openwrt/staging/blogic.git
17 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Sun, 22 Jul 2007 18:17:35 +0000 (11:17 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Clean up duplicate includes in drivers/macintosh/
  [POWERPC] Quiet section mismatch warning on pcibios_setup
  [POWERPC] init and exit markings for hvc_iseries
  [POWERPC] Quiet section mismatch in hvc_rtas.c
  [POWERPC] Constify of_platform_driver match_table
  [POWERPC] hvcs: Make some things static and const
  [POWERPC] Constify of_platform_driver name
  [POWERPC] MPIC protected sources
  [POWERPC] of_detach_node()'s device node argument cannot be const
  [POWERPC] Fix ARCH=ppc builds
  [POWERPC] mv64x60: Use mutex instead of semaphore
  [POWERPC] Allow smp_call_function_single() to current cpu
  [POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC
  [POWERPC] Fix future firmware feature fixups function failure
  [POWERPC] fix showing xmon help
  [POWERPC] Make xmon_write accept a const buffer
  [POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.
  [POWERPC] cell: CONFIG_SPE_BASE is a typo

17 years agox86_64: Fix xen section warnings
Andi Kleen [Sun, 22 Jul 2007 11:21:42 +0000 (13:21 +0200)]
x86_64: Fix xen section warnings

Fix

WARNING: vmlinux.o(.data+0x99): Section mismatch: reference to .init.text:xen_start_kernel (between 'startup_xen' and 'boot_gdt_descr')

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: Fix paravirt compilation
Andi Kleen [Sun, 22 Jul 2007 11:21:41 +0000 (13:21 +0200)]
x86_64: Fix paravirt compilation

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix broken handling of port=... in NFS option parsing
Al Viro [Sun, 22 Jul 2007 09:59:06 +0000 (10:59 +0100)]
fix broken handling of port=... in NFS option parsing

Obviously broken on little-endian; fortunately, the option is not
frequently used...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[ Hey, sparse is wonderful, but even better than sparse is having people
  like Al that actually _run_ it and fix bugs using it.    - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoKVM: Require CONFIG_ANON_INODES
Avi Kivity [Sun, 22 Jul 2007 09:40:30 +0000 (12:40 +0300)]
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>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Sun, 22 Jul 2007 18:04:11 +0000 (11:04 -0700)]
Merge branch 'release' of git://git./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
  ...

17 years agox86_64: Share msidef.h and hypertransport.h includes with i386
Andi Kleen [Sun, 22 Jul 2007 09:12:47 +0000 (11:12 +0200)]
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>
17 years agox86_64: Remove outdated comment in boot decompressor Makefile
Andi Kleen [Sun, 22 Jul 2007 09:12:46 +0000 (11:12 +0200)]
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>
17 years agox86_64: Squash initial_code modpost warnings
Andi Kleen [Sun, 22 Jul 2007 09:12:45 +0000 (11:12 +0200)]
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>
17 years agox86_64: fix section mismatch warning in init.c
Sam Ravnborg [Sun, 22 Jul 2007 09:12:44 +0000 (11:12 +0200)]
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>
17 years agox86_64: fix section mismatch warning in hpet.c
Sam Ravnborg [Sun, 22 Jul 2007 09:12:42 +0000 (11:12 +0200)]
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>
17 years agoi386: Fix the K7 NMI watchdog checkbit
Björn Steinbrink [Sun, 22 Jul 2007 09:12:41 +0000 (11:12 +0200)]
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>
17 years agoi386: Use patchable lock prefix in set_64bit
Andi Kleen [Sun, 22 Jul 2007 09:12:40 +0000 (11:12 +0200)]
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>
17 years agoi386: Handle P6s without performance counters in nmi watchdog
Andi Kleen [Sun, 22 Jul 2007 09:12:39 +0000 (11:12 +0200)]
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>
17 years agox86: Replace NSC/Cyrix specific chipset access macros by inlined functions.
Juergen Beisert [Sun, 22 Jul 2007 09:12:38 +0000 (11:12 +0200)]
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>
17 years agox86_64: x86_64 - Use non locked version for local_cmpxchg()
Mathieu Desnoyers [Sun, 22 Jul 2007 09:12:37 +0000 (11:12 +0200)]
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>
17 years agoi386: Do not include other cpus' interrupt 0 in nmi_watchdog
Keith Owens [Sun, 22 Jul 2007 09:12:36 +0000 (11:12 +0200)]
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>
17 years agoi386: Tune AMD Fam10h/11h like K8
Andi Kleen [Sun, 22 Jul 2007 09:12:35 +0000 (11:12 +0200)]
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>
17 years agox86_64: Set K8 CPUID flag for K8/Fam10h/Fam11h
Andi Kleen [Sun, 22 Jul 2007 09:12:34 +0000 (11:12 +0200)]
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>
17 years agoi386: Fix cpu_llc_id section mismatch warning
Andi Kleen [Sun, 22 Jul 2007 09:12:33 +0000 (11:12 +0200)]
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>
17 years agox86: Stop MCEs and NMIs during code patching
Andi Kleen [Sun, 22 Jul 2007 09:12:32 +0000 (11:12 +0200)]
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>
17 years agox86: Fix alternatives and kprobes to remap write-protected kernel text
Andi Kleen [Sun, 22 Jul 2007 09:12:31 +0000 (11:12 +0200)]
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>
17 years agox86_64: Use read and write crX in .c files
Glauber de Oliveira Costa [Sun, 22 Jul 2007 09:12:29 +0000 (11:12 +0200)]
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>
17 years agox86: i386-show-unhandled-signals-v3
Masoud Asgharifard Sharbiani [Sun, 22 Jul 2007 09:12:28 +0000 (11:12 +0200)]
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>
17 years agoFix ppc64 mismerge
Al Viro [Sun, 22 Jul 2007 07:10:35 +0000 (08:10 +0100)]
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>
17 years ago[POWERPC] Clean up duplicate includes in drivers/macintosh/
Jesper Juhl [Sat, 21 Jul 2007 15:02:30 +0000 (01:02 +1000)]
[POWERPC] Clean up duplicate includes in drivers/macintosh/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Quiet section mismatch warning on pcibios_setup
Stephen Rothwell [Sat, 21 Jul 2007 14:37:38 +0000 (00:37 +1000)]
[POWERPC] Quiet section mismatch warning on pcibios_setup

WARNING: vmlinux.o(.text+0x1cefcc): Section mismatch: reference to .init.text:.pcibios_setup (between '.pci_setup' and '.pci_init')

pci_setup() is marked __devinit and calls pcibios_setup.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] init and exit markings for hvc_iseries
Stephen Rothwell [Sat, 21 Jul 2007 14:33:11 +0000 (00:33 +1000)]
[POWERPC] init and exit markings for hvc_iseries

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Quiet section mismatch in hvc_rtas.c
Stephen Rothwell [Sat, 21 Jul 2007 14:31:28 +0000 (00:31 +1000)]
[POWERPC] Quiet section mismatch in hvc_rtas.c

WARNING: vmlinux.o(.text+0x2066f0): Section mismatch: reference to .init.text:.add_preferred_console (between '.hvc_rtas_console_init' and '.hvc_beat_put_chars')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Constify of_platform_driver match_table
Stephen Rothwell [Sat, 21 Jul 2007 14:27:01 +0000 (00:27 +1000)]
[POWERPC] Constify of_platform_driver match_table

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] hvcs: Make some things static and const
Stephen Rothwell [Sat, 21 Jul 2007 14:25:00 +0000 (00:25 +1000)]
[POWERPC] hvcs: Make some things static and const

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Constify of_platform_driver name
Stephen Rothwell [Sat, 21 Jul 2007 14:23:03 +0000 (00:23 +1000)]
[POWERPC] Constify of_platform_driver name

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] MPIC protected sources
Benjamin Herrenschmidt [Fri, 20 Jul 2007 23:55:21 +0000 (09:55 +1000)]
[POWERPC] MPIC protected sources

