]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoNFSv4.1: Ensure that reclaim_complete uses the right credential
Trond Myklebust [Mon, 20 May 2013 15:05:17 +0000 (11:05 -0400)]
NFSv4.1: Ensure that reclaim_complete uses the right credential

We want to use the same credential for reclaim_complete as we used
for the exchange_id call.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutreturn uses the correct credential
Trond Myklebust [Mon, 20 May 2013 14:43:47 +0000 (10:43 -0400)]
NFSv4.1: Ensure that layoutreturn uses the correct credential

We need to use the same credential as was used for the layoutget
and/or layoutcommit operations.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agoNFSv4.1: Ensure that layoutget is called using the layout credential
Trond Myklebust [Mon, 20 May 2013 14:49:34 +0000 (10:49 -0400)]
NFSv4.1: Ensure that layoutget is called using the layout credential

Ensure that we use the same credential for layoutget, layoutcommit and
layoutreturn.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
11 years agonet: Unbreak compat_sys_{send,recv}msg
Andy Lutomirski [Wed, 5 Jun 2013 19:38:26 +0000 (19:38 +0000)]
net: Unbreak compat_sys_{send,recv}msg

I broke them in this commit:

    commit 1be374a0518a288147c6a7398792583200a67261
    Author: Andy Lutomirski <luto@amacapital.net>
    Date:   Wed May 22 14:07:44 2013 -0700

        net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg

This patch adds __sys_sendmsg and __sys_sendmsg as common helpers that accept
MSG_CMSG_COMPAT and blocks MSG_CMSG_COMPAT at the syscall entrypoints.  It
also reverts some unnecessary checks in sys_socketcall.

Apparently I was suffering from underscore blindness the first time around.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Tested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'pm-cpufreq-next' into linux-next
Rafael J. Wysocki [Thu, 6 Jun 2013 16:28:47 +0000 (18:28 +0200)]
Merge branch 'pm-cpufreq-next' into linux-next

* pm-cpufreq-next:
  cpufreq: powerpc: Add cpufreq driver for Freescale e500mc SoCs

11 years agoMerge branch 'pm-cpuidle-next' into linux-next
Rafael J. Wysocki [Thu, 6 Jun 2013 16:28:40 +0000 (18:28 +0200)]
Merge branch 'pm-cpuidle-next' into linux-next

* pm-cpuidle-next:
  ARM: zynq: Add cpuidle support

11 years agoMerge branch 'acpi-assorted-next' into linux-next
Rafael J. Wysocki [Thu, 6 Jun 2013 16:28:26 +0000 (18:28 +0200)]
Merge branch 'acpi-assorted-next' into linux-next

* acpi-assorted-next:
  ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan
  ACPI: Add CMOS RTC Operation Region handler support
  ACPI / APEI: fix error return code in einj_init()
  ACPI: Remove unused flags in acpi_device_flags

11 years agoUSB: option,zte_ev: move most ZTE CDMA devices to zte_ev
Dan Williams [Wed, 5 Jun 2013 20:26:27 +0000 (15:26 -0500)]
USB: option,zte_ev: move most ZTE CDMA devices to zte_ev

Per some ZTE Linux drivers I found for the AC2716, the following patch
moves most ZTE CDMA devices from option to zte_ev.  The blacklist stuff
that option does is not required with zte_ev, because it doesn't
implement any of the send_setup hooks which the blacklist suppressed.

I did not move the 2718 over because I could not find any ZTE Linux
drivers for that device, nor even any Windows drivers.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: option: blacklist network interface on Huawei E1820
Bjørn Mork [Thu, 6 Jun 2013 10:57:24 +0000 (12:57 +0200)]
USB: option: blacklist network interface on Huawei E1820

The mode used by Windows for the Huawei E1820 will use the
same ff/ff/ff class codes for both serial and network
functions.

Reported-by: Graham Inggs <graham.inggs@uct.ac.za>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoUSB: whiteheat: fix broken port configuration
Johan Hovold [Thu, 6 Jun 2013 11:32:47 +0000 (13:32 +0200)]
USB: whiteheat: fix broken port configuration

When configuring the port (e.g. set_termios) the port minor number
rather than the port number was used in the request (and they only
coincide for minor number 0).

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoi915/drm: Add private api for power well usage
Wang Xingchao [Thu, 30 May 2013 14:07:11 +0000 (22:07 +0800)]
i915/drm: Add private api for power well usage

Haswell Display audio depends on power well in graphic side, it should
request power well before use it and release power well after use.
I915 will not shutdown power well if it detects audio is using.
This patch protects display audio crash for Intel Haswell C3 stepping board.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Add power-welll support for haswell HDA
Wang Xingchao [Thu, 30 May 2013 14:07:10 +0000 (22:07 +0800)]
ALSA: hda - Add power-welll support for haswell HDA

For Intel Haswell chip, HDA controller and codec have
power well dependency from GPU side. This patch added support
to request/release power well in audio driver. Power save
feature should be enabled to get runtime power saving.

There's deadlock when request_module(i915) in azx_probe.
It looks like:
device_lock(audio pci device) -> azx_probe -> module_request
(or symbol_request) -> modprobe (userspace) -> i915 init ->
drm_pci_init -> pci_register_driver -> bus_add_driver -> driver_attach ->
which in turn tries all locks on pci bus, and when it tries the one on the
audio device, it will deadlock.

