openwrt/staging/blogic.git
12 years agoMN10300: Get rid of unused variable from ASB2305 PCI code
David Howells [Wed, 12 Dec 2012 15:36:40 +0000 (15:36 +0000)]
MN10300: Get rid of unused variable from ASB2305 PCI code

Get rid of an unused variable in pcibios_fixup_device_resources() which leads
to the following warning:

arch/mn10300/unit-asb2305/pci.c: In function 'pcibios_fixup_device_resources':
arch/mn10300/unit-asb2305/pci.c:324:24: warning: unused variable 'region' [-Wunused-variable]

Whilst we're at it, merge the two integer variable declarations into one line.

Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: ASB2305 PCI code needs linux/irq.h
David Howells [Wed, 12 Dec 2012 15:36:40 +0000 (15:36 +0000)]
MN10300: ASB2305 PCI code needs linux/irq.h

ASB2305 PCI code needs to #include linux/irq.h for XIRQ1 so that it can set
the CPU interrupt priority level on the PCI interrupt.

Signed-off-by: David Howells <dhowells@redhat.com>
12 years agomn10300/mm/fault.c: Port OOM changes to do_page_fault
Kautuk Consul [Wed, 12 Dec 2012 15:36:39 +0000 (15:36 +0000)]
mn10300/mm/fault.c: Port OOM changes to do_page_fault

Commit d065bd810b6deb67d4897a14bfe21f8eb526ba99
(mm: retry page fault when blocking on disk transfer) and
commit 37b23e0525d393d48a7d59f870b3bc061a30ccdb
(x86,mm: make pagefault killable)

The above commits introduced changes into the x86 pagefault handler
for making the page fault handler retryable as well as killable.

These changes reduce the mmap_sem hold time, which is crucial
during OOM killer invocation.

Port these changes to mn10300.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: Handle cacheable PCI regions in pci_iomap()
David Howells [Wed, 12 Dec 2012 15:36:39 +0000 (15:36 +0000)]
MN10300: Handle cacheable PCI regions in pci_iomap()

Handle cacheable PCI regions in pci_iomap().  If IORESOURCE_CACHEABLE is set
then we AND away the 0x20000000 "flag".

Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: fix debug polling in ttySM driver
Mark Salter [Wed, 12 Dec 2012 15:36:39 +0000 (15:36 +0000)]
MN10300: fix debug polling in ttySM driver

The debug polling interface for the SoC serial ports did not work in the case
where the serial ports were not also used as a console. In that case, the
uart driver startup function will not be called so tx and rx would not be
enabled in the hardware control register. Also, vdma interrupts would not be
enabled which the poll_get_char function relied on. This patch makes sure that
the rx and tx enables are set as a consequence of the uart set_termios call
which is the only initialization done for the debug polling interface. Also,
the poll_get_char now handles the case where vdma interrupts are not enabled.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: ttySM: clean up unnecessary casting
Mark Salter [Wed, 12 Dec 2012 15:36:38 +0000 (15:36 +0000)]
MN10300: ttySM: clean up unnecessary casting

The ttySM uart data register pointers are declared as void* pointers. Change
them to u8* pointers so we don't need to use casts in the code.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: fix SMP synchronization between txdma and serial driver
Mark Salter [Wed, 12 Dec 2012 15:36:38 +0000 (15:36 +0000)]
MN10300: fix SMP synchronization between txdma and serial driver

The SoC serial port driver uses a high priority interrupt to handle tx of
characters in the tx ring buffer. The driver needs to disable/enable this IRQ
from outside of irq context. The original code to do this is not foolproof on
SMP machines because the IRQ running on one core could still access the serial
port for a short time after the driver running on another core disables the
interrupt. This patch adds a flag to tell the IRQ handler that the driver
wants to disable the interrupt. After seeing the flag, the IRQ handler will
immediately disable the interrupt and exit. After setting the flag, the driver
will wait for interrupt to be disabled by the IRQ handler.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: fix serial port vdma irq setup for SMP
Mark Salter [Wed, 12 Dec 2012 15:36:38 +0000 (15:36 +0000)]
MN10300: fix serial port vdma irq setup for SMP

The builtin SoC serial ports have no FIFOs and use a virtual DMA mechanism
based on high priority IRQs to avoid overruns. These high priority interrupts
are pinned to cpu#0 on SMP systems. This patch fixes a problem with SMP where
the set_intr_level() interface is used to set the priority for these IRQs. The
set_intr_level() function sets priority on the local cpu but on SMP systems,
this code may be run on some other cpu than the one handling the interrupts.
Instead of setting interrupt level explicitly, this patch uses a special
irq_chip for these interrupts so that the mask/unmask methods can set the
interrupt level implicitly.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: cleanup IRQ affinity setting
Mark Salter [Wed, 12 Dec 2012 15:36:37 +0000 (15:36 +0000)]
MN10300: cleanup IRQ affinity setting

