From 85784470efa2d5733e86679ba05d310ece81b20f Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Fri, 10 Sep 2021 12:44:05 -0600 Subject: x86/smp: Remove unnecessary assignment to local var freq_scale Coverity warns of an unused value in arch_scale_freq_tick(): CID 100778 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value 1024ULL to freq_scale here, but that stored value is overwritten before it can be used. It was introduced by commit: e2b0d619b400a ("x86, sched: check for counters overflow in frequency invariant accounting") Remove the variable initializer. Signed-off-by: Tim Gardner Signed-off-by: Borislav Petkov Reviewed-by: Giovanni Gherdovich Link: https://lkml.kernel.org/r/20210910184405.24422-1-tim.gardner@canonical.com --- arch/x86/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 85f6e242b6b4..c453b825a57f 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -2166,7 +2166,7 @@ DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE; void arch_scale_freq_tick(void) { - u64 freq_scale = SCHED_CAPACITY_SCALE; + u64 freq_scale; u64 aperf, mperf; u64 acnt, mcnt; -- cgit v1.2.3 From 3fd3590b53d1462ab534523e8d9ebdebd9b55f79 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 3 Aug 2021 13:35:26 +0200 Subject: x86/Kconfig: Remove references to obsolete Kconfig symbols Remove two symbols referenced in Kconfig which have been removed previously by: ef3c67b6454b ("mfd: intel_msic: Remove driver for deprecated platform") 1b79fc4f2bfd ("x86/apb_timer: Remove driver for deprecated platform") Detected by scripts/checkkconfigsymbols.py. [ bp: Merge into a single patch. ] Suggested-by: Randy Dunlap Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210803113531.30720-5-lukas.bulwahn@gmail.com --- arch/x86/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4e001bbbb425..b79e88ee6627 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -605,9 +605,7 @@ config X86_INTEL_MID depends on X86_IO_APIC select I2C select DW_APB_TIMER - select APB_TIMER select INTEL_SCU_PCI - select MFD_INTEL_MSIC help Select to build a kernel capable of supporting Intel MID (Mobile Internet Device) platform systems which do not have the PCI legacy -- cgit v1.2.3 From 6bf8a55d8344df1f61a29b18c398bcdf3539e163 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Tue, 5 Oct 2021 21:48:30 +0200 Subject: x86: Fix misspelled Kconfig symbols Fix misspelled Kconfig symbols as detected by scripts/checkkconfigsymbols.py. [ bp: Combine into a single patch. ] Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210803113531.30720-7-lukas.bulwahn@gmail.com --- arch/x86/include/asm/ia32.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/page_32.h | 2 +- arch/x86/include/asm/uaccess.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h index 2c5f7861d373..fada857f0a1e 100644 --- a/arch/x86/include/asm/ia32.h +++ b/arch/x86/include/asm/ia32.h @@ -68,6 +68,6 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm); #endif -#endif /* !CONFIG_IA32_SUPPORT */ +#endif /* CONFIG_IA32_EMULATION */ #endif /* _ASM_X86_IA32_H */ diff --git a/arch/x86/include/asm/irq_stack.h b/arch/x86/include/asm/irq_stack.h index 562854c60808..8912492a78f1 100644 --- a/arch/x86/include/asm/irq_stack.h +++ b/arch/x86/include/asm/irq_stack.h @@ -58,7 +58,7 @@ * the output constraints to make the compiler aware that R11 cannot be * reused after the asm() statement. * - * For builds with CONFIG_UNWIND_FRAME_POINTER ASM_CALL_CONSTRAINT is + * For builds with CONFIG_UNWINDER_FRAME_POINTER, ASM_CALL_CONSTRAINT is * required as well as this prevents certain creative GCC variants from * misplacing the ASM code. * diff --git a/arch/x86/include/asm/page_32.h b/arch/x86/include/asm/page_32.h index 94dbd51df58f..b13f8488ac85 100644 --- a/arch/x86/include/asm/page_32.h +++ b/arch/x86/include/asm/page_32.h @@ -43,7 +43,7 @@ static inline void copy_page(void *to, void *from) { memcpy(to, from, PAGE_SIZE); } -#endif /* CONFIG_X86_3DNOW */ +#endif /* CONFIG_X86_USE_3DNOW */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_PAGE_32_H */ diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index c9fa7be3df82..e7fc2c515e08 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -411,7 +411,7 @@ do { \ : [umem] "m" (__m(addr)), \ [efault] "i" (-EFAULT), "0" (err)) -#endif // CONFIG_CC_ASM_GOTO_OUTPUT +#endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT /* FIXME: this hack is definitely wrong -AK */ struct __large_struct { unsigned long buf[100]; }; -- cgit v1.2.3 From f2739ca15c414ebad88f4333e3186fd4144c1753 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 22 Oct 2021 11:46:42 -0500 Subject: x86/of: Kill unused early_init_dt_scan_chosen_arch() There are no callers for early_init_dt_scan_chosen_arch(), so remove it. Signed-off-by: Rob Herring Signed-off-by: Borislav Petkov Reviewed-by: Frank Rowand Link: https://lkml.kernel.org/r/20211022164642.2815706-1-robh@kernel.org --- arch/x86/kernel/devicetree.c | 5 ----- include/linux/of_fdt.h | 1 - 2 files changed, 6 deletions(-) diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 6a4cb71c2498..78b2311b3b8b 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -31,11 +31,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE]; int __initdata of_ioapic; -void __init early_init_dt_scan_chosen_arch(unsigned long node) -{ - BUG(); -} - void __init early_init_dt_add_memory_arch(u64 base, u64 size) { BUG(); diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index cf6a65b94d40..cf48983d3c86 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -65,7 +65,6 @@ extern int early_init_dt_scan_memory(unsigned long node, const char *uname, extern int early_init_dt_scan_chosen_stdout(void); extern void early_init_fdt_scan_reserved_mem(void); extern void early_init_fdt_reserve_self(void); -extern void __init early_init_dt_scan_chosen_arch(unsigned long node); extern void early_init_dt_add_memory_arch(u64 base, u64 size); extern u64 dt_mem_next_cell(int s, const __be32 **cellp); -- cgit v1.2.3 From a757ac555ce1dafca848aa090b66cd04b5ce40e7 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Thu, 28 Oct 2021 14:10:21 +0200 Subject: x86/Makefile: Remove unneeded whitespaces before tabs Align the FDINITRD line to the FDARGS one with tabs. [ bp: Commit message. ] Signed-off-by: Elyes HAOUAS Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20211028121021.10384-1-ehaouas@noos.fr --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 7488cfbbd2f6..aab70413ae7a 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -299,7 +299,7 @@ define archhelp echo ' isoimage - Create a boot CD-ROM image (arch/x86/boot/image.iso)' echo ' bzdisk/fdimage*/hdimage/isoimage also accept:' echo ' FDARGS="..." arguments for the booted kernel' - echo ' FDINITRD=file initrd for the booted kernel' + echo ' FDINITRD=file initrd for the booted kernel' echo '' echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest' echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest' -- cgit v1.2.3