This patch introduce a work to store remaining probe stuff, and let
request_module run in safe work context.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Move azx_first_init() into azx_probe_continue()
Takashi Iwai [Thu, 30 May 2013 14:07:09 +0000 (22:07 +0800)]
ALSA: hda - Move azx_first_init() into azx_probe_continue()

This is a preliminary work for the upcoming Haswell HDMI audio fixes.

azx_first_init() function can be safely called after the f/w loader,
since the f/w loader doesn't require the sound hardware initialization
beforehand.  Moving it into azx_probe_continue() cleans up the code
flow a bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Fix runtime PM check
Wang Xingchao [Thu, 30 May 2013 14:07:08 +0000 (22:07 +0800)]
ALSA: hda - Fix runtime PM check

The device can support runtime PM no matter whether it support
signal wakeup or not. For some chips like Haswell which doesnot
support PME by default, this patch let haswell Display HD-A controller
enter runtime suspend, and bring more power saving whith power-well
feature enabled.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoMerge branch '3.10-fixes' into mips-for-linux-next
Ralf Baechle [Thu, 6 Jun 2013 14:18:06 +0000 (16:18 +0200)]
Merge branch '3.10-fixes' into mips-for-linux-next

11 years agoMIPS: ralink: add missing SZ_1M multiplier
John Crispin [Thu, 6 Jun 2013 12:55:53 +0000 (12:55 +0000)]
MIPS: ralink: add missing SZ_1M multiplier

On RT5350 the memory size is set to Bytes and not MegaBytes due to a missing
multiplier.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5378/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.
Ralf Baechle [Tue, 28 May 2013 22:48:10 +0000 (00:48 +0200)]
MIPS: Compat: Fix cputime_to_timeval() arguments in compat binfmt_elf.

cputime_to_timeval() takes a struct timeval *as its second argument but
a struct compat_timeval * will be passed resulting in:

  CC      arch/mips/kernel/binfmt_elfn32.o
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfn32.c:122:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfn32.c:55:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
  AS      arch/mips/kernel/scall64-n32.o
  CC      arch/mips/kernel/signal_n32.o
  CC      arch/mips/kernel/binfmt_elfo32.o
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c: In function ‘fill_prstatus’:
arch/mips/kernel/../../../fs/binfmt_elf.c:1330:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1331:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1336:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1337:3: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1339:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’
In file included from arch/mips/kernel/binfmt_elfo32.c:165:0:
arch/mips/kernel/../../../fs/binfmt_elf.c:1340:2: warning: passing argument 2 of ‘cputime_to_timeval’ from incompatible pointer type [enabled by default]
In file included from include/asm-generic/cputime.h:12:0,
                 from /home/ralf/src/linux/linux-mips/arch/mips/include/asm/cputime.h:4,
                 from include/linux/sched.h:28,
                 from include/linux/ptrace.h:5,
                 from include/uapi/linux/elfcore.h:7,
                 from include/linux/elfcore.h:7,
                 from arch/mips/kernel/binfmt_elfo32.c:78:
include/asm-generic/cputime_nsecs.h:92:91: note: expected ‘struct timeval *’ but argument is of type ‘struct compat_timeval *’

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: OCTEON: Improve _machine_halt implementation.
David Daney [Fri, 24 May 2013 16:23:02 +0000 (16:23 +0000)]
MIPS: OCTEON: Improve _machine_halt implementation.

As noted by Wladislav Wiebe:
   $ halt
   ..
   Sent SIGKILL to all processes
   Requesting system halt
   [66.729373] System halted.
   [66.733244]
   [66.734761] =====================================
   [66.739473] [ BUG: lock held at task exit time! ]
   [66.744188] 3.8.7-0-sampleversion-fct #49 Tainted: G           O
   [66.750202] -------------------------------------
   [66.754913] init/21479 is exiting with locks still held!
   [66.760234] 1 lock held by init/21479:
   [66.763990]  #0:  (reboot_mutex){+.+...}, at: [<ffffffff801776c8>] SyS_reboot+0xe0/0x218
   [66.772165]
   [66.772165] stack backtrace:
   [66.776532] Call Trace:
   [66.778992] [<ffffffff805780a8>] dump_stack+0x8/0x34
   [66.783972] [<ffffffff801618b0>] do_exit+0x610/0xa70
   [66.788948] [<ffffffff801777a8>] SyS_reboot+0x1c0/0x218
   [66.794186] [<ffffffff8013d6a4>] handle_sys64+0x44/0x64

This is an alternative fix to the one sent by Wladislav.  We kill the
watchdog for each CPU and then spin in WAIT with interrupts disabled.
This is the lowest power mode for the OCTEON.  If we were to spin with
interrupts enabled, we would get a continual stream of warning messages
and backtraces from the lockup detector, so I chose to disable
interrupts.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: Maxim Uvarov <muvarov@gmail.com>
Cc: Wladislav Wiebe <wladislav.kw@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/5324/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: rtlx: Fix implicit declaration of function set_vi_handler()
Yoichi Yuasa [Tue, 28 May 2013 01:23:22 +0000 (01:23 +0000)]
MIPS: rtlx: Fix implicit declaration of function set_vi_handler()