The irq_set_affinity handler for the mn10300 cpu pic had some hard-coded IRQs
which were not to be migrated from one cpu to another. This patch cleans those
up by using a combination of IRQF_NOBALANCING and specialized irq chips with
no irq_set_affinity handler. This maintains the previous behavior by using
generic IRQ interfaces rather than hard coding IRQ numbers in the default
irq_set_affinity handler.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
12 years agoMN10300: ttySM: Use memory barriers correctly in circular buffer logic
David Howells [Wed, 12 Dec 2012 15:36:37 +0000 (15:36 +0000)]
MN10300: ttySM: Use memory barriers correctly in circular buffer logic

Use memory barriers correctly in the circular buffer logic used in the driver,
as documented in Documentation/circular-buffers.txt.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
12 years agodo_coredump(): get rid of pt_regs argument
Al Viro [Mon, 5 Nov 2012 18:11:26 +0000 (13:11 -0500)]
do_coredump(): get rid of pt_regs argument

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoprint_fatal_signal(): get rid of pt_regs argument
Al Viro [Mon, 5 Nov 2012 18:09:56 +0000 (13:09 -0500)]
print_fatal_signal(): get rid of pt_regs argument

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoptrace_signal(): get rid of unused arguments
Al Viro [Mon, 5 Nov 2012 18:08:06 +0000 (13:08 -0500)]
ptrace_signal(): get rid of unused arguments

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoget rid of ptrace_signal_deliver() arguments
Al Viro [Mon, 5 Nov 2012 18:06:22 +0000 (13:06 -0500)]
get rid of ptrace_signal_deliver() arguments

the first one is equal to signal_pt_regs(), the second is never used
(and always NULL, while we are at it).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agonew helper: signal_pt_regs()
Al Viro [Mon, 5 Nov 2012 18:00:27 +0000 (13:00 -0500)]
new helper: signal_pt_regs()

Always equal to task_pt_regs(current); defined only when we are in
signal delivery.  It may be different from current_pt_regs() - e.g.
architectures like m68k may have pt_regs location on exception
different from that on a syscall and signals (just as ptrace handling)
may happen on exceptions as well as on syscalls.

When they are equal, it's often better to have signal_pt_regs
defined (in asm/ptrace.h) as current_pt_regs - that tends to be
optimized better than default would be.  However, optimisation is
the only reason why we might want an arch-specific definition;
if current_pt_regs() and task_pt_regs(current) have different
values, the latter one is right.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agounify default ptrace_signal_deliver
Al Viro [Mon, 5 Nov 2012 17:59:15 +0000 (12:59 -0500)]
unify default ptrace_signal_deliver

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoflagday: kill pt_regs argument of do_fork()
Al Viro [Tue, 23 Oct 2012 03:10:08 +0000 (23:10 -0400)]
flagday: kill pt_regs argument of do_fork()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agodeath to idle_regs()
Al Viro [Tue, 23 Oct 2012 02:53:20 +0000 (22:53 -0400)]
death to idle_regs()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agodon't pass regs to copy_process()
Al Viro [Tue, 23 Oct 2012 02:52:26 +0000 (22:52 -0400)]
don't pass regs to copy_process()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoflagday: don't pass regs to copy_thread()
Al Viro [Tue, 23 Oct 2012 02:51:14 +0000 (22:51 -0400)]
flagday: don't pass regs to copy_thread()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agobfin: switch to generic vfork, get rid of pointless wrappers
Al Viro [Wed, 14 Nov 2012 04:47:37 +0000 (23:47 -0500)]
bfin: switch to generic vfork, get rid of pointless wrappers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoxtensa: switch to generic clone()
Al Viro [Sat, 27 Oct 2012 03:41:40 +0000 (23:41 -0400)]
xtensa: switch to generic clone()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoopenrisc: switch to use of generic fork and clone
Al Viro [Fri, 26 Oct 2012 23:37:49 +0000 (19:37 -0400)]
openrisc: switch to use of generic fork and clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agounicore32: switch to generic clone(2)
Al Viro [Tue, 23 Oct 2012 02:49:03 +0000 (22:49 -0400)]
unicore32: switch to generic clone(2)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoscore: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 20:44:57 +0000 (16:44 -0400)]
score: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoc6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
Al Viro [Sun, 21 Oct 2012 20:37:49 +0000 (16:37 -0400)]
c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agotake sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
Al Viro [Thu, 29 Nov 2012 04:04:26 +0000 (23:04 -0500)]
take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h

