Skip to content

Commit abc8bab

Browse files
committed
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()
2 parents 3e2cbc0 + 1ef64b1 commit abc8bab

File tree

10 files changed

+13
-18
lines changed

10 files changed

+13
-18
lines changed

arch/x86/entry/vdso/vma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
438438
static __init int vdso_setup(char *s)
439439
{
440440
vdso64_enabled = simple_strtoul(s, NULL, 0);
441-
return 0;
441+
return 1;
442442
}
443443
__setup("vdso=", vdso_setup);
444444

arch/x86/include/asm/amd_nb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
1616

1717
extern bool early_is_amd_nb(u32 value);
1818
extern struct resource *amd_get_mmconfig_range(struct resource *res);
19-
extern int amd_cache_northbridges(void);
2019
extern void amd_flush_garts(void);
2120
extern int amd_numa_init(void);
2221
extern int amd_get_subcaches(int);

arch/x86/kernel/amd_nb.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int amd_smn_write(u16 node, u32 address, u32 value)
188188
EXPORT_SYMBOL_GPL(amd_smn_write);
189189

190190

191-
int amd_cache_northbridges(void)
191+
static int amd_cache_northbridges(void)
192192
{
193193
const struct pci_device_id *misc_ids = amd_nb_misc_ids;
194194
const struct pci_device_id *link_ids = amd_nb_link_ids;
@@ -210,14 +210,14 @@ int amd_cache_northbridges(void)
210210
}
211211

212212
misc = NULL;
213-
while ((misc = next_northbridge(misc, misc_ids)) != NULL)
213+
while ((misc = next_northbridge(misc, misc_ids)))
214214
misc_count++;
215215

216216
if (!misc_count)
217217
return -ENODEV;
218218

219219
root = NULL;
220-
while ((root = next_northbridge(root, root_ids)) != NULL)
220+
while ((root = next_northbridge(root, root_ids)))
221221
root_count++;
222222

223223
if (root_count) {
@@ -290,7 +290,6 @@ int amd_cache_northbridges(void)
290290

291291
return 0;
292292
}
293-
EXPORT_SYMBOL_GPL(amd_cache_northbridges);
294293

295294
/*
296295
* Ignores subdevice/subvendor but as far as I can figure out

arch/x86/kernel/apic/apic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static __init int setup_apicpmtimer(char *s)
170170
{
171171
apic_calibrate_pmtmr = 1;
172172
notsc_setup(NULL);
173-
return 0;
173+
return 1;
174174
}
175175
__setup("apicpmtimer", setup_apicpmtimer);
176176
#endif

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static bool ring3mwait_disabled __read_mostly;
9494
static int __init ring3mwait_disable(char *__unused)
9595
{
9696
ring3mwait_disabled = true;
97-
return 0;
97+
return 1;
9898
}
9999
__setup("ring3mwait=disable", ring3mwait_disable);
100100

arch/x86/kernel/sys_x86_64.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ static int __init control_va_addr_alignment(char *str)
6868
if (*str == 0)
6969
return 1;
7070

71-
if (*str == '=')
72-
str++;
73-
7471
if (!strcmp(str, "32"))
7572
va_align.flags = ALIGN_VA_32;
7673
else if (!strcmp(str, "64"))
@@ -80,11 +77,11 @@ static int __init control_va_addr_alignment(char *str)
8077
else if (!strcmp(str, "on"))
8178
va_align.flags = ALIGN_VA_32 | ALIGN_VA_64;
8279
else
83-
return 0;
80+
pr_warn("invalid option value: 'align_va_addr=%s'\n", str);
8481

8582
return 1;
8683
}
87-
__setup("align_va_addr", control_va_addr_alignment);
84+
__setup("align_va_addr=", control_va_addr_alignment);
8885

8986
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
9087
unsigned long, prot, unsigned long, flags,

arch/x86/lib/delay.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ static void delay_loop(u64 __loops)
5454
" jnz 2b \n"
5555
"3: dec %0 \n"
5656

57-
: /* we don't need output */
58-
:"a" (loops)
57+
: "+a" (loops)
58+
:
5959
);
6060
}
6161

arch/x86/mm/pat/memtype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int pat_debug_enable;
101101
static int __init pat_debug_setup(char *str)
102102
{
103103
pat_debug_enable = 1;
104-
return 0;
104+
return 1;
105105
}
106106
__setup("debugpat", pat_debug_setup);
107107

drivers/char/agp/amd64-agp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
327327
{
328328
int i;
329329

330-
if (amd_cache_northbridges() < 0)
330+
if (!amd_nb_num())
331331
return -ENODEV;
332332

333333
if (!amd_nb_has_feature(AMD_NB_GART))

drivers/edac/amd64_edac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4336,7 +4336,7 @@ static int __init amd64_edac_init(void)
43364336
if (!x86_match_cpu(amd64_cpuids))
43374337
return -ENODEV;
43384338

4339-
if (amd_cache_northbridges() < 0)
4339+
if (!amd_nb_num())
43404340
return -ENODEV;
43414341

43424342
opstate_init();

0 commit comments

Comments
 (0)