arch/mips/kernel/rtlx.c: In function 'rtlx_module_init':
arch/mips/kernel/rtlx.c:523:3: error: implicit declaration of function 'set_vi_handler' [-Werror=implicit-function-declaration]

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5340/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agob43: stop format string leaking into error msgs
Kees Cook [Fri, 10 May 2013 21:48:21 +0000 (14:48 -0700)]
b43: stop format string leaking into error msgs

The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with b43 hardware,
this could lead to a uid-0 to ring-0 escalation.

CVE-2013-2852

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Use minstrel rate control by default
Sujith Manoharan [Thu, 6 Jun 2013 04:36:29 +0000 (10:06 +0530)]
ath9k: Use minstrel rate control by default

The ath9k rate control algorithm has various architectural
issues that make it a poor fit in scenarios like congested
environments etc.

An example: https://bugzilla.redhat.com/show_bug.cgi?id=927191

Change the default to minstrel which is more robust in such cases.
The ath9k RC code is left in the driver for now, maybe it can
be removed altogether later on.

Cc: stable@vger.kernel.org
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMIPS: Implement HAVE_CONTEXT_TRACKING.
Ralf Baechle [Tue, 28 May 2013 23:07:19 +0000 (01:07 +0200)]
MIPS: Implement HAVE_CONTEXT_TRACKING.

This enables support for CONFIG_NO_HZ_FULL.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMIPS: Cleanup flags in syscall flags handlers.
Ralf Baechle [Tue, 28 May 2013 23:02:18 +0000 (01:02 +0200)]
MIPS: Cleanup flags in syscall flags handlers.