now it can be done...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agomn10300: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 20:43:13 +0000 (16:43 -0400)]
mn10300: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoh8300: switch to generic fork/vfork/clone
Al Viro [Sat, 27 Oct 2012 04:07:24 +0000 (00:07 -0400)]
h8300: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agotile: switch to generic clone()
Al Viro [Sat, 27 Oct 2012 03:36:42 +0000 (23:36 -0400)]
tile: switch to generic clone()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agom68k: sanitize copy_thread(), fork/vfork/clone wrappers, switch to generic fork/vfork
Al Viro [Sun, 21 Oct 2012 20:41:46 +0000 (16:41 -0400)]
m68k: sanitize copy_thread(), fork/vfork/clone wrappers, switch to generic fork/vfork

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoalpha: switch to generic fork/vfork/clone
Al Viro [Fri, 26 Oct 2012 13:54:47 +0000 (09:54 -0400)]
alpha: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agos390: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 20:44:27 +0000 (16:44 -0400)]
s390: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agomicroblaze: switch to generic fork/vfork/clone
Al Viro [Sat, 27 Oct 2012 04:03:41 +0000 (00:03 -0400)]
microblaze: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
12 years agohexagon: switch to generic clone()
Al Viro [Fri, 26 Oct 2012 23:25:46 +0000 (19:25 -0400)]
hexagon: switch to generic clone()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agosh: switch to generic fork/vfork/clone
Al Viro [Sat, 27 Oct 2012 04:13:51 +0000 (00:13 -0400)]
sh: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoparisc: switch to generic fork/vfork/clone
Al Viro [Fri, 26 Oct 2012 23:59:16 +0000 (19:59 -0400)]
parisc: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agom32r: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 20:52:56 +0000 (16:52 -0400)]
m32r: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agocris: switch to generic fork/vfork/clone
Al Viro [Fri, 26 Oct 2012 19:15:13 +0000 (15:15 -0400)]
cris: switch to generic fork/vfork/clone

same braindamage as on s390 - the first two arguments of clone(2) in the
wrong order.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoavr32: sanitize copy_thread(), switch to generic fork/vfork/clone, kill wrappers
Al Viro [Sun, 21 Oct 2012 19:57:32 +0000 (15:57 -0400)]
avr32: sanitize copy_thread(), switch to generic fork/vfork/clone, kill wrappers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoarm64: sanitize copy_thread(), switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 19:56:52 +0000 (15:56 -0400)]
arm64: sanitize copy_thread(), switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agofrv: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 20:40:35 +0000 (16:40 -0400)]
frv: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agopowerpc: switch to generic fork/clone/vfork
Al Viro [Sat, 27 Oct 2012 03:08:25 +0000 (23:08 -0400)]
powerpc: switch to generic fork/clone/vfork

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoarm: switch to generic fork/vfork/clone
Al Viro [Sun, 21 Oct 2012 19:54:27 +0000 (15:54 -0400)]
arm: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agox86, um: switch to generic fork/vfork/clone
Al Viro [Tue, 23 Oct 2012 02:34:11 +0000 (22:34 -0400)]
x86, um: switch to generic fork/vfork/clone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoget rid of pt_regs argument of ->load_binary()
Al Viro [Sun, 21 Oct 2012 02:00:48 +0000 (22:00 -0400)]
get rid of pt_regs argument of ->load_binary()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoget rid of pt_regs argument of search_binary_handler()
Al Viro [Sun, 21 Oct 2012 01:53:31 +0000 (21:53 -0400)]
get rid of pt_regs argument of search_binary_handler()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoget rid of pt_regs argument of do_execve_common()
Al Viro [Sun, 21 Oct 2012 01:50:59 +0000 (21:50 -0400)]
get rid of pt_regs argument of do_execve_common()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoget rid of pt_regs argument of do_execve()
Al Viro [Sun, 21 Oct 2012 01:49:33 +0000 (21:49 -0400)]
get rid of pt_regs argument of do_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agomake compat_do_execve() static, lose pt_regs argument
Al Viro [Sun, 21 Oct 2012 01:46:25 +0000 (21:46 -0400)]
make compat_do_execve() static, lose pt_regs argument

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agokill stray kernel_thread() garbage
Al Viro [Sun, 21 Oct 2012 01:42:37 +0000 (21:42 -0400)]
kill stray kernel_thread() garbage

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoaudit: no nested contexts anymore...
Al Viro [Sat, 20 Oct 2012 19:07:18 +0000 (15:07 -0400)]
audit: no nested contexts anymore...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoconsolidate sys_execve() prototype
Al Viro [Sat, 20 Oct 2012 17:32:30 +0000 (13:32 -0400)]
consolidate sys_execve() prototype

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoMerge branches 'no-rebases', 'arch-avr32', 'arch-blackfin', 'arch-cris', 'arch-h8300...
Al Viro [Thu, 29 Nov 2012 02:52:07 +0000 (21:52 -0500)]
Merge branches 'no-rebases', 'arch-avr32', 'arch-blackfin', 'arch-cris', 'arch-h8300', 'arch-m32r', 'arch-mn10300', 'arch-score', 'arch-sh' and 'arch-powerpc' into for-next

