]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Tue, 16 Oct 2012 23:28:10 +0000 (10:28 +1100)]
Merge remote-tracking branch 'sh/sh-latest'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Tue, 16 Oct 2012 23:26:38 +0000 (10:26 +1100)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Tue, 16 Oct 2012 23:25:02 +0000 (10:25 +1100)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:23:31 +0000 (10:23 +1100)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:21:57 +0000 (10:21 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Tue, 16 Oct 2012 23:20:24 +0000 (10:20 +1100)]
Merge remote-tracking branch 'microblaze/next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:18:53 +0000 (10:18 +1100)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:17:19 +0000 (10:17 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Tue, 16 Oct 2012 23:15:49 +0000 (10:15 +1100)]
Merge remote-tracking branch 'arm64/upstream'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Tue, 16 Oct 2012 23:14:15 +0000 (10:14 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Tue, 16 Oct 2012 23:07:03 +0000 (10:07 +1100)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:52 +0000 (10:06 +1100)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:38 +0000 (10:06 +1100)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:37 +0000 (10:06 +1100)]
Merge remote-tracking branch 'tty.current/tty-linus'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:36 +0000 (10:06 +1100)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:35 +0000 (10:06 +1100)]
Merge remote-tracking branch 'sound-current/for-linus'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:34 +0000 (10:06 +1100)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:34 +0000 (10:06 +1100)]
Merge remote-tracking branch 'sparc/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:32 +0000 (10:06 +1100)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoMerge branch 'next/p1/for-linus' into mips-for-linux-next
Ralf Baechle [Tue, 16 Oct 2012 22:23:05 +0000 (00:23 +0200)]
Merge branch 'next/p1/for-linus' into mips-for-linux-next

12 years agoMIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.
Ralf Baechle [Tue, 16 Oct 2012 22:19:40 +0000 (00:19 +0200)]
MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.

On some CPU the write to pagemask might complete before the TLB write
instruction reads from the pagemask register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Transparent Huge Pages support
Ralf Baechle [Tue, 16 Oct 2012 22:04:06 +0000 (00:04 +0200)]
MIPS: Transparent Huge Pages support

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Restore pagemask after dumping the TLB.
Ralf Baechle [Tue, 16 Oct 2012 22:08:36 +0000 (00:08 +0200)]
MIPS: Restore pagemask after dumping the TLB.

Or bad things might happen if the last TLB entry isn't a basic size page.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Quick debug helper to dump page table for an addres to the console.
Ralf Baechle [Tue, 16 Oct 2012 22:04:01 +0000 (00:04 +0200)]
MIPS: Quick debug helper to dump page table for an addres to the console.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()
Ralf Baechle [Tue, 16 Oct 2012 20:20:30 +0000 (22:20 +0200)]
MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: page.h: Provide more readable definition for PAGE_MASK.
Ralf Baechle [Tue, 16 Oct 2012 20:20:27 +0000 (22:20 +0200)]
MIPS: page.h: Provide more readable definition for PAGE_MASK.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: tlbex: Better debug output.
Ralf Baechle [Tue, 16 Oct 2012 20:20:26 +0000 (22:20 +0200)]
MIPS: tlbex: Better debug output.

Pgtable bits are assigned dynamically depending on processor feature and
statically based on kernel configuration.  To make sense out of the
disassembled TLB exception handlers a list of the actual assignments
used for a particular configuration and hardware setup can be very useful.

Output the actual TLB exception handlers in a format that simplifies their
post processsing from dmesg output.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Remove unused defines.
Ralf Baechle [Tue, 16 Oct 2012 20:20:25 +0000 (22:20 +0200)]
MIPS: N32: Remove unused defines.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: pgtable.h: Remove commented out debugging printk.
Ralf Baechle [Tue, 16 Oct 2012 20:20:23 +0000 (22:20 +0200)]
MIPS: pgtable.h: Remove commented out debugging printk.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Remove R5000A.
Ralf Baechle [Tue, 16 Oct 2012 20:14:48 +0000 (22:14 +0200)]
MIPS: Remove R5000A.

From a software perspective R5000 and R5000A are the same thing which is
why the symbol CPU_R5000A never got used, so finally delete it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: R5000: Fix TLB hazard handling.
Ralf Baechle [Tue, 16 Oct 2012 20:13:06 +0000 (22:13 +0200)]
MIPS: R5000: Fix TLB hazard handling.

R5000 and the Nevada CPUs (RM5230, RM5231, RM5260, RM5261, RM5270 and
RM5271) are basically the same CPU core and all are documented to require
two instructions separating a write to c0_pagemask, c0_entryhi, c0_entrylo0,
c0_entrylo1 or c0_index.

So far we were only providing on cycle before / after a TLBR/TLBWI
for R5000 but 3 cycles before and 1 cycles after for the Nevadas.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: tlbex: Deal with re-definition of label
Ralf Baechle [Sat, 13 Oct 2012 20:46:26 +0000 (22:46 +0200)]
MIPS: tlbex: Deal with re-definition of label