Some HW platforms, such as the new cell blades, requires some MPIC sources
to be left alone by the operating system. This implements support for
a "protected-sources" property in the mpic controller node containing a list
of source numbers to be protected against operating system interference.

For those interested in the gory details, the MPIC on the southbridge of
those blades has some of the processor outputs routed to the cell, and
at least one routed as a GPIO to the service processor. It will be used
in the GA product for routing some of the southbridge error interrupts
to the service processor which implements some of the RAS stuff, such
as checkstopping when fatal errors occurs before they can propagate.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] of_detach_node()'s device node argument cannot be const
Segher Boessenkool [Fri, 20 Jul 2007 05:58:38 +0000 (15:58 +1000)]
[POWERPC] of_detach_node()'s device node argument cannot be const

...since it modifies it (when it sets the OF_DETACHED flag).

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix ARCH=ppc builds
Josh Boyer [Fri, 20 Jul 2007 03:11:10 +0000 (13:11 +1000)]
[POWERPC] Fix ARCH=ppc builds

The recent signal rework broke ARCH=ppc builds with the following
error:

CC      arch/powerpc/kernel/signal.o
arch/powerpc/kernel/signal.c: In function Â\91do_signalÂ\92:
arch/powerpc/kernel/signal.c:142: error: implicit declaration of
function Â\91set_dabrÂ\92
make[1]: *** [arch/powerpc/kernel/signal.o] Error 1