12 years agogeneric sys_fork / sys_vfork / sys_clone
Al Viro [Tue, 23 Oct 2012 17:17:59 +0000 (13:17 -0400)]
generic sys_fork / sys_vfork / sys_clone

... and get rid of idiotic struct pt_regs * in asm-generic/syscalls.h
prototypes of the same, while we are at it.  Eventually we want those
in linux/syscalls.h, of course, but that'll have to wait a bit.

Note that there are *three* variants of sys_clone() order of arguments.
Braindamage galore...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoalpha: reorganize copy_process(), prepare to saner fork_idle()
Al Viro [Sun, 21 Oct 2012 19:52:04 +0000 (15:52 -0400)]
alpha: reorganize copy_process(), prepare to saner fork_idle()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoalpha: don't pass useless arguments to do_{,rt_},sigreturn()
Al Viro [Thu, 18 Oct 2012 05:43:27 +0000 (01:43 -0400)]
alpha: don't pass useless arguments to do_{,rt_},sigreturn()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoalpha: simplify fork and friends
Al Viro [Thu, 18 Oct 2012 05:11:58 +0000 (01:11 -0400)]
alpha: simplify fork and friends

* no need to restore everything from switch_stack when we only need $26
* no need to pass current_pt_regs() manually, we can just as easily
calculate it in alpha_clone/alpha_vfork ($8 + constant)
* interpretation of zero usp as "use the parent's" is simpler in copy_thread();
let fork and vfork just pass 0.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoum: don't bother looking at regs in copy_thread() - current_pt_regs() is what we...
Al Viro [Tue, 30 Oct 2012 01:36:45 +0000 (21:36 -0400)]
um: don't bother looking at regs in copy_thread() - current_pt_regs() is what we'll get

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoum: don't bother with passing sp to do_fork() for fork(2)/vfork(2)
Al Viro [Wed, 17 Oct 2012 06:26:48 +0000 (02:26 -0400)]
um: don't bother with passing sp to do_fork() for fork(2)/vfork(2)

copy_thread() on um will do the right thing when getting 0 for sp...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agokill daemonize()
Al Viro [Tue, 2 Oct 2012 20:34:38 +0000 (16:34 -0400)]
kill daemonize()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agomicroblaze: rt_sigreturn is too trigger-happy about sigaltstack errors
Al Viro [Tue, 20 Nov 2012 15:41:11 +0000 (10:41 -0500)]
microblaze: rt_sigreturn is too trigger-happy about sigaltstack errors

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoscore: do_sigaltstack() expects a userland pointer...
Al Viro [Tue, 20 Nov 2012 15:36:17 +0000 (10:36 -0500)]
score: do_sigaltstack() expects a userland pointer...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agosh64: fix altstack switching on sigreturn
Al Viro [Thu, 20 Sep 2012 20:38:34 +0000 (16:38 -0400)]
sh64: fix altstack switching on sigreturn

incidentally, declaring a local variable as __user (!) to make
sparse STFU is really sick.  Especially since sparse had been
100% right - it *is* a bug.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoopenrisk: fix altstack switching on sigreturn
Al Viro [Thu, 20 Sep 2012 19:49:09 +0000 (15:49 -0400)]
openrisk: fix altstack switching on sigreturn

do_sigaltstack() expects _userland_ address, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoum: get_safe_registers() should be done in flush_thread(), not start_thread()
Al Viro [Sat, 10 Nov 2012 06:15:42 +0000 (01:15 -0500)]
um: get_safe_registers() should be done in flush_thread(), not start_thread()

... or we'll end up buggering the results of ELF_PLAT_INIT()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoMerge branch 'arch-tile' into no-rebases
Al Viro [Thu, 29 Nov 2012 02:44:15 +0000 (21:44 -0500)]
Merge branch 'arch-tile' into no-rebases

12 years agotile: compat rt_sigreturn gets too enthusiastic about sigaltstack errors
Al Viro [Thu, 29 Nov 2012 02:43:21 +0000 (21:43 -0500)]
tile: compat rt_sigreturn gets too enthusiastic about sigaltstack errors

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoLinux 3.7-rc7
Linus Torvalds [Mon, 26 Nov 2012 01:59:19 +0000 (17:59 -0800)]
Linux 3.7-rc7

