linux/arch/x86/kernel
Mike Travis 7496b60654 x86: fix remove cpu_pda table patch
Mike Travis wrote:
> Ingo Molnar wrote:
>> * Mike Travis <travis@sgi.com> wrote:
>>
>>> [Ingo - please replace "PATCH 07/11" with this one.]
>>>
>>>     *	Remove 544k bytes from the kernel by removing the boot_cpu_pda
>>> 	array from the data section and allocating it during startup.
>>>
>>> 	Fixed panic in setup_per_cpu_areas when HOTPLUG_CPU not set.
>>>
>>> For inclusion into sched-devel/latest tree.
>> sched-devel.git randconfig testing found another crash with your queue:
>>
>> [    0.111060] Brought up 1 CPUs
>> [    0.111986] Total of 1 processors activated (4022.73 BogoMIPS).
>> [    0.112987] Testing NMI watchdog ... <1>BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
>> [    0.114982] IP: [<ffffffff8180d4a0>] check_nmi_watchdog+0xb0/0x210
>> [    0.114982] PGD 0
>> [    0.114982] Oops: 0000 [1] SMP
>> [    0.114982] CPU 0
>> [............]
>>
>>  http://redhat.com/~mingo/misc/config-Mon_Apr_28_23_25_25_CEST_2008.bad
>>  http://redhat.com/~mingo/misc/log-Mon_Apr_28_23_25_25_CEST_2008.bad
>>
>> 	Ingo
>
> Hi Ingo,
>
> I need a bit more information on your hardware configuration.  Building a
> kernel with the above config file started up fine on both the Intel and AMD
> boxes.
>
> Based on the above output it looks like it might be a UP machine?
...

Ok, I think I found it.  In check_nmi_watchdog():

        for (cpu = 0; cpu < NR_CPUS; cpu++)
                prev_nmi_count[cpu] = cpu_pda(cpu)->__nmi_count;

As I mentioned it works fine on both of my systems so could you try it out?

Thanks!
Mike
--

  * Change function check_nmi_watchdog() to use nr_cpu_ids instead of NR_CPUS.

Based on:
	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
    +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-07-08 11:28:47 +02:00
