]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agosavagedb: Fix typo causing regression in savage4 series video chip detection
John Stanley [Thu, 4 Aug 2011 00:41:00 +0000 (20:41 -0400)]
savagedb: Fix typo causing regression in savage4 series video chip detection

Two additional savage4 variants were added, but the S3_SAVAGE4_SERIES
macro was incompletely modified, resulting in a false positive detection
of a savage4 card regardless of which savage card is actually present.

For non-savage4 series cards, such as a Savage/IX-MV card, this results
in garbled video and/or a hard-hang at boot time.  Fix this by changing
an '||' to an '&&' in the S3_SAVAGE4_SERIES macro.

Signed-off-by: John P. Stanley <jpsinthemix@verizon.net>
Reviewed-by: Tormod Volden <debian.tormod@gmail.com>
[ The macros have incomplete parenthesis too, but whatever ..  -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoCodingStyle: Document the exception of not splitting user-visible strings, for grepping
Josh Triplett [Wed, 3 Aug 2011 19:19:07 +0000 (12:19 -0700)]
CodingStyle: Document the exception of not splitting user-visible strings, for grepping

Patch reviewers now recommend not splitting long user-visible strings,
such as printk messages, even if they exceed 80 columns.  This avoids
breaking grep.  However, that recommendation did not actually appear
anywhere in Documentation/CodingStyle.

See, for example, the thread at
  http://news.gmane.org/find-root.php?message_id=%3c1312215262.11635.15.camel%40Joe%2dLaptop%3e

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agovfs: show O_CLOEXE bit properly in /proc/<pid>/fdinfo/<fd> files
Linus Torvalds [Sat, 6 Aug 2011 18:51:33 +0000 (11:51 -0700)]
vfs: show O_CLOEXE bit properly in /proc/<pid>/fdinfo/<fd> files

The CLOEXE bit is magical, and for performance (and semantic) reasons we
don't actually maintain it in the file descriptor itself, but in a
separate bit array.  Which means that when we show f_flags, the CLOEXE
status is shown incorrectly: we show the status not as it is now, but as
it was when the file was opened.

Fix that by looking up the bit properly in the 'fdt->close_on_exec' bit
array.

Uli needs this in order to re-implement the pfiles program:

  "For normal file descriptors (not sockets) this was the last piece of
   information which wasn't available.  This is all part of my 'give
   Solaris users no reason to not switch' effort.  I intend to offer the
   code to the util-linux-ng maintainers."

Requested-by: Ulrich Drepper <drepper@akkadia.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agooom_ajd: don't use WARN_ONCE, just use printk_once
Linus Torvalds [Sat, 6 Aug 2011 18:43:08 +0000 (11:43 -0700)]
oom_ajd: don't use WARN_ONCE, just use printk_once

WARN_ONCE() is very annoying, in that it shows the stack trace that we
don't care about at all, and also triggers various user-level "kernel
oopsed" logic that we really don't care about.  And it's not like the
user can do anything about the applications (sshd) in question, it's a
distro issue.

Requested-by: Andi Kleen <andi@firstfloor.org> (and many others)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agolib/sha1: use the git implementation of SHA-1
Mandeep Singh Baines [Sat, 6 Aug 2011 01:46:27 +0000 (18:46 -0700)]
lib/sha1: use the git implementation of SHA-1

For ChromiumOS, we use SHA-1 to verify the integrity of the root
filesystem.  The speed of the kernel sha-1 implementation has a major
impact on our boot performance.

To improve boot performance, we investigated using the heavily optimized
sha-1 implementation used in git.  With the git sha-1 implementation, we
see a 11.7% improvement in boot time.

10 reboots, remove slowest/fastest.

Before:

  Mean: 6.58 seconds Stdev: 0.14

After (with git sha-1, this patch):

  Mean: 5.89 seconds Stdev: 0.07

The other cool thing about the git SHA-1 implementation is that it only
needs 64 bytes of stack for the workspace while the original kernel
implementation needed 320 bytes.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Nicolas Pitre <nico@cam.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosparc: Fix build with DEBUG_PAGEALLOC enabled.
David S. Miller [Sat, 6 Aug 2011 12:26:35 +0000 (05:26 -0700)]
sparc: Fix build with DEBUG_PAGEALLOC enabled.

arch/sparc/mm/init_64.c:1622:22: error: unused variable '__swapper_4m_tsb_phys_patch_end' [-Werror=unused-variable]
arch/sparc/mm/init_64.c:1621:22: error: unused variable '__swapper_4m_tsb_phys_patch' [-Werror=unused-variable]

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: snd-usb-caiaq: Fix keymap for RigKontrol3
Daniel Mack [Sat, 6 Aug 2011 07:13:08 +0000 (09:13 +0200)]
ALSA: snd-usb-caiaq: Fix keymap for RigKontrol3

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Renato <naretobh@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-usb: Fix uninitialized variable usage
Daniel Mack [Fri, 5 Aug 2011 22:23:18 +0000 (00:23 +0200)]
ALSA: snd-usb: Fix uninitialized variable usage

Purely cosmetic, but fixes the following build warning.

  CC [M]  sound/usb/quirks.o
sound/usb/quirks.c: In function ‘snd_usb_apply_boot_quirk’:
sound/usb/quirks.c:429:6: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'battery' into release
Len Brown [Sat, 6 Aug 2011 02:16:42 +0000 (22:16 -0400)]
Merge branch 'battery' into release

13 years agoBattery: sysfs_remove_battery(): possible circular locking
Sergey Senozhatsky [Fri, 5 Aug 2011 22:34:08 +0000 (01:34 +0300)]
Battery: sysfs_remove_battery(): possible circular locking

Commit 9c921c22a7f33397a6774d7fa076db9b6a0fd669
Author: Lan Tianyu <tianyu.lan@intel.com>

    ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()

fixed BUG https://bugzilla.kernel.org/show_bug.cgi?id=35642 , but as a side
effect made lockdep unhappy with sysfs_remove_battery():

[14818.477168]
[14818.477170] =======================================================
[14818.477200] [ INFO: possible circular locking dependency detected ]
[14818.477221] 3.1.0-dbg-07865-g1280ea8-dirty #668
[14818.477236] -------------------------------------------------------
[14818.477257] s2ram/1599 is trying to acquire lock:
[14818.477276]  (s_active#8){++++.+}, at: [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
[14818.477323]
[14818.477325] but task is already holding lock:
[14818.477350]  (&battery->lock){+.+.+.}, at: [<ffffffffa0047278>] sysfs_remove_battery+0x10/0x4b [battery]
[14818.477395]
[14818.477397] which lock already depends on the new lock.
[14818.477399]
[..]
[14818.479121] stack backtrace:
[14818.479148] Pid: 1599, comm: s2ram Not tainted 3.1.0-dbg-07865-g1280ea8-dirty #668
[14818.479175] Call Trace:
[14818.479198]  [<ffffffff814828c3>] print_circular_bug+0x293/0x2a4
[14818.479228]  [<ffffffff81070cb5>] __lock_acquire+0xfe4/0x164b
[14818.479260]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479288]  [<ffffffff810718d2>] lock_acquire+0x138/0x1ac
[14818.479316]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479345]  [<ffffffff81168a79>] sysfs_deactivate+0x9b/0xec
[14818.479373]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
[14818.479405]  [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
[14818.479433]  [<ffffffff81167bc5>] sysfs_hash_and_remove+0x54/0x77
[14818.479461]  [<ffffffff811681b9>] sysfs_remove_file+0x12/0x14
[14818.479488]  [<ffffffff81385bf8>] device_remove_file+0x12/0x14
[14818.479516]  [<ffffffff81386504>] device_del+0x119/0x17c
[14818.479542]  [<ffffffff81386575>] device_unregister+0xe/0x1a
[14818.479570]  [<ffffffff813c6ef9>] power_supply_unregister+0x23/0x27
[14818.479601]  [<ffffffffa004729c>] sysfs_remove_battery+0x34/0x4b [battery]
[14818.479632]  [<ffffffffa004778f>] battery_notify+0x2c/0x3a [battery]
[14818.479662]  [<ffffffff8148fe82>] notifier_call_chain+0x74/0xa1
[14818.479692]  [<ffffffff810624b4>] __blocking_notifier_call_chain+0x6c/0x89
[14818.479722]  [<ffffffff810624e0>] blocking_notifier_call_chain+0xf/0x11
[14818.479751]  [<ffffffff8107e40e>] pm_notifier_call_chain+0x15/0x27
[14818.479770]  [<ffffffff8107ee1a>] enter_state+0xa7/0xd5
[14818.479782]  [<ffffffff8107e341>] state_store+0xaa/0xc0
[14818.479795]  [<ffffffff8107e297>] ? pm_async_store+0x45/0x45
[14818.479807]  [<ffffffff81248837>] kobj_attr_store+0x17/0x19
[14818.479820]  [<ffffffff81167e27>] sysfs_write_file+0x103/0x13f
[14818.479834]  [<ffffffff81109037>] vfs_write+0xad/0x13d
[14818.479847]  [<ffffffff811092b2>] sys_write+0x45/0x6c
[14818.479860]  [<ffffffff81492f92>] system_call_fastpath+0x16/0x1b

This patch introduces separate lock to struct acpi_battery to
grab in sysfs_remove_battery() instead of battery->lock.
So fix by Lan Tianyu is still there, we just grab independent lock.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tested-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agojump label: Reduce the cycle count by changing the link order
Jason Baron [Fri, 5 Aug 2011 20:40:40 +0000 (16:40 -0400)]
jump label: Reduce the cycle count by changing the link order

In the course of testing jump labels for use with the CFS
bandwidth controller, Paul Turner, discovered that using jump
labels reduced the branch count and the instruction count, but
did not reduce the cycle count or wall time.

I noticed that having the jump_label.o included in the kernel
but not used in any way still caused this increase in cycle
count and wall time. Thus, I moved jump_label.o in the
kernel/Makefile, thus changing the link order, and presumably
moving it out of hot icache areas. This brought down the cycle
count/time as expected.

In addition to Paul's testing,  I've tested the patch using a
single 'static_branch()' in the getppid() path, and basically
running tight loops of calls to getppid(). Here are my results
for the branch disabled case:

With jump labels turned on (CONFIG_JUMP_LABEL), branch disabled:

 Performance counter stats for 'bash -c /tmp/getppid;true' (50 runs):

     3,969,510,217 instructions             #    0.864 IPC     ( +-0.000% )
     4,592,334,954 cycles                     ( +-   0.046% )
       751,634,470 branches                   ( +-   0.000% )

        1.722635797  seconds time elapsed   ( +-   0.046% )

Jump labels turned off (CONFIG_JUMP_LABEL not set), branch
disabled:

 Performance counter stats for 'bash -c /tmp/getppid;true' (50 runs):

     4,009,611,846 instructions             #    0.867 IPC     ( +-0.000% )
     4,622,210,580 cycles                     ( +-   0.012% )
       771,662,904 branches                   ( +-   0.000% )

        1.734341454  seconds time elapsed   ( +-   0.022% )

Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: rth@redhat.com
Cc: a.p.zijlstra@chello.nl
Cc: rostedt@goodmis.org
Link: http://lkml.kernel.org/r/20110805204040.GG2522@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Paul Turner <pjt@google.com>
13 years agoPM / Runtime: Allow _put_sync() from interrupts-disabled context
Kevin Hilman [Fri, 5 Aug 2011 19:45:20 +0000 (21:45 +0200)]
PM / Runtime: Allow _put_sync() from interrupts-disabled context

Currently the use of pm_runtime_put_sync() is not safe from
interrupts-disabled context because rpm_idle() will release the
spinlock and enable interrupts for the idle callbacks.  This enables
interrupts during a time where interrupts were expected to be
disabled, and can have strange side effects on drivers that expected
interrupts to be disabled.

This is not a bug since the documentation clearly states that only
_put_sync_suspend() is safe in IRQ-safe mode.

However, pm_runtime_put_sync() could be made safe when in IRQ-safe
mode by releasing the spinlock but not re-enabling interrupts, which
is what this patch aims to do.

Problem was found when using some buggy drivers that set
pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
context.

Reported-by: Colin Cross <ccross@google.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoPM / Domains: Fix pm_genpd_poweron()
Rafael J. Wysocki [Fri, 5 Aug 2011 19:45:11 +0000 (21:45 +0200)]
PM / Domains: Fix pm_genpd_poweron()

The local variable ret is defined twice in pm_genpd_poweron(), which
causes this function to always return 0, even if the PM domain's
.power_on() callback fails, in which case an error code should be
returned.

Remove the wrong second definition of ret and additionally remove an
unnecessary definition of wait from pm_genpd_poweron().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agoacer-wmi: support Lenovo ideapad S205 wifi switch
Lee, Chun-Yi [Sat, 30 Jul 2011 09:00:45 +0000 (17:00 +0800)]
acer-wmi: support Lenovo ideapad S205 wifi switch

The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control
the wifi hardware state. We also found there have a 0x78 EC register
exposes the state of wifi hardware switch on the machine.

So, add this patch to support Lenovo ideapad S205 wifi hardware switch
in acer-wmi driver.

Reference: bko#37892
https://bugzilla.kernel.org/show_bug.cgi?id=37892

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Tested-by: Florian Heyer <heyho@flanto.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacerhdf.c: spaces in aliased changed to *
Anton V. Boyarshinov [Thu, 28 Jul 2011 14:05:35 +0000 (18:05 +0400)]
acerhdf.c: spaces in aliased changed to *

It seems that aliases shouldn't contain spaces, as
module-init-tools uses them as delimeters in module.alias file

Signed-off-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ideapad_acpi_...
Axel Lin [Wed, 27 Jul 2011 07:27:34 +0000 (15:27 +0800)]
platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ideapad_acpi_add error path

In the case of ideapad_backlight_init() failure,
we need to free the resources allocated by ideapad_input_init().

Aslo drop __devexit annotation for ideapad_input_exit() because
we also call it in ideapad_acpi_add() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agox86 driver: fix typo in TDP override enabling
Jesse Barnes [Fri, 22 Jul 2011 16:21:36 +0000 (09:21 -0700)]
x86 driver: fix typo in TDP override enabling

When enabling turbo, we need to set both the TDC and TDP bits.  IIRC
only the TDC one actually matters, but fix it up anyway since the
current code is confusing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoPlatform: fix samsung-laptop DMI identification for N150/N210/220/N230
Thomas Courbon [Wed, 20 Jul 2011 20:57:44 +0000 (22:57 +0200)]
Platform: fix samsung-laptop DMI identification for N150/N210/220/N230

Some samsung latop of the N150/N2{10,20,30} serie are badly detected by the samsung-laptop platform driver, see bug # 36082.
It appears that N230 identifies itself as N150/N210/N220/N230 whereas the other identify themselves as N150/N210/220.
This patch attemtp fix #36082 allowing correct identification for all the said netbook model.

Reported-by: Daniel Eklöf <daniel@ekloef.se>
Signed-off-by: Thomas Courbon <thcourbon@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agodell-wmi: Add keys for Dell XPS L502X
Seth Forshee [Mon, 1 Aug 2011 20:46:10 +0000 (15:46 -0500)]
dell-wmi: Add keys for Dell XPS L502X

All of these keys are being reported on the keyboard
controller but are also generating WMI events. Add them
to the legacy keymap to silence the noise.

BugLink: http://bugs.launchpad.net/bugs/815914
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: samsung-q10: make dmi_check_callback return 1
Axel Lin [Mon, 18 Jul 2011 08:08:21 +0000 (16:08 +0800)]
platform-drivers-x86: samsung-q10: make dmi_check_callback return 1

We only care about if there is any successful match from the dmi table
or no match at all, we can make dmi_check_system return immediately if
we have a successful match instead of iterate thorough the whole table.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoPlatform: Samsung Q10 backlight driver
Frederick van der Wyck [Thu, 7 Jul 2011 21:05:25 +0000 (22:05 +0100)]
Platform: Samsung Q10 backlight driver

This adds backlight control on the Samsung Q10 laptop, which does not support
the SABI interface. Also tested successfully on the Dell Latitude X200.

Signed-off-by: Frederick van der Wyck <fvanderwyck@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: intel_scu_ipc: convert to DEFINE_PCI_DEVICE_TABLE
Axel Lin [Thu, 7 Jul 2011 02:22:46 +0000 (10:22 +0800)]
platform-drivers-x86: intel_scu_ipc: convert to DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLE
Axel Lin [Thu, 7 Jul 2011 02:21:15 +0000 (10:21 +0800)]
platform-drivers-x86: intel_rar_register: convert to DEFINE_PCI_DEVICE_TABLE

And also remove unused variable 'my_id_table'.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: intel_menlow: add missing return AE_OK for intel_menlow_registe...
Axel Lin [Thu, 7 Jul 2011 02:05:49 +0000 (10:05 +0800)]
platform-drivers-x86: intel_menlow: add missing return AE_OK for intel_menlow_register_sensor()

Otherwise, the error path will always be executed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: intel_mid_thermal: fix memory leak
Axel Lin [Wed, 6 Jul 2011 15:40:51 +0000 (23:40 +0800)]
platform-drivers-x86: intel_mid_thermal: fix memory leak

The memory for td_info which is allocated in initialize_sensor()
should be properly kfreed in mid_thermal_probe() error patch and
mid_thermal_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoplatform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error...
Axel Lin [Wed, 6 Jul 2011 03:05:20 +0000 (11:05 +0800)]
platform-drivers-x86: msi-wmi: add missing sparse_keymap_free in msi_wmi_init error path

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoSamsung Laptop platform driver: support N510
J Witteveen [Sun, 3 Jul 2011 11:15:44 +0000 (13:15 +0200)]
Samsung Laptop platform driver: support N510

The N510 benefits from this code as well. Below is a patch to include support.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add uwb rfkill support
Corentin Chary [Fri, 1 Jul 2011 09:34:41 +0000 (11:34 +0200)]
asus-wmi: add uwb rfkill support

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add gps rfkill support
Corentin Chary [Fri, 1 Jul 2011 09:34:40 +0000 (11:34 +0200)]
asus-wmi: add gps rfkill support

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add CWAP support and clarify the meaning of WAPF bits
Corentin Chary [Fri, 1 Jul 2011 09:34:39 +0000 (11:34 +0200)]
asus-wmi: add CWAP support and clarify the meaning of WAPF bits

ref: http://dev.iksaif.net/projects/3/wiki/Asus-laptop_WAPF

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: return proper value in store_cpufv()
Corentin Chary [Fri, 1 Jul 2011 09:34:38 +0000 (11:34 +0200)]
asus-wmi: return proper value in store_cpufv()

Cc: stable@kernel.org
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: check for temp1 presence
Corentin Chary [Fri, 1 Jul 2011 09:34:37 +0000 (11:34 +0200)]
asus-wmi: check for temp1 presence

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add thermal sensor
Corentin Chary [Fri, 1 Jul 2011 09:34:36 +0000 (11:34 +0200)]
asus-wmi: add thermal sensor

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add some device ids
Corentin Chary [Fri, 1 Jul 2011 09:34:35 +0000 (11:34 +0200)]
asus-wmi: add some device ids

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: fix keyboard backlight detection
Corentin Chary [Fri, 1 Jul 2011 09:34:34 +0000 (11:34 +0200)]
asus-wmi: fix keyboard backlight detection

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: fix section mismatch
Corentin Chary [Fri, 1 Jul 2011 09:34:32 +0000 (11:34 +0200)]
asus-wmi: fix section mismatch

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: add keyboard backlight support
Corentin Chary [Fri, 1 Jul 2011 09:34:31 +0000 (11:34 +0200)]
asus-wmi: add keyboard backlight support

Based on a patch from Nate Weibley. <nweibley@gmail.com>.

Cc: Nate Weibley <nweibley@gmail.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: second part of the version starts at 16 not 8
Corentin Chary [Fri, 1 Jul 2011 09:34:30 +0000 (11:34 +0200)]
asus-wmi: second part of the version starts at 16 not 8

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: Enable autorepeat for hotkey input device
Seth Forshee [Mon, 4 Jul 2011 07:49:20 +0000 (09:49 +0200)]
asus-wmi: Enable autorepeat for hotkey input device

The T101MT Home/Express Gate key autorepeats in hardware, but
sparse-keymap does not support hardware autorepeat. Enable the
input core's software autorepeat to emulate the hardware behavior.
Normal hotkeys are autoreleased, so the behavior of these keys
will not be affected.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoeeepc-wmi: Add support for T101MT Home/Express Gate key
Seth Forshee [Fri, 1 Jul 2011 09:34:28 +0000 (11:34 +0200)]
eeepc-wmi: Add support for T101MT Home/Express Gate key

This key is different than other hotkeys, having seperate scan
codes for press, release, and hold, so it requires some special
filtering. Press and release events are passed on, and hold events
are ignored since sparse-keymap does not support hardware
autorepeat.

Note that "Home" in the context of this button doesn't mean the
same thing as the usual Home key, and it really isn't clear at
all what is meant by "Home". The manufacurer's description of the
button indicates that it should launch some sort of touch screen
settings interface on short press and apply a desktop rotation on
long press.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: Add callback for hotkey filtering
Seth Forshee [Fri, 1 Jul 2011 09:34:27 +0000 (11:34 +0200)]
asus-wmi: Add callback for hotkey filtering

This is required for the T101MT home key, which behaves differently
than other hotkeys.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoasus-wmi: fix hwmon/pwm1
Corentin Chary [Fri, 1 Jul 2011 09:34:26 +0000 (11:34 +0200)]
asus-wmi: fix hwmon/pwm1

The code was completly broken, and should never had been sent
to the kernel. That's what happens when you write code without
hardware to test it.

Cc: stable@kernel.org
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoideapad: add backlight driver
Ike Panhc [Thu, 30 Jun 2011 11:50:52 +0000 (19:50 +0800)]
ideapad: add backlight driver

When acpi_backlight=vendor in cmdline or no backlight support in acpi video
device, ideapad-laptop will register backlight device and control brightness
and backlight power via the command in VPC2004.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoideapad: let camera_power node invisiable if no camera
Ike Panhc [Thu, 30 Jun 2011 11:50:47 +0000 (19:50 +0800)]
ideapad: let camera_power node invisiable if no camera

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoideapad: define cfg bits and create sysfs node for cfg
Ike Panhc [Thu, 30 Jun 2011 11:50:40 +0000 (19:50 +0800)]
ideapad: define cfg bits and create sysfs node for cfg

Create /sys/devices/platform/ideapad/cfg for showing cfg value.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoAdd KEY_MICMUTE and enable it on Lenovo X220
Andy Lutomirski [Tue, 24 May 2011 19:16:43 +0000 (15:16 -0400)]
Add KEY_MICMUTE and enable it on Lenovo X220

I suspect that this works on T410.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agomsi-laptop: add MSI U270 netbook to module alias and scm list
Lee, Chun-Yi [Fri, 10 Jun 2011 07:24:26 +0000 (15:24 +0800)]
msi-laptop: add MSI U270 netbook to module alias and scm list

After test, msi-laptop driver also can support MSI U270 netbook.
So, add MSI U270's dmi information to module alias and scm table
for support this machine.

Tested on MSI U270 netbook.

Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Add support for Aspire 1830 wlan hotkey
Seth Forshee [Tue, 21 Jun 2011 17:00:32 +0000 (12:00 -0500)]
acer-wmi: Add support for Aspire 1830 wlan hotkey

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacerhdf: add support for Aspire 1810TZ BIOS v1.3314
Julien Valroff [Fri, 24 Jun 2011 12:47:17 +0000 (08:47 -0400)]
acerhdf: add support for Aspire 1810TZ BIOS v1.3314

Would you please consider applying the following patch adding support for
the Aspire 1810TZ BIOS v.1.3314 version to the acerhdf module and avoids the
following error:

acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1810TZ/v1.3314, ple=
ase report, aborting!

Not sure about the other Aspire models, but it seems at least 1810T should
also be updated.

Signed-off-by: Julien Valroff <julien@kirya.net>
13 years agoplatform-drivers-x86: dell-laptop: Remove unneeded mutex_init() for buffer_mutex
Axel Lin [Wed, 8 Jun 2011 06:56:42 +0000 (14:56 +0800)]
platform-drivers-x86: dell-laptop: Remove unneeded mutex_init() for buffer_mutex

DEFINE_MUTEX() will automatically initialize buffer_mutex,
no need to call mutex_init() in dell_init().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: schedule threeg and interface sysfs for feature removal
Lee, Chun-Yi [Tue, 31 May 2011 06:52:22 +0000 (14:52 +0800)]
acer-wmi: schedule threeg and interface sysfs for feature removal

we can now autodetect internal 3G device and already have the threeg
rfkill device. So, we plan to remove threeg sysfs support for it's no
longer necessary.

We also plan to remove interface sysfs file that exposed which ACPI-WMI
interface that was used by acer-wmi driver. It will replaced by information
log when acer-wmi initial.

We keep it around for userspace compatibility reasons, schedule removal
in 2012.

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 5 Aug 2011 16:44:38 +0000 (06:44 -1000)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (55 commits)
  Revert "drm/i915: Try enabling RC6 by default (again)"
  drm/radeon: Extended DDC Probing for ECS A740GM-M DVI-D Connector
  drm/radeon: Log Subsystem Vendor and Device Information
  drm/radeon: Extended DDC Probing for Connectors with Improperly Wired DDC Lines (here: Asus M2A-VM HDMI)
  drm: Separate EDID Header Check from EDID Block Check
  drm: Add NULL check about irq functions
  drm: Fix irq install error handling
  drm/radeon: fix potential NULL dereference in drivers/gpu/drm/radeon/atom.c
  drm/radeon: clean reg header files
  drm/debugfs: Initialise empty variable
  drm/radeon/kms: add thermal chip quirk for asus 9600xt
  drm/radeon: off by one in check_reg() functions
  drm/radeon/kms: fix version comment due to merge timing
  drm/i915: allow cache sharing policy control
  drm/i915/hdmi: HDMI source product description infoframe support
  drm/i915/hdmi: split infoframe setting from infoframe type code
  drm: track CEA version number if present
  drm/i915: Try enabling RC6 by default (again)
  Revert "drm/i915/dp: Zero the DPCD data before connection probe"
  drm/i915/dp: wait for previous AUX channel activity to clear
  ...

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 5 Aug 2011 16:42:36 +0000 (06:42 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Size mondo queues more sanely.
  sparc: Access kernel TSB using physical addressing when possible.
  sparc: Fix __atomic_add_unless() return value.
  sparc: use kbuild-generic support for true asm-generic header files
  sparc: Use popc when possible for ffs/__ffs/ffz.
  sparc: Set reboot-cmd using reboot data hypervisor call if available.
  sparc: Add some missing hypervisor API groups.
  sparc: Use hweight64() in popc emulation.
  sparc: Use popc if possible for hweight routines.
  sparc: Minor tweaks to Niagara page copy/clear.
  sparc: Sanitize cpu feature detection and reporting.

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 5 Aug 2011 16:42:01 +0000 (06:42 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits)
  ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
  mlx4: decreasing ref count when removing mac
  net: Fix security_socket_sendmsg() bypass problem.
  net: Cap number of elements for sendmmsg
  net: sendmmsg should only return an error if no messages were sent
  ixgbe: fix PHY link setup for 82599
  ixgbe: fix __ixgbe_notify_dca() bail out code
  igb: fix WOL on second port of i350 device
  e1000e: minor re-order of #include files
  e1000e: remove unnecessary check for NULL pointer
  intel drivers: repair missing flush operations
  macb: restore wrap bit when performing underrun cleanup
  cdc_ncm: fix endianness problem.
  irda: use PCI_VENDOR_ID_*
  mlx4: Fixing Ethernet unicast packet steering
  net: fix NULL dereferences in check_peer_redir()
  bnx2x: Clear MDIO access warning during first driver load
  bnx2x: Fix BCM578xx MAC test
  bnx2x: Fix BCM54618se invalid link indication
  bnx2x: Fix BCM84833 link
  ...

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Linus Torvalds [Fri, 5 Aug 2011 16:41:10 +0000 (06:41 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  drivers/ide/cy82c693.c: Add missing pci_dev_put
  ide: Fix irq flags madness

13 years agocifs: cope with negative dentries in cifs_get_root
Jeff Layton [Fri, 5 Aug 2011 13:02:40 +0000 (09:02 -0400)]
cifs: cope with negative dentries in cifs_get_root

The loop around lookup_one_len doesn't handle the case where it might
return a negative dentry, which can cause an oops on the next pass
through the loop. Check for that and break out of the loop with an
error of -ENOENT if there is one.

Fixes the panic reported here:

    https://bugzilla.redhat.com/show_bug.cgi?id=727927

Reported-by: TR Bentley <home@trarbentley.net>
Reported-by: Iain Arnell <iarnell@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: convert prefixpath delimiters in cifs_build_path_to_root
Jeff Layton [Fri, 5 Aug 2011 14:28:01 +0000 (10:28 -0400)]
cifs: convert prefixpath delimiters in cifs_build_path_to_root

Regression from 2.6.39...

The delimiters in the prefixpath are not being converted based on
whether posix paths are in effect. Fixes:

    https://bugzilla.redhat.com/show_bug.cgi?id=727834

Reported-and-Tested-by: Iain Arnell <iarnell@gmail.com>
Reported-by: Patrick Oltmann <patrick.oltmann@gmx.net>
Cc: Pavel Shilovsky <piastryyy@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoxen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set
Konrad Rzeszutek Wilk [Thu, 4 Aug 2011 22:42:10 +0000 (18:42 -0400)]
xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set

with CONFIG_XEN and CONFIG_FTRACE set we get this:

arch/x86/xen/trace.c:22: error: ‘__HYPERVISOR_console_io’ undeclared here (not in a function)
arch/x86/xen/trace.c:22: error: array index in initializer not of integer type
arch/x86/xen/trace.c:22: error: (near initialization for ‘xen_hypercall_names’)
arch/x86/xen/trace.c:23: error: ‘__HYPERVISOR_physdev_op_compat’ undeclared here (not in a function)

Issue was that the definitions of __HYPERVISOR were not pulled
if CONFIG_XEN_PRIVILEGED_GUEST was not set.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoipv6: check for IPv4 mapped addresses when connecting IPv6 sockets
Max Matveev [Fri, 5 Aug 2011 10:56:30 +0000 (03:56 -0700)]
ipv6: check for IPv4 mapped addresses when connecting IPv6 sockets

When support for binding to 'mapped INADDR_ANY (::ffff.0.0.0.0)' was added
in 0f8d3c7ac3693d7b6c731bf2159273a59bf70e12 the rest of the code
wasn't told so now it's possible to bind IPv6 datagram socket to
::ffff.0.0.0.0, connect it to another IPv4 address and it will all
work except for getsockhame() which does not return the local address
as expected.

To give getsockname() something to work with check for 'mapped INADDR_ANY'
when connecting and update the in-core source addresses appropriately.

Signed-off-by: Max Matveev <makc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: hda - Fix a complile warning in patch_via.c
Wang Shaoyan [Fri, 5 Aug 2011 10:51:29 +0000 (18:51 +0800)]
ALSA: hda - Fix a complile warning in patch_via.c

  sound/pci/hda/patch_via.c:2087: warning: 'dac' may be used uninitialized in this function

Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agomlx4: decreasing ref count when removing mac
Yevgeny Petrilin [Thu, 4 Aug 2011 01:05:12 +0000 (01:05 +0000)]
mlx4: decreasing ref count when removing mac

For older FW versions, when a Mac address removed from Mac table,
we should set 0 for reference count for the corresponding Mac index.
Fixes a bug where removing Mac from the table still left that entry as
invalid.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Tested-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net
David S. Miller [Fri, 5 Aug 2011 10:35:00 +0000 (03:35 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net

13 years agonet: Fix security_socket_sendmsg() bypass problem.
Tetsuo Handa [Thu, 4 Aug 2011 14:07:40 +0000 (14:07 +0000)]
net: Fix security_socket_sendmsg() bypass problem.

The sendmmsg() introduced by commit 228e548e "net: Add sendmmsg socket system
call" is capable of sending to multiple different destination addresses.

SMACK is using destination's address for checking sendmsg() permission.
However, security_socket_sendmsg() is called for only once even if multiple
different destination addresses are passed to sendmmsg().

Therefore, we need to call security_socket_sendmsg() for each destination
address rather than only the first destination address.

Since calling security_socket_sendmsg() every time when only single destination
address was passed to sendmmsg() is a waste of time, omit calling
security_socket_sendmsg() unless destination address of previous datagram and
that of current datagram differs.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Anton Blanchard <anton@samba.org>
Cc: stable <stable@kernel.org> [3.0+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Cap number of elements for sendmmsg
Anton Blanchard [Thu, 4 Aug 2011 14:07:39 +0000 (14:07 +0000)]
net: Cap number of elements for sendmmsg

To limit the amount of time we can spend in sendmmsg, cap the
number of elements to UIO_MAXIOV (currently 1024).

For error handling an application using sendmmsg needs to retry at
the first unsent message, so capping is simpler and requires less
application logic than returning EINVAL.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable <stable@kernel.org> [3.0+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sendmmsg should only return an error if no messages were sent
Anton Blanchard [Thu, 4 Aug 2011 14:07:38 +0000 (14:07 +0000)]
net: sendmmsg should only return an error if no messages were sent

sendmmsg uses a similar error return strategy as recvmmsg but it
turns out to be a confusing way to communicate errors.

The current code stores the error code away and returns it on the next
sendmmsg call. This means a call with completely valid arguments could
get an error from a previous call.

Change things so we only return an error if no datagrams could be sent.
If less than the requested number of messages were sent, the application
must retry starting at the first failed one and if the problem is
persistent the error will be returned.

This matches the behaviour of other syscalls like read/write - it
is not an error if less than the requested number of elements are sent.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable <stable@kernel.org> [3.0+]
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: hdspm - Fix uninitialized compile warnings
Takashi Iwai [Fri, 5 Aug 2011 10:30:12 +0000 (12:30 +0200)]
ALSA: hdspm - Fix uninitialized compile warnings

Put the exception checks for io_type switch() for possible mistakes in
future.  Also this shuts up annoying compile warnings.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoRevert "drm/i915: Try enabling RC6 by default (again)"
Dave Airlie [Fri, 5 Aug 2011 09:56:29 +0000 (10:56 +0100)]
Revert "drm/i915: Try enabling RC6 by default (again)"

This reverts commit 4e20fa65a3ea789510eed1a15deb9e8aab2b8202.

Francesco Allertsen still has a broken configuration.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agosparc: Size mondo queues more sanely.
David S. Miller [Fri, 5 Aug 2011 09:38:27 +0000 (02:38 -0700)]
sparc: Size mondo queues more sanely.

There is currently no upper limit on the mondo queue sizes we'll use,
which guarentees that we'll eventually his page allocation limits, and
thus allocation failures, due to MAX_ORDER.

Cap the sizes sanely, current limits are:

CPU  MONDO 2 * max_possible_cpus
DEV  MONDO 256 (basically NR_IRQS)
RES  MONDO 128
NRES MONDO 4

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux...
Ingo Molnar [Fri, 5 Aug 2011 08:35:55 +0000 (10:35 +0200)]
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

13 years agoMerge branch 'linus' into perf/urgent
Ingo Molnar [Fri, 5 Aug 2011 08:32:54 +0000 (10:32 +0200)]
Merge branch 'linus' into perf/urgent

Merge reason: Include most of the merge window trees, to do fixes on top.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agosparc: Access kernel TSB using physical addressing when possible.
David S. Miller [Fri, 5 Aug 2011 07:53:57 +0000 (00:53 -0700)]
sparc: Access kernel TSB using physical addressing when possible.

On sun4v this is basically required since we point the hypervisor and
the TSB walking hardware at these tables using physical addressing
too.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: usb-audio - add quirk for Keith McMillen StringPort
Miller Puckette [Thu, 4 Aug 2011 19:25:56 +0000 (12:25 -0700)]
ALSA: usb-audio - add quirk for Keith McMillen StringPort

Signed-off-by: Miller Puckette <msp@ucsd.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agopowerpc: Fix build without CONFIG_PCI
Benjamin Herrenschmidt [Fri, 5 Aug 2011 06:01:20 +0000 (16:01 +1000)]
powerpc: Fix build without CONFIG_PCI

Commit fea80311a939a746533a6d7e7c3183729d6a3faf
"iomap: make IOPORT/PCI mapping functions conditional"

Broke powerpc build without CONFIG_PCI as we would still define
pci_iomap(), which overlaps with the new empty inline in the headers.

Make our implementation conditional on CONFIG_PCI

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/4xx: Fix build of PCI code on 405
Benjamin Herrenschmidt [Fri, 5 Aug 2011 05:59:40 +0000 (15:59 +1000)]
powerpc/4xx: Fix build of PCI code on 405

Commit 112d1fe9f7715db423ffeec5ac1beccff6093dc4
"powerpc/4xx: Add check_link to struct ppc4xx_pciex_hwops" inadvertently
broke 405 builds due to some functions being over protected by an
ifdef CONFIG_44x.

Move them back out.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoDo 'shm_init_ns()' in an early pure_initcall
Linus Torvalds [Fri, 5 Aug 2011 05:35:59 +0000 (19:35 -1000)]
Do 'shm_init_ns()' in an early pure_initcall

This isn't really critical any more, since other patches (commit
298507d4d2cf: "shm: optimize exit_shm()") have caused us to not actually
need to touch the rw_mutex unless there are actual shm segments
associated with the namespace, but we really should do tne shm_init_ns()
earlier than we do now.

This, together with commit 288d5abec831 ("Boot up with usermodehelper
disabled") will mean that we really do initialize the initial ipc
namespace data structure before we run any tasks.

Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopowerpc/pseries: Simplify vpa deregistration functions
Anton Blanchard [Mon, 25 Jul 2011 01:46:34 +0000 (01:46 +0000)]
powerpc/pseries: Simplify vpa deregistration functions

The VPA, SLB shadow and DTL degistration functions do not need an
address, so simplify things and remove it.

Also cleanup pseries_kexec_cpu_down a bit by storing the cpu IDs
in local variables.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/pseries: Cleanup VPA registration and deregistration errors
Anton Blanchard [Mon, 25 Jul 2011 01:46:33 +0000 (01:46 +0000)]
powerpc/pseries: Cleanup VPA registration and deregistration errors

Make the VPA, SLB shadow and DTL registration and deregistration
functions print consistent messages on error. I needed the firmware
error code while chasing a kexec bug but we weren't printing it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/pseries: Fix kexec on recent firmware versions
Anton Blanchard [Mon, 25 Jul 2011 01:46:32 +0000 (01:46 +0000)]
powerpc/pseries: Fix kexec on recent firmware versions

Recent versions of firmware will fail to unmap the virtual processor
area if we have a dispatch trace log registered. This causes kexec
to fail.

If a trace log is registered this patch unregisters it before the
SLB shadow and virtual processor areas, fixing the problem.

The address argument is ignored by firmware on unregister so we
may as well remove it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoMAINTAINERS: change maintainership of mpc5xxx
Anatolij Gustschin [Wed, 20 Jul 2011 19:04:25 +0000 (19:04 +0000)]
MAINTAINERS: change maintainership of mpc5xxx

Grant intends to hand over maintainership of mpc5xxx
to me. Change MPC5XXX entry in MAINTAINERS accordingly.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Make KVM_GUEST default to n
Anton Blanchard [Thu, 4 Aug 2011 17:23:58 +0000 (17:23 +0000)]
powerpc: Make KVM_GUEST default to n

KVM_GUEST adds a 1 MB array to the kernel (kvm_tmp) which grew
my kernel enough to cause it to fail to boot.

Dynamically allocating or reducing the size of this array is a
good idea, but in the meantime I think it makes sense to make
KVM_GUEST default to n in order to minimise surprises.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/kvm: Fix build errors with older toolchains
Nishanth Aravamudan [Wed, 3 Aug 2011 08:55:54 +0000 (08:55 +0000)]
powerpc/kvm: Fix build errors with older toolchains

On a box with gcc 4.3.2, I see errors like:

arch/powerpc/kvm/book3s_hv_rmhandlers.S:1254: Error: Unrecognized opcode: stxvd2x
arch/powerpc/kvm/book3s_hv_rmhandlers.S:1316: Error: Unrecognized opcode: lxvd2x

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Lack of ibm,io-events not that important!
Anton Blanchard [Sun, 31 Jul 2011 19:30:04 +0000 (19:30 +0000)]
powerpc: Lack of ibm,io-events not that important!

The ibm,io-events code is a bit verbose with its error messages.
Reverse the reporting so we only print when we successfully enable
I/O event interrupts.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Move kdump default base address to half RMO size on 64bit
Anton Blanchard [Sun, 31 Jul 2011 19:27:35 +0000 (19:27 +0000)]
powerpc: Move kdump default base address to half RMO size on 64bit

We are seeing boot failures on some very large boxes even with
commit b5416ca9f824 (powerpc: Move kdump default base address to
64MB on 64bit).

This patch halves the RMO so both kernels get about the same
amount of RMO memory. On large machines this region will be
at least 256MB, so each kernel will get 128MB.

We cap it at 256MB (small SLB size) since some early allocations need
to be in the bolted SLB region. We could relax this on machines with
1TB SLBs in a future patch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc/perf: Disable pagefaults during callchain stack read
David Ahern [Sat, 30 Jul 2011 10:53:20 +0000 (10:53 +0000)]
powerpc/perf: Disable pagefaults during callchain stack read

Panic observed on an older kernel when collecting call chains for
the context-switch software event:

 [<b0180e00>]rb_erase+0x1b4/0x3e8
 [<b00430f4>]__dequeue_entity+0x50/0xe8
 [<b0043304>]set_next_entity+0x178/0x1bc
 [<b0043440>]pick_next_task_fair+0xb0/0x118
 [<b02ada80>]schedule+0x500/0x614
 [<b02afaa8>]rwsem_down_failed_common+0xf0/0x264
 [<b02afca0>]rwsem_down_read_failed+0x34/0x54
 [<b02aed4c>]down_read+0x3c/0x54
 [<b0023b58>]do_page_fault+0x114/0x5e8
 [<b001e350>]handle_page_fault+0xc/0x80
 [<b0022dec>]perf_callchain+0x224/0x31c
 [<b009ba70>]perf_prepare_sample+0x240/0x2fc
 [<b009d760>]__perf_event_overflow+0x280/0x398
 [<b009d914>]perf_swevent_overflow+0x9c/0x10c
 [<b009db54>]perf_swevent_ctx_event+0x1d0/0x230
 [<b009dc38>]do_perf_sw_event+0x84/0xe4
 [<b009dde8>]perf_sw_event_context_switch+0x150/0x1b4
 [<b009de90>]perf_event_task_sched_out+0x44/0x2d4
 [<b02ad840>]schedule+0x2c0/0x614
 [<b0047dc0>]__cond_resched+0x34/0x90
 [<b02adcc8>]_cond_resched+0x4c/0x68
 [<b00bccf8>]move_page_tables+0xb0/0x418
 [<b00d7ee0>]setup_arg_pages+0x184/0x2a0
 [<b0110914>]load_elf_binary+0x394/0x1208
 [<b00d6e28>]search_binary_handler+0xe0/0x2c4
 [<b00d834c>]do_execve+0x1bc/0x268
 [<b0015394>]sys_execve+0x84/0xc8
 [<b001df10>]ret_from_syscall+0x0/0x3c

A page fault occurred walking the callchain while creating a perf
sample for the context-switch event. To handle the page fault the
mmap_sem is needed, but it is currently held by setup_arg_pages.
(setup_arg_pages calls shift_arg_pages with the mmap_sem held.
shift_arg_pages then calls move_page_tables which has a cond_resched
at the top of its for loop - hitting that cond_resched is what caused
the context switch.)

This is an extension of Anton's proposed patch:
https://lkml.org/lkml/2011/7/24/151
adding case for 32-bit ppc.

Tested on the system that first generated the panic and then again
with latest kernel using a PPC VM. I am not able to test the 64-bit
path - I do not have H/W for it and 64-bit PPC VMs (qemu on Intel)
is horribly slow.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoppc: Remove duplicate definition of PV_POWER7
Peter Zijlstra [Wed, 27 Jul 2011 07:27:21 +0000 (07:27 +0000)]
ppc: Remove duplicate definition of PV_POWER7

One definition of PV_POWER7 seems enough to me.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: pseries: Fix kexec on machines with more than 4TB of RAM
Anton Blanchard [Tue, 26 Jul 2011 18:15:03 +0000 (18:15 +0000)]
powerpc: pseries: Fix kexec on machines with more than 4TB of RAM

On a box with 8TB of RAM the MMU hashtable is 64GB in size. That
means we have 4G PTEs. pSeries_lpar_hptab_clear was using a signed
int to store the index which will overflow at 2G.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Jump label misalignment causes oops at boot
Anton Blanchard [Tue, 26 Jul 2011 14:35:46 +0000 (14:35 +0000)]
powerpc: Jump label misalignment causes oops at boot

I hit an oops at boot on the first instruction of timer_cpu_notify:

NIP [c000000000722f88] .timer_cpu_notify+0x0/0x388

The code should look like:

c000000000722f78:       eb e9 00 30     ld      r31,48(r9)
c000000000722f7c:       2f bf 00 00     cmpdi   cr7,r31,0
c000000000722f80:       40 9e ff 44     bne+    cr7,c000000000722ec4
c000000000722f84:       4b ff ff 74     b       c000000000722ef8

c000000000722f88 <.timer_cpu_notify>:
c000000000722f88:       7c 08 02 a6     mflr    r0
c000000000722f8c:       2f a4 00 07     cmpdi   cr7,r4,7
c000000000722f90:       fb c1 ff f0     std     r30,-16(r1)
c000000000722f94:       fb 61 ff d8     std     r27,-40(r1)

But the oops output shows:

eb61ffd8 eb81ffe0 eba1ffe8 ebc1fff0 7c0803a6 ebe1fff8 4e800020
00000000 ebe90030 c0000000 00ad0a28 00000000 2fa40007 fbc1fff0 fb61ffd8

So we scribbled over our instructions with c000000000ad0a28, which
is an address inside the jump_table ELF section.

It turns out the jump_table section is only aligned to 8 bytes but
we are aligning our entries within the section to 16 bytes. This
means our entries are offset from the table:

c000000000acd4a8 <__start___jump_table>:
        ...
c000000000ad0a10:       c0 00 00 00     lfs     f0,0(0)
c000000000ad0a14:       00 70 cd 5c     .long 0x70cd5c
c000000000ad0a18:       c0 00 00 00     lfs     f0,0(0)
c000000000ad0a1c:       00 70 cd 90     .long 0x70cd90
c000000000ad0a20:       c0 00 00 00     lfs     f0,0(0)
c000000000ad0a24:       00 ac a4 20     .long 0xaca420

And the jump table sort code gets very confused and writes into the
wrong spot. Remove the alignment, and also remove the padding since
we it saves some space and we shouldn't need it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Clean up some panic messages in prom_init
Anton Blanchard [Mon, 25 Jul 2011 20:47:51 +0000 (20:47 +0000)]
powerpc: Clean up some panic messages in prom_init

Add a newline to the panic messages in make_room. Also fix a
comment that suggested our chunk size is 4Mb. It's 1MB.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Fix device tree claim code
Anton Blanchard [Mon, 25 Jul 2011 20:47:07 +0000 (20:47 +0000)]
powerpc: Fix device tree claim code

I have a box that fails in OF during boot with:

DEFAULT CATCH!, exception-handler=fff00400
at   %SRR0: 49424d2c4c6f6768   %SRR1: 800000004000b002

ie "IBM,Logh". OF got corrupted with a device tree string.

Looking at make_room and alloc_up, we claim the first chunk (1 MB)
but we never claim any more. mem_end is always set to alloc_top
which is the top of our available address space, guaranteeing we will
never call alloc_up and claim more memory.

Also alloc_up wasn't setting alloc_bottom to the bottom of the
available address space.

This doesn't help the box to boot, but we at least fail with
an obvious error. We could relocate the device tree in a future
patch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: Return the_cpu_ spec from identify_cpu
Scott Wood [Mon, 25 Jul 2011 11:04:36 +0000 (11:04 +0000)]
powerpc: Return the_cpu_ spec from identify_cpu

Commit af9eef3c7b1ed004c378c89b87642f4937337d50 caused cpu_setup to see
the_cpu_spec, rather than the source struct.  However, on 32-bit, the
return value of identify_cpu was being used for feature fixups, and
identify_cpu was returning the source struct.  So if cpu_setup patches
the feature bits, the update won't affect the fixups.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agopowerpc: mtspr/mtmsr should take an unsigned long
Scott Wood [Mon, 25 Jul 2011 11:02:11 +0000 (11:02 +0000)]
powerpc: mtspr/mtmsr should take an unsigned long

Add a cast in case the caller passes in a different type, as it would
if mtspr/mtmsr were functions.

Previously, if a 64-bit type was passed in on 32-bit, GCC would bind the
constraint to a pair of registers, and would substitute the first register
in the pair in the asm code.  This corresponds to the upper half of the
64-bit register, which is generally not the desired behavior.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 5 Aug 2011 02:44:40 +0000 (16:44 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  RCUify freeing acls, let check_acl() go ahead in RCU mode if acl is cached
  get rid of boilerplate switches in posix_acl.h
  fix block device fallout from ->fsync() changes

13 years agoMerge branch 'fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 5 Aug 2011 02:44:23 +0000 (16:44 -1000)]
Merge branch 'fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'fixefi' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  efi: Fix argument types for SetVariable() for ia64

13 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 5 Aug 2011 02:44:04 +0000 (16:44 -1000)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  slab, lockdep: Annotate the locks before using them
  lockdep: Clear whole lockdep_map on initialization
  slab, lockdep: Annotate slab -> rcu -> debug_object -> slab
  lockdep: Fix up warning
  lockdep: Fix trace_hardirqs_on_caller()
  futex: Fix regression with read only mappings

13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Fri, 5 Aug 2011 02:43:43 +0000 (16:43 -1000)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  dmaengine: use DEFINE_IDR for static initialization
  ioat: fix xor_idx_to_desc
  Avoid section type conflict in dma/ioat/dma_v3.c
  ioat: Adding PCI IDs for IOAT devices on SandyBridge platforms

13 years agocpuidle: Consistent spelling of cpuidle_idle_call()
David Brown [Thu, 4 Aug 2011 16:24:31 +0000 (09:24 -0700)]
cpuidle: Consistent spelling of cpuidle_idle_call()

Commit a0bfa1373859e9d11dc92561a8667588803e42d8 mispells
cpuidle_idle_call() on ARM and SH code.  Fix this to be consistent.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: x86@kernel.org
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
[ Also done by Mark Brown - th ebug has been around forever, and was
  noticed in -next, but the idle tree never picked it up. Bad bad bad ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoefi: Fix argument types for SetVariable() for ia64
Matthew Garrett [Wed, 6 Jul 2011 20:48:49 +0000 (16:48 -0400)]
efi: Fix argument types for SetVariable() for ia64

The spec says this takes uint32 for attributes, not uintn.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
13 years agoexofs: Fix truncate for the raid-groups case
Boaz Harrosh [Thu, 4 Aug 2011 03:44:16 +0000 (20:44 -0700)]
exofs: Fix truncate for the raid-groups case

In the general raid-group case the truncate was wrong in that
it did not also fix the object length of the neighboring groups.

There are two bad cases in the old code:
1. Space that should be freed was not.
2. If a file That was big is truncated small, then made bigger
   again, the holes would not contain zeros but could expose old data.
   (If the growing of the file expands to more than a full
    groups cycle + group size (> S + T))

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
13 years agoexofs: Small cleanup of exofs_fill_super
Boaz Harrosh [Thu, 4 Aug 2011 03:18:01 +0000 (20:18 -0700)]
exofs: Small cleanup of exofs_fill_super

Small cleanup that unifies duplicated code used in both the
error and success cases

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
13 years agoexofs: BUG: Avoid sbi realloc
Boaz Harrosh [Thu, 28 Jul 2011 00:51:53 +0000 (17:51 -0700)]
exofs: BUG: Avoid sbi realloc

Since the beginning we realloced the sbi structure when a bigger
then one device table was specified. (I know that was really stupid).

Then much later when "register bdi" was added (By Jens) it was
registering the pointer to sbi->bdi before the realloc.

We never saw this problem because up till now the realloc did not
do anything since the device table was small enough to fit in the
original allocation. But once we starting testing with large device
tables (Bigger then 28) we noticed the crash of writeback operating
on a deallocated pointer.

* Avoid the all mess by allocating the device-table as a second array
  and get rid of the variable-sized structure and the rest of this
  mess.
* Take the chance to clean near by structures and comments.
* Add a needed dprint on startup to indicate the loaded layout.
* Also move the bdi registration to the very end because it will
  only fail in a low memory, which will probably fail before hand.
  There are many more likely causes to not load before that. This
  way the error handling is made simpler. (Just doing this would be
  enough to fix the BUG)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>