This fixes it by including a function prototype in asm-ppc/system.h.

Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] mv64x60: Use mutex instead of semaphore
Christoph Hellwig [Thu, 19 Jul 2007 21:50:49 +0000 (07:50 +1000)]
[POWERPC] mv64x60: Use mutex instead of semaphore

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Allow smp_call_function_single() to current cpu
Avi Kivity [Thu, 19 Jul 2007 15:33:48 +0000 (01:33 +1000)]
[POWERPC] Allow smp_call_function_single() to current cpu

This removes the requirement for callers to get_cpu() to check in simple
cases.  i386 and x86_64 already received a similar treatment.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC
Paul Mackerras [Thu, 19 Jul 2007 00:00:20 +0000 (10:00 +1000)]
[POWERPC] Allow exec faults on readable areas on classic 32-bit PowerPC

Classic 32-bit PowerPC CPUs, and the early 64-bit PowerPC CPUs, don't
provide a way to prevent execution from readable pages, that is, the
MMU doesn't distinguish between data reads and instruction reads,
although a different exception is taken for faults in data accesses
and instruction accesses.

Commit 9ba4ace39fdfe22268daca9f28c5df384ae462cf, in the course of
fixing another bug, added a check that meant that a page fault due
to an instruction access would fail if the vma did not have the
VM_EXEC flag set.  This gives an inconsistent enforcement on these
CPUs of the no-execute status of the vma (since reading from the page
is sufficient to allow subsequent execution from it), and causes old
versions of ppc32 glibc (2.2 and earlier) to fail, since they rely
on executing the word before the GOT but don't have it marked
executable.

This fixes the problem by allowing execution from readable (or writable)
areas on CPUs which do not provide separate control over data and
instruction reads.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Jon Loeliger <jdl@freescale.com>
17 years ago[POWERPC] Fix future firmware feature fixups function failure
Michael Neuling [Wed, 18 Jul 2007 21:56:32 +0000 (07:56 +1000)]
[POWERPC] Fix future firmware feature fixups function failure

Move firmware feature initialisation from pSeries_init_early to the
earlier pSeries_probe_hypertas so they are initialised before firmware
feature fixups are applied.

Currently firmware feature sections are only used for iSeries which
initialises the these features much earlier.  This is a bug in waiting
on pSeries.

Also adds some whitespace fixups.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] fix showing xmon help
Ishizaki Kou [Wed, 18 Jul 2007 09:26:40 +0000 (19:26 +1000)]
[POWERPC] fix showing xmon help

In some configuration, xmon help string is larger than xmon_printf
buffer.  We need not to use printf.  This patch adds xmon_puts and
change to use it to show help string.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Make xmon_write accept a const buffer
Ishizaki Kou [Wed, 18 Jul 2007 09:30:29 +0000 (19:30 +1000)]
[POWERPC] Make xmon_write accept a const buffer

