Commit abc8babe authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'x86_misc_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc x86 updates from Borislav Petkov:
 "A variety of fixes which don't fit any other tip bucket:

   - Remove unnecessary function export

   - Correct asm constraint

   - Fix __setup handlers retval"

* tag 'x86_misc_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Cleanup the control_va_addr_alignment() __setup handler
  x86: Fix return value of __setup handlers
  x86/delay: Fix the wrong asm constraint in delay_loop()
  x86/amd_nb: Unexport amd_cache_northbridges()
parents 3e2cbc01 1ef64b1e
...@@ -438,7 +438,7 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs) ...@@ -438,7 +438,7 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
static __init int vdso_setup(char *s) static __init int vdso_setup(char *s)
{ {
vdso64_enabled = simple_strtoul(s, NULL, 0); vdso64_enabled = simple_strtoul(s, NULL, 0);
return 0; return 1;
} }
__setup("vdso=", vdso_setup); __setup("vdso=", vdso_setup);
......
...@@ -16,7 +16,6 @@ extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[]; ...@@ -16,7 +16,6 @@ extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
extern bool early_is_amd_nb(u32 value); extern bool early_is_amd_nb(u32 value);
extern struct resource *amd_get_mmconfig_range(struct resource *res); extern struct resource *amd_get_mmconfig_range(struct resource *res);
extern int amd_cache_northbridges(void);
extern void amd_flush_garts(void); extern void amd_flush_garts(void);
extern int amd_numa_init(void); extern int amd_numa_init(void);
extern int amd_get_subcaches(int); extern int amd_get_subcaches(int);
......
...@@ -188,7 +188,7 @@ int amd_smn_write(u16 node, u32 address, u32 value) ...@@ -188,7 +188,7 @@ int amd_smn_write(u16 node, u32 address, u32 value)
EXPORT_SYMBOL_GPL(amd_smn_write); EXPORT_SYMBOL_GPL(amd_smn_write);
int amd_cache_northbridges(void) static int amd_cache_northbridges(void)
{ {
const struct pci_device_id *misc_ids = amd_nb_misc_ids; const struct pci_device_id *misc_ids = amd_nb_misc_ids;
const struct pci_device_id *link_ids = amd_nb_link_ids; const struct pci_device_id *link_ids = amd_nb_link_ids;
...@@ -210,14 +210,14 @@ int amd_cache_northbridges(void) ...@@ -210,14 +210,14 @@ int amd_cache_northbridges(void)
} }
misc = NULL; misc = NULL;
while ((misc = next_northbridge(misc, misc_ids)) != NULL) while ((misc = next_northbridge(misc, misc_ids)))
misc_count++; misc_count++;
if (!misc_count) if (!misc_count)
return -ENODEV; return -ENODEV;
root = NULL; root = NULL;
while ((root = next_northbridge(root, root_ids)) != NULL) while ((root = next_northbridge(root, root_ids)))
root_count++; root_count++;
if (root_count) { if (root_count) {
...@@ -290,7 +290,6 @@ int amd_cache_northbridges(void) ...@@ -290,7 +290,6 @@ int amd_cache_northbridges(void)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(amd_cache_northbridges);
/* /*
* Ignores subdevice/subvendor but as far as I can figure out * Ignores subdevice/subvendor but as far as I can figure out
......
...@@ -170,7 +170,7 @@ static __init int setup_apicpmtimer(char *s) ...@@ -170,7 +170,7 @@ static __init int setup_apicpmtimer(char *s)
{ {
apic_calibrate_pmtmr = 1; apic_calibrate_pmtmr = 1;
notsc_setup(NULL); notsc_setup(NULL);
return 0; return 1;
} }
__setup("apicpmtimer", setup_apicpmtimer); __setup("apicpmtimer", setup_apicpmtimer);
#endif #endif
......
...@@ -94,7 +94,7 @@ static bool ring3mwait_disabled __read_mostly; ...@@ -94,7 +94,7 @@ static bool ring3mwait_disabled __read_mostly;
static int __init ring3mwait_disable(char *__unused) static int __init ring3mwait_disable(char *__unused)
{ {
ring3mwait_disabled = true; ring3mwait_disabled = true;
return 0; return 1;
} }
__setup("ring3mwait=disable", ring3mwait_disable); __setup("ring3mwait=disable", ring3mwait_disable);
......
...@@ -68,9 +68,6 @@ static int __init control_va_addr_alignment(char *str) ...@@ -68,9 +68,6 @@ static int __init control_va_addr_alignment(char *str)
if (*str == 0) if (*str == 0)
return 1; return 1;
if (*str == '=')
str++;
if (!strcmp(str, "32")) if (!strcmp(str, "32"))
va_align.flags = ALIGN_VA_32; va_align.flags = ALIGN_VA_32;
else if (!strcmp(str, "64")) else if (!strcmp(str, "64"))
...@@ -80,11 +77,11 @@ static int __init control_va_addr_alignment(char *str) ...@@ -80,11 +77,11 @@ static int __init control_va_addr_alignment(char *str)
else if (!strcmp(str, "on")) else if (!strcmp(str, "on"))
va_align.flags = ALIGN_VA_32 | ALIGN_VA_64; va_align.flags = ALIGN_VA_32 | ALIGN_VA_64;
else else
return 0; pr_warn("invalid option value: 'align_va_addr=%s'\n", str);
return 1; return 1;
} }
__setup("align_va_addr", control_va_addr_alignment); __setup("align_va_addr=", control_va_addr_alignment);
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags, unsigned long, prot, unsigned long, flags,
......
...@@ -54,8 +54,8 @@ static void delay_loop(u64 __loops) ...@@ -54,8 +54,8 @@ static void delay_loop(u64 __loops)
" jnz 2b \n" " jnz 2b \n"
"3: dec %0 \n" "3: dec %0 \n"
: /* we don't need output */ : "+a" (loops)
:"a" (loops) :
); );
} }
......
...@@ -101,7 +101,7 @@ int pat_debug_enable; ...@@ -101,7 +101,7 @@ int pat_debug_enable;
static int __init pat_debug_setup(char *str) static int __init pat_debug_setup(char *str)
{ {
pat_debug_enable = 1; pat_debug_enable = 1;
return 0; return 1;
} }
__setup("debugpat", pat_debug_setup); __setup("debugpat", pat_debug_setup);
......
...@@ -327,7 +327,7 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) ...@@ -327,7 +327,7 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
{ {
int i; int i;
if (amd_cache_northbridges() < 0) if (!amd_nb_num())
return -ENODEV; return -ENODEV;
if (!amd_nb_has_feature(AMD_NB_GART)) if (!amd_nb_has_feature(AMD_NB_GART))
......
...@@ -4336,7 +4336,7 @@ static int __init amd64_edac_init(void) ...@@ -4336,7 +4336,7 @@ static int __init amd64_edac_init(void)
if (!x86_match_cpu(amd64_cpuids)) if (!x86_match_cpu(amd64_cpuids))
return -ENODEV; return -ENODEV;
if (amd_cache_northbridges() < 0) if (!amd_nb_num())
return -ENODEV; return -ENODEV;
opstate_init(); opstate_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment