1
0
Fork 0
Commit Graph

62584 Commits (77668791d96436f48fca94255934b67dab924a0f)

Author SHA1 Message Date
Avi Kivity 77668791d9 KVM: Require CONFIG_ANON_INODES
Found by Sebastian Siewior and randconfig.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:13:59 -07:00
Linus Torvalds 39804b20f6 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* '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-22 11:04:11 -07:00
Andi Kleen 83e2b5ef05 x86_64: Share msidef.h and hypertransport.h includes with i386
They are identical

Indirectly pointed out by Thomas Gleixner

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Andi Kleen b5d009ca6b x86_64: Remove outdated comment in boot decompressor Makefile
64bit code in there now since some time.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Andi Kleen 92417df076 x86_64: Squash initial_code modpost warnings
Get rid of warnings like

WARNING: vmlinux.o(.bootstrap.text+0x1a8): Section mismatch: reference to .init.text:x86_64_start_kernel (between 'initial_code' and 'init_rsp')

- Move initialization code into .text.head like i386 because modpost knows about this already
- Mark initial_code .initdata

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Sam Ravnborg dec2e6b7aa x86_64: fix section mismatch warning in init.c
Fix following warning:
WARNING: vmlinux.o(.text+0x188ea): Section mismatch: reference to .init.text:__alloc_bootmem_core (between 'alloc_bootmem_high_node' and 'get_gate_vma')

alloc_bootmem_high_node() is only used from __init scope so declare it __init.
And in addition declare the weak variant __init too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Sam Ravnborg 7aa6ec56b9 x86_64: fix section mismatch warning in hpet.c
Fix following warnings:
WARNING: vmlinux.o(.text+0x945e): Section mismatch: reference to .init.text:__set_fixmap (between 'hpet_arch_init' and 'hpet_mask_rtc_irq_bit')
WARNING: vmlinux.o(.text+0x9474): Section mismatch: reference to .init.text:__set_fixmap (between 'hpet_arch_init' and 'hpet_mask_rtc_irq_bit')

hpet_arch_init is only used from __init context so mark it __init.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Björn Steinbrink a284b0518d i386: Fix the K7 NMI watchdog checkbit
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-22 11:03:38 -07:00
Andi Kleen e05aff854c i386: Use patchable lock prefix in set_64bit
Previously lock was unconditionally used, but shouldn't be needed on
UP systems.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Andi Kleen 57c22f49e4 i386: Handle P6s without performance counters in nmi watchdog
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-22 11:03:38 -07:00
Juergen Beisert f25f64ed5b x86: Replace NSC/Cyrix specific chipset access macros by inlined functions.
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-22 11:03:38 -07:00
Mathieu Desnoyers bdda1561ff x86_64: x86_64 - Use non locked version for local_cmpxchg()
local_cmpxchg() should not use any LOCK prefix.  This change probably
got lost in the move to cmpxchg.h.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Keith Owens 20fe1d30e7 i386: Do not include other cpus' interrupt 0 in nmi_watchdog
kstat_irqs(0) includes the count of interrupt 0 from all cpus, not just
the current cpu.  The updated interrupt 0 on other cpus can stop the
nmi_watchdog from tripping, so only include the current cpu's int 0.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Andi Kleen 398cf2abdb i386: Tune AMD Fam10h/11h like K8
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-22 11:03:38 -07:00
Andi Kleen 0bd8acd1a7 x86_64: Set K8 CPUID flag for K8/Fam10h/Fam11h
Previously this flag was only used on 32bit, but some shared code can use
it now.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:38 -07:00
Andi Kleen fbab6e7a5c i386: Fix cpu_llc_id section mismatch warning
Fix

WARNING: arch/i386/kernel/built-in.o(.text+0xdd0d): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')
WARNING: arch/i386/kernel/built-in.o(.text+0xdd1b): Section mismatch: reference to .init.data:cpu_llc_id (between 'set_cpu_sibling_map' and 'initialize_secondary')

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:37 -07:00
Andi Kleen 8f4e956b31 x86: Stop MCEs and NMIs during code patching
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-22 11:03:37 -07:00
Andi Kleen 19d36ccdc3 x86: Fix alternatives and kprobes to remap write-protected kernel text
Reenable kprobes and alternative patching when the kernel text is write
protected by DEBUG_RODATA