Because xmon_write doesn't change the buffer, we should add 'const'
qualifier to the argument which points it.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.
Robert P. J. Day [Tue, 17 Jul 2007 22:21:29 +0000 (08:21 +1000)]
[POWERPC] Fix misspelled "CONFIG_CHECK_CACHE_COHERENCY" Kconfig option.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] cell: CONFIG_SPE_BASE is a typo
Geert Uytterhoeven [Mon, 16 Jul 2007 16:35:38 +0000 (02:35 +1000)]
[POWERPC] cell: CONFIG_SPE_BASE is a typo

The config symbol for SPE support is called CONFIG_SPU_BASE, not
CONFIG_SPE_BASE.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoPull tables-in-sysfs into release branch
Len Brown [Sun, 22 Jul 2007 08:14:18 +0000 (04:14 -0400)]
Pull tables-in-sysfs into release branch

17 years agoPull netlink into release branch
Len Brown [Sun, 22 Jul 2007 08:14:07 +0000 (04:14 -0400)]
Pull netlink into release branch

17 years agoACPI: Populate /sys/firmware/acpi/tables/
Zhang Rui [Thu, 14 Jun 2007 09:43:07 +0000 (17:43 +0800)]
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>
17 years agoPull osi into release branch
Len Brown [Sun, 22 Jul 2007 06:29:41 +0000 (02:29 -0400)]
Pull osi into release branch

17 years agoPull video into release branch
Len Brown [Sun, 22 Jul 2007 06:28:33 +0000 (02:28 -0400)]
Pull video into release branch

17 years agoPull throttle into release branch
Len Brown [Sun, 22 Jul 2007 06:28:18 +0000 (02:28 -0400)]
Pull throttle into release branch

17 years agoPull thinkpad into release branch
Len Brown [Sun, 22 Jul 2007 06:28:06 +0000 (02:28 -0400)]
Pull thinkpad into release branch

17 years agoPull sony into release branch
Len Brown [Sun, 22 Jul 2007 06:27:56 +0000 (02:27 -0400)]
Pull sony into release branch

17 years agoPull misc into release branch
Len Brown [Sun, 22 Jul 2007 06:27:40 +0000 (02:27 -0400)]
Pull misc into release branch

Conflicts:

Documentation/feature-removal-schedule.txt

17 years agoPull dock-bay into release branch
Len Brown [Sun, 22 Jul 2007 06:25:18 +0000 (02:25 -0400)]
Pull dock-bay into release branch

17 years agoPull bugzilla-7880 into release branch
Len Brown [Sun, 22 Jul 2007 06:25:03 +0000 (02:25 -0400)]
Pull bugzilla-7880 into release branch

17 years agoPull ec into release branch
Len Brown [Sun, 22 Jul 2007 06:24:51 +0000 (02:24 -0400)]
Pull ec into release branch

17 years agoPull sbs into release branch
Len Brown [Sun, 22 Jul 2007 06:24:42 +0000 (02:24 -0400)]
Pull sbs into release branch

17 years agoPull battery into release branch
Len Brown [Sun, 22 Jul 2007 06:24:31 +0000 (02:24 -0400)]
Pull battery into release branch

17 years agoPull acpi-debug into release branch
Len Brown [Sun, 22 Jul 2007 06:22:55 +0000 (02:22 -0400)]
Pull acpi-debug into release branch

17 years agoPull acpica into release branch
Len Brown [Sun, 22 Jul 2007 06:22:43 +0000 (02:22 -0400)]
Pull acpica into release branch