12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Mon, 26 Nov 2012 01:57:01 +0000 (17:57 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc EEH bugfixes from Benjamin Herrenschmidt.

Two one-liner fixes for the new EEH code.

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/eeh: Do not invalidate PE properly
  powerpc/pseries: Fix oops with MSIs when missing EEH PEs

12 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Mon, 26 Nov 2012 01:55:04 +0000 (17:55 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "Three issues fixed accross the field:

   - Some functions that were recently outlined as part of a preemption
     fix were causing problems with function tracing.
   - The recently merged in-kernel MPI library uses very outdated
     headers that contain MIPS-specific code which won't build on with
     gcc 4.4 or newer.
   - The MIPS non-NUMA memory initialization was making only a very
     half-baked attempt at merging adjacent memory ranges.  This kept
     the code simple enough but is now causing issues with kexec."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MPI: Fix compilation on MIPS with GCC 4.4 and newer
  MIPS: Fix crash that occurs when function tracing is enabled
  MIPS: Merge overlapping bootmem ranges

12 years agopowerpc/eeh: Do not invalidate PE properly
Gavin Shan [Thu, 22 Nov 2012 21:58:26 +0000 (21:58 +0000)]
powerpc/eeh: Do not invalidate PE properly

While the EEH does recovery on the specific PE that has PCI errors,
the PCI devices belonging to the PE will be removed and the PE will
be marked as invalid since we still need the information stored in
the PE. We only invalidate the PE when it doesn't have associated
EEH devices and valid child PEs. However, the code used to check
that is wrong. The patch fixes that.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Sat, 24 Nov 2012 18:32:11 +0000 (08:32 -1000)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound build error fix from Takashi Iwai:
 "Only a single commit for fixing the build error without CONFIG_PM in
  hda driver."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix build without CONFIG_PM

12 years agoALSA: hda - Fix build without CONFIG_PM
Takashi Iwai [Sat, 24 Nov 2012 10:58:24 +0000 (11:58 +0100)]
ALSA: hda - Fix build without CONFIG_PM

I forgot this again...  codec->in_pm is in #ifdef CONFIG_PM

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 24 Nov 2012 06:03:14 +0000 (20:03 -1000)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 arch fixes from Peter Anvin:
 "Here is a collection of fixes for 3.7-rc7.  This is a superset of
  tglx' earlier pull request."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64: Fix ordering of CFI directives and recent ASM_CLAC additions
  x86, microcode, AMD: Add support for family 16h processors
  x86-32: Export kernel_stack_pointer() for modules
  x86-32: Fix invalid stack address while in softirq
  x86, efi: Fix processor-specific memcpy() build error
  x86: remove dummy long from EFI stub
  x86, mm: Correct vmflag test for checking VM_HUGETLB
  x86, amd: Disable way access filter on Piledriver CPUs
  x86/mce: Do not change worker's running cpu in cmci_rediscover().
  x86/ce4100: Fix PCI configuration register access for devices without interrupts
  x86/ce4100: Fix reboot by forcing the reboot method to be KBD
  x86/ce4100: Fix pm_poweroff
  MAINTAINERS: Update email address for Robert Richter
  x86, microcode_amd: Change email addresses, MAINTAINERS entry
  MAINTAINERS: Change Boris' email address
  EDAC: Change Boris' email address
  x86, AMD: Change Boris' email address

12 years agoMerge tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6
Linus Torvalds [Sat, 24 Nov 2012 01:12:17 +0000 (15:12 -1000)]
Merge tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6

Pull MTD fixes from David Woodhouse:
 "The most important part of this is that it fixes a regression in
  Samsung NAND chip detection, introduced by some rework which went into
  3.7.  The initial fix wasn't quite complete, so it's in two parts.  In
  fact the first part is committed twice (Artem committed his own copy
  of the same patch) and I've merged Artem's tree into mine which
  already had that fix.

  I'd have recommitted that to make it somewhat cleaner, but figured by
  this point in the release cycle it was better to merge *exactly* the
  commits which have been in linux-next.

  If I'd recommitted, I'd also omit the sparse warning fix.  But it's
  there, and it's harmless — just marking one function as 'static' in
  onenand code.

  This also includes a couple more fixes for stable: an AB-BA deadlock
  in JFFS2, and an invalid range check in slram."

* tag 'for-linus-20121123' of git://git.infradead.org/mtd-2.6:
  mtd: nand: fix Samsung SLC detection regression
  mtd: nand: fix Samsung SLC NAND identification regression
  jffs2: Fix lock acquisition order bug in jffs2_write_begin
  mtd: onenand: Make flexonenand_set_boundary static
  mtd: slram: invalid checking of absolute end address
  mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions()
  mtd: nand: fix Samsung SLC NAND identification regression

12 years agoMerge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 23 Nov 2012 22:36:06 +0000 (12:36 -1000)]
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull device tree regression fix from Grant Likely:
 "Simple build regression fix for DT device drivers on Sparc.  An
  earlier change had masked out the of_iomap() helper on SPARC."

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  of/address: sparc: Declare of_iomap as an extern function for sparc again

12 years agoMerge tag 'pm-for-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 23 Nov 2012 22:16:43 +0000 (12:16 -1000)]
Merge tag 'pm-for-3.7-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management update from Rafael Wysocki:
 "Fix for an incorrect error condition check in device PM QoS code that
  may lead to an Oops from Guennadi Liakhovetski."

* tag 'pm-for-3.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / QoS: fix wrong error-checking condition

12 years agoMerge tag 'md-3.7-fixes' of git://neil.brown.name/md
Linus Torvalds [Fri, 23 Nov 2012 22:11:13 +0000 (12:11 -1000)]
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md

Pull md fixes from NeilBrown:
 "Several bug fixes for md in 3.7:

   - raid5 discard has problems
   - raid10 replacement devices have problems
   - bad block lock seqlock usage has problems
   - dm-raid doesn't free everything"

* tag 'md-3.7-fixes' of git://neil.brown.name/md:
  md/raid10: decrement correct pending counter when writing to replacement.
  md/raid10: close race that lose writes lost when replacement completes.
  md/raid5: Make sure we clear R5_Discard when discard is finished.
  md/raid5: move resolving of reconstruct_state earlier in stripe_handle.
  md/raid5: round discard alignment up to power of 2.
  md: make sure everything is freed when dm-raid stops an array.
  md: Avoid write invalid address if read_seqretry returned true.
  md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.

12 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 23 Nov 2012 22:06:05 +0000 (12:06 -1000)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:
 "Distilled down version of bug fixes for 3.7.  The patches have been
  well tested.  If you notice that commit dates are from today, it's
  because I pulled less important bits out and shuffled them into the
  3.8 mix.  Apart from that, no changes, base still the same.

  It contains:

   - Fix for aoe, don't run request_fn while it's plugged.

   - Fix for a regression in floppy since 3.6, which causes problems if
     no floppy is found.

   - Stable fix for blk_exec(), don't touch a request after it has been
     sent to the scheduler (and the device as well).

   - Five fixes for various nasties in mtip32xx."

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: Don't access request after it might be freed
  mtip32xx: Fix padding issue
  aoe: avoid running request handler on plugged queue
  mtip32xx: fix potential NULL pointer dereference in mtip_timeout_function()
  mtip32xx: fix shift larger than type warning
  mtip32xx: Fix incorrect mask used for erase mode
  mtip32xx: Fix to make lba address correct in big-endian systems
  mtip32xx: fix potential crash on SEC_ERASE_UNIT
  dm: fix deadlock with request based dm and queue request_fn recursion
  floppy: destroy floppy workqueue before cleaning up the queue

12 years agoof/address: sparc: Declare of_iomap as an extern function for sparc again
Andreas Larsson [Fri, 23 Nov 2012 11:24:09 +0000 (12:24 +0100)]
of/address: sparc: Declare of_iomap as an extern function for sparc again

This bug-fix makes sure that of_iomap is defined extern for sparc so that the
sparc-specific implementation of_iomap is once again used when including
include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
sparc relies on this.

The bug was inadvertently introduced in a850a75, "of/address: add empty static
inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
!CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.

This fix takes the same approach as 0bce04b that solved the equivalent problem
for of_address_to_resource.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Fri, 23 Nov 2012 22:01:02 +0000 (12:01 -1000)]
Merge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux

Pull omapdss fixes from Tomi Valkeinen:
 "Here are a few OMAPDSS fixes for the next -rc.  I'm sending these
  directly to you, and quite late, as the fbdev tree maintainer
  (Florian) has been busy with his work and hasn't had time to manage
  the fb patches."

* tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux:
  OMAPDSS: do not fail if dpll4_m4_ck is missing
  OMAPFB: Fix possible null pointer dereferencing
  OMAPDSS: HDMI: fix missing unlock on error in hdmi_dump_regs()
  omapdss: dss: Fix clocks on OMAP363x
  OMAPDSS: DSI: fix dsi_get_dsidev_from_id()

12 years agoMerge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Linus Torvalds [Fri, 23 Nov 2012 21:59:26 +0000 (11:59 -1000)]
Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Bugfixes for the i2c subsystem.

  Except for a few one-liners, there is mainly one revert because of an
  overlooked dependency.  Since there is no linux-next at the moment, I
  did some extra testing, and all was fine for me."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: mxs: Handle i2c DMA failure properly
  i2c: s3c2410: Fix code to free gpios
  i2c: omap: ensure writes to dev->buf_len are ordered
  Revert "ARM: OMAP: convert I2C driver to PM QoS for MPU latency constraints"
  i2c: at91: fix SMBus quick command