..
acpi x86 ACPI: normalize segment descriptor register on resume 2008-07-05 08:25:40 +02:00
cpu [CPUFREQ] Crusoe: longrun cpufreq module reports false min freq 2008-05-19 18:17:28 -04:00
.gitignore
alternative.c
aperture_64.c
apic_32.c
apic_64.c x86: don't read maxlvt before checking if APIC is mapped 2008-05-23 14:08:06 +02:00
apm_32.c
asm-offsets.c
asm-offsets_32.c
asm-offsets_64.c
audit_64.c
bootflag.c
bugs_64.c
cpuid.c
crash.c
crash_dump_32.c
crash_dump_64.c
doublefault_32.c
ds.c
e820_32.c
e820_64.c
early-quirks.c
early_printk.c
efi.c
efi_32.c x86: fix Intel Mac booting with EFI 2008-07-03 08:19:18 +02:00
efi_64.c
efi_stub_32.S
efi_stub_64.S
entry_32.S x86: fix lockdep warning during suspend-to-ram 2008-06-12 21:27:09 +02:00
entry_64.S
genapic_64.c
genapic_flat_64.c
genx2apic_uv_x.c
geode_32.c x86, geode: add a VSA2 ID for General Software 2008-06-19 14:19:03 +02:00
head32.c
head64.c
head_32.S x86: fix asm warning in head_32.S 2008-06-12 21:26:12 +02:00
head_64.S x86 ACPI: fix resume from suspend to RAM on uniprocessor x86-64 2008-07-05 08:42:28 +02:00
hpet.c
i386_ksyms_32.c
i387.c ptrace GET/SET FPXREGS broken 2008-06-30 14:35:18 +02:00
i8237.c
i8253.c
i8259_32.c
i8259_64.c
init_task.c [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
io_apic_32.c Revert "x86: fix ioapic bug again" 2008-06-12 21:26:28 +02:00
io_apic_64.c
io_delay.c
ioport.c
ipi.c
irq_32.c
irq_64.c
k8.c
kdebugfs.c
kgdb.c
kprobes.c
kvm.c
kvmclock.c x86: KVM guest: Use the paravirt clocksource structs and functions 2008-06-24 21:02:33 +03:00
ldt.c
machine_kexec_32.c
machine_kexec_64.c
Makefile x86: Add structs and functions for paravirt clocksource 2008-06-24 21:02:31 +03:00
mca_32.c
mfgpt_32.c geode: fix modular build 2008-06-12 21:25:51 +02:00
microcode.c
mmconf-fam10h_64.c
module_32.c
module_64.c
mpparse.c x86: es7000 build fix 2008-05-04 20:04:45 +02:00
msr.c
nmi_32.c Revert "x86: fix ioapic bug again" 2008-06-12 21:26:28 +02:00
nmi_64.c x86: fix remove cpu_pda table patch 2008-07-08 11:28:47 +02:00
numaq_32.c
olpc.c
paravirt.c
paravirt_patch_32.c
paravirt_patch_64.c
pci-calgary_64.c
pci-dma.c x86, pci-dma.c: don't always add __GFP_NORETRY to gfp 2008-06-10 12:22:18 +02:00
pci-gart_64.c suspend-vs-iommu: prevent suspend if we could not resume 2008-06-04 13:11:47 +02:00
pci-nommu.c
pci-swiotlb_64.c
pcspeaker.c
pmtimer_64.c
process.c x86: disable mwait for AMD family 10H/11H CPUs 2008-05-17 22:57:20 +02:00
process_32.c x86: fix NULL pointer deref in __switch_to 2008-06-19 10:08:45 +02:00
process_64.c x86: fix NULL pointer deref in __switch_to 2008-06-19 10:08:45 +02:00
ptrace.c x86: user_regset_view table fix for ia32 on 64-bit 2008-05-13 19:40:20 +02:00
pvclock.c x86: Add structs and functions for paravirt clocksource 2008-06-24 21:02:31 +03:00
quirks.c
reboot.c x86: remove dell reboot dmi quirk board name match 2008-05-04 20:04:45 +02:00
reboot_fixups_32.c
relocate_kernel_32.S
relocate_kernel_64.S
rtc.c provide rtc_cmos platform device 2008-06-12 18:05:42 -07:00
scx200_32.c
setup.c x86: [VOYAGER] fix duplicate phys_cpu_present_map symbol 2008-05-12 21:27:51 +02:00
setup64.c
setup_32.c x86: use BOOTMEM_EXCLUSIVE on 32-bit 2008-06-19 10:08:48 +02:00
setup_64.c x86: early_init_centaur(): use set_cpu_cap() 2008-05-13 19:37:38 +02:00
sigframe.h
signal_32.c
signal_64.c
smp.c x86: fix app crashes after SMP resume 2008-05-13 19:36:12 +02:00
smpboot.c x86: fix cpu hotplug crash 2008-06-30 13:15:43 +02:00
smpcommon.c
smpcommon_32.c
srat_32.c
stacktrace.c
step.c
summit_32.c
sys_i386_32.c
sys_x86_64.c
syscall_64.c
syscall_table_32.S
tce_64.c
test_nx.c
test_rodata.c
time_32.c
time_64.c
tlb_32.c
tlb_64.c
tls.c
tls.h
topology.c
trampoline.c
trampoline_32.S
trampoline_64.S
traps_32.c x86, lockdep: fix "WARNING: at kernel/lockdep.c:2658 check_flags+0x4c/0x128()" 2008-06-12 21:27:19 +02:00
traps_64.c
tsc_32.c x86, 32-bit: fix boot failure on TSC-less processors 2008-06-19 10:08:47 +02:00
tsc_64.c x86: fix setup of cyc2ns in tsc_64.c 2008-05-23 14:08:06 +02:00
tsc_sync.c
verify_cpu_64.S
vm86_32.c
vmi_32.c
vmiclock_32.c
vmlinux.lds.S
vmlinux_32.lds.S
vmlinux_64.lds.S
vsmp_64.c
vsyscall_64.c
x8664_ksyms_64.c x86: fix csum_partial() export 2008-05-13 19:38:47 +02:00