Add a general utility function to change write protected text.  The new
function remaps the code using vmap to write it and takes care of CPU
synchronization.  It also does CLFLUSH to make icache recovery faster.

There are some limitations on when the function can be used, see the
comment.

This is a newer version that also changes the paravirt_ops code.
text_poke also supports multi byte patching now.

Contains bug fixes from Zach Amsden and suggestions from Mathieu
Desnoyers.

Cc: Jan Beulich <jbeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Zach Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:37 -07:00
Glauber de Oliveira Costa f51c94528a x86_64: Use read and write crX in .c files
This patch uses the read and write functions provided at system.h
for control registers instead of writting raw assembly over and
over again in .c files. Functions to manipulate cr2 and cr8 were
provided, as they were lacking.

Also, removed some extra space after closing brackets

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:37 -07:00
Masoud Asgharifard Sharbiani abd4f7505b x86: i386-show-unhandled-signals-v3
This patch makes the i386 behave the same way that x86_64 does when a
segfault happens.  A line gets printed to the kernel log so that tools
that need to check for failures can behave more uniformly between
debug.show_unhandled_signals sysctl variable to 0 (or by doing echo 0 >
/proc/sys/debug/exception-trace)

Also, all of the lines being printed are now using printk_ratelimit() to
deny the ability of DoS from a local user with a program like the
following:

main()
{
       while (1)
               if (!fork()) *(int *)0 = 0;
}

This new revision also includes the fix that Andrew did which got rid of
new sysctl that was added to the system in earlier versions of this.
Also, 'show-unhandled-signals' sysctl has been renamed back to the old
'exception-trace' to avoid breakage of people's scripts.

AK: Enabling by default for i386 will be likely controversal, but let's see what happens
AK: Really folks, before complaining just fix your segfaults
AK: I bet this will find a lot of silent issues