17 years agoACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACE
Thomas Renninger [Thu, 31 May 2007 15:20:39 +0000 (17:20 +0200)]
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>
17 years agoACPI: update ACPI proc I/F removal schedule
Zhang Rui [Wed, 18 Jul 2007 09:23:24 +0000 (17:23 +0800)]
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>
17 years agoACPI: update feature-removal-schedule.txt, /sys/firmware/acpi/namespace is gone
Zhang Rui [Fri, 13 Jul 2007 05:42:47 +0000 (13:42 +0800)]
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>
17 years agoACPI: export ACPI events via acpi_mc_group multicast group
Zhang Rui [Fri, 20 Jul 2007 08:41:14 +0000 (16:41 +0800)]
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>
17 years agoACPI: fix empty macros found by -Wextra
Dave Jones [Mon, 9 Jul 2007 18:33:14 +0000 (11:33 -0700)]
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>
17 years agoACPI: drivers/acpi/pci_link.c: lower printk severity
Dan Aloni [Mon, 9 Jul 2007 18:33:18 +0000 (11:33 -0700)]
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>
17 years agosony-laptop: Fix event reading in sony-laptop
Mattia Dongili [Sun, 15 Jul 2007 17:34:39 +0000 (02:34 +0900)]
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>
17 years agosony-laptop: Add Vaio FE to the special init sequence
Mattia Dongili [Sun, 15 Jul 2007 17:34:38 +0000 (02:34 +0900)]
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>
17 years agosony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.
Mattia Dongili [Thu, 19 Jul 2007 17:01:57 +0000 (02:01 +0900)]
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>
17 years agosony-laptop: Invoke _INI for SNC devices that provide it
Mattia Dongili [Sun, 15 Jul 2007 17:34:36 +0000 (02:34 +0900)]
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>
17 years agosony-laptop: Add support for recent Vaios Fn keys (C series for now)
Mattia Dongili [Sun, 15 Jul 2007 17:34:35 +0000 (02:34 +0900)]
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>
17 years agosony-laptop: map wireless switch events to KEY_WLAN
Mattia Dongili [Sun, 15 Jul 2007 17:34:34 +0000 (02:34 +0900)]
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>
17 years agosony-laptop: add new SNC handlers
Mattia Dongili [Sun, 15 Jul 2007 17:34:33 +0000 (02:34 +0900)]
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>
17 years agoACPI: thinkpad-acpi: add locking to brightness subdriver
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:48 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: add locking to brightness subdriver

The backlight class does all the locking needed for sysfs access, but
offers no API to interface to that locking without an layer violation.

Since we need to mutex-lock procfs access, implement in-driver locking for
brightness.  It will go away the day thinkpad-acpi procfs goes away, or the
backlight class gives us a way to use its locks without a layer violation.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: bump up version to 0.15
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:47 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: bump up version to 0.15

Name it thinkpad-acpi version 0.15.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: make EC-based thermal readings non-experimental
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:46 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: make EC-based thermal readings non-experimental

Reading the 16 thermal sensors directly from the EC has been stable for
about one year, in all supported ThinkPad models.  Remove its
"experimental" label.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: make sure DSDT TMPx readings don't return +128
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:45 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: make sure DSDT TMPx readings don't return +128

We get +128 instead of -128 from the DSDT TMPx methods, due to errors when
converting a EC byte return that is a s8 to an ACPI handler return that is
an int.

Fix it once and for all, by clamping acceptable temperature readings from
DSDT TMPx so that anything outside the [-127,+127] range is converted to
TP_EC_THERMAL_TMP_NA (-128).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Michael Olbrich <michael.olbrich@gmx.net>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:44 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: react to Lenovo ThinkPad differences in hot key

Lenovo ThinkPads have a slightly different key map layout from IBM
ThinkPads (fn+f2 and fn+f3 are swapped).  Knowing which one we are dealing
with, we can properly set a few more hot keys up by default.

Also, export the correct vendor in the input device, as that information
might be useful to userspace.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: allow use of CMOS NVRAM for brightness control
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:43 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: allow use of CMOS NVRAM for brightness control

It appears that Lenovo decided to break the EC brightness control interface
in a weird way in their latest BIOSes.  Fortunately, the old CMOS NVRAM
interface works just fine in such BIOSes.

Add a module parameter that allows the user to select which strategy to use
for brightness control: EC, NVRAM, or both.  By default, do both (which is
the way thinkpad-acpi used to work until now) on IBM ThinkPads, and use
NVRAM only on Lenovo ThinkPads.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: store ThinkPad model information
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:42 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: store ThinkPad model information

