commit 2ffbb8377c7a0713baf6644e285adc27a5654582 Merge: 6840999... 80ef88d... Author: Linus Torvalds Date: Sat Nov 17 08:36:10 2007 -0800 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: simplify "make ARCH=x86" and fix kconfig all.config x86: reboot fixup for wrap2c board x86: check boundary in count setup resource x86: fix reboot with no keyboard attached x86: add hpet sanity checks x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c x86: fix freeze in x86_64 RTC update code in time_64.c ntp: fix typo that makes sync_cmos_clock erratic Remove x86 merge artifact from top Makefile x86: fixup cpu_info array conversion x86: show cpuinfo only for online CPUs x86: fix cpu-hotplug regression x86: ignore the sys_getcpu() tcache parameter x86: voyager use correct header file name x86: fix smp init sections x86: fix voyager_cat_init section x86: fix bogus memcpy in es7000_check_dsdt() commit 6840999b192b1b57d713ddee3761c457a2779036 Author: Sam Ravnborg Date: Sat Nov 17 15:37:31 2007 +0100 x86: simplify "make ARCH=x86" and fix kconfig all.config Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in all.config. For a fix the diffstat is nice: 6 files changed, 3 insertions(+), 36 deletions(-) The patch reverts these commits: - 0f855aa64b3f63d35a891510cf7db932a435c116 ("kconfig: add helper to set config symbol from environment variable") - 2a113281f5cd2febbab21a93c8943f8d3eece4d3 ("kconfig: use $K64BIT to set 64BIT with all*config targets") Roman Zippel pointed out that kconfig supported string compares so the additional complexity introduced by the above two patches were not needed. With this patch we have following behaviour: # make {allno,allyes,allmod,rand}config [ARCH=...] option \ host arch | 32bit | 64bit ===================================================== ./. | 32bit | 64bit ARCH=x86 | 32bit | 32bit ARCH=i386 | 32bit | 32bit ARCH=x86_64 | 64bit | 64bit The general rule are that ARCH= and native architecture takes precedence over the configuration. So make ARCH=i386 [whatever] will always build a 32-bit kernel no matter what the configuration says. The configuration will be updated to 32-bit if it was configured to 64-bit and the other way around. This behaviour is consistent with previous behaviour so no suprises here. make ARCH=x86 will per default result in a 32-bit kernel but as the only ARCH= value x86 allow the user to select between 32-bit and 64-bit using menuconfig. Signed-off-by: Sam Ravnborg Cc: Roman Zippel Cc: Andreas Herrmann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Linus Torvalds commit 80ef88d6d23bf1b94d65db0ac32334d01b9f7350 Author: Sam Ravnborg Date: Sat Nov 17 15:37:31 2007 +0100 x86: simplify "make ARCH=x86" and fix kconfig all.config Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in all.config. For a fix the diffstat is nice: 6 files changed, 3 insertions(+), 36 deletions(-) The patch reverts these commits: 0f855aa64b3f63d35a891510cf7db932a435c116 -> kconfig: add helper to set config symbol from environment variable 2a113281f5cd2febbab21a93c8943f8d3eece4d3 -> kconfig: use $K64BIT to set 64BIT with all*config targets Roman Zippel pointed out that kconfig supported string compares so the additional complexity introduced by the above two patches were not needed. With this patch we have following behaviour: # make {allno,allyes,allmod,rand}config [ARCH=...] option \ host arch | 32bit | 64bit ===================================================== ./. | 32bit | 64bit ARCH=x86 | 32bit | 32bit ARCH=i386 | 32bit | 32bit ARCH=x86_64 | 64bit | 64bit The general rule are that ARCH= and native architecture takes precedence over the configuration. So make ARCH=i386 [whatever] will always build a 32-bit kernel no matter what the configuration says. The configuration will be updated to 32-bit if it was configured to 64-bit and the other way around. This behaviour is consistent with previous behaviour so no suprises here. make ARCH=x86 will per default result in a 32-bit kernel but as the only ARCH= value x86 allow the user to select between 32-bit and 64-bit using menuconfig. Signed-off-by: Sam Ravnborg Cc: Roman Zippel Cc: Andreas Herrmann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" commit 6d1b30e30ca1c831b82c44aedd2536820bdb2bc4 Author: Denys Date: Sat Nov 17 16:27:02 2007 +0100 x86: reboot fixup for wrap2c board Needed to make the wireless board, WRAP2C reboot. Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner commit 3d9befd2cdf65b1768b0d3078a65cc0ae9aa6412 Author: Yinghai Lu Date: Sat Nov 17 16:27:01 2007 +0100 x86: check boundary in count setup resource need to check info->res_num less than PCI_BUS_NUM_RESOURCES, so info->bus->resource[info->res_num] = res will not beyond of bus resource array when acpi returns too many resource entries. Signed-off-by: Yinghai Lu Cc: Greg Kroah-Hartman Cc: Gary Hade Cc: Len Brown Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner commit 05dfa35e84331c6921ab394463069e9376f0bd76 Author: Truxton Fulton Date: Sat Nov 17 16:27:01 2007 +0100 x86: fix reboot with no keyboard attached Attempt to fix http://bugzilla.kernel.org/show_bug.cgi?id=8378 Hiroto Shibuya wrote to tell me that he has a VIA EPIA-EK10000 which suffers from the reboot problem when no keyboard is attached. My first patch works for him: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59f4e7d572980a521b7bdba74ab71b21f5995538 But the latest patch does not work for him : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b93789808756bcc1e5c90c99f1b1ef52f839a51 We found that it was necessary to also set the "disable keyboard" flag in the command byte, as the first patch was doing. The second patch tries to minimally modify the command byte, but it is not enough. Please consider this simple one-line patch to help people with low end VIA motherboards reboot when no keyboard is attached. Hiroto Shibuya has verified that this works for him (as I no longer have an afflicted machine). Additional discussion: Note that original patch from Truxton DOES disable keyboard and this has been in main tree since 2.6.14, thus it must have quite a bit of air time already. http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.14.y.git;a=commit;h=59f4e7d572980a521b7bdba74ab71b21f5995538 Note that he only mention "System flag" in the description and comment, but in the code, "disable keyboard" flag is set. outb(0x14, 0x60); /* set "System flag" */ In 2.6.23, he made a change to read the current byte and then mask the flags, but along this change, he only set the "System flag" and dropped the setting of "disable keyboard" flag. http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.23.y.git;a=commit;h=8b93789808756bcc1e5c90c99f1b1ef52f839a51 outb(cmd | 0x04, 0x60); /* set "System flag" */ So my request is to restore the setting of disable keyboard flag which has been there since 2.6.14 but disappeared in 2.6.23. Cc: Lee Garrett Cc: "Hiroto Shibuya" Cc: Natalie Protasevich Cc: Dmitry Torokhov Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Aristeu Rozanski Cc: Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner commit f4df73c2914a49bf6a55896aaecb0563c955e167 Author: Thomas Gleixner Date: Thu Nov 15 21:41:50 2007 -0500 x86: add hpet sanity checks Some BIOSes advertise HPET at 0x0. We really do no want to allocate a resource there. Check for it and leave early. Other BIOSes tell us the HPET is at 0xfed0000000000000 instead of 0xfed00000. Add a check and fix it up with a warning on user request. Signed-off-by: Thomas Gleixner commit bbbd99955bfe84c9ae63f51db946a7bcd21f48be Author: David P. Reed Date: Wed Nov 14 20:14:50 2007 -0500 x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c Correct potentially unstable PC RTC time register reading in time_64.c Stop the use of an incorrect technique for reading the standard PC RTC timer, which is documented to "disconnect" time registers from the bus while updates are in progress. The use of UIP flag while interrupts are disabled to protect a 244 microsecond window is one of the Motorola spec sheet's documented ways to read the RTC time registers reliably. tglx: removed locking changes from original patch, as they gain nothing (read_persistent_clock is only called during boot, suspend, resume - so no hot path affected) and conflict with the paravirt locking scheme (see 32bit code), which we do not want to complicate for no benefit. Signed-off-by: David P. Reed Signed-off-by: Thomas Gleixner commit c399da0d97e06803e51085ec076b63a3168aad1b Author: David P. Reed Date: Wed Nov 14 17:47:35 2007 -0500 x86: fix freeze in x86_64 RTC update code in time_64.c Fix hard freeze on x86_64 when the ntpd service calls update_persistent_clock() A repeatable but randomly timed freeze has been happening in Fedora 6 and 7 for the last year, whenever I run the ntpd service on my AMD64x2 HP Pavilion dv9000z laptop. This freeze is due to the use of spin_lock(&rtc_lock) under the assumption (per a bad comment) that set_rtc_mmss is called only with interrupts disabled. The call from ntp.c to update_persistent_clock is made with interrupts enabled. Signed-off-by: David P. Reed Signed-off-by: Thomas Gleixner commit fa6a1a554b50cbb7763f6907e6fef927ead480d9 Author: David P. Reed Date: Wed Nov 14 17:49:21 2007 -0500 ntp: fix typo that makes sync_cmos_clock erratic Fix a typo in ntp.c that has caused updating of the persistent (RTC) clock when synced to NTP to behave erratically. When debugging a freeze that arises on my AMD64 machines when I run the ntpd service, I added a number of printk's to monitor the sync_cmos_clock procedure. I discovered that it was not syncing to cmos RTC every 11 minutes as documented, but instead would keep trying every second for hours at a time. The reason turned out to be a typo in sync_cmos_clock, where it attempts to ensure that update_persistent_clock is called very close to 500 msec. after a 1 second boundary (required by the PC RTC's spec). That typo referred to "xtime" in one spot, rather than "now", which is derived from "xtime" but not equal to it. This makes the test erratic, creating a "coin-flip" that decides when update_persistent_clock is called - when it is called, which is rarely, it may be at any time during the one second period, rather than close to 500 msec, so the value written is needlessly incorrect, too. Signed-off-by: David P. Reed Signed-off-by: Thomas Gleixner commit d0974b11e0741034fc5d22838b9cb85402a280d6 Author: Thomas Gleixner Date: Thu Nov 15 07:11:12 2007 +0100 Remove x86 merge artifact from top Makefile The x86 merge modified the tags target to handle the two separate source directories. Remove it now that i386/x86_64 are gone completely. Signed-off-by: Thomas Gleixner commit 699d934d5f958d7944d195c03c334f28cc0b3669 Author: Thomas Gleixner Date: Sat Nov 17 13:18:42 2007 +0100 x86: fixup cpu_info array conversion 92cb7612aee39642d109b8d935ad265e602c0563 sets cpu_info->cpu_index to zero for no reason. Referencing cpu_info->cpu_index now points always to CPU#0, which is apparently not what we want. Remove it. Spotted-by: Zou Nan hai Signed-off-by: Thomas Gleixner commit c0c52d28e05e8bdaa2126570c02ecb1a7358cecc Author: Andreas Herrmann Date: Thu Nov 1 19:32:17 2007 +0100 x86: show cpuinfo only for online CPUs Fix regressions introduced with 92cb7612aee39642d109b8d935ad265e602c0563. It can happen that cpuinfo is displayed for CPUs that are not online or even worse for CPUs not present at all. As an example, following was shown for a "second" CPU of a single core K8 variant: processor : 0 vendor_id : unknown cpu family : 0 model : 0 model name : unknown stepping : 0 cache size : 0 KB fpu : yes fpu_exception : yes cpuid level : 0 wp : yes flags : bogomips : 0.00 clflush size : 0 cache_alignment : 0 address sizes : 0 bits physical, 0 bits virtual power management: Signed-off-by: Andreas Herrmann Signed-off-by: Thomas Gleixner commit 903675569e278af86aa08c2af238b0ab997065d1 Author: Andreas Herrmann Date: Wed Nov 7 02:12:58 2007 +0100 x86: fix cpu-hotplug regression Commit d435d862baca3e25e5eec236762a43251b1e7ffc ("cpu hotplug: mce: fix cpu hotplug error handling") changed the error handling in mce_cpu_callback. In cases where not all CPUs are brought up during boot (e.g. using maxcpus and additional_cpus parameters) mce_cpu_callback now returns NOTFIY_BAD because for such CPUs cpu_data is not completely filled when the notifier is called. Thus mce_create_device fails right at its beginning: if (!mce_available(&cpu_data[cpu])) return -EIO; As a quick fix I suggest to check boot_cpu_data for MCE. To reproduce this regression: (1) boot with maxcpus=2 addtional_cpus=2 on a 4 CPU x86-64 system (2) # echo 1 >/sys/devices/system/cpu/cpu2/online -bash: echo: write error: Invalid argument dmesg shows: _cpu_up: attempt to bring up CPU 2 failed Signed-off-by: Andreas Herrmann Signed-off-by: Thomas Gleixner commit 4307d1e5ada595c87f9a4d16db16ba5edb70dcb1 Author: Ingo Molnar Date: Wed Nov 7 18:37:48 2007 +0100 x86: ignore the sys_getcpu() tcache parameter dont use the vgetcpu tcache - it's causing problems with tasks migrating, they'll see the old cache up to a jiffy after the migration, further increasing the costs of the migration. In the worst case they see a complete bogus information from the tcache, when a sys_getcpu() call "invalidated" the cache info by incrementing the jiffies _and_ the cpuid info in the cache and the following vdso_getcpu() call happens after vdso_jiffies have been incremented. Signed-off-by: Ingo Molnar Signed-off-by: Ulrich Drepper Signed-off-by: Thomas Gleixner commit 434b3d3209a8d8dcda63c3b14815659f4671b0a8 Author: Randy Dunlap Date: Sun Nov 11 21:06:02 2007 -0800 x86: voyager use correct header file name Fix header file name for Voyager build. In file included from arch/x86/kernel/setup_32.c:61: include/asm-x86/mach-voyager/setup_arch.h:2:26: error: asm/setup_32.h: No such file or directory make[1]: *** [arch/x86/kernel/setup_32.o] Error 1 Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner commit 8f8182106890970bb13bed325f0a04aef931883d Author: Randy Dunlap Date: Sun Nov 11 21:06:45 2007 -0800 x86: fix smp init sections Fix Voyager section mismatch due to using __devinit instead of __cpuinit. WARNING: vmlinux.o(.text+0xd943): Section mismatch: reference to .init.text:init_gdt (between 'voyager_smp_prepare_boot_cpu' and 'smp_vic_cmn_interrupt') Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner commit e5ef67ef0b5d96315d3f7b74823cbfa85938a3a8 Author: Randy Dunlap Date: Sun Nov 11 21:06:23 2007 -0800 x86: fix voyager_cat_init section Fix Voyager section mismatches: voyager_cat_init() should be __init. WARNING: vmlinux.o(.text+0xee83): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xeea6): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xeeac): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xeeb2): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xef4c): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xef56): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf10f): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf13b): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf14b): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf159): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf1b1): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf1bb): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf1c1): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf1c7): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk') WARNING: vmlinux.o(.text+0xf1e6): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk') Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner commit 142d0a674d50b53366bd5ea02d7093d04960744e Author: Thomas Gleixner Date: Wed Nov 14 13:20:48 2007 +0100 x86: fix bogus memcpy in es7000_check_dsdt() es7000_check_dst() contains a memcpy from 0, which probably should have been a memset. Remove it and check the retunr value from acpi_get_table_header. Noticed by: Joe Perches Signed-off-by: Thomas Gleixner