Signed-off-by: Masoud Sharbiani <masouds@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
[ Personally, I've found the complaints useful on x86-64, so I'm all for
  this. That said, I wonder if we could do it more prettily..   -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 11:03:37 -07:00
Al Viro 5fa63fccc5 Fix ppc64 mismerge
Fix a mismerge in commit 8b6f50ef1d5cc86b278eb42bc91630fad455fb10:
"spufs: make signal-notification files readonly for NOSCHED contexts",
where structs got duplicated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-22 10:41:27 -07:00
Len Brown 17c50b4102 Pull tables-in-sysfs into release branch 2007-07-22 04:14:18 -04:00
Len Brown 0d090b6819 Pull netlink into release branch 2007-07-22 04:14:07 -04:00
Zhang Rui d4c5f047ae ACPI: Populate /sys/firmware/acpi/tables/
The file name is the signature, such as DSDT,
and the contents are the binary table image.

Some tables, such as the SSDT, can have multiple instances.
If just one, the file is SSDT, but if 3 instances,
for example, it will be SSDT1, SSDT2, SSDT3

All static tables (besides teh RSDP and RSDT themselves
are exported.  Dynamic tables, such as SSDT op-regions that
are not declared in the RSDT, will be added in a subsequent patch.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 02:42:45 -04:00
Len Brown b4b613fd83 Pull osi into release branch 2007-07-22 02:29:41 -04:00
Len Brown 5e16e3f0e2 Pull video into release branch 2007-07-22 02:28:33 -04:00
Len Brown dcb76f8868 Pull throttle into release branch 2007-07-22 02:28:18 -04:00
Len Brown 08e31686d6 Pull thinkpad into release branch 2007-07-22 02:28:06 -04:00
Len Brown d6da5ce8cc Pull sony into release branch 2007-07-22 02:27:56 -04:00
Len Brown f79e3185dd Pull misc into release branch
Conflicts:

	Documentation/feature-removal-schedule.txt
2007-07-22 02:27:40 -04:00
Len Brown e8b495fe09 Pull dock-bay into release branch 2007-07-22 02:25:18 -04:00
Len Brown 22aadf8a07 Pull bugzilla-7880 into release branch 2007-07-22 02:25:03 -04:00
Len Brown 2e85622042 Pull ec into release branch 2007-07-22 02:24:51 -04:00
Len Brown b43035a5ec Pull sbs into release branch 2007-07-22 02:24:42 -04:00
Len Brown 8269cc4e2b Pull battery into release branch 2007-07-22 02:24:31 -04:00
Len Brown 939ab20152 Pull acpi-debug into release branch 2007-07-22 02:22:55 -04:00
Len Brown d9ff963801 Pull acpica into release branch 2007-07-22 02:22:43 -04:00
Thomas Renninger 798d910398 ACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACE
Split ACPI_DEBUG into function trace enabled and not enabled.

Function trace is most of the ACPI_DEBUG costs, but is
not much of use for kernel ACPI debugging.

Size of kernel image increased on test compile:
+ 48k  (Full ACPI_DEBUG)
+ 35k  (ACPI_DEBUG with function trace compiled out)

Performance without function trace is also much better.

Also remove ACPI_LV_DEBUG_OBJECT from default debug level as
a lot vendors let Store (value, debug) in their code and this
might confuse users when it pops up in syslog.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 02:20:07 -04:00
Zhang Rui 8b8eb7d8cf ACPI: update ACPI proc I/F removal schedule
ACPI sysfs conversion is not finished yet and
some user space tools still depend on the ACPI proc I/F.

We plan to finish all the sysfs conversion by January 2008
and remove the ACPI proc I/F in July 2008.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 02:09:16 -04:00
Zhang Rui 7a9b9068b8 ACPI: update feature-removal-schedule.txt, /sys/firmware/acpi/namespace is gone
The /sys/firmware/acpi/namespace has already been removed in 2.6.21.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 02:08:16 -04:00
Zhang Rui 9c977a453e ACPI: export ACPI events via acpi_mc_group multicast group
This is an incremental patch for the recent genetlink
multicast changes.

Now ACPI events are exported via generic netlink multicast group.

Thanks for Johannes' help on developing this patch

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 01:05:16 -04:00
Dave Jones 4ebf83c8cf ACPI: fix empty macros found by -Wextra
ACPI has a ton of macros which make a bunch of empty if's when configured
in non-debug mode.

[lenb: The code it complaines about is functionally correct,
 so this patch is just to make -Wextra happier]

#define DBG()

if(...)
        DBG();
next_c_statement

which turns into
if(...) ;
next_c_statement

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:54:24 -04:00
Dan Aloni 0dc070bb02 ACPI: drivers/acpi/pci_link.c: lower printk severity
Signed-off-by: Dan Aloni <da-x@monatomic.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:48:48 -04:00
Mattia Dongili 22a1778058 sony-laptop: Fix event reading in sony-laptop
The rewritten event reading code from sonypi was absolutely wrong,
this patche makes things functional for type2 and type1 models.

Cc: Andrei Paskevich <andrei@capet.iut-fbleau.fr>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili 89892d153d sony-laptop: Add Vaio FE to the special init sequence
The Vaio FE series uses the same sequence as Vaio C series

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili bc57f865fa sony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.
The following is the only way I could think of to hide some events as
per Dmitry suggestions while still using the default {set,get}keycode
implementation.

Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili b25b732a16 sony-laptop: Invoke _INI for SNC devices that provide it
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili 6315fd1c9c sony-laptop: Add support for recent Vaios Fn keys (C series for now)
Recent Vaios (C, AR, N, FE) need some special initialization
sequence to enable Fn keys interrupts through the Embedded
Controller. Moreover Fn keys have to be decoded internally
using ACPI methods to get the key code.
Thus a new DMI table to add SNC init time callbacks and new
mappings for model-specific key code to generic sony-laptop
code have been added.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili 8538c3686c sony-laptop: map wireless switch events to KEY_WLAN
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili 044847e02d sony-laptop: add new SNC handlers
- lid state: GLID
- indicator lamp: GILS/SILS
- multimedia bass gain: GMGB/CMGB

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00