12 years agoMerge tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 23 Nov 2012 21:58:28 +0000 (11:58 -1000)]
Merge tag 'sound-3.7' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The highlight of this update is the fixes for ASoC kirkwood by
  Russell.  In addition to that, a couple of regression fixes for
  HD-audio due to the runtime PM support on 3.7, and other driver-
  specific regression fixes like USB MIDI on non-standard USB audio
  drivers."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: snd-usb: properly initialize the sync endpoint
  ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speaker
  ALSA: hda - Add support for Realtek ALC292
  ASoC: kirkwood-i2s: more pause-mode fixes
  ASoC: kirkwood-i2s: fix DMA underruns
  ASoC: kirkwood-i2s: fix DCO lock detection
  ASoC: kirkwood-dma: don't ignore other irq causes on error
  ASoC: kirkwood-dma: fix use of virt_to_phys()
  ALSA: hda - Limit runtime PM support only to known Intel chips
  ALSA: hda - Fix recursive suspend/resume call
  ALSA: ua101, usx2y: fix broken MIDI output
  ASoC: arizona: Fix typo - Swap value in 48k_rates[] and 44k1_rates[]
  ASoC: bells: Fix up git patch application failure
  ASoC: cs4271: free allocated GPIO

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 23 Nov 2012 21:55:49 +0000 (11:55 -1000)]
Merge git://git./linux/kernel/git/davem/net

Pull networkign fixes from David Miller:
 "Networking bug fixes, Cacio e Pepe edition:

  1) BNX2X accidently accesses chip rev specific registers without an
     appropriate guard, fix from Ariel Elior.

  2) When we removed the routing cache, we set ip_rt_max_size to ~0 just
     to keep reporting a value to userspace via sysfs.  But the ipv4
     IPSEC layer was using this to tune itself which is completely bogus
     to now do.  Fix from Steffen Klassert.

  3) Missing initialization in netfilter ipset code from Jozsef
     Kadlecsik.

  4) Check CTA_TIMEOUT_NAME length properly in netfilter cttimeout code,
     fix from Florian Westphal.

  5) After removing the routing cache, we inadvertantly are caching
     multicast routes that end up looping back locally, we cannot do
     that legitimately any more.  Fix from Julian Anastasov.

  6) Revert a race fix for 8139cp qemu/kvm that doesn't actually work
     properly on real hardware.  From Francois Romieu.

  7) Fixup errors in example command lines in VXLAN device docs."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  bnx2x: remove redundant warning log
  vxlan: fix command usage in its doc
  8139cp: revert "set ring address before enabling receiver"
  ipv4: do not cache looped multicasts
  netfilter: cttimeout: fix buffer overflow
  netfilter: ipset: Fix range bug in hash:ip,port,net
  xfrm: Fix the gc threshold value for ipv4

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 23 Nov 2012 21:55:09 +0000 (11:55 -1000)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fix from David Miller:
 "Bug fix from Al Viro"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: not any error from do_sigaltstack() should fail rt_sigreturn()

12 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 23 Nov 2012 21:54:22 +0000 (11:54 -1000)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull one more ARM SoC fix from Olof Johansson:
 "I missed one pull request from Samsung with one fix in the previous
  batch.  Here it is -- a dma driver fix for an early version of silicon
  that they still support."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: EXYNOS: PL330 MDMA1 fix for revision 0 of Exynos4210 SOC

12 years agoPM / QoS: fix wrong error-checking condition
Guennadi Liakhovetski [Fri, 23 Nov 2012 19:55:06 +0000 (20:55 +0100)]
PM / QoS: fix wrong error-checking condition

dev_pm_qos_add_request() can return 0, 1, or a negative error code,
therefore the correct error test is "if (error < 0)." Checking just for
non-zero return code leads to erroneous setting of the req->dev pointer
to NULL, which then leads to a repeated call to
dev_pm_qos_add_ancestor_request() in st1232_ts_irq_handler(). This in turn
leads to an Oops, when the I2C host adapter is unloaded and reloaded again
because of the inconsistent state of its QoS request list.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
12 years agobnx2x: remove redundant warning log
Ariel Elior [Thu, 22 Nov 2012 07:16:17 +0000 (07:16 +0000)]
bnx2x: remove redundant warning log

fix bug where a register which was only meant to be read in 578xx/57712
devices causes a bogus error message to be logged when read from other
devices.

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 agovxlan: fix command usage in its doc
Zhi Yong Wu [Thu, 22 Nov 2012 00:10:01 +0000 (00:10 +0000)]
vxlan: fix command usage in its doc

  Some commands don't work in its example doc. The patch will fix it.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years ago8139cp: revert "set ring address before enabling receiver"