This will simplify further modifications.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
11 years agoMerge remote-tracking branch 'asoc/topic/x86' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:24 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/x86' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8994' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:23 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm8962' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:23 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/wm0010' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:22 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ux500' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:22 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/ux500' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/tegra' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:21 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ssm2518' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:21 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/ssm2518' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/spear' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:20 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/spear' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/spdif' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:20 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/spdif' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/sn95031' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:19 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:19 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/samsung' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:18 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/pxa' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:18 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/omap' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:17 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/omap' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/mxs' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:17 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/max98090' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:16 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/max98090' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:16 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/jz4740' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:15 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/jz4740' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/hdmi' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:15 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/hdmi' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsl' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:14 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/fsi' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:14 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/fsi' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:13 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/dfmbcs320' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:13 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/dfmbcs320' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/davinci' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:12 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:12 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/blackfin' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:11 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/blackfin' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/atmel' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:11 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/arizona' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:10 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:10 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/adau1701' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:09 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next
Mark Brown [Thu, 6 Jun 2013 13:29:09 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next

11 years agoMerge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus
Mark Brown [Thu, 6 Jun 2013 13:29:08 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/maintainers' into asoc-linus
Mark Brown [Thu, 6 Jun 2013 13:29:08 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/fix/maintainers' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus
Mark Brown [Thu, 6 Jun 2013 13:29:07 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus

11 years agoMerge remote-tracking branch 'asoc/fix/core' into asoc-linus
Mark Brown [Thu, 6 Jun 2013 13:29:07 +0000 (14:29 +0100)]
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus

11 years agoASoC: WM8962: Create default platform data structure
Nicolin Chen [Thu, 6 Jun 2013 11:38:45 +0000 (19:38 +0800)]
ASoC: WM8962: Create default platform data structure

Embed a copy of struct wm8962_pdata in stuct wm8962_priv
so that there's no need to check validity of pdata any more.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agodrm/i915: update FBC maximum fb sizes
Paulo Zanoni [Tue, 4 Jun 2013 19:53:39 +0000 (16:53 -0300)]
drm/i915: update FBC maximum fb sizes

CTG/ILK/SNB/IVB support 4kx2k surfaces. HSW supports 4kx4k, but
without proper front buffer invalidation on the last 2k lines, so
don't enable FBC on these cases for now.

v2: Use gen >= 5, not gen > 4 (Daniel).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: hw state readout support for pixel_multiplier
Daniel Vetter [Thu, 6 Jun 2013 10:45:25 +0000 (12:45 +0200)]
drm/i915: hw state readout support for pixel_multiplier

Incomplete since ilk+ support needs proper pch dpll tracking first.
SDVO get_config parts based on a patch from Jesse Barnes, but fixed up
to actually work.

v2: Make sure that we call encoder->get_config _after_ we
get_pipe_config to be consistent in both setup_hw_state and the
modeset state checker. Otherwise the clever trick with handling the
pixel mutliplier on i915G/GM where the encoder overrides the default
value of 1 from the crtc get_pipe_config function doesn't work.
Spotted by Imre Deak.

v3: Actually cross-check the pixel mutliplier (but not on pch split
platforms for now). Now actually also tested on a i915G with a sdvo
encoder plugged in.

Cc: Imre Deak <imre.deak@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Don't take unresponsive D3 transition too serious
Takashi Iwai [Thu, 6 Jun 2013 12:20:19 +0000 (14:20 +0200)]
ALSA: hda - Don't take unresponsive D3 transition too serious

When a codec is powered off, some systems don't respond properly after
D3 FG transition, while the driver still expects the response and
tries to fall back to different modes (polling and single-cmd).  When
the fallback happens, the driver stays in that mode, and falling back
to the single-cmd mode means it'll loose the unsol event handling,
too.

The unresponsiveness at D3 isn't too serious, thus this fallback is
mostly superfluous.  We can gracefully ignore the error there so that
the driver keeps the normal operation mode.

This patch adds a new bit flag for codec read/write, set in the power
transition stage, which is notified to the controller driver via a new
bus->no_response_fallback flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Introduce bit flags to snd_hda_codec_read/write()
Takashi Iwai [Thu, 6 Jun 2013 12:00:23 +0000 (14:00 +0200)]
ALSA: hda - Introduce bit flags to snd_hda_codec_read/write()

snd_hda_codec_read(), snd_hda_codec_write() & co take the argument
"direct" that indicates whether the given NID is a direct reference or
an indirect reference.  However, the indirect reference is practically
unimplemented and never exists.  And moreover, we don't need the
indication of indirect reference at this high level, as NID can be
represented in 16bit values at this point.

Meanwhile, there are some cases where it'd be nice to give some
operational options to these functions.  So, we can reuse this
argument as a new bit flag!  Pretty frugal, eh?

All callers so far pass zero to this argument, thus there is no
behavior change by this replacement.

The real usage of this new bit option will be added in the following
patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agodrm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms
Ville Syrjälä [Tue, 4 Jun 2013 10:49:07 +0000 (13:49 +0300)]
drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms

Adding more context from Ville's reply to Rodrigo's question why we
need this:

"The spec says that on some hardware you need to PLL running before you
can poke at the palette registers. I didn't actually try to anger the
hardware so I'm not really sure what would happen otherwise, but IIRC
Jesse said something about a hard system hang..."

And generally documenting such ordering constraints with asserts is
Just Good.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
[danvet: Spruce up the commit message a lot.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Spruce up assert_sprites_disabled()
Ville Syrjälä [Tue, 4 Jun 2013 10:49:06 +0000 (13:49 +0300)]
drm/i915: Spruce up assert_sprites_disabled()

Make assert_sprites_disabled() operational on all platforms where
we currently have sprite support enabled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Improve assert_planes_disabled()
Ville Syrjälä [Tue, 4 Jun 2013 10:49:05 +0000 (13:49 +0300)]
drm/i915: Improve assert_planes_disabled()

Ever since gen4 primary planes were fixed to pipes.

And for gen2-3, don't check plane B if it doesn't exist.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Disable/restore all sprite planes around modeset
Ville Syrjälä [Tue, 4 Jun 2013 10:49:04 +0000 (13:49 +0300)]
drm/i915: Disable/restore all sprite planes around modeset

Disable/restore sprite planes around mode-set just like we do for the
primary and cursor planes. Now that we have working sprite clipping,
this actually works quite decently.

Previosuly we didn't even bother to disable sprites when changing mode,
which could lead to a corrupted sprite appearing on the screen after a
modeset (at least on my IVB). Not sure if all hardware generations would
be so forgiving when enabled sprites end up outside the pipe dimensons.

v2: Disable rather than enable sprites in ironlake_crtc_disable()

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Drop overlay DPMS call from valleyview_crtc_enable
Ville Syrjälä [Tue, 4 Jun 2013 10:49:03 +0000 (13:49 +0300)]
drm/i915: Drop overlay DPMS call from valleyview_crtc_enable

VLV doesn't have the old video overlay.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Follow the same sequence when disabling planes
Ville Syrjälä [Tue, 4 Jun 2013 10:49:02 +0000 (13:49 +0300)]
drm/i915: Follow the same sequence when disabling planes

First disable FBC, then IPS, then disable all planes, and finally
disable the pipe.

v2: Mention IPS in the commit message

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Enable the overlay right after primary and cursor planes
Ville Syrjälä [Tue, 4 Jun 2013 10:49:01 +0000 (13:49 +0300)]
drm/i915: Enable the overlay right after primary and cursor planes

Again follow the same sequence for all generations, because doing
otherwise just doesn't make sense.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Always enable the cursor right after the primary plane
Ville Syrjälä [Tue, 4 Jun 2013 10:49:00 +0000 (13:49 +0300)]
drm/i915: Always enable the cursor right after the primary plane

Follow the same sequence when enabling the cursor plane during
modeset. No point in doing this stuff in different order on different
generations.

This should also avoid a needless wait for vblank for the g4x cursor
workaround when the cursor gets enabled anyway.

Acked-by: Egbert Eich <eich@suse.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: Always load the display palette before enabling the pipe
Ville Syrjälä [Tue, 4 Jun 2013 10:48:59 +0000 (13:48 +0300)]
drm/i915: Always load the display palette before enabling the pipe

Loading the palette after the planes are enabled can risk showing
incorrect colors. ILK+ already load the palette before even the pipe
is enabled. Just follow the same order for gen2-4 and VLV.

According to BSpec the requirements for palette access are
display core clock and display PLL running. In certain platforms
just the core clock may be enough. But we definitely should have both
running when this gets called during the modeset.

v2: Amend the commit message with some display PLL/core clock info

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoRevert "drm/i915: Include display_mmio_offset in sequencer index/data registers"
Ville Syrjälä [Thu, 6 Jun 2013 10:09:32 +0000 (13:09 +0300)]
Revert "drm/i915: Include display_mmio_offset in sequencer index/data registers"

We use port I/O for VGA register access, so adding display_mmio_offset
is just wrong.

This reverts commit 56a12a509296c87d6f149be86c6694d312b21d35.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agodrm/i915: add ibx_irq_preinstall
Paulo Zanoni [Wed, 5 Jun 2013 17:21:51 +0000 (14:21 -0300)]
drm/i915: add ibx_irq_preinstall

So we can remove some duplicate code. All the PCHs are very similar
and right now the code is the same. I plan to add more code, so we
would have more duplicated code.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoALSA: hda - Drop hard dependency on CONFIG_SND_DYNAMIC_MINORS
Takashi Iwai [Thu, 6 Jun 2013 10:10:24 +0000 (12:10 +0200)]
ALSA: hda - Drop hard dependency on CONFIG_SND_DYNAMIC_MINORS

Currently HDMI codec driver sets the hard dependency (reverse
selection) on CONFIG_SND_DYNAMIC_MINORS because the recent codecs may
support more than two PCMs.  But, this doesn't mean that we need
always this option, since there can be a single PCM stream even with
the modern codecs.

This patch drops the hard dependency again but give more sensible
error message when no enough PCMs are available due to the lack of
this option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoASoC: max98090: Guard runtime PM callbacks
Mark Brown [Wed, 5 Jun 2013 18:33:03 +0000 (19:33 +0100)]
ASoC: max98090: Guard runtime PM callbacks

Otherwise the functions will be defined but unreferenced when runtime PM
is disabled, generating warnings.

Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoGFS2: fix error propagation in init_threads()
Alexey Khoroshilov [Wed, 5 Jun 2013 21:29:04 +0000 (01:29 +0400)]
GFS2: fix error propagation in init_threads()

If kthread_run() fails, init_threads() returns
IS_ERR(p) instead of PTR_ERR(p).

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agodrm/i915: Track clients and print their object usage in debugfs
Chris Wilson [Tue, 4 Jun 2013 22:49:08 +0000 (23:49 +0100)]
drm/i915: Track clients and print their object usage in debugfs

By stashing a pointer of who opened the device and keeping a list of
open fd, we can then walk each client and inspect how many objects they
have open. For example,

i915_gem_objects:
1102 objects, 613646336 bytes
663 [662] objects, 468783104 [468750336] bytes in gtt
  37 [37] active objects, 46874624 [46874624] bytes
  626 [625] inactive objects, 421908480 [421875712] bytes
282 unbound objects, 6512640 bytes
85 purgeable objects, 6787072 bytes
28 pinned mappable objects, 3686400 bytes
40 fault mappable objects, 27783168 bytes
2145386496 [536870912] gtt total

Xorg: 43 objects, 32243712 bytes (10223616 active, 16683008 inactive, 4096 unbound)
gnome-shell: 30 objects, 28381184 bytes (0 active, 28336128 inactive, 0 unbound)
xonotic-linux64: 1032 objects, 569933824 bytes (46874624 active, 383545344 inactive, 6508544 unbound)

v2: Use existing drm->filelist as pointed out by Ben.
v3: Not even stashing the task_struct is required as Ben pointed out
    drm_file->pid.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
David S. Miller [Thu, 6 Jun 2013 08:03:06 +0000 (01:03 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Conflicts:
net/netfilter/nf_log.c

The conflict in nf_log.c is that in 'net' we added CONFIG_PROC_FS
protection around foo_proc_entry() calls to fix a build failure,
whereas in Pablo's tree a guard if() test around a call is
remove_proc_entry() was removed.  Trivially resolved.

Pablo Neira Ayuso says:

====================
The following patchset contains the first batch of
Netfilter/IPVS updates for your net-next tree, they are:

* Three patches with improvements and code refactorization
  for nfnetlink_queue, from Florian Westphal.

* FTP helper now parses replies without brackets, as RFC1123
  recommends, from Jeff Mahoney.

* Rise a warning to tell everyone about ULOG deprecation,
  NFLOG has been already in the kernel tree for long time
  and supersedes the old logging over netlink stub, from
  myself.

* Don't panic if we fail to load netfilter core framework,
  just bail out instead, from myself.

* Add cond_resched_rcu, used by IPVS to allow rescheduling
  while walking over big hashtables, from Simon Horman.

* Change type of IPVS sysctl_sync_qlen_max sysctl to avoid
  possible overflow, from Zhang Yanfei.

* Use strlcpy instead of strncpy to skip zeroing of already
  initialized area to write the extension names in ebtables,
  from Chen Gang.

* Use already existing per-cpu notrack object from xt_CT,
  from Eric Dumazet.

* Save explicit socket lookup in xt_socket now that we have
  early demux, also from Eric Dumazet.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agopowerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression
Michael Neuling [Thu, 16 May 2013 20:27:31 +0000 (20:27 +0000)]
powerpc/hw_breakpoints: Add DABRX cpu feature to fix 32-bit regression

When introducing support for DABRX in 4474ef0, we broke older 32-bit CPUs
that don't have that register.

Some CPUs have a DABR but not DABRX.  Configuration are:
- No 32bit CPUs have DABRX but some have DABR.
- POWER4+ and below have the DABR but no DABRX.
- 970 and POWER5 and above have DABR and DABRX.
- POWER8 has DAWR, hence no DABRX.

This introduces CPU_FTR_DABRX and sets it on appropriate CPUs.  We use
the top 64 bits for CPU FTR bits since only 64 bit CPUs have this.

Processors that don't have the DABRX will still work as they will fall
back to software filtering these breakpoints via perf_exclude_event().

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: "Gorelik, Jacob (335F)" <jacob.gorelik@jpl.nasa.gov>
cc: stable@vger.kernel.org (v3.9 only)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/power8: Update denormalization handler
Michael Neuling [Wed, 29 May 2013 21:33:19 +0000 (21:33 +0000)]
powerpc/power8: Update denormalization handler

POWER8 can take a denormalisation exception on any VSX registers.

This does the extra 32 VSX registers we don't currently handle.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pseries: Simplify denormalization handler
Michael Neuling [Wed, 29 May 2013 21:33:18 +0000 (21:33 +0000)]
powerpc/pseries: Simplify denormalization handler

The following simplifies the denorm code by using macros to generate the long
stream of almost identical instructions.

This patch results in no changes to the output binary, but removes a lot of
lines of code.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/power8: Fix oprofile and perf
Michael Neuling [Tue, 4 Jun 2013 19:38:54 +0000 (19:38 +0000)]
powerpc/power8: Fix oprofile and perf

In 2ac6f42 powerpc/cputable: Fix oprofile_cpu_type on power8
we broke all power8 hw events.

This reverts this change and uses oprofile_type instead. Perf now works
on POWER8 again and oprofile will revert to using timers on POWER8.

Kudos to mpe this fix.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Rename PMU interrupts from CNT to PMI
Michael Ellerman [Mon, 3 Jun 2013 18:21:17 +0000 (18:21 +0000)]
powerpc: Rename PMU interrupts from CNT to PMI

Back in commit 89713ed "Add timer, performance monitor and machine check
counts to /proc/interrupts" we added a count of PMU interrupts to the
output of /proc/interrupts.

At the time we named them "CNT" to match x86.

However in commit 89ccf46 "Rename 'performance counter interrupt'", the
x86 guys renamed theirs from "CNT" to "PMI".

Arguably changing the name could break someone's script, but I think the
chance of that is minimal, and it's preferable to have a name that 1) is
somewhat meaningful, and 2) matches x86.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/eeh: Don't check RTAS token to get PE addr
Gavin Shan [Wed, 5 Jun 2013 14:25:50 +0000 (14:25 +0000)]
powerpc/eeh: Don't check RTAS token to get PE addr

RTAS token "ibm,get-config-addr-info" or ibm,get-config-addr-info2"
are used to retrieve the PE address according to PCI address, which
made up of domain/bus/slot/function. If we don't have those 2 tokens,
the domain/bus/slot/function would be used as the address for EEH
RTAS operations. Some older f/w might not have those 2 tokens and
that blocks the EEH functionality to be initialized. It was introduced
by commit e2af155c ("powerpc/eeh: pseries platform EEH initialization").

The patch skips the check on those 2 tokens so we can bring up EEH
functionality successfully. And domain/bus/slot/function will be
used as address for EEH RTAS operations.

Cc: <stable@vger.kernel.org> # v3.4+
Reported-by: Robert Knight <knight@princeton.edu>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Tested-by: Robert Knight <knight@princeton.edu>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources
Kevin Hao [Wed, 5 Jun 2013 02:26:51 +0000 (02:26 +0000)]
powerpc/pci: Check the bus address instead of resource address in pcibios_fixup_resources

If a BAR has the value of 0, we would assume that it is unset yet and
then mark the resource as unset and would reassign it later. But after
commit 6c5705fe (powerpc/PCI: get rid of device resource fixups)
the pcibios_fixup_resources is invoked after the bus address was
translated to linux resource. So the value of res->start is resource
address. And since the resource and bus address may be different, we
should translate it to the bus address before doing the check.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoxfrm: add LINUX_MIB_XFRMACQUIREERROR statistic counter
Fan Du [Thu, 6 Jun 2013 02:15:54 +0000 (10:15 +0800)]
xfrm: add LINUX_MIB_XFRMACQUIREERROR statistic counter

When host ping its peer, ICMP echo request packet triggers IPsec
policy, then host negotiates SA secret with its peer. After IKE
installed SA for OUT direction, but before SA for IN direction
installed, host get ICMP echo reply from its peer. At the time
being, the SA state for IN direction could be XFRM_STATE_ACQ,
then the received packet will be dropped after adding
LINUX_MIB_XFRMINSTATEINVALID statistic.

Adding a LINUX_MIB_XFRMACQUIREERROR statistic counter for such
scenario when SA in larval state is much clearer for user than
LINUX_MIB_XFRMINSTATEINVALID which indicates the SA is totally
bad.

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
11 years agoarch, mm: Remove tlb_fast_mode()
Peter Zijlstra [Wed, 5 Jun 2013 10:26:50 +0000 (12:26 +0200)]
arch, mm: Remove tlb_fast_mode()

Since the introduction of preemptible mmu_gather TLB fast mode has been
broken. TLB fast mode relies on there being absolutely no concurrency;
it frees pages first and invalidates TLBs later.

However now we can get concurrency and stuff goes *bang*.

This patch removes all tlb_fast_mode() code; it was found the better
option vs trying to patch the hole by entangling tlb invalidation with
the scheduler.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Tony Luck <tony.luck@intel.com>
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Thu, 6 Jun 2013 01:05:45 +0000 (10:05 +0900)]
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kbuild fixes from Michal Marek:
 "There is one fix for a kbuild regression, plus three kconfig fixes for
  bugs that have alway been there, but are simple enough to be fixed in
  an -rc"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
  mconf: handle keys in empty dialogs
  kbuild: Don't assume dts files live in arch/*/boot/dts
  scripts/config: fix assignment of parameters for short version of --*-after options

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Wed, 5 Jun 2013 22:56:43 +0000 (15:56 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Merge 'net' bug fixes into 'net-next' as we have patches
that will build on top of them.

This merge commit includes a change from Emil Goode
(emilgoode@gmail.com) that fixes a warning that would
have been introduced by this merge.  Specifically it
fixes the pingv6_ops method ipv6_chk_addr() to add a
"const" to the "struct net_device *dev" argument and
likewise update the dummy_ipv6_chk_addr() declaration.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branches 'devel-stable', 'fixes', 'mcpm', 'misc' and 'mmci' into for-next
Russell King [Wed, 5 Jun 2013 22:58:46 +0000 (23:58 +0100)]
Merge branches 'devel-stable', 'fixes', 'mcpm', 'misc' and 'mmci' into for-next

11 years agoARM: 7741/1: mcpm_platsmp.c: remove empty smp_init_cpus method
Nicolas Pitre [Fri, 31 May 2013 04:24:03 +0000 (05:24 +0100)]
ARM: 7741/1: mcpm_platsmp.c: remove empty smp_init_cpus method

The smp_init_cpus method in the smp_operations structure is optional
and can be omitted entirely.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7740/1: MCPM: prettify debug output
Nicolas Pitre [Fri, 31 May 2013 04:17:29 +0000 (05:17 +0100)]
ARM: 7740/1: MCPM: prettify debug output

The CPU and cluster numbers (MPIDR affinity levels 0 and 1) may have
at most 8 bits each.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7746/1: mm: lazy cache flushing on non-mapped pages
Ming Lei [Wed, 5 Jun 2013 01:44:00 +0000 (02:44 +0100)]
ARM: 7746/1: mm: lazy cache flushing on non-mapped pages

Currently flush_dcache_page() thinks pages as non-mapped if
mapping_mapped(mapping) return false. This approach is very
coase:
- mmap on part of file may cause all pages backed on
the file being thought as mmaped

- file-backed pages aren't mapped into user space actually
if the memory mmaped on the file isn't accessed

This patch uses page_mapped() to decide if the page has been
mapped.

From the attached test code, I find there is much performance
improvement(>25%) when accessing page caches via read under this
situations, so memcpy benefits a lot from not flushing cache
under this situation.

No.   read time without the patch No. read time with the patch
================================================================
No. 0, time  22615636 us No. 0, time  22014717 us
No. 1, time  4387851 us  No. 1, time  3113184 us
No. 2, time  4276535 us  No. 2, time  3005244 us
No. 3, time  4259821 us  No. 3, time  3001565 us
No. 4, time  4263811 us  No. 4, time  3002748 us
No. 5, time  4258486 us  No. 5, time  3004104 us
No. 6, time  4253009 us  No. 6, time  3002188 us
No. 7, time  4262809 us  No. 7, time  2998196 us
No. 8, time  4264525 us  No. 8, time  3007255 us
No. 9, time  4267795 us  No. 9, time  3005094 us

1), No.0. is to read the file from storage device, and others are
to read the file from page caches basically.
2), file size is 512M, and is on ext4 over usb mass storage.
3), the test is done on Pandaboard.

unsigned int  sum = 0;
unsigned long sum_val = 0;

static unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2)
{
return (tv2->tv_sec - tv1->tv_sec) * 1000000 +
(tv2->tv_usec - tv1->tv_usec);
}

int main(int argc, char *argv[])
{
char *mbuf, fbuf;
int fd;
int i;
unsigned long page_size, size;
struct stat stat;
struct timeval t1, t2;
unsigned char *rbuf = malloc(32 * page_size);

if (!rbuf) {
printf(" %sn", "malloc failed");
exit(-1);
}

page_size = getpagesize();
fd = open(argv[1], O_RDWR);
assert(fd >= 0);

fstat(fd, &stat);
size = stat.st_size;
printf("%s: file %s, size %lu, page size %lun",
argv[0],
argv[1], size, page_size);

gettimeofday(&t1, NULL);
mbuf = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (!mbuf) {
printf(" %sn", "mmap failed");
exit(-1);
}

for (i = 0 ; i < size ; i += (page_size * 32)) {
int rcnt;
lseek(fd, i, SEEK_SET);
rcnt = read(fd, rbuf, page_size * 32);
if (rcnt != page_size * 32) {
printf("%s: read faildn", __func__);
exit(-1);
}
}
free(rbuf);
munmap(mbuf, size);
gettimeofday(&t2, NULL);
printf("tread mmaped time: %luusn", tv_diff(&t1, &t2));

close(fd);
}

Cc: Michel Lespinasse <walken@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7745/1: psci: fix building without HOTPLUG_CPU
Arnd Bergmann [Mon, 3 Jun 2013 22:09:14 +0000 (23:09 +0100)]
ARM: 7745/1: psci: fix building without HOTPLUG_CPU

The cpu_die field in smp_operations is not valid with CONFIG_HOTPLUG_CPU,
so we must enclose it in #ifdef, but at least that lets us remove
two other lines.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()
Will Deacon [Wed, 5 Jun 2013 10:20:33 +0000 (11:20 +0100)]
ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier()

__my_cpu_offset is non-volatile, since we want its value to be cached
when we access several per-cpu variables in a row with preemption
disabled. This means that we rely on preempt_{en,dis}able to hazard
with the operation via the barrier() macro, so that we can't end up
migrating CPUs without reloading the per-cpu offset.

Unfortunately, GCC doesn't treat a "memory" clobber on a non-volatile
asm block as a side-effect, and will happily re-order it before other
memory clobbers (including those in prempt_disable()) and cache the
value. This has been observed to break the cmpxchg logic in the slub
allocator, leading to livelock in kmem_cache_alloc in mainline kernels.

This patch adds a dummy memory input operand to __my_cpu_offset,
forcing it to be ordered with respect to the barrier() macro.

Cc: <stable@vger.kernel.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7750/1: update legacy CPU ID in decompressor cache support jump table
Marc C [Wed, 5 Jun 2013 21:02:23 +0000 (22:02 +0100)]
ARM: 7750/1: update legacy CPU ID in decompressor cache support jump table

The previous mask values for the legacy ARM CPU IDs were conflicting
with the CPU ID assignments for late-generation CPUs (like the
Qualcomm MSM/QSD or Broadcom Brahma-15 processors). This change
corrects the legacy ARM CPU ID value so that the jump table can
fall-through to the appropriate cache maintenance / MMU functions.

Signed-off-by: Marc C <marc.ceeeee@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7743/1: compressed/head.S: work around new binutils warning
Arnd Bergmann [Fri, 31 May 2013 21:50:47 +0000 (22:50 +0100)]
ARM: 7743/1: compressed/head.S: work around new binutils warning

In August 2012, Matthew Gretton-Dann checked a change into binutils
labelled "Error on obsolete & warn on deprecated registers", apparently as
part of ARMv8 support. Apparently, this was supposed to emit the message
"Warning: This coprocessor register access is deprecated in ARMv8" when
using certain mcr/mrc instructions and building for ARMv8. Unfortunately,
the message that is actually emitted appears to be '(null)', which is
less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel
build with a new gas, because arch/arm/boot/compressed/head.S and some
other files in that directory are built with -march=all since kernel
commit 80cec14a8 "[ARM] Add -march=all to assembly file build in
arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and instead marks the head.S
file to be built for armv7-a, which fortunately lets us build all
instructions in that file without warnings even on the broken binutils.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:957: Warning: (null)
arch/arm/boot/compressed/head.S:996: Warning: (null)
arch/arm/boot/compressed/head.S:997: Warning: (null)
arch/arm/boot/compressed/head.S:1027: Warning: (null)
arch/arm/boot/compressed/head.S:1035: Warning: (null)
arch/arm/boot/compressed/head.S:1046: Warning: (null)
arch/arm/boot/compressed/head.S:1060: Warning: (null)
arch/arm/boot/compressed/head.S:1092: Warning: (null)
arch/arm/boot/compressed/head.S:1094: Warning: (null)
arch/arm/boot/compressed/head.S:1095: Warning: (null)
arch/arm/boot/compressed/head.S:1102: Warning: (null)
arch/arm/boot/compressed/head.S:1134: Warning: (null)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Cc: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7742/1: topology: export cpu_topology
Arnd Bergmann [Fri, 31 May 2013 21:49:22 +0000 (22:49 +0100)]
ARM: 7742/1: topology: export cpu_topology

The cpu_topology symbol is required by any driver using the topology
interfaces, which leads to a couple of build errors:

ERROR: "cpu_topology" [drivers/net/ethernet/sfc/sfc.ko] undefined!
ERROR: "cpu_topology" [drivers/cpufreq/arm_big_little.ko] undefined!
ERROR: "cpu_topology" [drivers/block/mtip32xx/mtip32xx.ko] undefined!

The obvious solution is to export this symbol.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7737/1: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING
Nicolas Pitre [Wed, 29 May 2013 15:57:30 +0000 (16:57 +0100)]
ARM: 7737/1: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING

Selecting this option produces:

  AS      arch/arm/boot/compressed/debug.o
arch/arm/boot/compressed/debug.S:4:33: fatal error: mach/debug-macro.S: No such file or directory
compilation terminated.
make[3]: *** [arch/arm/boot/compressed/debug.o] Error 1

The semihosting support cannot be modelled into a senduart macro as
it requires memory space for argument passing.  So the
CONFIG_DEBUG_LL_INCLUDE may not have any sensible value and the include
directive should be omitted.

While at it, let's add proper semihosting output support to the
decompressor.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>