id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0723a69a63beec1ca6e792239ef75d0181387ef0
Analyze and fix the following issue in the Linux kernel code: x86: fix synchronize_rcu(): high latency on idle system
Problem Details: an otherwise idle system takes about 3 ticks per network interface in unregister_netdev() due to multiple calls to synchronize_rcu(), which adds up to quite a few seconds for tearing down thousands of interfaces. By flushing pending rcu callbacks in the idle loop, the system makes progress hundreds of...
```diff diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 7a61b54649de..69a69c3f43bb 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -198,6 +198,9 @@ void cpu_idle(void) rmb(); idle = pm_idle; + if (rcu_pending(cpu)) + rcu_check_callbacks(cpu, ...
e8c10ef9dde3ab7b7d7db6804859d9daf38f01c4
Analyze and fix the following issue in the Linux kernel code: x86: change bios_cpu_apicid to percpu data variable
Problem Details: Change static bios_cpu_apicid array to a per_cpu data variable. This includes using a static array used during initialization similar to the way x86_cpu_to_apicid[] is handled. There is one early use of bios_cpu_apicid in apic_is_clustered_box(). The other reference in cpu_present_to_apicid() is calle...
```diff diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 01d4ca27ecf0..f9919c492699 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c @@ -1180,14 +1180,26 @@ __cpuinit int apic_is_clustered_box(void) bitmap_zero(clustermap, NUM_APIC_CLUSTERS); for (i = 0; i < NR_CPUS; ...
9718769d298f8642d5ef41eb5f55669d7c5b9fd6
Analyze and fix the following issue in the Linux kernel code: x86: fix ioport unification on 32-bit
Problem Details: ioport unification was broken for 32-bit; it was missing the acutal pushf/popf EFLAGS manipulation (set_iopl_mask()). Also, use of volatile looks like leftover cruft. Cc: mboton@gmail.com Cc: Kevin Winchester <kjwinchester@gmail.com> Cc: Zach Brown <zach.brown@oracle.com> Cc: "H. Peter Anvin" <hpa@zyt...
```diff diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index e723ff3b1d53..be72d809bce7 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c @@ -116,9 +116,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) #ifdef CONFIG_X86_32 asmlinkage long sys_io...
aaf230424204864e2833dcc1da23e2cb0b9f39cd
Analyze and fix the following issue in the Linux kernel code: x86: disable the GART early, 64-bit
Problem Details: For K8 system: 4G RAM with memory hole remapping enabled, or more than 4G RAM installed. when try to use kexec second kernel, and the first doesn't include gart_shutdown. the second kernel could have different aper position than the first kernel. and second kernel could use that hole as RAM that is st...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 40db7dd1d92a..860a90875491 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -660,6 +660,10 @@ and is between 256 and 4096 characters. It is defined in the file gamma= [H...
0d64484f7ea12ca04211b497e94634c3d27cf3fb
Analyze and fix the following issue in the Linux kernel code: x86: fix DMI ioremap leak
Problem Details: Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 0b24a1141009..5f9d0bc839ba 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -349,6 +349,7 @@ void __init dmi_scan_machine(void) rc = dmi_present(q); if (!rc) { dmi_available = 1; + dmi_iounm...
a25bd94964e87b1b93903a822fba5025d995d4da
Analyze and fix the following issue in the Linux kernel code: x86: add the "print code before the trapping instruction" feature to 64 bit
Problem Details: The 32 bit x86 tree has a very useful feature that prints the Code: line for the code even before the trapping instrution (and the start of the trapping instruction is then denoted with a <>). Unfortunately, the 64 bit x86 tree does not yet have this feature, making diagnosing backtraces harder than ne...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e7910f8b4fcc..40db7dd1d92a 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -416,8 +416,8 @@ and is between 256 and 4096 characters. It is defined in the file [SPARC64] t...
6dab27784b2a97823b522e1cb88e40be40a93d45
Analyze and fix the following issue in the Linux kernel code: x86: add a simple backtrace test module
Problem Details: During the work on the x86 32 and 64 bit backtrace code I found it useful to have a simple test module to test a process and irq context backtrace. Since the existing backtrace code was buggy, I figure it might be useful to have such a test module in the kernel so that maybe we can even detect such bug...
```diff diff --git a/kernel/Makefile b/kernel/Makefile index 62015c3d8d91..8885627ea021 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o obj-$(CONFIG_PM) += power/ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o obj-$(CONFIG_KEXEC) += kexec.o +obj-$(CONFIG_BACKTRACE_...
3d1f7cae883ce4aac99c661562111a25d52effe0
Analyze and fix the following issue in the Linux kernel code: x86: fix 32-bit FRAME_POINTER chasing code
Problem Details: The current x86 32 bit FRAME_POINTER chasing code has a nasty bug in that the EBP tracer doesn't actually update the value of EBP it is tracing, so that the code doesn't actually switch to the irq stack properly. The result is a truncated backtrace: WARNING: at timeroops.c:8 kerneloops_regression_te...
```diff diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 83df0f37ba75..acc9af260fac 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -125,7 +125,8 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo, unsigned long addr; addr = frame->...
d504e39efd4e64a1a6e01dc85fd8a33fdb196dce
Analyze and fix the following issue in the Linux kernel code: x86: discover_ebda section mismatch
Problem Details: Fix section mismatches. discover_ebda() can be __init. WARNING: vmlinux.o(.text+0x738a): Section mismatch: reference to .init.data:ebda_addr (between 'discover_ebda' and 'get_model_name') WARNING: vmlinux.o(.text+0x73c4): Section mismatch: reference to .init.data:ebda_size (between 'discover_ebda' an...
```diff diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index a7124bfb8578..07547febac7a 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c @@ -248,7 +248,7 @@ static inline void __init reserve_crashkernel(void) unsigned __initdata ebda_addr; unsigned __initdata ebda_size; ...
387faedb1dee2e917811acd05902cc36142a4850
Analyze and fix the following issue in the Linux kernel code: x86 setup: correct the base in the GDT_ENTRY() macro
Problem Details: The GDT_ENTRY() macro in pm.c would incorrectly cut the bottom 8 bits off the base. We didn't define any bases with the bottom 8 bits nonzero, so it is a non-manifest bug, but it's still a bug. Pointed out by John Smith <johnsmith9344@gmail.com>. Cc: John Smith <johnsmith9344@gmail.com> Signed-off-by...
```diff diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c index b23cbdc7d547..1a0f936c160b 100644 --- a/arch/x86/boot/pm.c +++ b/arch/x86/boot/pm.c @@ -104,7 +104,7 @@ static void reset_coprocessor(void) (((u64)(base & 0xff000000) << 32) | \ ((u64)flags << 40) | \ ((u64)(limit & 0x00ff0000) << 32) | \ - (...
70d8abf5df857ca7befe02e5d61fde807420a54c
Analyze and fix the following issue in the Linux kernel code: x86 setup: add missing prototype; formatting fix
Problem Details: Add prototype for cmdline_find_option_bool() missing from: x86 setup: early cmdline parser handle boolean options Also, fix up a minor formatting error in that patch. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@lin...
```diff diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index 8ec575249aa9..7822a4983da2 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -241,6 +241,7 @@ int query_apm_bios(void); /* cmdline.c */ int cmdline_find_option(const char *option, char *buffer, int bufsize); +int cmdline_find_optio...
811a0fff5d6e80e18e06be88e0fb685f3924bf8f
Analyze and fix the following issue in the Linux kernel code: x86 setup: fix constraints in segment accessor functions
Problem Details: Fix the operand constraints for the segment accessor functions, {rd,wr}{fs,gs}*. In particular, the 8-bit functions used "r" constraints instead of "q" constraints. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix...
```diff diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index d2b5adf46512..8ec575249aa9 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -109,7 +109,7 @@ typedef unsigned int addr_t; static inline u8 rdfs8(addr_t addr) { u8 v; - asm volatile("movb %%fs:%1,%0" : "=r" (v) : "m" (*(u8 *)addr))...
d50efc6c40620b2e11648cac64ebf4a824e40382
Analyze and fix the following issue in the Linux kernel code: x86: fix UML and -regparm=3
Problem Details: introduce the "asmregparm" calling convention: for functions implemented in assembly with a fixed regparm input parameters calling convention. mark the semaphore and rwsem slowpath functions with that. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-...
```diff diff --git a/include/asm-x86/linkage.h b/include/asm-x86/linkage.h index 5a4c95905420..31739c7d66a9 100644 --- a/include/asm-x86/linkage.h +++ b/include/asm-x86/linkage.h @@ -9,6 +9,11 @@ #ifdef CONFIG_X86_32 #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) #define prevent_tail_call(ret) __asm__...
938f667198179dc0c8424e2cfac9cd9fe405bee3
Analyze and fix the following issue in the Linux kernel code: x86: coding style fixes in arch/x86/pci/fixup.c
Problem Details: Simple coding style fixes. no code changed: text data bss dec hex filename 3139 576 194 3909 f45 fixup.o.before 3139 576 194 3909 f45 fixup.o.after md5: 9a3467057478b2d99962bdd448282eeb fixup.o.before.asm 9a3467057478b2d99962bdd448282eeb...
```diff diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 6cff66dd0c91..cb63007e20b2 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -19,7 +19,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) printk(KERN_WARNING "PCI: Searching for i450NX host bridges on %s\n", pci_name(d)...
015c8dd0cb3b380cb4c3930968250c719d1dd303
Analyze and fix the following issue in the Linux kernel code: xen: mask out PWT too
Problem Details: The hypervisor doesn't allow PCD or PWT to be set on guest ptes, so make sure they're masked out. Also, fix up some previous mispatching. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 52f392893008..3e9e095c295c 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -291,7 +291,7 @@ pte_t xen_make_pte(unsigned long pte) if (pte & _PAGE_PRESENT) pte = phys_to_machine(XPADDR(pte)).maddr; - pte &= ~_PAGE_PCD; + pte &= ~(_PAGE...
4891645e764d2e181b834509a689fcd12e890c10
Analyze and fix the following issue in the Linux kernel code: x86: unify paravirt pagetable accessors
Problem Details: Put all the defines for mapping pagetable operations to their native versions (for the non-paravirt case) into one place. Make the corresponding changes to paravirt.h. The tricky part here is that when a pagetable entry can't be updated atomically (ie, 32-bit PAE), we need special handlers for pte_cl...
```diff diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 24385decbd47..4aa06b929e48 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h @@ -1039,6 +1039,27 @@ static inline void set_pmd(pmd_t *pmdp, pmd_t pmdval) { PVOP_VCALL2(pv_mmu_ops.set_pmd, pmdp, pmdval.pud.pgd.pg...
d8d89827fc0c9c2ea6ac4c22e14e30586a856f58
Analyze and fix the following issue in the Linux kernel code: x86: fix warning
Problem Details: &ptep->pte isn't always an unsigned long *, so cast it to avoid a warning. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 62fa856c2491..820db41dbe4c 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h @@ -275,7 +275,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long #define __HAVE_ARCH_PTEP_SET_WRPROTECT ...
e33287013585e96180c575288bf1db22bee47b52
Analyze and fix the following issue in the Linux kernel code: x86/vmi: fix compilation as a result of pte_t changes
Problem Details: Fix various compilation problems as a result of changing pte_t. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Zachary Amsden <zach@vmware.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 10c46419d35d..2ee5d8e0ada5 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c @@ -475,7 +475,7 @@ static void vmi_set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep static void vmi_set_pmd(pmd_t *pmdp, pmd_t ...
b7fff536d0ad45c4810f9b99845c707ceadc3afc
Analyze and fix the following issue in the Linux kernel code: x86: fix pte_modify() bug
Problem Details: fix sign extension bug in PTE_MASK / _PTE_CHG_MASK. this resolves the following bootup crash on PAE systems: [ 94.710726] init[1]: segfault at 00000004 ip 49471cbb sp bff0c6c0 error 4 [ 94.717764] init[1]: segfault at 00000004 ip 49471cbb sp bff0c6c0 error 4 [ 94.724772] init[1]: segfault at 00...
```diff diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index 3a00d0d9dfd3..91920565a575 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h @@ -11,7 +11,7 @@ #ifdef __KERNEL__ #define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK) -#define PTE_MASK PHYSICAL_PAGE_MASK +#define PTE_MASK ...
c3bcfb57e1e64b9b2f8b2d90564826637e21c5ea
Analyze and fix the following issue in the Linux kernel code: x86: mask NX from pte_pfn
Problem Details: In 32-bit PAE, mask NX from pte_pfn, since it isn't part of the PFN. This code is due for unification anyway, but this fixes a latent bug. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 948a33414118..9816346f7df6 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h @@ -155,7 +155,7 @@ static inline int pte_none(pte_t pte) static inline unsigned long pte_pfn(pte_t pte) { - ...
61f38226def55d972cfd0e789971e952525ff8e5
Analyze and fix the following issue in the Linux kernel code: x86/pgtable: fix constant sign extension problem
Problem Details: based on: Subject: x86/pgtable: fix constant sign extension problem From: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 5b858f0285a8..73e2b47c055e 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h @@ -19,18 +19,18 @@ #define _PAGE_BIT_UNUSED3 11 #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ -...
6c3866558213ff706d8331053386915371ad63ec
Analyze and fix the following issue in the Linux kernel code: x86: move all asm/pgtable constants into one place
Problem Details: 32 and 64-bit use the same flags for pagetable entries, so make them all common. [ mingo@elte.hu: fixes ] Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 1039140652af..5b858f0285a8 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h @@ -1,5 +1,124 @@ +#ifndef _ASM_X86_PGTABLE_H +#define _ASM_X86_PGTABLE_H + +#define USER_PTRS_PER_PGD ((TASK_SIZE-1)/PGDIR_SIZE+1) +#define ...
7375931a27bbe687e03ae3c28178920b0c66a87d
Analyze and fix the following issue in the Linux kernel code: x86: coding style fixes in arch/x86/ia32/audit.c
Problem Details: Fix one error reported by checkpatch, it now reports: total: 0 errors, 0 warnings, 42 lines checked Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/ia32/audit.c b/arch/x86/ia32/audit.c index 91b7b5922dfa..5d7b381da692 100644 --- a/arch/x86/ia32/audit.c +++ b/arch/x86/ia32/audit.c @@ -27,7 +27,7 @@ unsigned ia32_signal_class[] = { int ia32_classify_syscall(unsigned syscall) { - switch(syscall) { + switch (syscall) { case __NR_ope...
8c1c9356429741a82ff176d0f3400fb9e06b2a30
Analyze and fix the following issue in the Linux kernel code: x86: kprobes: add kprobes smoke tests that run on boot
Problem Details: Here is a quick and naive smoke test for kprobes. This is intended to just verify if some unrelated change broke the *probes subsystem. It is self contained, architecture agnostic and isn't of any great use by itself. This needs to be built in the kernel and runs a basic set of tests to verify if kpro...
```diff diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 81891581e89b..6168c0a44172 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -182,6 +182,15 @@ static inline void kretprobe_assert(struct kretprobe_instance *ri, } } +#ifdef CONFIG_KPROBES_SANITY_TEST +extern int init_...
acdac87202a408133ee8f7985076de9d2e0dc5ab
Analyze and fix the following issue in the Linux kernel code: percpu: make the asm-generic/percpu.h more "generic"
Problem Details: - add support for PER_CPU_ATTRIBUTES - fix generic smp percpu_modcopy to use per_cpu_offset() macro. Add the ability to use generic/percpu even if the arch needs to override several aspects of its operations. This will enable the use of generic percpu.h for all arches. An arch may define: __per_cpu...
```diff diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index 196287928bae..e699eb6c44be 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c @@ -947,7 +947,7 @@ percpu_modcopy (void *pcpudst, const void *src, unsigned long size) { unsigned int i; for_each_possible_cpu(i) { - ...
4d022e35fd7e07c522c7863fee6f07e53cf3fc14
Analyze and fix the following issue in the Linux kernel code: x86: reboot_{32|64}.c unification
Problem Details: reboot_{32|64}.c unification patch. This patch unifies the code from the reboot_32.c and reboot_64.c files. It has been tested in computers with X86_32 and X86_64 kernels and it looks like all reboot modes work fine (EFI restart system hasn't been tested yet). Probably I made some mistakes (like I u...
```diff diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 0903bbf0ca4d..b40bed4baa77 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -30,8 +30,8 @@ obj-y += step.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += cpu/ obj-y += acpi/ -obj-$(CONFIG_X86_BIOS_REBOOT...
71c339116a216b181fc5e203ef51a033fe5e38cf
Analyze and fix the following issue in the Linux kernel code: debug: add the end-of-trace marker and the module list to
Problem Details: Unlike oopses, WARN_ON() currently does't print the loaded modules list. This makes it harder to take action on certain bug reports. For example, recently there were a set of WARN_ON()s reported in the mac80211 stack, which were just signalling a driver bug. It takes then anther round trip to the bug r...
```diff diff --git a/kernel/panic.c b/kernel/panic.c index 0ebea438278a..d9e90cfe3298 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -281,6 +281,13 @@ static int init_oops_id(void) } late_initcall(init_oops_id); +static void print_oops_end_marker(void) +{ + init_oops_id(); + printk(KERN_WARNING "---[ end trace...
79b4cc5ee7a8086ac2c9c0afa52e6d687ce1ffef
Analyze and fix the following issue in the Linux kernel code: debug: move WARN_ON() out of line
Problem Details: A quick grep shows that there are currently 1145 instances of WARN_ON in the kernel. Currently, WARN_ON is pretty much entirely inlined, which makes it hard to enhance it without growing the size of the kernel (and getting Andrew unhappy). This patch build on top of Olof's patch that introduces __WARN...
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 1a0e1a7684bd..2632328d8646 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -32,11 +32,11 @@ struct bug_entry { #endif #ifndef __WARN -#define __WARN() do { \ - printk("WARNING: at %s:%d %s()\n", __FILE__...
3a6a62f96f168d192fb0cc9c0b5ee2584740b32d
Analyze and fix the following issue in the Linux kernel code: debug: introduce __WARN()
Problem Details: Introduce __WARN() in the generic case, so the generic WARN_ON() can use arch-specific code for when the condition is true. Signed-off-by: Olof Johansson <olof@lixom.net> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu...
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index d56fedbb457a..1a0e1a7684bd 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -31,14 +31,19 @@ struct bug_entry { #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0) #endif -#ifndef HAVE_ARC...
a6b68076fd5d7de04e6847ed9d7d212e7dd6beb5
Analyze and fix the following issue in the Linux kernel code: x86: compile apm and voyager module only when selected in Kconfig
Problem Details: Previously the complete files were #ifdef'ed, but now handle that in the Makefile. May save a minor bit of compilation time. [ Stephen Rothwell <sfr@canb.auug.org.au>: build dependency fix ] Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixn...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5271665a22e0..1de28e850aa4 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1199,6 +1199,11 @@ source "kernel/power/Kconfig" source "drivers/acpi/Kconfig" +config X86_APM_BOOT + bool + default y + depends on APM || APM_MODULE + menuconfig APM ...
96d97cf03b3d68e6c857623da93acd522b2b7e1a
Analyze and fix the following issue in the Linux kernel code: x86: add /proc/irq/*/spurious to dump the spurious irq debugging state
Problem Details: This is useful to debug problems with interrupt handlers that return sometimes IRQ_NONE. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 50b81b98046a..c2f2ccb0549a 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -75,6 +75,18 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer, #endif +static int irq_spurious_read(char *page, char **start, off_t...
9e094c17ee2b85130ab7b2ea37456f6867eb687a
Analyze and fix the following issue in the Linux kernel code: genirq: turn irq debugging options into module params
Problem Details: This allows to change them at runtime using sysfs. No need to reboot to set them. I only added aliases (kernel.noirqdebug etc.) so the old options still work. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 32b161972fad..a6b2bc831dd0 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -10,6 +10,7 @@ #include <linux/module.h> #include <linux/kallsyms.h> #include <linux/interrupt.h> +#include <linux/moduleparam.h> static int irqfixu...
b899c5ed2ef3af3429abd8046197255f179ea496
Analyze and fix the following issue in the Linux kernel code: x86/efi: fix improper use of lvalue
Problem Details: # HG changeset patch # User Jeremy Fitzhardinge <jeremy@xensource.com> # Date 1199391030 28800 # Node ID 5d35c92fdf0e2c52edbb6fc4ccd06c7f65f25009 # Parent 22f6a5902285b58bfc1fbbd9e183498c9017bd78 x86/efi: fix improper use of lvalue pgd_val is no longer valid as an lvalue, so don't try to assign to it...
```diff diff --git a/arch/x86/kernel/efi_64.c b/arch/x86/kernel/efi_64.c index 269de2e049a3..1f8bbd9644d7 100644 --- a/arch/x86/kernel/efi_64.c +++ b/arch/x86/kernel/efi_64.c @@ -85,7 +85,7 @@ void __init efi_call_phys_prelog(void) local_irq_save(efi_flags); early_runtime_code_mapping_set_exec(1); vaddress = (uns...
9566e91d494ed0668edf88f852de7f251fe8fe9a
Analyze and fix the following issue in the Linux kernel code: x86: fix detection of CONSTANT_TSC bit for AMD CPUs
Problem Details: Commits - c52f61fcbdb2aa84f0e4d831ef07f375e6b99b2c (x86: allow TSC clock source on AMD Fam10h and some cleanup) - e30436f05d456efaff77611e4494f607b14c2782 (x86: move X86_FEATURE_CONSTANT_TSC into early cpu feature detection) are supposed to fix the detection of contant TSC for AMD CPUs. Unfortun...
```diff diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 3cae326093cb..1caf7458dc48 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c @@ -996,6 +996,10 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) c->x86_capability[2] = cpuid_edx(0x80860001); ...
2b16a2353814a513cdb5c5c739b76a19d7ea39ce
Analyze and fix the following issue in the Linux kernel code: x86: move X86_FEATURE_CONSTANT_TSC into early cpu feature detection
Problem Details: Need this in the next patch in time_init and that happens early. This includes a minor fix on i386 where early_intel_workarounds() [which is now called early_init_intel] really executes early as the comments say. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index aaa8101d3d80..cd2fe15ff4b5 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -63,6 +63,15 @@ static __cpuinit int amd_apic_timer_broken(void) int force_mwait __cpuinitdata; +void __cpuinit early_init_amd(struct...
92767af0e3904b4d35ed547fb514ff6cb227e678
Analyze and fix the following issue in the Linux kernel code: x86: fix sched_clock()
Problem Details: [ andi@firstfloor.org: build fix ] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 276cb7073ab1..eb9b1a198f5e 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -196,14 +196,9 @@ int update_persistent_clock(struct timespec now) return set_rtc_mmss(now.tv_sec); } -unsigned long long __vsyscall_fn native_read_t...
6d5f718a497375f853d90247f5f6963368e89803
Analyze and fix the following issue in the Linux kernel code: x86: lfence fix
Problem Details: LFENCE is available on XMM2 or higher Intel CPUs - not XMM or higher... this caused boot failures on XMM1 & !XMM1 capable CPUs. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 0a4abdb61ae4..5731de3e1bd1 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -203,7 +203,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) } #endif - if (cpu_has_xmm) + if (cpu_has_xmm2) s...
3aa88cdf6bcc9e510c0707581131b821a7d3b7cb
Analyze and fix the following issue in the Linux kernel code: x86: clean up k8topology.c
Problem Details: This patch fixes all errors pointed out by checkpatch.pl. errors lines of code errors/KLOC arch/x86/mm/k8topology_64.c (before) 72 185 389.1 arch/x86/mm/k8topology_64.c (after) 0 185 0 No code changed. ...
```diff diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index 3695c9e8b9b6..32b963de9b8f 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c @@ -1,9 +1,9 @@ -/* +/* * AMD K8 NUMA support. * Discover the memory map and associated nodes. - * + * * This version reads i...
f2633105cd92b793dd6a6f623b4140287d46160a
Analyze and fix the following issue in the Linux kernel code: x86: debug: double-check the empty zero page
Problem Details: temporary debugging - remove before this hits v2.6.25. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 6c3f6eb1f790..05f12c527b02 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -497,6 +497,14 @@ void __init mem_init(void) /* clear_bss() already clear the empty_zero_page */ + /* temporary debugging - double check it's true: ...
b6795e65f158d12d3124379fc50ec156ae60f888
Analyze and fix the following issue in the Linux kernel code: x86: fault_32.c cleanup
Problem Details: We get die() from kdebug.h, no need for forward declaration. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index bfb0917d699d..870b5610555c 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c @@ -42,8 +42,6 @@ #define PF_RSVD (1<<3) #define PF_INSTR (1<<4) -extern void die(const char *, struct pt_regs *, long); - static inline int notify_...
b75f53dba8a4a61fda1ff7e0fb0fe3b0d80e0c64
Analyze and fix the following issue in the Linux kernel code: x86: fix style errors in nmi_int.c
Problem Details: This patch fixes most errors detected by checkpatch.pl. errors lines of code errors/KLOC arch/x86/oprofile/nmi_int.c (after) 1 461 2.1 arch/x86/oprofile/nmi_int.c (before) 60 477 125.7 No code changed. size:...
```diff diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index c8ab79ef4276..1f11cf0a307f 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@ -18,11 +18,11 @@ #include <asm/nmi.h> #include <asm/msr.h> #include <asm/apic.h> - + #include "op_counter.h" #include "op_x8...
39657b6546558469734eb960f7c0c9492111096f
Analyze and fix the following issue in the Linux kernel code: git-x86: drivers/pnp/pnpbios/bioscalls.c build fix
Problem Details: drivers/pnp/pnpbios/bioscalls.c:64: warning: (near initialization for 'bad_bios_desc.<anonymous>') Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index 5dba68fe33f5..a8364d815222 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c @@ -61,7 +61,7 @@ set_base(gdt[(selname) >> 3], (u32)(address)); \ set_limit(gdt[(selname) >> 3], size); \ } while(...
fb0328e2e6407d6f48a608aefa62b2be91989e7e
Analyze and fix the following issue in the Linux kernel code: x86: reduce CONFIG_X86_PPRO_FENCE bloat
Problem Details: CONFIG_X86_PPRO_FENCE bloats text: i386 allmodconf: size mm/built-in.o text data bss dec hex text ratio vanilla: 163082 20372 40120 223574 36956 100.00% bugfix : 163509 20372 40120 224001 36b01 0.26% noppro : 162191 20372 40120 2...
```diff diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 018d68e3184e..e09a6b73a1aa 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -321,8 +321,17 @@ config X86_XADD depends on X86_32 && !M386 config X86_PPRO_FENCE - def_bool y + bool "PentiumPro memory ordering errata workaround" d...
0a6ef376d4baf298aaa2db71794df821a0d7795c
Analyze and fix the following issue in the Linux kernel code: x86: unification of arch/x86/Makefiles
Problem Details: Unify the 32 and 64 bit specific Makefiles. The unification was simplest to do in one step although the readability of the patch suffers a bit from this. Noteworthy remarks on the unification: - The 64 bit cpu stuff should be moved to Makefile_32.cpu but I did not feel confident doing it due to subt...
```diff diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 7aa1dc6d67c8..d3debde0ce0b 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -7,13 +7,242 @@ else KBUILD_DEFCONFIG := $(ARCH)_defconfig endif -# No need to remake these files -$(srctree)/arch/x86/Makefile%: ; +# BITS is used as extensi...
33cb52438341d6e2d7e06e3b64ed776bc54a2ca4
Analyze and fix the following issue in the Linux kernel code: x86: cosmetic fixes fault_{32|64}.c
Problem Details: First step towards unifying these files. - Checkpatch trailing whitespace fixes - Checkpatch indentation of switch statement fixes - Checkpatch single statement ifs need no braces fixes - Checkpatch consistent spacing after comma fixes - Introduce defines for pagefault error bits from X86_64 and add us...
```diff diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index db8d748814e4..bfb0917d699d 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c @@ -1,6 +1,4 @@ /* - * linux/arch/i386/mm/fault.c - * * Copyright (C) 1995 Linus Torvalds */ @@ -30,11 +28,25 @@ #include <asm/desc.h> #inclu...
9930927f36ac3e39ffa674dc23ef06f13c39cef7
Analyze and fix the following issue in the Linux kernel code: x86: introduce REX prefix helper for kprobes
Problem Details: Fold some small ifdefs into a helper function. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 4e33329ce8a3..b1804e40235d 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -170,6 +170,19 @@ static void __kprobes set_jmp_op(void *from, void *to) jop->op = RELATIVEJUMP_INSTRUCTION; } +/* + * Check for the ...
e419190683cdeeda9be69af1dbc77031478559af
Analyze and fix the following issue in the Linux kernel code: x86: arch/x86/math-emu/errors.c: fix printk warnings
Problem Details: arch/x86/math-emu/errors.c:163: warning: format '%ld' expects type 'long int', but argument 3 has type 'u32' arch/x86/math-emu/errors.c:175: warning: format '%ld' expects type 'long int', but argument 3 has type 'u32' arch/x86/math-emu/errors.c:175: warning: format '%ld' expects type 'long int', but ar...
```diff diff --git a/arch/x86/math-emu/errors.c b/arch/x86/math-emu/errors.c index 145b68a99516..59d353d2c599 100644 --- a/arch/x86/math-emu/errors.c +++ b/arch/x86/math-emu/errors.c @@ -149,7 +149,7 @@ void FPU_printall(void) printk("SW: invalid operation\n"); #endif /* DEBUGGING */ - printk(" SW: b=%d st=%ld es...
7271339347653f6d652bb47aaee1f57d936002f6
Analyze and fix the following issue in the Linux kernel code: x86: arch/x86/kernel/cpu/mcheck/k7.c checkpatch fixes
Problem Details: #88: FILE: arch/x86/kernel/cpu/mcheck/k7.c:34: + rdmsr(MSR_IA32_MC0_STATUS+i*4,low, high); ^ ERROR: need space after that ',' (ctx:VxV) #142: FILE: arch/x86/kernel/cpu/mcheck/p4.c:170: + rdmsr(MSR_IA32_MC0_STATUS+i*4,low, high); ^ ERRO...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/k7.c b/arch/x86/kernel/cpu/mcheck/k7.c index 55dfd4f9446a..e633c9c2b764 100644 --- a/arch/x86/kernel/cpu/mcheck/k7.c +++ b/arch/x86/kernel/cpu/mcheck/k7.c @@ -31,7 +31,7 @@ static void k7_machine_check(struct pt_regs * regs, long error_code) smp_processor_id(), mcgsth,...
b912a1c73739b6016ced049552392a148c1736c8
Analyze and fix the following issue in the Linux kernel code: x86: arch/x86/kernel/cpu/mcheck/ checkpatch fixes
Problem Details: #40: FILE: arch/x86/kernel/cpu/mcheck/k7.c:46: + snprintf (misc, 20, "[%08x%08x]", ahigh, alow); WARNING: line over 80 characters #45: FILE: arch/x86/kernel/cpu/mcheck/k7.c:50: + snprintf (addr, 24, " at %08x%08x", ahigh, alow); WARNING: no space between function name and open parenthesis '(' #...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/k7.c b/arch/x86/kernel/cpu/mcheck/k7.c index 9e929409fd7a..55dfd4f9446a 100644 --- a/arch/x86/kernel/cpu/mcheck/k7.c +++ b/arch/x86/kernel/cpu/mcheck/k7.c @@ -27,11 +27,11 @@ static void k7_machine_check(struct pt_regs * regs, long error_code) if (mcgstl & (1<<0)) /* Re...
8b2cb7a8f531d6ca72a8aff873b9bb1c6b3122ba
Analyze and fix the following issue in the Linux kernel code: x86: 32-bit EFI runtime service support: fixes in sync with 64-bit support
Problem Details: support according to fixes of x86_64 support. - Delete efi_rt_lock because it is used during system early boot, before SMP is initialized. - Change local_flush_tlb() to __flush_tlb_all() to flush global page mapping. - Clean up includes. - Revise Kconfig description. - Enable noefi kernel para...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b3f20beea411..e7910f8b4fcc 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1169,6 +1169,8 @@ and is between 256 and 4096 characters. It is defined in the file nodisconn...
c6334593c61c71ab2e666c015eef13995736f49a
Analyze and fix the following issue in the Linux kernel code: x86, ptrace: overflow signal API
Problem Details: Establish the user API for sending a user-defined signal to the traced task on a BTS buffer overflow. This should complete the user API for the BTS ptrace extension. The patches so far implement wrap-around overflow handling as is needed for debugging. The remaining open is another overflow handling ...
```diff diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h index bcf67044754c..b3b9e023afce 100644 --- a/include/asm-x86/ptrace-abi.h +++ b/include/asm-x86/ptrace-abi.h @@ -88,11 +88,13 @@ struct ptrace_bts_config { unsigned int size; /* bitmask of below flags */ unsigned int flags; + /* buf...
ddc66df876fd33d3956f3c3acc1ae334b16eedee
Analyze and fix the following issue in the Linux kernel code: x86: fix kprobe_handler reenable preemption
Problem Details: Fix a preemption bug in kprobe_handler(). It has to call preempt_enable() before returning. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 521a469acaad..f0f2b98b9e20 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -467,7 +467,8 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) arch_disarm_kprobe(p); regs->ip = (unsigned long)p->a...
bde6f5f59c2b2b48a7a849c129d5b48838fe77ee
Analyze and fix the following issue in the Linux kernel code: x86: voluntary leave_mm before entering ACPI C3
Problem Details: Aviod TLB flush IPIs during C3 states by voluntary leave_mm() before entering C3. The performance impact of TLB flush on C3 should not be significant with respect to C3 wakeup latency. Also, CPUs tend to flush TLB in hardware while in C3 anyways. On a 8 logical CPU system, running make -j2, the numbe...
```diff diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c index 070816ac79e1..dc0cde9d16fb 100644 --- a/arch/x86/kernel/smp_32.c +++ b/arch/x86/kernel/smp_32.c @@ -256,13 +256,14 @@ static DEFINE_SPINLOCK(tlbstate_lock); * We need to reload %cr3 since the page tables may be going * away from under us...
bca25bafbb390eeec376ac994954b99489d198ec
Analyze and fix the following issue in the Linux kernel code: x86: fix dmi_alloc() to not advance alloc index in case of
Problem Details: dmi_alloc() for CONFIG_X86_64 is defined to allocate from a static array and it maintains a allocation index which is advanced each time allocation is attempted - it gets incremented even if an allocation fails thereby depriving any future request that may be small enough to be satisfied from the array...
```diff diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h index 8e2b0e6aa8e7..5008c365e6e4 100644 --- a/include/asm-x86/dmi.h +++ b/include/asm-x86/dmi.h @@ -22,8 +22,9 @@ extern char dmi_alloc_data[DMI_MAX_DATA]; static inline void *dmi_alloc(unsigned len) { int idx = dmi_alloc_index; - if ((dmi_alloc_ind...
79da4721117fcf188b4b007b775738a530f574da
Analyze and fix the following issue in the Linux kernel code: x86: fix DMI out of memory problems
Problem Details: People with HP Desktops (including me) encounter couple of DMI errors during boot - dmi_save_oem_strings_devices: out of memory and dmi_string: out of memory. On some HP desktops the DMI data include OEM strings (type 11) out of which only few are meaningful and most other are empty. DMI code religiou...
```diff diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 5e596a7e3601..0b24a1141009 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -8,6 +8,8 @@ #include <linux/slab.h> #include <asm/dmi.h> +static char dmi_empty_string[] = " "; + static char * __ini...
ab4a574ef23cfa801a5078f7d7c2f2b76ecd6d91
Analyze and fix the following issue in the Linux kernel code: arch/x86/: spelling fixes
Problem Details: Spelling fixes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 4c014fca2057..4330a899ddcb 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c @@ -108,7 +108,7 @@ static inline int lapic_get_version(void) } /* - * Check, if the APIC is integrated or a seperate chip + * Check, if ...
6d48583ba9ade609634e694fc35ea62b7a8adaaa
Analyze and fix the following issue in the Linux kernel code: x86: unify extable_{32|64}.c
Problem Details: Introduce fixup_exception() on 64-bit and use it in kprobes to eliminate an #ifdef. Only 64-bit needs search_extable() due to a stepping bug. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 8de82c8cedd6..7848bf74e2ab 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c @@ -904,19 +904,9 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, int trapnr) * In case the user-specified fault handler retu...
053de044411111da00272d1b4e174e7dd743f499
Analyze and fix the following issue in the Linux kernel code: x86: get rid of _MASK flags
Problem Details: There's no need for the *_MASK flags (TF_MASK, IF_MASK, etc), found in processor.h (both _32 and _64). They have a one-to-one mapping with the EFLAGS value. This patch removes the definitions, and use the already existent X86_EFLAGS_ version when applicable. [ roland@redhat.com: KVM build fixes. ] Si...
```diff diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index d03d43f32f4c..0e24e3fda3d7 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c @@ -501,7 +501,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, regs->ss = __USER32_DS; set_fs(USER_DS); - regs->flag...
01c57fb6a3eefc34da17be1399453c0800bcff68
Analyze and fix the following issue in the Linux kernel code: x86: local.h fix checkpatch warnings
Problem Details: Mostly space after comma, one space after if. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/local.h b/include/asm-x86/local.h index f5677e208601..f852c62b3319 100644 --- a/include/asm-x86/local.h +++ b/include/asm-x86/local.h @@ -7,15 +7,14 @@ #include <asm/atomic.h> #include <asm/asm.h> -typedef struct -{ +typedef struct { atomic_long_t a; } local_t; #define LOC...
992b95920a311db3267659ea17160e4812a05830
Analyze and fix the following issue in the Linux kernel code: x86: fix asm memory constraints in local_64.h
Problem Details: Use the shorter +m form rather than =m and m. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/local_64.h b/include/asm-x86/local_64.h index 92330f8135f8..50e99eddd628 100644 --- a/include/asm-x86/local_64.h +++ b/include/asm-x86/local_64.h @@ -5,32 +5,30 @@ static inline void local_inc(local_t *l) { __asm__ __volatile__( "incq %0" - :"=m" (l->a.counter) - :"m" (l->a....
4ad02718345783a3b84bae1895917666b779850d
Analyze and fix the following issue in the Linux kernel code: x86: clean up local_{32|64}.h
Problem Details: Common prefix from both files moved to local.h Change __inline__ to inline Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/asm-x86/local_32.h b/include/asm-x86/local_32.h index 6e85975b9ed2..33d9c7bf463c 100644 --- a/include/asm-x86/local_32.h +++ b/include/asm-x86/local_32.h @@ -1,35 +1,21 @@ #ifndef _ARCH_I386_LOCAL_H #define _ARCH_I386_LOCAL_H -#include <linux/percpu.h> -#include <asm/system.h> -#include...
c6b48324325ffb637c3aafb2d795408febf40198
Analyze and fix the following issue in the Linux kernel code: x86, kexec: force x86 arches to boot kdump kernels on boot cpu
Problem Details: Recently a kdump bug was discovered in which a system would hang inside calibrate_delay during the booting of the kdump kernel. This was caused by the fact that the jiffies counter was not being incremented during timer calibration. The root cause of this problem was found to be a bios misconfigurati...
```diff diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 88bb83ec895f..b55258e49208 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c @@ -21,7 +21,30 @@ #include <asm/gart.h> #endif -static void __init via_bugs(void) +static void __init fix_hypertrans...
d88879b2d0225da3ba460bbdb8361bb049653671
Analyze and fix the following issue in the Linux kernel code: x86-64: make pda's cpunumber and nodenumber unsigned
Problem Details: This generally allows better code to be generated, since the zero- extension during 32-bit operations comes for free (needed when the result is used as array index or similar), whereas sign extension must be done explicitly and frequently requires a one byte larger instruction due to the necessary rex6...
```diff diff --git a/include/asm-x86/pda.h b/include/asm-x86/pda.h index 3d9dd653628a..b620d0c39a93 100644 --- a/include/asm-x86/pda.h +++ b/include/asm-x86/pda.h @@ -15,14 +15,14 @@ struct x8664_pda { unsigned long kernelstack; /* 16 top of kernel stack for current */ unsigned long oldrsp; /* 24 user rsp for...
aa470140e86e45723cf8387292edbce9106ddc1f
Analyze and fix the following issue in the Linux kernel code: x86: kprobe-booster for x86-64
Problem Details: This patch adds kprobe-booster to kprobes_64.c. - Changes are based on x86-32. - Add REX prefix checking code. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutr...
```diff diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c index f6837cd3bed5..bf0e18473677 100644 --- a/arch/x86/kernel/kprobes_64.c +++ b/arch/x86/kernel/kprobes_64.c @@ -55,6 +55,105 @@ struct kretprobe_blackpoint kretprobe_blacklist[] = { }; const int kretprobe_blacklist_size = ARRAY_SIZE(kr...
314cdbefd1fd0a7acf3780e9628465b77ea6a836
Analyze and fix the following issue in the Linux kernel code: x86: FIFO ticket spinlocks
Problem Details: Introduce ticket lock spinlocks for x86 which are FIFO. The implementation is described in the comments. The straight-line lock/unlock instruction sequence is slightly slower than the dec based locks on modern x86 CPUs, however the difference is quite small on Core2 and Opteron when working out of cach...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index db434f8171d3..1992b8fe6a2f 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -20,8 +20,7 @@ config X86 def_bool y config GENERIC_LOCKBREAK - def_bool y - depends on SMP && PREEMPT + def_bool n config GENERIC_TIME def_bool y diff --git a/incl...
a95d67f87e1a5f1b4429be3ba3bf7b4051657908
Analyze and fix the following issue in the Linux kernel code: x86, ptrace: new ptrace BTS API
Problem Details: Here's the new ptrace BTS API that supports two different overflow handling mechanisms (wrap-around and buffer-full-signal) to support two different use cases (debugging and profiling). It further combines buffer allocation and configuration. Opens: - memory rlimit - overflow signal What would be th...
```diff diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index e7855def97c3..6eb5d49a36bb 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c @@ -177,18 +177,20 @@ static inline void set_info_data(char *base, unsigned long value) } -int ds_allocate(void **dsp, size_t bts_size_in_records) +int ds_a...
1e160cc3f3b5c38bba79c58172e82c1e24934546
Analyze and fix the following issue in the Linux kernel code: x86: __vdso_getcpu() warning fix
Problem Details: arch/x86/vdso/vgetcpu.c: In function '__vdso_getcpu': arch/x86/vdso/vgetcpu.c:22: warning: pointer targets in passing argument 1 of 'native_read_tscp' differ in signedness Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner...
```diff diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index 040d3910d891..088652a62d58 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h @@ -13,7 +13,7 @@ #include <asm/asm.h> #include <asm/errno.h> -static inline unsigned long long native_read_tscp(int *aux) +static inline unsigned long l...
507f90c9f92592e7630b1c1e87bf92d2c9858cc6
Analyze and fix the following issue in the Linux kernel code: x86: move _set_gate and its users to a common location
Problem Details: This patch moves _set_gate and its users to desc.h. We can now use common code for x86_64 and i386. [ mingo@elte.hu: set_system_gate() fixes for nasty crashes. ] Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tgl...
```diff diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index c70c41fd710b..3065b3f41928 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -1102,40 +1102,6 @@ asmlinkage void math_emulate(long arg) #endif /* CONFIG_MATH_EMULATION */ -/* - * This needs to use 'idt_tabl...
2355188570790930718fb72444cddc2959039d9d
Analyze and fix the following issue in the Linux kernel code: x86: avoid build warning
Problem Details: fix this build warning: include/asm/topology_32.h: In function 'node_to_first_cpu': include/asm/topology_32.h:66: warning: unused variable 'mask' Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 85bd790c201e..7047f58306a7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -218,8 +218,8 @@ int __first_cpu(const cpumask_t *srcp); int __next_cpu(int n, const cpumask_t *srcp); #define next_cpu(n, src) __next_cpu((n), ...
929fd589135ed417663f1b75b8031c9cf6687700
Analyze and fix the following issue in the Linux kernel code: x86: some whitespace cleanups in paging code
Problem Details: This patch does some whitespace cleanups in the paging code to fix some checkpatch.pl warnings of my formerly merged cleanup patches. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 3f8bf298dbb8..5cadbb40da3e 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -226,7 +226,7 @@ __meminit void *early_ioremap(unsigned long addr, unsigned long size) vaddr += addr & ~PMD_MASK; addr &= PMD_MASK; for (i = 0; i...
bb1ad8205be4cb95e3286d7442596da6fd70409f
Analyze and fix the following issue in the Linux kernel code: x86: PIE executable randomization, checkpatch fixes
Problem Details: #39: FILE: arch/ia64/ia32/binfmt_elf32.c:229: +elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type, unsigned long unused) WARNING: no space between function name and open parenthesis '(' #39: FILE: arch/ia64/ia32/binfmt_elf32.c:229: +elf32_map (struct file *fi...
```diff diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 2a662215359c..4f0c30c38e99 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c @@ -222,7 +222,8 @@ elf32_set_personality (void) } static unsigned long -elf32_map (struct file *filep, unsigned long add...
cc503c1b43e002e3f1fed70f46d947e2bf349bb6
Analyze and fix the following issue in the Linux kernel code: x86: PIE executable randomization
Problem Details: main executable of (specially compiled/linked -pie/-fpie) ET_DYN binaries onto a random address (in cases in which mmap() is allowed to perform a randomization). The code has been extraced from Ingo's exec-shield patch http://people.redhat.com/mingo/exec-shield/ [akpm@linux-foundation.org: fix used-u...
```diff diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 3e35987af458..2a662215359c 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c @@ -222,7 +222,7 @@ elf32_set_personality (void) } static unsigned long -elf32_map (struct file *filep, unsigned long add...
56ec1ddcff967e51d98427e4efcbfc90de67efe3
Analyze and fix the following issue in the Linux kernel code: x86: make fixups wordsize agnostic
Problem Details: This patch uses the _ASM_ALIGN and _ASM_PTR macros to make the fixups in native_read/write_msr_safe look the same for x86_64 and i386. Besides using this macros, we also have to take the explicit instruction suffixes out. It's okay because all this instructions uses registers, and can be sized by them....
```diff diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h index cb7222358897..792fde2e8908 100644 --- a/include/asm-x86/msr.h +++ b/include/asm-x86/msr.h @@ -33,6 +33,7 @@ static inline unsigned long long native_read_tscp(int *aux) #ifdef __KERNEL__ #ifndef __ASSEMBLY__ +#include <asm/asm.h> #include <asm...
2ba7deef09dad6662dc4fa8b275af8d0794fd9fc
Analyze and fix the following issue in the Linux kernel code: x86: 32-bit IOAPIC: de-fang IRQ compression
Problem Details: commit c434b7a6aedfe428ad17cd61b21b125a7b7a29ce (x86: avoid wasting IRQs for PCI devices) created a concept of "IRQ compression" on i386 to conserve IRQ numbers on systems with many sparsely populated IO APICs. The same scheme was also added to x86_64, but later removed when x86_64 recieved an IRQ ove...
```diff diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index 22fc8d7dec11..bfcfc41f5607 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c @@ -1041,13 +1041,14 @@ void __init mp_config_acpi_legacy_irqs (void) } #define MAX_GSI_NUM 4096 +#define IRQ_COMPRESSION_STA...
cb757c41f3c2e1ac6f950f9d070e9849983efc18
Analyze and fix the following issue in the Linux kernel code: x86: x86 ia32 ptrace getreg/putreg merge
Problem Details: This reimplements the 64-bit IA32-emulation register access functions in arch/x86/kernel/ptrace.c, where they can share some guts with the native access functions directly. These functions are not used yet, but this paves the way to move IA32 ptrace support into this file to share its local functions....
```diff diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 509804957f5f..d56aa18309f8 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -215,14 +215,14 @@ static int set_segment_reg(struct task_struct *task, #ifdef CONFIG_IA32_EMULATION if (test_tsk_thread_flag(task, TIF_IA...
742fa54a62be6a263df14a553bf832724471dfbe
Analyze and fix the following issue in the Linux kernel code: x86: use generic register names in struct sigcontext
Problem Details: Switch struct sigcontext (defined in <asm/sigcontext*.h>) to using register names withut e- or r-prefixes for both 32- and 64-bit x86. This is intended as a preliminary step in unifying this code between architectures. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elt...
```diff diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index f2da443f8c7b..d03d43f32f4c 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c @@ -192,9 +192,9 @@ struct rt_sigframe char retcode[8]; }; -#define COPY(x) { \ - unsigned int reg; \ - err |= __get_user(reg...
153d5f2e5787c74e9cbb6b6687c9b04be1b59893
Analyze and fix the following issue in the Linux kernel code: x86: use generic register names in struct user_regs_struct
Problem Details: Switch struct user_regs_struct (defined in <asm/user.h>, which is no longer exported to userspace) to using register names without e- or r-prefixes for both 32 and 64 bit x86. This is intended as a preliminary step in unifying this code between architectures. Also, be a bit more strict in truncating ...
```diff diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index c9f28e02e86d..53406461074f 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -523,6 +523,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, void dump_thread(struct pt_regs * regs,...
5b88abbf770a0e1975c668743100f42934f385e8
Analyze and fix the following issue in the Linux kernel code: ptrace: generic PTRACE_SINGLEBLOCK
Problem Details: This makes ptrace_request handle PTRACE_SINGLEBLOCK along with PTRACE_CONT et al. The new generic code makes use of the arch_has_block_step macro and generic entry points on machines that define them. [ mingo@elte.hu: bugfix ] Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Mol...
```diff diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 1febc541dda5..515bff053de8 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -187,7 +187,7 @@ static inline void user_disable_single_step(struct task_struct *task) * supports step-until-branch for user mode. It can be a cons...
d9771e8c50020bb1b4ca9eca9c188874ff126aa4
Analyze and fix the following issue in the Linux kernel code: x86: x86-32 ptrace debugreg cleanup
Problem Details: This cleans up the 32-bit ptrace code to separate the guts of the debug register access from the implementation of PTRACE_PEEKUSR and PTRACE_POKEUSR. The new functions ptrace_[gs]et_debugreg match the new 64-bit entry points for parity, but they don't need to be global. Signed-off-by: Roland McGrath ...
```diff diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index a1425e9ad028..512f8412b799 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c @@ -118,6 +118,72 @@ static unsigned long getreg(struct task_struct *child, unsigned long regno) return retval; } +/* + * This f...
d0f081758260e9221729cabbc3aba63d89b8c8d4
Analyze and fix the following issue in the Linux kernel code: x86: x86-64 ia32 ptrace debugreg cleanup
Problem Details: This cleans up the ia32 compat ptrace code to use shared code from native ptrace for the implementation guts of debug register access. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/ia32/ptrace32.c b/arch/x86/ia32/ptrace32.c index 5dee33417313..5ababea1307a 100644 --- a/arch/x86/ia32/ptrace32.c +++ b/arch/x86/ia32/ptrace32.c @@ -41,7 +41,6 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 val) { - int i; __u64 *stack = (__u64 *)task_pt_regs(c...
962ff3804d31a4d090bbcbd3d06a4b63e3a5b5fd
Analyze and fix the following issue in the Linux kernel code: x86: x86-64 ptrace debugreg cleanup
Problem Details: This cleans up the 64-bit ptrace code to separate the guts of the debug register access from the implementation of PTRACE_PEEKUSR and PTRACE_POKEUSR. The new functions ptrace_[gs]et_debugreg are made global so that the ia32 code can later be changed to call them too. Signed-off-by: Roland McGrath <ro...
```diff diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index d0a0aeaaa0c2..4ba66d8af717 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c @@ -183,9 +183,63 @@ static unsigned long getreg(struct task_struct *child, unsigned long regno) } +unsigned long ptrace_get_deb...
e1f287735c1e58c653b516931b5d3dd899edcb77
Analyze and fix the following issue in the Linux kernel code: x86 single_step: TIF_FORCED_TF
Problem Details: This changes the single-step support to use a new thread_info flag TIF_FORCED_TF instead of the PT_DTRACE flag in task_struct.ptrace. This keeps arch implementation uses out of this non-arch field. This changes the ptrace access to eflags to mask TF and maintain the TIF_FORCED_TF flag directly if user...
```diff diff --git a/arch/x86/ia32/ptrace32.c b/arch/x86/ia32/ptrace32.c index 9d754b640205..5dee33417313 100644 --- a/arch/x86/ia32/ptrace32.c +++ b/arch/x86/ia32/ptrace32.c @@ -89,6 +89,15 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 val) __u64 *flags = &stack[offsetof(struct pt_regs, efla...
5f76cb1f6c42e7575256595f85b8b97d84ec669e
Analyze and fix the following issue in the Linux kernel code: x86: single_step 0xf0
Problem Details: This fixes the 64-bit single-step handling code's instruction decoder to grok the 0xf0 (lock) prefix, which the 32-bit code already does correctly. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index 3b70f20f21f9..6a93b93f91f1 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c @@ -66,7 +66,7 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) case 0x26: case 0x2e: case 0x36: case 0x3e: c...
b263295dbffd33b0fbff670720fa178c30e3392a
Analyze and fix the following issue in the Linux kernel code: x86: 64-bit, make sparsemem vmemmap the only memory model
Problem Details: Use sparsemem as the only memory model for UP, SMP and NUMA. Measurements indicate that DISCONTIGMEM has a higher overhead than sparsemem. And FLATMEMs benefits are minimal. So I think its best to simply standardize on sparsemem. Results of page allocator tests (test can be had via git from slab gi...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2f4d88babd36..da98368f66af 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -891,25 +891,29 @@ config HAVE_ARCH_ALLOC_REMAP config ARCH_FLATMEM_ENABLE def_bool y - depends on (X86_32 && ARCH_SELECT_MEMORY_MODEL && X86_PC) || (X86_64 && !NUMA) + ...
df5d438e33d7fc914ba9b6e0d6b019a8966c5fcc
Analyze and fix the following issue in the Linux kernel code: x86: ptrace fs/gs_base
Problem Details: The fs_base and gs_base fields are available in user_regs_struct. But reading these via ptrace (PTRACE_GETREGS or PTRACE_PEEKUSR) does not give a reliably useful value. The thread_struct fields are 0 when do_arch_prctl decided to use a GDT slot instead of MSR_FS_BASE, which it does for a value under 1...
```diff diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index 607085f3f08a..1edece36044c 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c @@ -22,6 +22,7 @@ #include <asm/pgtable.h> #include <asm/system.h> #include <asm/processor.h> +#include <asm/prctl.h> #include <a...
36197c92a20c142fc2a068e0366053d770fa0096
Analyze and fix the following issue in the Linux kernel code: x86 vDSO: ia32 sysenter_return
Problem Details: This changes the 64-bit kernel's support for the 32-bit sysenter instruction to use stored fields rather than constants for the user-mode return address, as the 32-bit kernel does. This adds a sysenter_return field to struct thread_info, as 32-bit has. There is no observable effect from this yet. It...
```diff diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index df588f0f76e1..2499a324feaa 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@ -12,7 +12,6 @@ #include <asm/ia32_unistd.h> #include <asm/thread_info.h> #include <asm/segment.h> -#include <asm/vsyscall32.h> #incl...
c1d171a002942ea2d93b4fbd0c9583c56fce0772
Analyze and fix the following issue in the Linux kernel code: x86: randomize brk
Problem Details: Randomize the location of the heap (brk) for i386 and x86_64. The range is randomized in the range starting at current brk location up to 0x02000000 offset for both architectures. This, together with pie-executable-randomization.patch and pie-executable-randomization-fix.patch, should make the addres...
```diff diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index a8cdd09ad53f..631af167bc51 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -992,3 +992,10 @@ unsigned long arch_align_stack(unsigned long sp) sp -= get_random_int() % 8192; return sp & ~0xf; } + ...
739f33b38bf88312447e38ae8b7ac3acdbb72a6b
Analyze and fix the following issue in the Linux kernel code: x86: untable __init references between IO data
Problem Details: Earlier patch added IO APIC setup into local APIC setup. This caused modpost warnings. Fix them by untangling setup_local_APIC() and splitting it into smaller functions. The IO APIC initialization is only called for the BP init. Also removed some outdated debugging code and minor cleanup. [ tglx: arc...
```diff diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 994298bf4921..d341f798255c 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c @@ -677,7 +677,7 @@ void __init init_bsp_APIC(void) */ void __cpuinit setup_local_APIC(void) { - unsigned int value, maxlvt; + unsigned i...
0b80fc721bed2635c7f0b198e1c862a4596dc2cd
Analyze and fix the following issue in the Linux kernel code: x86: merge acpi_32/64.h
Problem Details: Merge the files. [ mingo@elte.hu: build fix ] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index f8a89793ac8c..c477e5741751 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h @@ -1,14 +1,123 @@ #ifndef _ASM_X86_ACPI_H #define _ASM_X86_ACPI_H -#ifdef CONFIG_X86_32 -# include "acpi_32.h" -#else -# include "acpi_64.h" -#endif...
8a999410135602d98bd007e835dc21c0c279ad72
Analyze and fix the following issue in the Linux kernel code: x86: cleanup acpi_32/64.h
Problem Details: Fix coding style to get a readable diff Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/asm-x86/acpi_32.h b/include/asm-x86/acpi_32.h index c8afeea0b80b..03612bcf6422 100644 --- a/include/asm-x86/acpi_32.h +++ b/include/asm-x86/acpi_32.h @@ -24,11 +24,8 @@ #ifndef _ASM_ACPI_H #define _ASM_ACPI_H -#ifdef __KERNEL__ - #include <acpi/pdc_intel.h> - -#include <asm/system.h> ...
a33fff3a033f2e8a930067ad608c21e1f86bffab
Analyze and fix the following issue in the Linux kernel code: x86: fix asm constraints in spinlock_32/64.h
Problem Details: Use the correct constraints for the spinlock assembler functions. read (modify) write functions need "+m" instead of "=m" Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/asm-x86/spinlock_32.h b/include/asm-x86/spinlock_32.h index c42c3f12d7ce..fca124a1103d 100644 --- a/include/asm-x86/spinlock_32.h +++ b/include/asm-x86/spinlock_32.h @@ -99,7 +99,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock) static inline void __raw_spin_unlock(raw_spin...
ec12fa5c80126b252ebcb474d12c832ec4647daa
Analyze and fix the following issue in the Linux kernel code: x86: bitops_32.h style cleanups
Problem Details: Coding style cleanups in x86/bitops_32.h: - drop space in "* addr" - whitespace & indentation fixes - spello fixes Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Mol...
```diff diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h index 0b40f6d20bea..5a29cce6a91d 100644 --- a/include/asm-x86/bitops_32.h +++ b/include/asm-x86/bitops_32.h @@ -37,7 +37,7 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word q...
9a211abeaab74e2634669a64ebd82fac5d94d276
Analyze and fix the following issue in the Linux kernel code: x86: clean up ioport_32.c
Problem Details: Remove unused variables, rename the "unused" argument to regp. It is used ! Codingstyle fixes. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/ioport_32.c b/arch/x86/kernel/ioport_32.c index c5a64011764f..c281ffa18259 100644 --- a/arch/x86/kernel/ioport_32.c +++ b/arch/x86/kernel/ioport_32.c @@ -29,16 +29,14 @@ static void set_bitmap(unsigned long *bitmap, unsigned int base, } } - /* * this changes the io permissio...
af7a78e9258ffcca681e080cbc857f854869144f
Analyze and fix the following issue in the Linux kernel code: x86: move mce related declarations
Problem Details: Move the mce related declarations where they belong, fix the users and remove 32bit dependency in mce.h Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 0e2bffe2e203..a84a4efc7fe6 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c @@ -59,6 +59,7 @@ #include <asm/sections.h> #include <asm/dmi.h> #include <asm/cacheflush.h> +#include <asm/mce.h> /* * Machine s...
718fc13b4675470ea191522ef98b02a55d990fa1
Analyze and fix the following issue in the Linux kernel code: x86: move debug related declarations to kdebug.h
Problem Details: Move them and fixup some users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index d41cd2f01733..e510cfd5bb71 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c @@ -26,6 +26,7 @@ #include <asm/proto.h> #include <asm/setup.h> #include <asm/sections.h> +#include <asm/kdebug.h> struct e820map e820;...
c9ff03428f24219b927d9d9d3c0c581622967794
Analyze and fix the following issue in the Linux kernel code: x86: move k8 related declarations
Problem Details: Move k8 related declarations to k8.h and fix numa_64.c Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 3d6926ba8995..2d8fdc05f415 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c @@ -17,6 +17,7 @@ #include <asm/dma.h> #include <asm/numa.h> #include <asm/acpi.h> +#include <asm/k8.h> #ifndef Dprintk #define Dprintk(x...) diff --g...
376ff0352c24a5fa47f1250dd60937b5a9077672
Analyze and fix the following issue in the Linux kernel code: x86: move acpi and pci declarations
Problem Details: Move acpi/pci related declarations to the correct headers and remove the duplicate. Build fix from: Andrew Morton Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 51bdc0b1b72e..236d30b264d8 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -44,6 +44,7 @@ #include <linux/crash_dump.h> #include <linux/dmi.h> #include <linux/pfn.h> +#include <linux/pci.h> #include <vid...
42e0a9aa5d467188687c6b705412578e53c14af6
Analyze and fix the following issue in the Linux kernel code: x86: use u32 for some lapic functions
Problem Details: Use u32 so 32 and 64bit have the same interface. Andrew Morton: xen, lguest build fixes Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index a56c782653be..3a069acb270c 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c @@ -135,9 +135,9 @@ void apic_wait_icr_idle(void) cpu_relax(); } -unsigned long safe_apic_wait_icr_idle(void) +u32 safe_apic_wait_icr_i...
83bd01024b1fdfc41d9b758e5669e80fca72df66
Analyze and fix the following issue in the Linux kernel code: x86: protect against sigaltstack wraparound
Problem Details: cf http://lkml.org/lkml/2007/10/3/41 To summarize: on Linux, SA_ONSTACK decides whether you are already on the signal stack based on the value of the SP at the time of a signal. If you are not already inside the range, you are not "on the signal stack" and so the new signal handler frame starts over ...
```diff diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 20f29e4c1d33..5c6170c44b00 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c @@ -295,6 +295,13 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) /* Default to using normal stac...
d0049e71c6e14a3b0a5b8cedaa1325a1a91fecb0
Analyze and fix the following issue in the Linux kernel code: x86: make io_delay=0xed the default
Problem Details: make io_delay=0xed the default. This frees up port 0x80 which is a debug port on some machines and locks up certain laptops. Testing only for now. Try the io_delay=0x80 boot option if this does not work for you. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutroni...
```diff diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 77eda46f97b8..b747ab38814d 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -134,7 +134,7 @@ config IO_DELAY_TYPE_NONE choice prompt "IO delay type" - default IO_DELAY_0X80 + default IO_DELAY_0XED config IO_DELAY_0X80 ...