Keep note of ThinkPad model, BIOS and EC firmware information, and log it
on startup.  Makes for far more readable code in places, too.

This patch also adds Lenovo's PCI ID to the pci ids table.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad_acpi: use bool for boolean parameters
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:41 +0000 (23:45 -0300)]
ACPI: thinkpad_acpi: use bool for boolean parameters

Some of the module parameters are boolean in nature.  Make it so in fact.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: rename pci HID constant
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:40 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: rename pci HID constant

Rename an internal driver constant, on request by Len Brown.  Also,
document exactly what it is for.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: checkpoint sysfs interface version due to input layer
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:39 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: checkpoint sysfs interface version due to input layer

The change in the way hotkey events are handled by default, and the use of
the input layer for the hotkey events are important enough features to
warrant increasing the major field of the sysfs interface version.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: export EV_SW SW_RADIO events
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:38 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: export EV_SW SW_RADIO events

The expected user case for the radio slider switch on a ThinkPad includes
interfacing to applications, so that the user gets an offer to find and
associate with a wireless network when the switch is changed from disabled
to enabled (ThinkVantage suite).

Export the information about the switch state, and switch change events as
an EV_SW SW_RADIO event over the input layer.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ivo van Doorn <ivdoorn@gmail.com>
Cc: Richard Hughes <hughsient@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: add power-management handler capability
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:37 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: add power-management handler capability

Some subdrivers could benefit from resume handling, so add the
infrastructure for simple resume handling.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: make the input event mode the default
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:36 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: make the input event mode the default

Make the input layer the default way to deal with thinkpad-acpi hot keys,
but add a kernel config option to retain the old way of doing things.

This means we map a lot more keys to useful stuff by default, and also that
we enable hot key handling by default on driver load (like Windows does).

