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.
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.
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.
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).
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>
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>
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>
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>
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>
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>
Olof Johansson [Tue, 16 Oct 2012 18:19:04 +0000 (11:19 -0700)]
Merge tag 'cleanup-for-3.8' of git://server.prisktech.co.nz/git/linuxwmt into next/cleanup
From Tony Prisk: Cleanup for 3.8
Removes a few unused headers from include/mach
Removes unused arm/boot/compressed/head-vt8500.S
Fixes header text in mach-vt8500/timer.c
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
* tag 'cleanup-for-3.8' of git://server.prisktech.co.nz/git/linuxwmt:
vt8500: Fix header in mach-vt8500/timer.c
vt8500: Remove arm/boot/compressed/head-vt8500.S
vt8500: Remove unused headers from include/mach/
Olof Johansson [Tue, 16 Oct 2012 18:04:32 +0000 (11:04 -0700)]
Merge branch 'next/cleanup' into for-next
By Shawn Guo
via Olof Johansson (1) and Shawn Guo (1)
* next/cleanup: (31 commits)
ARM: imx: enable multi-platform build
ARM: imx: call mxc_device_init() in soc specific function
ARM: imx: remove header file mach/irqs.h
ARM: imx: include hardware.h rather than mach/hardware.h
ARM: imx: move debug macros to include/debug
video: imxfb: remove cpu_is_xxx by using platform_device_id
mmc: mxcmmc: remove cpu_is_xxx by using platform_device_id
media: mx2_camera: remove cpu_is_xxx by using platform_device_id
dma: imx-dma: remove cpu_is_xxx by using platform_device_id
dma: imx-dma: retrieve MEM and IRQ from resources
dma: imx-dma: use devm_kzalloc and devm_request_irq
rtc: mxc_rtc: remove cpu_is_xxx by using platform_device_id
mtd: mxc_nand: remove cpu_is_xxx by using platform_device_id
i2c: imx: remove cpu_is_xxx by using platform_device_id
watchdog: imx2_wdt: remove unneeded mach/hardware.h inclusion
video: mx3fb: remove unneeded mach/hardware.h inclusion
usb: ehci-mxc: remove unneeded mach/hardware.h inclusion
ASoC: imx-ssi: remove unneeded mach/hardware.h inclusion
dma: imx-sdma: remove unneeded mach/hardware.h inclusion
dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
...
Olof Johansson [Tue, 16 Oct 2012 18:03:40 +0000 (11:03 -0700)]
Merge branch 'imx/multi-platform' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/cleanup
From Shawn Guo:
"Here is the imx multi-platform support [1] that missed 3.7 merge window.
Please pull it for 3.8 and exposing on linux-next. As it touches a lot
of files, I send it early, so that people can base their works off it
to avoid conflicts."
* 'imx/multi-platform' of git://git.linaro.org/people/shawnguo/linux-2.6: (31 commits)
ARM: imx: enable multi-platform build
ARM: imx: call mxc_device_init() in soc specific function
ARM: imx: remove header file mach/irqs.h
ARM: imx: include hardware.h rather than mach/hardware.h
ARM: imx: move debug macros to include/debug
video: imxfb: remove cpu_is_xxx by using platform_device_id
mmc: mxcmmc: remove cpu_is_xxx by using platform_device_id
media: mx2_camera: remove cpu_is_xxx by using platform_device_id
dma: imx-dma: remove cpu_is_xxx by using platform_device_id
dma: imx-dma: retrieve MEM and IRQ from resources
dma: imx-dma: use devm_kzalloc and devm_request_irq
rtc: mxc_rtc: remove cpu_is_xxx by using platform_device_id
mtd: mxc_nand: remove cpu_is_xxx by using platform_device_id
i2c: imx: remove cpu_is_xxx by using platform_device_id
watchdog: imx2_wdt: remove unneeded mach/hardware.h inclusion
video: mx3fb: remove unneeded mach/hardware.h inclusion
usb: ehci-mxc: remove unneeded mach/hardware.h inclusion
ASoC: imx-ssi: remove unneeded mach/hardware.h inclusion
dma: imx-sdma: remove unneeded mach/hardware.h inclusion
dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h
...