Skip to content

Commit 4fcab66

Browse files
douliyangKAGA-KOKO
authored andcommitted
x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case
There are two consumers of apic=: apic_set_verbosity() for setting the APIC debug level; parse_apic() for registering APIC driver by hand. X86-32 supports both of them, but sometimes, kernel issues a weird warning. eg: when kernel was booted up with 'apic=bigsmp' in command line, early_param would warn like that: ... [ 0.000000] APIC Verbosity level bigsmp not recognised use apic=verbose or apic=debug [ 0.000000] Malformed early option 'apic' ... Wrap the warning code in CONFIG_X86_64 case to avoid this. Signed-off-by: Dou Liyang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent ac46112 commit 4fcab66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/apic/apic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,11 +2626,13 @@ static int __init apic_set_verbosity(char *arg)
26262626
apic_verbosity = APIC_DEBUG;
26272627
else if (strcmp("verbose", arg) == 0)
26282628
apic_verbosity = APIC_VERBOSE;
2629+
#ifdef CONFIG_X86_64
26292630
else {
26302631
pr_warning("APIC Verbosity level %s not recognised"
26312632
" use apic=verbose or apic=debug\n", arg);
26322633
return -EINVAL;
26332634
}
2635+
#endif
26342636

26352637
return 0;
26362638
}

0 commit comments

Comments
 (0)