The microassembler used in tlbex.c does not notice if a label is redefined
resulting in relocations against such labels silently missrelocated.
The issues exists since commit add6eb04776db4189ea89f596cbcde31b899be9d
[Synthesize TLB exception handlers at runtime.] in 2.6.10 and went unnoticed
for so long because the relocations for the affected branches got computed
to do something *almost* sensible.

The issue affects R4000, R4400, QED/IDT RM5230, RM5231, RM5260, RM5261,
RM5270 and RM5271 processors.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Make __{,n,u}delay declarations match definitions and generic delay.h
David Daney [Fri, 28 Sep 2012 18:34:10 +0000 (11:34 -0700)]
MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h

At some recent point arch/mips/include/asm/delay.h has started being
included into csrc-octeon.c where the __?delay() functions are defined.
This causes a compile failure due to conflicting declarations and
definitions of the functions.

It turns out that the generic definitions in arch/mips/lib/delay.c also
conflict.

Proposed fix: Declare the functions to take unsigned long parameters
just like asm-generic (and x86) does.  Update __delay to agree
(__ndelay and __udelay need no change).

Bonus: Get rid of 'inline' from __delay() definition, as it is globally
visible, and the compiler should be making this decision itself (it does
in fact inline the function without being told to).

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4354/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agosparc64: Fix bit twiddling in sparc_pmu_enable_event().
David S. Miller [Tue, 16 Oct 2012 20:05:25 +0000 (13:05 -0700)]
sparc64: Fix bit twiddling in sparc_pmu_enable_event().

There was a serious disconnect in the logic happening in
sparc_pmu_disable_event() vs. sparc_pmu_enable_event().

Event disable is implemented by programming a NOP event into the PCR.

However, event enable was not reversing this operation.  Instead, it
was setting the User/Priv/Hypervisor trace enable bits.

That's not sparc_pmu_enable_event()'s job, that's what
sparc_pmu_enable() and sparc_pmu_disable() do .

The intent of sparc_pmu_enable_event() is clear, since it first clear
out the event type encoding field.  So fix this by OR'ing in the event
encoding rather than the trace enable bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: addrconf: fix /proc/net/if_inet6
Eric Dumazet [Tue, 16 Oct 2012 07:37:27 +0000 (07:37 +0000)]
ipv6: addrconf: fix /proc/net/if_inet6

Commit 1d5783030a1 (ipv6/addrconf: speedup /proc/net/if_inet6 filling)
added bugs hiding some devices from if_inet6 and breaking applications.

"ip -6 addr" could still display all IPv6 addresses, while "ifconfig -a"
couldnt.

One way to reproduce the bug is by starting in a shell :

unshare -n /bin/bash
ifconfig lo up

And in original net namespace, lo device disappeared from if_inet6

Reported-by: Jan Hinnerk Stosch <janhinnerk.stosch@gmail.com>
Tested-by: Jan Hinnerk Stosch <janhinnerk.stosch@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mihai Maruseac <mihai.maruseac@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix handling mf storage modes
Dmitry Kravkov [Tue, 16 Oct 2012 01:28:27 +0000 (01:28 +0000)]
bnx2x: fix handling mf storage modes

Since commit a3348722 AFEX FCoE function is continuously reset.
The patch prevents the resetting and removes debug print
to stop garbaging syslog.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqeth: fix deadlock between recovery and bonding driver
Stefan Raspl [Mon, 15 Oct 2012 19:21:18 +0000 (19:21 +0000)]
qeth: fix deadlock between recovery and bonding driver

The recovery thread, when failing, tears down the respective interface. To do
so, it needs to obtain the rtnl lock first, as the interface configuration is
changed.
If another process tries to modify an interface setting at the same time, that
process can obtain the rtnl lock first, but the respective callback in the qeth
driver will block until recovery has completed - which cannot happen since the
calling process already obtained it.
In one particular case, the bonding driver acquired the rtnl lock to modify the
card's MAC address, while the recovery failed at the same time due to the card
being removed. Hence qeth_l2_set_mac_address (implicitly holding the rtnl lock)
was waiting on qeth_l2_recover, which deadlocked when waiting on the rtnl lock.
This patch uses rtnl_trylock instead of rtnl_lock in the recovery thread. If the
lock cannot be obtained, the interface will be left up, but the card state
remains in CARD_STATE_RECOVER, which will prevent any further activities on the
card.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsgiucv: reestablish IUCV path after resume
Hendrik Brueckner [Mon, 15 Oct 2012 19:21:17 +0000 (19:21 +0000)]
smsgiucv: reestablish IUCV path after resume

smsg_pm_restore_thaw() uses wrong checking before reconnecting
the IUCV path to *MSG. It is corrected with this patch.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()
Zijie Pan [Mon, 15 Oct 2012 03:56:39 +0000 (03:56 +0000)]
sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()

Bug introduced by commit edfee0339e681a784ebacec7e8c2dc97dc6d2839
(sctp: check src addr when processing SACK to update transport state)

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovlan: fix bond/team enslave of vlan challenged slave/port
Jiri Pirko [Sun, 14 Oct 2012 04:30:56 +0000 (04:30 +0000)]
vlan: fix bond/team enslave of vlan challenged slave/port

In vlan_uses_dev() check for number of vlan devs rather than existence
of vlan_info. The reason is that vlan id 0 is there without appropriate
vlan dev on it by default which prevented from enslaving vlan challenged
dev.

