aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-11i386: move kernel/cpuThomas Gleixner15-4540/+0
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11i386: move kernel/cpu/mtrrThomas Gleixner10-2622/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11i386: move kernel/cpu/cpufreqThomas Gleixner23-9443/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-11i386: move kernel/cpu/mcheckThomas Gleixner11-947/+1
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-07Longhaul: add auto enabled "revid_errata" optionRafal Bilski1-3/+57
VIA C3 Ezra-T has RevisionID equal to 1, but it needs RevisionKey to be 0 or CPU will ignore new frequency and will continue to work at old frequency. New "revid_errata" option will force RevisionKey to be set to 0, whatever RevisionID is. Additionaly "Longhaul" will not silently ignore unsuccessful transition. It will try to check if "revid_errata" or "disable_acpi_c3" options need to be enabled for this processor/system. Same for Longhaul ver. 2 support. It will be disabled if none of above options will work. Best case scenario (with patch apllied and v2 enabled): longhaul: VIA C3 'Ezra' [C5C] CPU detected. Longhaul v2 supported. longhaul: Using northbridge support. longhaul: VRM 8.5 longhaul: Max VID=1.350 Min VID=1.050, 13 possible voltage scales longhaul: f: 300000 kHz, index: 0, vid: 1050 mV [...] longhaul: Voltage scaling enabled. Worst case scenario: longhaul: VIA C3 'Ezra-T' [C5M] CPU detected. Powersaver supported. longhaul: Using northbridge support. longhaul: Using ACPI support. longhaul: VRM 8.5 longhaul: Claims to support voltage scaling but min & max are both 1.250. Voltage scaling disabled longhaul: Failed to set requested frequency! longhaul: Enabling "Ignore Revision ID" option. longhaul: Failed to set requested frequency! longhaul: Disabling ACPI C3 support. longhaul: Disabling "Ignore Revision ID" option. longhaul: Failed to set requested frequency! longhaul: Enabling "Ignore Revision ID" option. [akpm@linux-foundation.org: coding-style cleanups] Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.Andi Kleen1-1/+3
AK: Removed the unlikelies because gcc heuristics default to unlikely AK: for test == NULL and for negative returns. Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Ashok Raj <ashok.raj@intel.com> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10i386: Fix perfctr watchdog on core duoStephane Eranian1-6/+22
Fix the NMI watchdog on Intel CoreDuo processor where the kernel would get stuck during boot. The issue is related to errata AE49, where the PERFEVTSEL1 counter does not have a working enable bit. Thus it is not possible to use it for NMI. The patch creates a dedicated wd_ops for CoreDuo which falls back to using PERFEVTSEL0. The other Intel processors supporting the architectural PMU will keep on using PERFEVTSEL1 as this allows other subsystems, such as perfmon, to use PERFEVTSEL0 for PEBS monitoring in particular. Bug initially reported by Daniel Walker. AK: Added comments Signed-off-by: Stephane Eranian <eranian@hpl.hp.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-12Pull processor into release branchLen Brown1-26/+15
2007-08-11i386: Use global flag to disable broken local apic timer on AMD CPUs.Andi Kleen1-1/+6
The Averatec 2370 and some other Turion laptop BIOS seems to program the ENABLE_C1E MSR inconsistently between cores. This confuses the lapic use heuristics because when C1E is enabled anywhere it seems to affect the complete chip. Use a global flag instead of a per cpu flag to handle this. If any CPU has C1E enabled disabled lapic use. Thanks to Cal Peake for debugging. Cc: tglx@linutronix.de Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-07acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issuesFenghua Yu1-26/+15
This patch addresses some issues in x86/x86-64 acpi-cpufreq driver: 1. Current memory allocation for acpi_perf_data is actually open-coded alloc_percpu(). The patch defines and handles acpi_perf_data as percpu data. The code will be cleaner and easier to be maintained with this change. 2. Won't load driver in acpi_cpufreq_early_init() failure case. 3. Add __init for acpi_cpufreq_early_init(). Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-31i386: include asm/bugs.h in bugs.c for check_bugs prototypeJosh Triplett1-0/+1
C files should include the header files that prototype their functions. Eliminates a sparse warning: warning: symbol 'check_bugs' was not declared. Should it be static? Signed-off-by: Josh Triplett <josh@kernel.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-31Fix uninitialized local variable "covered" in i386 acpi-cpufreq driverFenghua Yu1-3/+1
The local variable "covered" is used without initialization in i386 acpi-cpufreq driver. The initial value of covered should be 0. The bug will cause memory leak when hit. The following patch fixes this bug. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-26X86_POWERNOW_K8_ACPI must depend on ACPIAdrian Bunk1-1/+1
This patch fixes the following compile error introduced by commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported by Alexey Dobriyan: <-- snip --> CC arch/i386/kernel/acpi/cstate.o In file included from arch/i386/kernel/acpi/cstate.c:17: include/acpi/processor.h:88: error: expected specifier-qualifier-list before 'acpi_integer' <-- snip --> If you select something you must ensure that the dependencies of what you are selecting are fulfilled. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Alexey Dobriyan <adobriyan@sw.ru> Cc: Joshua Hoblitt <jhoblitt@ifa.hawaii.edu> Cc: Dave Jones <davej@redhat.com> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: Len Brown <lenb@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6Linus Torvalds1-2/+2
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (77 commits) ACPI: Populate /sys/firmware/acpi/tables/ ACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACE ACPI: update ACPI proc I/F removal schedule ACPI: update feature-removal-schedule.txt, /sys/firmware/acpi/namespace is gone ACPI: export ACPI events via acpi_mc_group multicast group ACPI: fix empty macros found by -Wextra ACPI: drivers/acpi/pci_link.c: lower printk severity sony-laptop: Fix event reading in sony-laptop sony-laptop: Add Vaio FE to the special init sequence sony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode key table. sony-laptop: Invoke _INI for SNC devices that provide it sony-laptop: Add support for recent Vaios Fn keys (C series for now) sony-laptop: map wireless switch events to KEY_WLAN sony-laptop: add new SNC handlers ACPI: thinkpad-acpi: add locking to brightness subdriver ACPI: thinkpad-acpi: bump up version to 0.15 ACPI: thinkpad-acpi: make EC-based thermal readings non-experimental ACPI: thinkpad-acpi: make sure DSDT TMPx readings don't return +128 ACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key ACPI: thinkpad-acpi: allow use of CMOS NVRAM for brightness control ...
2007-07-22i386: Fix the K7 NMI watchdog checkbitBjörn Steinbrink1-1/+1
The performance counters on K7 are only 48 bits wide, so using bit 63 to check if the counter overflowed is wrong. Let's use bit 47 instead. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Don Zickus <dzickus@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22i386: Handle P6s without performance counters in nmi watchdogAndi Kleen1-1/+3
I got an oops while booting a 32bit kernel on KVM because it doesn't implement performance counters used by the NMI watchdog. Handle this case. Cc: Avi Kivity <avi@qumranet.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22x86: Replace NSC/Cyrix specific chipset access macros by inlined functions.Juergen Beisert4-2/+4
Due to index register access ordering problems, when using macros a line like this fails (and does nothing): setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88); With inlined functions this line will work as expected. Note about a side effect: Seems on Geode GX1 based systems the "suspend on halt power saving feature" was never enabled due to this wrong macro expansion. With inlined functions it will be enabled, but this will stop the TSC when the CPU runs into a HLT instruction. Kernel output something like this: Clocksource tsc unstable (delta = -472746897 ns) This is the 3rd version of this patch. - Adding missed arch/i386/kernel/cpu/mtrr/state.c Thanks to Andres Salomon - Adding some big fat comments into the new header file Suggested by Andi Kleen AK: fixed x86-64 compilation Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22i386: Tune AMD Fam10h/11h like K8Andi Kleen1-0/+3
This mainly changes the nops for alternative, so not very revolutionary. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22x86: Stop MCEs and NMIs during code patchingAndi Kleen1-0/+14
When a machine check or NMI occurs while multiple byte code is patched the CPU could theoretically see an inconsistent instruction and crash. Prevent this by temporarily disabling MCEs and returning early in the NMI handler. Based on discussion with Mathieu Desnoyers. Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22Pull bugzilla-7880 into release branchLen Brown1-2/+2
2007-07-21i386: fix section mismatch warning in intel_cacheinfoSam Ravnborg1-1/+1
Fix following warning: WARNING: arch/i386/kernel/built-in.o(.init.text+0x3818): Section mismatch: reference to .exit.text:cache_remove_dev (between 'cacheinfo_cpu_callback' and 'cache_sysfs_init') It points out that a function marked __cpuexit is calling a function marked __cpuinit => oops. The call happens only in an error-condition which may explain why we have not seen it before. The offending function was not used anywhere else - so marked it __cpuexit. Note: This warning triggers only with a local copy of modpost but that version will soon be pushed out. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21x86: remove support for the Rise CPUAdrian Bunk3-55/+0
The Rise CPUs were only very short-lived, and there are no reports of anyone both owning one and running Linux on it. Googling for the printk string "CPU: Rise iDragon" didn't find any dmesg available online. If it turns out that against all expectations there are actually users reverting this patch would be easy. This patch will make the kernel images smaller by a few bytes for all i386 users. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21x86: round_jiffies() for i386 and x86-64 non-critical/corrected MCE pollingVenki Pallipadi1-2/+2
This helps to reduce the frequency at which the CPU must be taken out of a lower-power state. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Acked-by: Tim Hockin <thockin@hockin.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21i386: fix section mismatch warnings in mtrrSam Ravnborg2-2/+2
Following section mismatch warnings were reported by Andrey Borzenkov: WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text:amd_init_mtrr from .text between 'mtrr_bp_init' (at offset 0x967a) and 'mtrr_attrib_to_str' WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text:cyrix_init_mtrr from .text between 'mtrr_bp_init' (at offset 0x967f) and 'mtrr_attrib_to_str' WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text:centaur_init_mtrr from .text between 'mtrr_bp_init' (at offset 0x9684) and 'mtrr_attrib_to_str' WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text: from .text between 'get_mtrr_state' (at offset 0xa735) and 'generic_get_mtrr' WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text: from .text between 'get_mtrr_state' (at offset 0xa749) and 'generic_get_mtrr' WARNING: arch/i386/kernel/built-in.o - Section mismatch: reference to .init.text: from .text between 'get_mtrr_state' (at offset 0xa770) and 'generic_get_mtrr' It was tracked down to a few functions missing __init tag. Compile tested only. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21i386: Reserve the right performance counter for the Intel PerfMon NMI watchdogBjörn Steinbrink1-2/+2
The Intel PerfMon NMI watchdog reserves the first performance counter, but uses the second one. Make it correctly reserve the second one. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21i386: Add L3 cache support to AMD CPUID4 emulationAndi Kleen2-22/+60
With that an L3 cache is correctly reported in the cache information in /sys With fixes from Andreas Herrmann and Dean Gaudet and Joachim Deguara Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21i386: intel_cacheinfo.c:find_num_cache_leaves() should be __cpuinitAdrian Bunk1-2/+1
WARNING: arch/i386/kernel/built-in.o(.text+0xb6a7): Section mismatch: reference to .init.text:find_num_cache_leaves (between 'init_intel_cacheinfo' and 'cache_shared_cpu_map_setup') It could be __init_refok, but gcc >= 4.0 anyway inlines it into the __cpuinit init_intel_cacheinfo(), and IMHO it's too small for "noinline __init". Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16HOTPLUG: Adapt thermal throttle to CPU_DYINGAvi Kivity1-2/+4
CPU_DYING is notified in atomic context, so no taking mutexes here. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-07-13[CPUFREQ] Fix typos in powernow-k8 printk's.Dave Jones1-8/+11
Based on a patch from Joachim which didn't apply, so I fixed it up by hand, and also corrected the surrounding indentation a little. Signed-off-by: Joachim.Deguara <joachim.deguara@amd.com> Acked-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
2007-07-13[CPUFREQ] powernow-k8 compile fix.Andrew Morton1-1/+6
Make it compile on UP. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <davej@redhat.com>
2007-07-13[CPUFREQ] the overdue removal of X86_SPEEDSTEP_CENTRINO_ACPIAdrian Bunk2-276/+18
This patch contains the overdue removal of X86_SPEEDSTEP_CENTRINO_ACPI. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
2007-07-13[CPUFREQ] Longhaul - Option to disable ACPI C3 supportRafał Bilski1-0/+7
On some motherboards ACPI C3 is available, but it isn't causing frequency transition on VIA Nehemiah. Longhaul wasn't working at all earlier, but due to scaling_cur_speed returning true CPU frequency now, it looks like CPU is getting stuck at highest frequency since 2.6.21. I didn't find a reason. Halt is causing frequency transition. Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com>
2007-07-12Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreqLinus Torvalds5-90/+162
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Fix sysfs_create_file return value handling [CPUFREQ] ondemand: fix tickless accounting and software coordination bug [CPUFREQ] ondemand: add a check to avoid negative load calculation [CPUFREQ] Keep userspace governor quiet when it is not being used [CPUFREQ] Longhaul - Proper register access [CPUFREQ] Kconfig powernow-k8 driver should depend on ACPI P-States driver [CPUFREQ] Longhaul - Replace ACPI functions with direct I/O [CPUFREQ] Longhaul - Remove duplicate multipliers [CPUFREQ] Longhaul - Embedded "conservative" [CPUFREQ] acpi-cpufreq: Proper ReadModifyWrite of PERF_CTL MSR [CPUFREQ] check return value of sysfs_create_file [CPUFREQ] Longhaul - Check ACPI "BM DMA in progress" bit [CPUFREQ] Longhaul - Move old_ratio to correct place [CPUFREQ] Longhaul - VT8237 support [CPUFREQ] Longhaul - Use all kinds of support [CPUFREQ] powernow-k8: clarify number of cores.
2007-07-12Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds3-11/+3
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
2007-07-12Use a new CPU feature word to cover features that are spread aroundVenki Pallipadi4-1/+59
Some Intel features are spread around in different CPUID leafs like 0x5, 0x6 and 0xA. Make this feature detection code common across i386 and x86_64. Display Intel Dynamic Acceleration feature in /proc/cpuinfo. This feature will be enabled automatically by current acpi-cpufreq driver. Refer to Intel Software Developer's Manual for more details about the feature. Thanks to hpa (H Peter Anvin) for the making the actual code detecting the scattered features data-driven. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Unify the CPU features vectors between i386 and x86-64H. Peter Anvin1-6/+9
Unify the handling of the CPU features vectors between i386 and x86-64. This also adopts the collapsing of features which are required at compile-time into constant tests from x86-64 to i386. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-11PCI: Change all drivers to use pci_device->revisionAuke Kok3-11/+3
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-06MTRR: Fix race causing set_mtrr to go into infinite loopLoic Prylli1-0/+4
Processors synchronization in set_mtrr requires the .gate field to be set after .count field is properly initialized. Without an explicit barrier, the compiler was reordering those memory stores. That was sometimes causing a processor (in ipi_handler) to see the .gate change and decrement .count before the latter is set by set_mtrr() (which then hangs in a infinite loop with irqs disabled). Signed-off-by: Loic Prylli <loic@myri.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-03Revert perfctr reservation to 2.6.21 stateAndi Kleen1-2/+33
With this change it works again when the nmi watchdog is disabled. Signed-off-by: Andi Kleen <ak@suse.de> Cc: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Stephane Eranian <eranian@hpl.hp.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-01i386: mtrr crash fixAndrew Morton1-1/+2
Commit 3ebad5905609476a4ff1151a66b21d9794009961 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending") added mtrr operations without verifying that the CPU has MTRRs. Crashes transmeta CPUs. Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: <linux@horizon.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-01i386: remove bogus mtrr range checkLinus Torvalds1-5/+0
Commit 9215da33209b861b01c51382254b178a3fe92a30 "fixed" the MTRR range check to not allow any MTRR's under the 1MB mark (since that's where the fixed MTRR's are active). However, that was totally bogus, since it's normal (and almost required) to have a large variable MTRR that starts at 0, and covers some large percentage of the whole RAM, and then using the fixed MTRR's to override that large MTRR to handle the special ISA hole in the 640k-1M region. The old check was bogus too (checking that no variable MTRR is used that is entirely under the 1MB range), but at least it wasn't actively detrimental, because no sane situation would ever trigger such MTRR usage in the first place. That said, the whole notion of not allowing variable MTRR's in the low 1MB is just stupid, so rather than revert the commit, this just removes the whole sad and unnecessary check entirely. Cc: Jan Beulich <jbeulich@novell.com> Cc: Andi Kleen <ak@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Tested-by: Luca Palermo <darkmage@sabayonlinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-28mtrr/cyrix: fix sectionsRandy Dunlap1-2/+2
main.c::mtrr_add() or mtrr_del() [exported] calls main.c::mtrr_add_page() or mtrr_del_page() or mtrr_restore() [resume] calls main.c::set_mtrr() calls main.c::ipi_handler() calls main.c::mtrr_if->set_all() == which can be cyrix_set_all WARNING: arch/i386/kernel/built-in.o(.text+0x8657): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region') WARNING: arch/i386/kernel/built-in.o(.text+0x866b): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region') WARNING: arch/i386/kernel/built-in.o(.text+0x867e): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region') WARNING: arch/i386/kernel/built-in.o(.text+0x8684): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region') WARNING: arch/i386/kernel/built-in.o(.text+0x868a): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-21[CPUFREQ] Longhaul - Proper register accessRafał Bilski1-6/+6
In previous commit I used u32 for u16 register. This code will work only when ACPI block address is set. For now it is only for VT8235 and VT8237. Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com>
2007-06-20x86_64: fix link warning between for .text and .init.textYinghai Lu2-3/+3
WARNING: arch/x86_64/kernel/built-in.o(.text+0xace9): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr') WARNING: arch/x86_64/kernel/built-in.o(.text+0xad09): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr') WARNING: arch/x86_64/kernel/built-in.o(.text+0xad38): Section mismatch: reference to .init.text: (between 'get_mtrr_state' and 'mtrr_wrmsr') WARNING: drivers/built-in.o(.text+0x3a680): Section mismatch: reference to .init.text:acpi_map_pxm_to_node (between 'acpi_get_node' and 'acpi_lock_ac_dir') AK: also marked mtrr_bp_init __init to avoid some more warnings Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-16perfctr-watchdog: fix interchanged parameters to release_{evntsel,perfctr}_nmiBjörn Steinbrink1-5/+5
Fix oops triggered during: echo 0 > /proc/sys/kernel/nmi_watchdog The culprit seems to be 09198e68501a7e34737cd9264d266f42429abcdc: [PATCH] i386: Clean up NMI watchdog code In two places, the parameters to release_{evntsel,perfctr}_nmi got interchanged during the cleanup. Fix interchanged parameters to release_{evntsel,perfctr}_nmi. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Stephane Eranian <eranian@hpl.hp.com> Cc: Andi Kleen <ak@suse.de> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-16i386: use the right wrapper to disable the NMI watchdogBjörn Steinbrink1-5/+5
When disabled through /proc/sys/kernel/nmi_watchdog, the NMI watchdog uses the stop() method directly, which does not decrement the activity counter, leading to a BUG(). Use the wrapper function instead to fix that. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-16i386: fix NMI watchdog not reserving its MSRsBjörn Steinbrink1-0/+6
At system boot time, the NMI watchdog no longer reserved its MSRs, allowing other subsystems to mess with them. Fix that. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-13ACPI: Discard invalid elements in _PSS packageZhang Rui1-2/+2
Make sure that the _PSS list is sorted in descending order by typical power dissipation. http://bugzilla.kernel.org/show_bug.cgi?id=7880 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-06[CPUFREQ] Kconfig powernow-k8 driver should depend on ACPI P-States driverJoshua Hoblitt1-3/+10
powernow-k8 really needs to use ACPI to function on SMP systems. The current Kconfig allows us to build kernels which fail mysteriously for some users due to us trying to automatically enable this, and getting it wrong. It's easier to just present this as an option to the user. Signed-off-by: Joshua Hoblitt <jhoblitt@ifa.hawaii.edu> Signed-off-by: Dave Jones <davej@redhat.com>
2007-06-06[CPUFREQ] Longhaul - Replace ACPI functions with direct I/ORafał Bilski1-7/+16
Current version of "bm status" bit test works as long as no USB device is in use. When USB device is plugged in ACPI function in this context is always returning 1. Until reboot. Direct I/O is working fine even when many USB devices are connected. Change bm_timeout value to less annoying. 1000 is still much more then worst case observed and it is much better when status bit gets stuck. Signed-off-by: Rafal Bilski <rafalbilski@interia.pl> Signed-off-by: Dave Jones <davej@redhat.com>