forked from Minki/linux
- fix jump label branch range check
- check kmalloc failures in Loongson64 kexec - fix builds with clang-14 - fix char/int handling in pic32 -----BEGIN PGP SIGNATURE----- iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmNw8WkaHHRzYm9nZW5k QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHCdPQ//a3bRPpetxO3Feg4ETBxd bsk4Zu9YEwwXzghBRAV09iAwuI/0sw79g8I49zAW1yOO5L0Y8UJGybpoxdhXEwhB yX5yWrh+oM4ktwX5uJGD0r+q1GH4bqM245L08g0Ry3u19aux9LdhH3rMC4XZOb+Q L6op6TALI+zv6O4+7RTY/kKxOds/So6D3ZuZUoy3DF0EYj8ij4eXQ8w/HNz/wYqo tmgoYM6JT+E6jDRGFoMtj4bUnC1tt3aTBMYSiHw+fMTRFn7p/pWnMBMbsfN8WY4Q qUTPTZj28s0azgWqar5yoGbVYqnDKEzTuSMxIScNlyf2jmOecC1WcEJIxqEOmRui fPrBNffeR88bG1qofUeBE9ctoOqf20pcCUQrFYdCA51R6dDa1Pamn3gwql2Df6/Y 7AUSUSl/1mWQv4vt1+QQ87Jwi9nteJ7LomPspKBTRFE6okLa0XVVSViCDqrwS0lj QgGdkgzSHn2wDd4+tc5NNDMhjW4df/u52+MH62J8S4CnextNtfMKacPuwidARABn acT1oVkInUM5bBvEEuaK++tuFDixfse0eQSnUlq7FoIIjm0nKDUIYEWgClzFdJRT i5ErRIFPTcJd2UUM1d8dQ9F8A/5q54UBHvDiTtD3Fet2+YqaFww+6FYid8qXWYkg mW+DHzZaxyPrd8cV2v4Ka1M= =OtmI -----END PGP SIGNATURE----- Merge tag 'mips-fixes_6.1_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix jump label branch range check - check kmalloc failures in Loongson64 kexec - fix builds with clang-14 - fix char/int handling in pic32 * tag 'mips-fixes_6.1_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: pic32: treat port as signed integer MIPS: jump_label: Fix compat branch range check mips: alchemy: gpio: Include the right header MIPS: Loongson64: Add WARN_ON on kexec related kmalloc failed MIPS: fix duplicate definitions for exported symbols mips: boot/compressed: use __NO_FORTIFY
This commit is contained in:
commit
af7a056891
@ -31,7 +31,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <asm/mach-au1x00/gpio-au1000.h>
|
||||
#include <asm/mach-au1x00/gpio-au1300.h>
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#define DISABLE_BRANCH_PROFILING
|
||||
|
||||
#define __NO_FORTIFY
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
|
@ -26,6 +26,6 @@ extern char *fw_getcmdline(void);
|
||||
extern void fw_meminit(void);
|
||||
extern char *fw_getenv(char *name);
|
||||
extern unsigned long fw_getenvl(char *name);
|
||||
extern void fw_init_early_console(char port);
|
||||
extern void fw_init_early_console(void);
|
||||
|
||||
#endif /* __ASM_FW_H_ */
|
||||
|
@ -56,7 +56,7 @@ void arch_jump_label_transform(struct jump_entry *e,
|
||||
* The branch offset must fit in the instruction's 26
|
||||
* bit field.
|
||||
*/
|
||||
WARN_ON((offset >= BIT(25)) ||
|
||||
WARN_ON((offset >= (long)BIT(25)) ||
|
||||
(offset < -(long)BIT(25)));
|
||||
|
||||
insn.j_format.opcode = bc6_op;
|
||||
|
@ -145,7 +145,6 @@ LEAF(kexec_smp_wait)
|
||||
* kexec_args[0..3] are used to prepare register values.
|
||||
*/
|
||||
|
||||
kexec_args:
|
||||
EXPORT(kexec_args)
|
||||
arg0: PTR_WD 0x0
|
||||
arg1: PTR_WD 0x0
|
||||
@ -159,7 +158,6 @@ arg3: PTR_WD 0x0
|
||||
* their registers a0-a3. secondary_kexec_args[0..3] are used
|
||||
* to prepare register values.
|
||||
*/
|
||||
secondary_kexec_args:
|
||||
EXPORT(secondary_kexec_args)
|
||||
s_arg0: PTR_WD 0x0
|
||||
s_arg1: PTR_WD 0x0
|
||||
@ -171,19 +169,16 @@ kexec_flag:
|
||||
|
||||
#endif
|
||||
|
||||
kexec_start_address:
|
||||
EXPORT(kexec_start_address)
|
||||
PTR_WD 0x0
|
||||
.size kexec_start_address, PTRSIZE
|
||||
|
||||
kexec_indirection_page:
|
||||
EXPORT(kexec_indirection_page)
|
||||
PTR_WD 0
|
||||
.size kexec_indirection_page, PTRSIZE
|
||||
|
||||
relocate_new_kernel_end:
|
||||
|
||||
relocate_new_kernel_size:
|
||||
EXPORT(relocate_new_kernel_size)
|
||||
PTR_WD relocate_new_kernel_end - relocate_new_kernel
|
||||
.size relocate_new_kernel_size, PTRSIZE
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/idle.h>
|
||||
#include <asm/reboot.h>
|
||||
#include <asm/bug.h>
|
||||
|
||||
#include <loongson.h>
|
||||
#include <boot_param.h>
|
||||
@ -159,8 +160,17 @@ static int __init mips_reboot_setup(void)
|
||||
|
||||
#ifdef CONFIG_KEXEC
|
||||
kexec_argv = kmalloc(KEXEC_ARGV_SIZE, GFP_KERNEL);
|
||||
if (WARN_ON(!kexec_argv))
|
||||
return -ENOMEM;
|
||||
|
||||
kdump_argv = kmalloc(KEXEC_ARGV_SIZE, GFP_KERNEL);
|
||||
if (WARN_ON(!kdump_argv))
|
||||
return -ENOMEM;
|
||||
|
||||
kexec_envp = kmalloc(KEXEC_ENVP_SIZE, GFP_KERNEL);
|
||||
if (WARN_ON(!kexec_envp))
|
||||
return -ENOMEM;
|
||||
|
||||
fw_arg1 = KEXEC_ARGV_ADDR;
|
||||
memcpy(kexec_envp, (void *)fw_arg2, KEXEC_ENVP_SIZE);
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define U_BRG(x) (UART_BASE(x) + 0x40)
|
||||
|
||||
static void __iomem *uart_base;
|
||||
static char console_port = -1;
|
||||
static int console_port = -1;
|
||||
|
||||
static int __init configure_uart_pins(int port)
|
||||
{
|
||||
@ -47,7 +47,7 @@ static int __init configure_uart_pins(int port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __init configure_uart(char port, int baud)
|
||||
static void __init configure_uart(int port, int baud)
|
||||
{
|
||||
u32 pbclk;
|
||||
|
||||
@ -60,7 +60,7 @@ static void __init configure_uart(char port, int baud)
|
||||
uart_base + PIC32_SET(U_STA(port)));
|
||||
}
|
||||
|
||||
static void __init setup_early_console(char port, int baud)
|
||||
static void __init setup_early_console(int port, int baud)
|
||||
{
|
||||
if (configure_uart_pins(port))
|
||||
return;
|
||||
@ -130,15 +130,14 @@ _out:
|
||||
return baud;
|
||||
}
|
||||
|
||||
void __init fw_init_early_console(char port)
|
||||
void __init fw_init_early_console(void)
|
||||
{
|
||||
char *arch_cmdline = pic32_getcmdline();
|
||||
int baud = -1;
|
||||
int baud, port;
|
||||
|
||||
uart_base = ioremap(PIC32_BASE_UART, 0xc00);
|
||||
|
||||
baud = get_baud_from_cmdline(arch_cmdline);
|
||||
if (port == -1)
|
||||
port = get_port_from_cmdline(arch_cmdline);
|
||||
|
||||
if (port == -1)
|
||||
|
@ -47,7 +47,7 @@ void __init plat_mem_setup(void)
|
||||
strscpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
|
||||
|
||||
#ifdef CONFIG_EARLY_PRINTK
|
||||
fw_init_early_console(-1);
|
||||
fw_init_early_console();
|
||||
#endif
|
||||
pic32_config_init();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user