Reported-by: Jon Stanley <jstanley@rmrf.net>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMAINTAINERS: Add explicit section for IPSEC networking.
David S. Miller [Tue, 16 Oct 2012 18:08:40 +0000 (14:08 -0400)]
MAINTAINERS: Add explicit section for IPSEC networking.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoUSB: fix port probing and removal in garmin_gps
Alan Stern [Wed, 10 Oct 2012 18:10:21 +0000 (14:10 -0400)]
USB: fix port probing and removal in garmin_gps

This patch (as1615) fixes a bug in the Garmin USB serial driver.  It
uses attach, disconnect, and release routines to carry out actions
that should be handled by port_probe and port_remove routines, because
they access port-specific data.

The bug causes an oops when the device in unplugged, because the
private data for each port structure now gets erased when the port is
unbound from the driver, resulting in a null-pointer dereference.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported--by: Markus Schauler <mschauler@gmail.com>
Tested-by: Markus Schauler <mschauler@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: pl2303: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 13:47:21 +0000 (15:47 +0200)]
USB: pl2303: fix port-data memory leak

Fix port-data memory leak by allocating and freeing port data in
port_probe/remove rather than in attach/release, and by introducing
serial private data to store the device type which is interface rather
than port specific.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: cp210x: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 13:47:20 +0000 (15:47 +0200)]
USB: cp210x: fix port-data memory leak

Fix port data memory leak by replacing port private data with serial
private data.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at
release.

The private data is used to store the control interface number, but as
this is the same for all ports on an interface it should be stored as
usb-serial data anyway.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: belkin_sa: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 16:20:53 +0000 (18:20 +0200)]
USB: belkin_sa: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: cyberjack: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 16:20:54 +0000 (18:20 +0200)]
USB: cyberjack: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: ark3116: fix NULL-pointer dereference
Johan Hovold [Mon, 15 Oct 2012 16:20:52 +0000 (18:20 +0200)]
USB: ark3116: fix NULL-pointer dereference

Fix NULL-pointer dereference at release by replacing attach and release
with port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is NULL when release is called.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosparc64: Add global PMU register dumping via sysrq.
David S. Miller [Tue, 16 Oct 2012 16:34:01 +0000 (09:34 -0700)]
sparc64: Add global PMU register dumping via sysrq.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoarm64: No need to set the x0-x2 registers in start_thread()
Catalin Marinas [Tue, 16 Oct 2012 16:07:46 +0000 (17:07 +0100)]
arm64: No need to set the x0-x2 registers in start_thread()

For historical reasons, ARM used to set r0-r2 in start_thread() to the
first values on the user stack when starting a new user application. The
same logic has been inherited in AArch64. The x0 register is overridden
by the sys_execve() return value so it's always zero on success. The x1
and x2 registers are ignored by AArch64 and EABI AArch32 applications,
so we can safely remove the register setting for both native and compat
user space.

This also fixes a potential fault with the kernel accessing user space
stack directly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoarm64: Ignore memory blocks below PHYS_OFFSET
Catalin Marinas [Tue, 16 Oct 2012 11:00:29 +0000 (12:00 +0100)]
arm64: Ignore memory blocks below PHYS_OFFSET

According to Documentation/arm64/booting.txt, the kernel image must be
loaded at a pre-defined offset from the start of RAM so that the kernel
can calculate PHYS_OFFSET based on this address. If the DT contains
memory blocks below this PHYS_OFFSET, report them and ignore the
corresponding memory range.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoarm64: Fix the update_vsyscall() prototype
Catalin Marinas [Tue, 16 Oct 2012 10:44:53 +0000 (11:44 +0100)]
arm64: Fix the update_vsyscall() prototype

With commit 576094b7 (time: Introduce new GENERIC_TIME_VSYSCALL) the old
update_vsyscall() prototype is no longer available. This patch updates
the arm64 port.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: John Stultz <john.stultz@linaro.org>
12 years agoarm64: Select MODULES_USE_ELF_RELA
Catalin Marinas [Tue, 16 Oct 2012 10:26:57 +0000 (11:26 +0100)]
arm64: Select MODULES_USE_ELF_RELA

With commit 786d35d4 (make most arch asm/module.h files use
asm-generic/module.h) arm64 needs to enable MODULES_USE_ELF_RELA for
loadable modules.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoarm64: Remove duplicate inclusion of mmu_context.h in smp.c
Sachin Kamat [Sat, 13 Oct 2012 08:25:58 +0000 (09:25 +0100)]
arm64: Remove duplicate inclusion of mmu_context.h in smp.c

asm/mmu_context.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoALSA: hda - Stop LPIB delay counting on broken hardware
Takashi Iwai [Tue, 16 Oct 2012 14:52:26 +0000 (16:52 +0200)]
ALSA: hda - Stop LPIB delay counting on broken hardware

If LPIB reports a pretty bad value, we can't trust such hardware for
calculating the PCM delay.  Automatically turn off the delay counting
when such a problem is encountered.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911

Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agom68k: Remove empty #ifdef/#else/#endif block
Geert Uytterhoeven [Sun, 14 Oct 2012 10:11:55 +0000 (12:11 +0200)]
m68k: Remove empty #ifdef/#else/#endif block