françois romieu [Wed, 21 Nov 2012 10:07:29 +0000 (10:07 +0000)]
8139cp: revert "set ring address before enabling receiver"

This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db.

The original patch was tested with emulated hardware. Real
hardware chokes.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMPI: Fix compilation on MIPS with GCC 4.4 and newer
Manuel Lauss [Thu, 22 Nov 2012 10:58:22 +0000 (11:58 +0100)]
MPI: Fix compilation on MIPS with GCC 4.4 and newer

Since 4.4 GCC on MIPS no longer recognizes the "h" constraint,
leading to this build failure:

  CC      lib/mpi/generic_mpih-mul1.o
lib/mpi/generic_mpih-mul1.c: In function 'mpihelp_mul_1':
lib/mpi/generic_mpih-mul1.c:50:3: error: impossible constraint in 'asm'

This patch updates MPI with the latest umul_ppm implementations for MIPS.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: James Morris <jmorris@namei.org>
Patchwork: https://patchwork.linux-mips.org/patch/4612/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Fix crash that occurs when function tracing is enabled
Al Cooper [Thu, 15 Nov 2012 23:16:14 +0000 (18:16 -0500)]
MIPS: Fix crash that occurs when function tracing is enabled

A recent patch changed some irq routines from inlines to functions.
These routines are called by the tracer code. Now that they're functions,
if they are compiled for function tracing they will call the tracer
and crash the system due to infinite recursion. The fix disables
tracing in these functions by using "notrace" in the function
definition.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: David Daney <david.daney@cavium.com>
Pathchwork: https://patchwork.linux-mips.org/patch/4564/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Merge overlapping bootmem ranges
Ralf Baechle [Thu, 15 Nov 2012 11:53:59 +0000 (12:53 +0100)]
MIPS: Merge overlapping bootmem ranges

Without this, we may end up with something like this in /proc/iomem:

01100000-014fffff : System RAM
  01100000-013bf48f : Kernel code
  013bf490-0149e01f : Kernel data
01500000-0c0fffff : System RAM

but the two System RAM ranges should be one single range.  This particular
case will result in kexec failure on Octeon systems if the kernel being
loaded by kexec is bigger than the already running kernel.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoblock: Don't access request after it might be freed
Roland Dreier [Thu, 22 Nov 2012 10:00:11 +0000 (02:00 -0800)]
block: Don't access request after it might be freed

After we've done __elv_add_request() and __blk_run_queue() in
blk_execute_rq_nowait(), the request might finish and be freed
immediately.  Therefore checking if the type is REQ_TYPE_PM_RESUME
isn't safe afterwards, because if it isn't, rq might be gone.
Instead, check beforehand and stash the result in a temporary.

This fixes crashes in blk_execute_rq_nowait() I get occasionally when
running with lots of memory debugging options enabled -- I think this
race is usually harmless because the window for rq to be reallocated
is so small.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Fix padding issue
Selvan Mani [Wed, 14 Nov 2012 13:16:35 +0000 (06:16 -0700)]
mtip32xx: Fix padding issue

Hi Jens,

Another tiny patch.

Removed __packed before the struct smart_attr and added __packed at end of
the structure to fix padding issue.

Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoaoe: avoid running request handler on plugged queue
Ed Cashin [Fri, 9 Nov 2012 00:17:15 +0000 (19:17 -0500)]
aoe: avoid running request handler on plugged queue

Calling the request handler directly on a plugged queue defeats
the performance improvements provided by the plugging mechanism.
Use the __blk_run_queue function instead of calling the request
handler directly, so that we don't interfere with the block
layer's ability to plug the queue.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: fix potential NULL pointer dereference in mtip_timeout_function()
Wei Yongjun [Thu, 8 Nov 2012 09:35:38 +0000 (17:35 +0800)]
mtip32xx: fix potential NULL pointer dereference in mtip_timeout_function()

The dereference to port should be moved below the NULL test.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: fix shift larger than type warning
Jens Axboe [Thu, 8 Nov 2012 06:58:53 +0000 (07:58 +0100)]
mtip32xx: fix shift larger than type warning

If we're building a 32-bit kernel and CONFIG_LBADF isn't set,
sector_t is 32-bits wide. The shifts by 32 and 40 are thus
larger than we support.

Cast the sector offset to a u64 to avoid these warnings.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agomtip32xx: Fix incorrect mask used for erase mode
Selvan Mani [Wed, 7 Nov 2012 13:03:56 +0000 (06:03 -0700)]
mtip32xx: Fix incorrect mask used for erase mode

Previous commit use value 3 for erasemode mask.
Changing the mask to correct value to 2

Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>