The documentation for proper use of this resource is also updated.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 22 Jul 2007 03:39:59 +0000 (20:39 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: Add missing entries to family name tables
  [NET]: Make NETDEVICES depend on NET.
  [IPV6]: endianness bug in ip6_tunnel
  [IrDA]: TOSHIBA_FIR depends on virt_to_bus
  [IrDA]: EP7211 IR driver port to the latest SIR API
  [IrDA] Typo fix in irnetlink.c copyright
  [NET]: Fix loopback crashes when multiqueue is enabled.
  [IPV4]: Fix inetpeer gcc-4.2 warnings

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sun, 22 Jul 2007 03:38:51 +0000 (20:38 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!
  [SPARC32]: Make PAGE_SHARED a read-mostly variable.
  [SPARC32]: Take enable_irq/disable_irq out of line.
  [SPARC32]: clean include/asm-sparc/irq.h
  [SPARC32]: Fix rounding errors in ndelay/udelay implementation.

17 years agoACPI: thinkpad-acpi: add input device support to hotkey subdriver
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:35 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: add input device support to hotkey subdriver

Add input device support to the hotkey subdriver.

Hot keys that have a valid keycode mapping are reported through the input
layer if the input device is open.  Otherwise, they will be reported as
ACPI events, as they were before.

Scan codes are reported (using EV_MSC MSC_SCAN events) along with EV_KEY
KEY_UNKNOWN events.

For backwards compatibility purposes, hot keys that used to be reported
through ACPI events are not mapped to anything meaningful by default.
Userspace is supposed to remap them if it wants to use the input device for
hot key reporting.

This patch is based on a patch by Richard Hughes <hughsient@gmail.com>.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: register input device
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:34 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: register input device

Register an input device to send input events to userspace.

This patch is based on a patch by Richard Hughes <hughsient@gmail.com>.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: update CMOS commands documentation
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:33 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: update CMOS commands documentation

The CMOS set of commands is often just used to keep the CMOS NVRAM in sync
with whatever the ACPI BIOS has been doing in modern ThinkPads.  In older
ThinkPads, it actually carried out real actions.  Document this.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: checkpoint sysfs interface version due to hotkey
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:32 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: checkpoint sysfs interface version due to hotkey

The change in the size of the hotkey mask, the hability to report the keys
that use the higher bits, and the addition of the hotkey_radio_sw attribute
are important enough features to warrant increasing the minor field of the
sysfs interface version.

Also, document a bit better how and when the thinkpad-acpi sysfs interface
version will be updated.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: export to sysfs the state of the radio slider switch
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:31 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: export to sysfs the state of the radio slider switch

Some ThinkPad models, notably the T60 and X60, have a slider switch to
enable and disable the radios.  The switch has the capability of
force-disabling the radios in hardware on most models, and it is supposed
to affect all radios (WLAN, WWAN, BlueTooth).

Export the switch state as a sysfs attribute, on ThinkPads where it is
available.

Thanks to Henning Schild for asking for this feature, and for tracking down
the EC register that holds the radio switch state.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Henning Schild <henning@wh9.tu-dresden.de>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: export hotkey maximum masks
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:30 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: export hotkey maximum masks

The firmware knows how many hot keys it supports, so export this
information in a sysfs attribute.

And the driver knows which keys are always handled by the firmware in all
known ThinkPad models too, so export this information as well in a sysfs
attribute.  Unless you know which events need to be handled in a passive
way, do *not* enable hotkeys that are always handled by the firmware.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: enable more hotkeys
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:29 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: enable more hotkeys

Revise ACPI HKEY functionality to better interface with the firmware, and
enable up to 32 regular hotkeys, instead of just 16 of them.  Ouch.

This takes care of most keys one used to have to do CMOS NVRAM polling on,
and should drop the need for tpb, thinkpad-keys, and other such 5Hz NVRAM
polling power vampires on most modern ThinkPads ;-)

And, just to add insult to injury, this was sort of working since forever
through the procfs interface, but nobody noticed or tried an echo
0xffffffff > /proc/acpi/ibm/hotkey and told me it would generate weird
events. ARGH!

Thanks to Richard Hughes for kicking off the work that ended up with this
discovery, and to Matthew Garret for calling my attention to the fact that
newer ThinkPads were indeed generating ACPI GPEs when such hot keys were
pressed.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: update information on T43 thermal sensor 0xc1
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:28 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: update information on T43 thermal sensor 0xc1

Update the documentation with some extra data on the T43 thermal sensor
@0xc1, thanks to Alexey Fisher.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: remove all uneeded initializers
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:27 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: remove all uneeded initializers

Remove all initializers to NULL or zero.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agoACPI: thinkpad-acpi: add DMI-based modalias
Henrique de Moraes Holschuh [Thu, 19 Jul 2007 02:45:26 +0000 (23:45 -0300)]
ACPI: thinkpad-acpi: add DMI-based modalias

Add DMI-based aliases to allow module autoloading on select thinkpads.

The aliases will do nothing unless the dmi-based-module-autoloading.patch
patch from Lennart Poettering <mzxreary@0pointer.de> is applied.  Lennart's
patch has been accepted by greghk and will be merged eventually.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years ago[NET]: Add missing entries to family name tables
David Howells [Sun, 22 Jul 2007 02:30:16 +0000 (19:30 -0700)]
[NET]: Add missing entries to family name tables

Add missing entries to af_family_clock_key_strings[].

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!
Christoph Hellwig [Sun, 22 Jul 2007 02:22:42 +0000 (19:22 -0700)]
[SPARC64]: ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!

From: Christoph Hellwig <hch@infradead.org>

On Fri, Jul 20, 2007 at 09:24:42AM -0400, Horst H. von Brand wrote:
> When building v2.6.22-3478-g275afca on sparc64 (.config attached) I get:
>
>   MODPOST vmlinux
>   Building modules, stage 2.
>   MODPOST 463 modules
> ERROR: "sys_ioctl" [arch/sparc64/solaris/solaris.ko] undefined!

Sorry, my fault.

It looked to me like sparc64 exports sys_ioctl on it's own, but it
only exports compat_sys_ioctl on it's own.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC32]: Make PAGE_SHARED a read-mostly variable.
Al Viro [Sun, 22 Jul 2007 02:20:34 +0000 (19:20 -0700)]
[SPARC32]: Make PAGE_SHARED a read-mostly variable.

same scheme as for sparc64, same rationale

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>