Leftover from commit 10b3a979347d4aba7de19e8d33eb8b87fe2a11dd ("UAPI:
(Scripted) Disintegrate arch/m68k/include/asm")

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agoMerge tag 'disintegrate-m68k-20121009' of git://git.infradead.org/users/dhowells...
Geert Uytterhoeven [Mon, 15 Oct 2012 21:03:30 +0000 (23:03 +0200)]
Merge tag 'disintegrate-m68k-20121009' of git://git.infradead.org/users/dhowells/linux-headers into for-linus

12 years agothermal, cpufreq: Fix build when CPU_FREQ_TABLE isn't configured
David Rientjes [Mon, 15 Oct 2012 20:40:15 +0000 (13:40 -0700)]
thermal, cpufreq: Fix build when CPU_FREQ_TABLE isn't configured

Commit 023614183768 ("thermal: add generic cpufreq cooling
implementation") requires cpufreq_frequency_get_table(), but that
function is only defined for CONFIG_CPU_FREQ_TABLE resulting in the
following build error:

  drivers/built-in.o: In function `cpufreq_get_max_state':
  drivers/thermal/cpu_cooling.c:259: undefined reference to `cpufreq_frequency_get_table'
  drivers/built-in.o: In function `get_cpu_frequency':
  drivers/thermal/cpu_cooling.c:129: undefined reference to `cpufreq_frequency_get_table'

Fix it by selecting CONFIG_CPU_FREQ_TABLE for such a configuration.

It turns out CONFIG_EXYNOS_THERMAL also needs CONFIG_CPU_FREQ_TABLE, so
select it there as well.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoserial/8250_hp300: Missing 8250 register interface conversion bits
Geert Uytterhoeven [Mon, 15 Oct 2012 20:13:12 +0000 (22:13 +0200)]
serial/8250_hp300: Missing 8250 register interface conversion bits

commit 2655a2c76f80d91da34faa8f4e114d1793435ed3 ("8250: use the 8250
register interface not the legacy one") forgot to fully switch one
instance of struct uart_port to struct uart_8250_port, causing the
following compile failure:

drivers/tty/serial/8250/8250_hp300.c: In function â€˜hpdca_init_one’:
drivers/tty/serial/8250/8250_hp300.c:174: error: â€˜uart’ undeclared (first use in this function)
drivers/tty/serial/8250/8250_hp300.c:174: error: (Each undeclared identifier is reported only once
drivers/tty/serial/8250/8250_hp300.c:174: error: for each function it appears in.)

This went unnoticed in -next, as CONFIG_HPDCA is not set to y by
allmodconfig.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Philip Blundell <philb@gnu.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agokbuild: Fix accidental revert in commit fe04ddf
Michal Marek [Mon, 15 Oct 2012 19:16:56 +0000 (21:16 +0200)]
kbuild: Fix accidental revert in commit fe04ddf

Commit fe04ddf7c291 ("kbuild: Do not package /boot and /lib in make
tar-pkg") accidentally reverted two previous kbuild commits.  I don't
know what I was thinking.

This brings back changes made by commits 24cc7fb69a5b ("x86/kbuild:
archscripts depends on scripts_basic") and c1c1a59e37da ("firmware: fix
directory creation rule matching with make 3.80")

Reported-by: Jan Beulich <JBeulich@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agonet/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()
Stanislav Yakovlev [Mon, 15 Oct 2012 14:14:32 +0000 (14:14 +0000)]
net/wireless: ipw2200: Fix panic occurring in ipw_handle_promiscuous_tx()

The driver does not count space of radiotap fields when allocating skb for
radiotap packet. This leads to kernel panic with the following call trace:

...
[67607.676067] [<c152f90f>] error_code+0x67/0x6c
[67607.676067] [<c142f831>] ? skb_put+0x91/0xa0
[67607.676067] [<f8cf5e5b>] ? ipw_handle_promiscuous_tx+0x16b/0x2d0 [ipw2200]
[67607.676067] [<f8cf5e5b>] ipw_handle_promiscuous_tx+0x16b/0x2d0 [ipw2200]
[67607.676067] [<f8cf899b>] ipw_net_hard_start_xmit+0x8b/0x90 [ipw2200]
[67607.676067] [<f8741c5a>] libipw_xmit+0x55a/0x980 [libipw]
[67607.676067] [<c143d3e8>] dev_hard_start_xmit+0x218/0x4d0
...

This bug was found by VittGam.
https://bugzilla.kernel.org/show_bug.cgi?id=43255

Cc: stable@kernel.org
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: fix unregistration of cores
Piotr Haber [Thu, 11 Oct 2012 12:05:15 +0000 (14:05 +0200)]
bcma: fix unregistration of cores

When cores are unregistered, entries
need to be removed from cores list in a safe manner.

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use ieee80211_free_txskb in a few more places
Felix Fietkau [Wed, 10 Oct 2012 20:40:23 +0000 (22:40 +0200)]
mac80211: use ieee80211_free_txskb in a few more places

Free tx status skbs when draining power save buffers, pending frames, or
when tearing down a vif.
Fixes remaining conditions that can lead to hostapd/wpa_supplicant hangs when
running out of socket write memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: fix end of loop check (signedness bug)
Dan Carpenter [Wed, 10 Oct 2012 18:13:12 +0000 (11:13 -0700)]
brcmfmac: fix end of loop check (signedness bug)

The problem here is that we loop until "remained_buf_len" is less than
zero, but since it is unsigned, it never is.

"remained_buf_len" has to be large enough to hold the value from
"mgmt_ie_buf_len".  That variable is type u32, but it only holds small
values so I have changed to both variables to int.

Also I removed the bogus initialization from "mgmt_ie_buf_len" so that
GCC can detect if it is used unitialized.  I moved the declaration of
"remained_buf_len" closer to where it is used so it's easier to read.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: set dongle mode accordingly when interface up
Franky Lin [Wed, 10 Oct 2012 18:13:10 +0000 (11:13 -0700)]
brcmfmac: set dongle mode accordingly when interface up

The mode of WiFi dongle should be initialized in brcmf_cfg80211_up
which get called when network interface is brought up. Otherwise
brcmf_cfg80211_get_station would return error.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: use control channel in roamed status reporting
Franky Lin [Wed, 10 Oct 2012 18:13:09 +0000 (11:13 -0700)]
brcmfmac: use control channel in roamed status reporting

Channel reported in scan results passed to cfg80211 is control
channel. But chanspec is reported while notifying cfg80211 about
roamed update. Cfg80211 complains because it could not find the
bss in the list. Report control channel while calling
cfg80211_roamed.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: handle all exceptions as an error.
Hante Meuleman [Wed, 10 Oct 2012 18:13:06 +0000 (11:13 -0700)]
brcmfmac: handle all exceptions as an error.

in brcmf_usb_probe_cb only return code ENOLINK was seen as an
error. This is wrong, all error codes should be returned to usb
subsystem.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: check if key has TKIP type before updating IV
Stanislaw Gruszka [Tue, 2 Oct 2012 19:34:23 +0000 (21:34 +0200)]
mac80211: check if key has TKIP type before updating IV

This patch fix corruption which can manifest itself by following crash
when switching on rfkill switch with rt2x00 driver:
https://bugzilla.redhat.com/attachment.cgi?id=615362

Pointer key->u.ccmp.tfm of group key get corrupted in:

ieee80211_rx_h_michael_mic_verify():

        /* update IV in key information to be able to detect replays */
        rx->key->u.tkip.rx[rx->security_idx].iv32 = rx->tkip_iv32;
        rx->key->u.tkip.rx[rx->security_idx].iv16 = rx->tkip_iv16;

because rt2x00 always set RX_FLAG_MMIC_STRIPPED, even if key is not TKIP.

We already check type of the key in different path in
ieee80211_rx_h_michael_mic_verify() function, so adding additional
check here is reasonable.

Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
John W. Linville [Mon, 15 Oct 2012 18:34:23 +0000 (14:34 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

12 years agoMAINTAINERS: Add maintainer entry for the USB webcam gadget
Laurent Pinchart [Thu, 4 Oct 2012 00:32:42 +0000 (02:32 +0200)]
MAINTAINERS: Add maintainer entry for the USB webcam gadget

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agousb: gadget: Make webcam gadget select USB_LIBCOMPOSITE
Laurent Pinchart [Thu, 4 Oct 2012 00:32:41 +0000 (02:32 +0200)]
usb: gadget: Make webcam gadget select USB_LIBCOMPOSITE

Composite gadget support is now available as a library instead of being
built with each gadget. Composite drivers need to select
USB_LIBCOMPOSITE.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodocbook: networking: fix file paths for uapi headers
Randy Dunlap [Mon, 15 Oct 2012 01:50:05 +0000 (18:50 -0700)]
docbook: networking: fix file paths for uapi headers

Update file paths in Documentation/DocBook/networking.tmpl for uapi headers.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: huge_memory: Fix build error.
Ralf Baechle [Mon, 15 Oct 2012 11:44:56 +0000 (13:44 +0200)]
mm: huge_memory: Fix build error.

Certain configurations won't implicitly pull in <linux/pagemap.h> resulting
in the following build error:

  mm/huge_memory.c: In function 'release_pte_page':
  mm/huge_memory.c:1697:2: error: implicit declaration of function 'unlock_page' [-Werror=implicit-function-declaration]
  mm/huge_memory.c: In function '__collapse_huge_page_isolate':
  mm/huge_memory.c:1757:3: error: implicit declaration of function 'trylock_page' [-Werror=implicit-function-declaration]
  cc1: some warnings being treated as errors

Reported-by: David Daney <david.daney@cavium.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoARM: fix oops on initial entry to userspace with Thumb2 kernels
Russell King [Sun, 14 Oct 2012 23:16:49 +0000 (00:16 +0100)]
ARM: fix oops on initial entry to userspace with Thumb2 kernels

Daniel Mack reports an oops at boot with the latest kernels:

  Internal error: Oops - undefined instruction: 0 [#1] SMP THUMB2
  Modules linked in:
  CPU: 0    Not tainted  (3.6.0-11057-g584df1d #145)
  PC is at cpsw_probe+0x45a/0x9ac
  LR is at trace_hardirqs_on_caller+0x8f/0xfc
  pc : [<c03493de>]    lr : [<c005e81f>]    psr: 60000113
  sp : cf055fb0  ip : 00000000  fp : 00000000
  r10: 00000000  r9 : 00000000  r8 : 00000000
  r7 : 00000000  r6 : 00000000  r5 : c0344555  r4 : 00000000
  r3 : cf057a40  r2 : 00000000  r1 : 00000001  r0 : 00000000
  Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment user
  Control: 50c5387d  Table: 8f3f4019  DAC: 00000015
  Process init (pid: 1, stack limit = 0xcf054240)
  Stack: (0xcf055fb0 to 0xcf056000)
  5fa0:                                     00000001 00000000 00000000 00000000
  5fc0: cf055fb0 c000d1a8 00000000 00000000 00000000 00000000 00000000 00000000
  5fe0: 00000000 be9b3f10 00000000 b6f6add0 00000010 00000000 aaaabfaf a8babbaa

The analysis of this is as follows.  In init/main.c, we issue:

kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND);

This creates a new thread, which falls through to the ret_from_fork
assembly, with r4 set NULL and r5 set to kernel_init.  You can see
this in your oops dump register set - r5 is 0xc0344555, which is the
address of kernel_init plus 1 which marks the function as Thumb code.

Now, let's look at this code a little closer - this is what the
disassembly looks like:

  c000d180 <ret_from_fork>:
  c000d180:       f03a fe08       bl      c0047d94 <schedule_tail>
  c000d184:       2d00            cmp     r5, #0
  c000d186:       bf1e            ittt    ne
  c000d188:       4620            movne   r0, r4
  c000d18a:       46fe            movne   lr, pc <-- XXXXXXX
  c000d18c:       46af            movne   pc, r5
  c000d18e:       46e9            mov     r9, sp
  c000d190:       ea4f 3959       mov.w   r9, r9, lsr #13
  c000d194:       ea4f 3949       mov.w   r9, r9, lsl #13
  c000d198:       e7c8            b.n     c000d12c <ret_to_user>
  c000d19a:       bf00            nop
  c000d19c:       f3af 8000       nop.w

This code was introduced in 9fff2fa0db911 (arm: switch to saner
kernel_execve() semantics).  I have marked one instruction, and it's
the significant one - I'll come back to that later.

Eventually, having had a successful call to kernel_execve(), kernel_init()
returns zero.

In returning, it uses the value in 'lr' which was set by the instruction
I marked above.  Unfortunately, this causes lr to contain 0xc000d18e -
an even address.  This switches the ISA to ARM on return but with a non
word aligned PC value.

So, what do we end up executing?  Well, not the instructions above - yes
the opcodes, but they don't mean the same thing in ARM mode.  In ARM mode,
it looks like this instead:

  c000d18c:       46e946af        strbtmi r4, [r9], pc, lsr #13
  c000d190:       3959ea4f        ldmdbcc r9, {r0, r1, r2, r3, r6, r9, fp, sp, lr, pc}^
  c000d194:       3949ea4f        stmdbcc r9, {r0, r1, r2, r3, r6, r9, fp, sp, lr, pc}^
  c000d198:       bf00e7c8        svclt   0x0000e7c8
  c000d19c:       8000f3af        andhi   pc, r0, pc, lsr #7
  c000d1a0:       e88db092        stm     sp, {r1, r4, r7, ip, sp, pc}
  c000d1a4:       46e81fff                        ; <UNDEFINED> instruction: 0x46e81fff
  c000d1a8:       8a00f3ef        bhi     0xc004a16c
  c000d1ac:       0a0cf08a        beq     0xc03493dc

I have included more above, because it's relevant.  The PSR flags which
we can see in the oops dump are nZCv, so Z and C are set.

All the above ARM instructions are not executed, except for two.
c000d1a0, which has no writeback, and writes below the current stack
pointer (and that data is lost when we take the next exception.) The
other instruction which is executed is c000d1ac, which takes us to...
0xc03493dc.  However, remember that bit 1 of the PC got set.  So that
makes the PC value 0xc03493de.

And that value is the value we find in the oops dump for PC.  What is
the instruction here when interpreted in ARM mode?

       0:       f71e150c                ; <UNDEFINED> instruction: 0xf71e150c

and there we have our undefined instruction (remember that the 'never'
condition code, 0xf, has been deprecated and is now always executed as
it is now being used for additional instructions.)

This path also nicely explains the state of the stack we see in the oops
dump too.

The above is a consistent and sane story for how we got to the oops
dump, which all stems from the instruction at 0xc000d18a being wrong.

Reported-by: Daniel Mack <zonque@gmail.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'hw-breakpoint' into for-next/perf
Will Deacon [Mon, 15 Oct 2012 13:00:12 +0000 (14:00 +0100)]
Merge branch 'hw-breakpoint' into for-next/perf

12 years agoMerge branch 'perf/updates' into for-next/perf
Will Deacon [Mon, 15 Oct 2012 13:00:08 +0000 (14:00 +0100)]
Merge branch 'perf/updates' into for-next/perf

12 years agoARM: perf: consistently use arm_pmu->name for PMU name
Will Deacon [Fri, 21 Sep 2012 13:23:47 +0000 (14:23 +0100)]
ARM: perf: consistently use arm_pmu->name for PMU name

Perf has three ways to name a PMU: either by passing an explicit char *,
reading arm_pmu->name or accessing arm_pmu->pmu.name.

Just use arm_pmu->name consistently in the ARM backend.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: return NOTIFY_DONE from cpu notifier when no available PMU
Will Deacon [Fri, 21 Sep 2012 13:14:17 +0000 (14:14 +0100)]
ARM: perf: return NOTIFY_DONE from cpu notifier when no available PMU

When attempting to reset the PMU state for either a NULL PMU or a PMU
implementation without a reset function, return NOTIFY_DONE from the CPU
notifier as we don't care about the hotplug event.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: register cpu_notifier at driver init
Mark Rutland [Fri, 21 Sep 2012 10:53:41 +0000 (11:53 +0100)]
ARM: perf: register cpu_notifier at driver init

The current practice of registering the cpu hotplug notifier at PMU
registration time won't be safe with multiple PMUs, as we'll repeatedly
attempt to register the notifier. This has the unfortunate effect of
silently corrupting the notifier list, leading to boot stalling.

Instead, register the notifier at init time. Its sanity checks will
prevent anything bad from happening if the notifier is called before we
have any PMUs registered.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: check ARMv7 counter validity on a per-pmu basis
Sudeep KarkadaNagesha [Fri, 20 Jul 2012 14:18:07 +0000 (15:18 +0100)]
ARM: perf: check ARMv7 counter validity on a per-pmu basis

Multi-cluster ARMv7 systems may have CPU PMUs with different number of
counters.

This patch updates armv7_pmnc_counter_valid so that it takes a pmu
argument and checks the counter validity against that. We also remove a
number of redundant counter checks whether the current PMU is not easily
retrievable.

Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: consistently use struct perf_event in arm_pmu functions
Sudeep KarkadaNagesha [Mon, 30 Jul 2012 11:00:02 +0000 (12:00 +0100)]
ARM: perf: consistently use struct perf_event in arm_pmu functions

The arm_pmu functions have wildly varied parameters which can often be
derived from struct perf_event.

This patch changes the arm_pmu function prototypes so that struct
perf_event pointers are passed in preference to fields that can be
derived from the event.

Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: allocate CPU PMU dynamically at probe time
Sudeep KarkadaNagesha [Tue, 31 Jul 2012 09:11:23 +0000 (10:11 +0100)]
ARM: perf: allocate CPU PMU dynamically at probe time

Supporting multiple, heterogeneous CPU PMUs requires us to allocate the
arm_pmu structures dynamically as the devices are probed.

This patch removes the static structure definitions for each CPU PMU
type and instead passes pointers to the PMU-specific init functions.

Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: use CRn as argument for debug reg accessor macros
Dietmar Eggemann [Wed, 26 Sep 2012 16:28:47 +0000 (17:28 +0100)]
ARM: hw_breakpoint: use CRn as argument for debug reg accessor macros

The coprocessor register CRn for accesses to the debug register can be a
different one than C0. Take this into account for the ARM_DBG_READ and
the ARM_DBG_WRITE macro.

The inline assembler calls which used a coprocessor register CRn other
than C0 are replaced by the ARM_DBG_READ or ARM_DBG_WRITE macro.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: check if monitor mode is enabled during validation
Will Deacon [Mon, 24 Sep 2012 17:01:13 +0000 (18:01 +0100)]
ARM: hw_breakpoint: check if monitor mode is enabled during validation

Rather than attempt to enable monitor mode explicitly when scheduling in
a breakpoint event (which could raise an undefined exception trap when
accessing DBGDSCRext), instead check that DBGDSCRint.MDBGen is set
during event validation and report an error to the caller if not.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: make boot quieter without CPUID feature registers
Will Deacon [Fri, 21 Sep 2012 17:17:24 +0000 (18:17 +0100)]
ARM: hw_breakpoint: make boot quieter without CPUID feature registers

Booting on a v6 core without the CPUID feature registers (e.g. 1136)
leads to a noisy dmesg complaining about their absence.

This patch changes the pr_warning into a WARN_ONCE to keep the log
quieter.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: don't try to clear v6 debug registers during boot
Will Deacon [Fri, 21 Sep 2012 16:53:08 +0000 (17:53 +0100)]
ARM: hw_breakpoint: don't try to clear v6 debug registers during boot

v6 cores do not provide a way to clear the debug registers without first
enabling monitor mode, meaning that we could take spurious debug
exceptions. Instead, rely on the registers being in a sane state when we
boot as they are defined to be disabled out of reset anyway.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: fix ordering of debug register reset sequence
Will Deacon [Fri, 21 Sep 2012 14:38:26 +0000 (15:38 +0100)]
ARM: hw_breakpoint: fix ordering of debug register reset sequence

The debug register reset sequence for v7 and v7.1 is congruent with
tap-dancing through a minefield.

Rather than wait until we've blown ourselves to pieces, this patch
instead checks the debug_err_mask after each potentially faulting
operation. We also move the enabling of monitor_mode to the end of the
sequence in order to prevent spurious debug events generated by UNKNOWN
register values.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: fix monitor mode detection with v7.1
Will Deacon [Fri, 21 Sep 2012 14:08:17 +0000 (15:08 +0100)]
ARM: hw_breakpoint: fix monitor mode detection with v7.1

Detecting whether halting debug is enabled is no longer possible via
the DBGDSCR in v7.1, returning an UNKNOWN value for the HDBGen bit via
CP14 when the OS lock is clear.

This patch removes the halting mode check and ensures that accesses to
the internal and external views of the DBGDSCR are serialised with an
instruction barrier.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: hw_breakpoint: only clear OS lock when implemented on v7
Will Deacon [Fri, 21 Sep 2012 13:53:13 +0000 (14:53 +0100)]
ARM: hw_breakpoint: only clear OS lock when implemented on v7

The OS save and restore register are optional in debug architecture v7,
so check the status register before attempting to clear the OS lock.

Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: add guest vs host discrimination
Marc Zyngier [Thu, 13 Sep 2012 15:40:46 +0000 (16:40 +0100)]
ARM: perf: add guest vs host discrimination

Add minimal guest support to perf, so it can distinguish whether
the PMU interrupt was in the host or the guest, as well as collecting
some very basic information (guest PC, user vs kernel mode).

This is not feature complete though, as it doesn't support backtracing
in the guest.

Based on the x86 implementation, tested with KVM/ARM.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoARM: perf: update event period in response to PERF_EVENT_IOC_PERIOD
Will Deacon [Wed, 15 Aug 2012 14:39:32 +0000 (15:39 +0100)]
ARM: perf: update event period in response to PERF_EVENT_IOC_PERIOD

The PERF_EVENT_IOC_PERIOD ioctl command can be used to change the
sample period of a running perf_event. Consequently, when calculating
the next event period, the new period will only be considered after the
previous one has overflowed.

This patch changes the calculation of the remaining event ticks so that
they are offset if the period has changed.

Reported-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
12 years agoALSA: hda - Fix registration race of VGA switcheroo
Takashi Iwai [Fri, 12 Oct 2012 15:28:18 +0000 (17:28 +0200)]
ALSA: hda - Fix registration race of VGA switcheroo

Delay the registration of VGA switcheroo client to the end of the
probing.  Otherwise a too quick switching may result in Oops during
probing.

Also add the check of the return value from snd_hda_lock_devices().

Reported-and-tested-by: Daniel J Blueman <daniel@quora.org>
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Clean up superfluous position_fix list entries
Takashi Iwai [Thu, 11 Oct 2012 14:51:52 +0000 (16:51 +0200)]
ALSA: hda - Clean up superfluous position_fix list entries

The white-list entries of position_fix for ASUS laptops have been
added just as a workaround for broken COMBO mode.  Now the combo mode
itself is disabled, we can safely remove these entries.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
Takashi Iwai [Thu, 11 Oct 2012 14:43:40 +0000 (16:43 +0200)]
ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44721

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge 3.7-rc1 into tty-linus
Greg Kroah-Hartman [Mon, 15 Oct 2012 05:41:27 +0000 (22:41 -0700)]
Merge 3.7-rc1 into tty-linus

This syncs up the tty-linus branch to the latest in Linus's tree to get all of
the UAPI stuff needed for the next set of patches to merge.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosh: Fix up more fallout from pointless ARM __iomem churn.
Paul Mundt [Mon, 15 Oct 2012 05:08:48 +0000 (14:08 +0900)]
sh: Fix up more fallout from pointless ARM __iomem churn.

It was already pointed out how to fix these cases before the offending
patches were merged, but unsurprisingly, that didn't happen. As this
change is entirely superfluous to begin with, simply shut things up by
casting everything away.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: Wire up kcmp syscall.
Paul Mundt [Mon, 15 Oct 2012 04:54:29 +0000 (13:54 +0900)]
sh: Wire up kcmp syscall.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoMerge tag 'disintegrate-sh-20121009' of git://git.infradead.org/users/dhowells/linux...
Paul Mundt [Mon, 15 Oct 2012 04:47:38 +0000 (13:47 +0900)]
Merge tag 'disintegrate-sh-20121009' of git://git.infradead.org/users/dhowells/linux-headers into sh-latest

UAPI Disintegration 2012-10-09

12 years agosparc64: Like x86 we should check current->mm during perf backtrace generation.
David S. Miller [Mon, 15 Oct 2012 00:59:40 +0000 (17:59 -0700)]
sparc64: Like x86 we should check current->mm during perf backtrace generation.

If the MM is not active, only report the top-level PC.  Do not try to
access the address space.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge 3.7-rc1 usb-linus
Greg Kroah-Hartman [Sun, 14 Oct 2012 22:37:29 +0000 (15:37 -0700)]
Merge 3.7-rc1 usb-linus

Sync up to a known-good point in Linus's tree to build on.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoLinux 3.7-rc1 v3.7-rc1
Linus Torvalds [Sun, 14 Oct 2012 21:41:04 +0000 (14:41 -0700)]
Linux 3.7-rc1