pandora-kernel.git
13 years agomicroblaze: Fix _reset function
Michal Simek [Thu, 10 Mar 2011 09:56:21 +0000 (10:56 +0100)]
microblaze: Fix _reset function

If soft reset falls through with no hardware assisted reset, the best
we can do is jump to the reset vector and see what the bootloader left
for us.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: John Williams <john.williams@petalogix.com>
13 years agomicroblaze: Fix microblaze init vectors
Michal Simek [Thu, 10 Mar 2011 09:51:27 +0000 (10:51 +0100)]
microblaze: Fix microblaze init vectors

Microblaze vector table stores several vectors (reset, user exception,
interrupt, debug exception and hardware exception).
All these functions can be below address 0x10000. If they are, wrong
vector table is genarated because jump is not setup from two instructions
(imm upper 16bit and brai lower 16bit).
Adding specific offset prevent problem if address is below 0x10000.
For this case only brai instruction is used.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix circular headers dependency when ftrace is enabled.
Michal Simek [Thu, 10 Mar 2011 09:39:51 +0000 (10:39 +0100)]
microblaze: Fix circular headers dependency when ftrace is enabled.

Remove compilation failure when ftrace in enabled.

Error log:
  CC      kernel/trace/power-traces.o
In file included from arch/microblaze/include/asm/irq.h:15,
                 from include/linux/irq.h:27,
                 from include/asm-generic/hardirq.h:12,
                 from arch/microblaze/include/asm/hardirq.h:15,
                 from include/linux/hardirq.h:7,
                 from include/linux/ftrace_event.h:7,
                 from include/trace/ftrace.h:19,
                 from include/trace/define_trace.h:96,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/linux/interrupt.h: In function '__raise_softirq_irqoff':
include/linux/interrupt.h:413: error: implicit declaration of function 'trace_softirq_raise'
In file included from include/trace/ftrace.h:554,
                 from include/trace/define_trace.h:96,
                 from include/trace/events/power.h:240,
                 from kernel/trace/power-traces.c:14:
include/trace/events/irq.h: In function 'ftrace_test_probe_irq_handler_entry':
include/trace/events/irq.h:37: error: implicit declaration of function 'check_trace_callback_type_irq_handler_entry'
include/trace/events/irq.h: In function 'ftrace_test_probe_irq_handler_exit':
include/trace/events/irq.h:67: error: implicit declaration of function 'check_trace_callback_type_irq_handler_exit'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_entry':
include/trace/events/irq.h:112: error: implicit declaration of function 'check_trace_callback_type_softirq_entry'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_exit':
include/trace/events/irq.h:126: error: implicit declaration of function 'check_trace_callback_type_softirq_exit'
include/trace/events/irq.h: In function 'ftrace_test_probe_softirq_raise':
include/trace/events/irq.h:140: error: implicit declaration of function 'check_trace_callback_type_softirq_raise'
make[5]: *** [kernel/trace/power-traces.o] Error 1
make[4]: *** [kernel/trace] Error 2
make[3]: *** [kernel] Error 2

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix typo in Kconfig
Tobias Klauser [Wed, 2 Mar 2011 17:38:35 +0000 (18:38 +0100)]
microblaze: Fix typo in Kconfig

s/Exectuable/Executable/

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
13 years agomicroblaze: Add missing export symbols for lib functions
Michal Simek [Thu, 24 Feb 2011 14:36:49 +0000 (15:36 +0100)]
microblaze: Add missing export symbols for lib functions

Adding missing export symbols for loadable modules.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix /dev/zero corruption from __clear_user()
Steven J. Magnani [Thu, 10 Feb 2011 18:12:13 +0000 (12:12 -0600)]
microblaze: Fix /dev/zero corruption from __clear_user()

A userland read of more than PAGE_SIZE bytes from /dev/zero results in
(a) not all of the bytes returned being zero, and
(b) memory corruption due to zeroing of bytes beyond the user buffer.

This is caused by improper constraints on the assembly __clear_user function.
The constrints don't indicate to the compiler that the pointer argument is
modified. Since the function is inline, this results in double-incrementing
of the pointer when __clear_user() is invoked through a multi-page read() of
/dev/zero.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Acked-by: Michal Simek <monstr@monstr.eu>
CC: stable@kernel.org
13 years agomicroblaze: Convert irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 19:36:30 +0000 (19:36 +0000)]
microblaze: Convert irq_chip to new functions

Use proper irq_desc wrappers while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Select GENERIC_HARDIRQS_NO_DEPRECATED
Thomas Gleixner [Sun, 6 Feb 2011 19:36:33 +0000 (19:36 +0000)]
microblaze: Select GENERIC_HARDIRQS_NO_DEPRECATED

All irq_chips converted.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agomicroblaze: Remove stale irq_chip.end
Thomas Gleixner [Sun, 6 Feb 2011 19:36:28 +0000 (19:36 +0000)]
microblaze: Remove stale irq_chip.end

irq_chip.end got obsolete with the removal of __do_IRQ().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Tested-by: Michal Simek <monstr@monstr.eu>
LKML-Reference: <20110203004210.240154507@linutronix.de>

13 years agomicroblaze: Fix sparse warnings - signal.c
Michal Simek [Mon, 7 Feb 2011 11:25:37 +0000 (12:25 +0100)]
microblaze: Fix sparse warnings - signal.c

Warning log:
CHECK   arch/microblaze/kernel/signal.c
arch/microblaze/kernel/signal.c:200:9: warning: Using plain integer as NULL pointer
arch/microblaze/kernel/signal.c:201:9: warning: incorrect type in initializer (different address spaces)
arch/microblaze/kernel/signal.c:201:9:    expected void [noderef] *volatile __gu_val<asn:1>
arch/microblaze/kernel/signal.c:201:9:    got void *<noident>

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - fault.c
Michal Simek [Mon, 7 Feb 2011 11:24:39 +0000 (12:24 +0100)]
microblaze: Fix sparse warning - fault.c

Warning log:
CHECK   arch/microblaze/mm/fault.c
arch/microblaze/mm/fault.c:51:6: warning: incorrect type in initializer (different address spaces)
arch/microblaze/mm/fault.c:51:6:    expected unknown type 2const [noderef] *__gu_addr<asn:1>
arch/microblaze/mm/fault.c:51:6:    got unsigned int *<noident>
arch/microblaze/mm/fault.c:68:6: warning: symbol 'bad_page_fault' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix missing microblaze specific syscalls declaration
Michal Simek [Mon, 7 Feb 2011 11:22:55 +0000 (12:22 +0100)]
microblaze: Fix missing microblaze specific syscalls declaration

Warning log:
CHECK   arch/microblaze/kernel/sys_microblaze.c
arch/microblaze/kernel/sys_microblaze.c:37:17: warning: symbol 'microblaze_vfork' was not declared. Should it be static?
arch/microblaze/kernel/sys_microblaze.c:43:17: warning: symbol 'microblaze_clone' was not declared. Should it be static?
arch/microblaze/kernel/sys_microblaze.c:50:17: warning: symbol 'microblaze_execve' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warnings - cache.c
Michal Simek [Mon, 7 Feb 2011 11:21:42 +0000 (12:21 +0100)]
microblaze: Fix sparse warnings - cache.c

Warning log:
CHECK   arch/microblaze/kernel/cpu/cache.c
arch/microblaze/kernel/cpu/cache.c:522:21: warning: symbol 'wb_msr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:538:21: warning: symbol 'wb_nomsr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:554:21: warning: symbol 'wt_msr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:569:21: warning: symbol 'wt_nomsr' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:585:21: warning: symbol 'wt_msr_noirq' was not declared. Should it be static?
arch/microblaze/kernel/cpu/cache.c:600:21: warning: symbol 'wt_nomsr_noirq' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - cpuinfo.h
Michal Simek [Mon, 7 Feb 2011 10:56:14 +0000 (11:56 +0100)]
microblaze: Fix sparse warning - cpuinfo.h

Warning log:
CHECK   arch/microblaze/kernel/cpu/cpuinfo-static.c
arch/microblaze/include/asm/cpuinfo.h:101:21: warning: incorrect type in argument 1 (different signedness)
arch/microblaze/include/asm/cpuinfo.h:101:21:    expected unsigned int const [usertype] *p
arch/microblaze/include/asm/cpuinfo.h:101:21:    got int *[assigned] val
...

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - unwind.c
Michal Simek [Mon, 7 Feb 2011 10:51:07 +0000 (11:51 +0100)]
microblaze: Fix sparse warning - unwind.c

Warning log:
CHECK   arch/microblaze/kernel/unwind.c
arch/microblaze/kernel/unwind.c:186:6: warning: symbol 'microblaze_unwind_inner' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - consistent_alloc function
Michal Simek [Mon, 7 Feb 2011 10:42:37 +0000 (11:42 +0100)]
microblaze: Fix sparse warning - consistent_alloc function

Warning in dma.c was caused by incorrect type in consistent_alloc function.

Warning log:
CHECK   arch/microblaze/kernel/dma.c
arch/microblaze/kernel/dma.c:53:26: warning: incorrect type in argument 1 (different base types)
arch/microblaze/kernel/dma.c:53:26:    expected int [signed] gfp
arch/microblaze/kernel/dma.c:53:26:    got restricted unsigned int [usertype] flag

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warnings - ptrace
Michal Simek [Mon, 7 Feb 2011 10:38:57 +0000 (11:38 +0100)]
microblaze: Fix sparse warnings - ptrace

Warning log:
CHECK   arch/microblaze/kernel/ptrace.c
arch/microblaze/kernel/ptrace.c:126:11: warning: incorrect type in initializer (different address spaces)
arch/microblaze/kernel/ptrace.c:126:11:    expected unknown type 2[noderef] *__pu_addr<asn:1>
arch/microblaze/kernel/ptrace.c:126:11:    got unsigned long *<noident>
arch/microblaze/kernel/ptrace.c:134:17: warning: symbol 'do_syscall_trace_enter' was not declared. Should it be static?
arch/microblaze/kernel/ptrace.c:157:17: warning: symbol 'do_syscall_trace_leave' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - sw_exceptions
Michal Simek [Mon, 7 Feb 2011 10:36:25 +0000 (11:36 +0100)]
microblaze: Fix sparse warning - sw_exceptions

Function sw_exception is linked with asm code.

Warning log:
CHECK   arch/microblaze/kernel/exceptions.c
arch/microblaze/kernel/exceptions.c:53:6: warning: symbol 'sw_exception' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - timer.c
Michal Simek [Mon, 7 Feb 2011 10:33:47 +0000 (11:33 +0100)]
microblaze: Fix sparse warning - timer.c

Variables and init_microblaze_timecounter should be static.

Warning log:
CHECK   arch/microblaze/kernel/timer.c
arch/microblaze/kernel/timer.c:41:14: warning: symbol 'freq_div_hz' was not declared. Should it be static?
arch/microblaze/kernel/timer.c:42:14: warning: symbol 'timer_clock_freq' was not declared. Should it be static?
arch/microblaze/kernel/timer.c:205:12: warning: symbol 'init_microblaze_timecounter' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix sparse warning - prom.c
Michal Simek [Mon, 7 Feb 2011 10:32:09 +0000 (11:32 +0100)]
microblaze: Fix sparse warning - prom.c

Warning log:
CHECK   arch/microblaze/kernel/dma.c
arch/microblaze/kernel/dma.c:53:26: warning: incorrect type in argument 1 (different base types)
arch/microblaze/kernel/dma.c:53:26:    expected int [signed] gfp
arch/microblaze/kernel/dma.c:53:26:    got restricted unsigned int [usertype] flag

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Add support for DMA_BIDIRECTIONAL
Michal Simek [Thu, 10 Feb 2011 07:37:49 +0000 (08:37 +0100)]
microblaze: Add support for DMA_BIDIRECTIONAL

CDMA requires DMA_BIDIRECTIONAL option.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: trivial: Add one empty line
Michal Simek [Tue, 21 Jul 2009 10:58:21 +0000 (12:58 +0200)]
microblaze: trivial: Add one empty line

Add one empty line to microblaze_ksyms.c.
Remove one empty line to cacheflush.h.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix coding style - ptrace.h
Michal Simek [Tue, 8 Feb 2011 13:55:09 +0000 (14:55 +0100)]
microblaze: Fix coding style - ptrace.h

Use tab instead of spaces.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Add PVR for Microblaze v8.10.a
Michal Simek [Wed, 9 Feb 2011 13:23:34 +0000 (14:23 +0100)]
microblaze: Add PVR for Microblaze v8.10.a

Microblaze v8.10.a has 0x14 version string.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Label MB 7.20.d as broken with WB cache
Michal Simek [Mon, 31 May 2010 19:16:30 +0000 (21:16 +0200)]
microblaze: Label MB 7.20.d as broken with WB cache

MB version 7.20.d contains fault which is related with WB that's why
error message will be shown.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix GDB issue caused by cache issue
Michal Simek [Fri, 28 May 2010 12:45:38 +0000 (14:45 +0200)]
microblaze: Fix GDB issue caused by cache issue

Used the same solution as SH. Changed len to PAGE_SIZE
in copy_to_user_page macro.

Implement flush_cache_page macro.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Do not use "la" pseudo instruction - use addik instead
Michal Simek [Tue, 1 Feb 2011 08:00:57 +0000 (09:00 +0100)]
microblaze: Do not use "la" pseudo instruction - use addik instead

"la" pseudo instruction is only translation to "addik".
Use directly "addik" which is described in the MB reference guide.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Remove r0_ram pointer and PTO alignment
Michal Simek [Mon, 31 Jan 2011 14:10:04 +0000 (15:10 +0100)]
microblaze: Remove r0_ram pointer and PTO alignment

r0_ram pool was used for saving/restoring register
content if hw exception happen. This poll was replaced by
pt_pool_space with PT_SIZE size.
Based on this change SAVE_STATE_ARG_SPACE was removed which
caused that PTO offset is zero that's why is also removed.

r0_ram space was used as scratchpad by v850. In early
Microblaze Linux developing phase was this part of code
blindly copied.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Do not use r0_ram space for syscall debugging
Michal Simek [Mon, 31 Jan 2011 14:04:43 +0000 (15:04 +0100)]
microblaze: Do not use r0_ram space for syscall debugging

Remove syscall counting space from r0_ram. Use special
syscall_debug_table pool for syscall statistic.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Optimize BE/LE bootup detecting
Michal Simek [Mon, 31 Jan 2011 13:57:26 +0000 (14:57 +0100)]
microblaze: Optimize BE/LE bootup detecting

Save 0x1 word to rodata section and remove online value
loading if DTB is passed from bootloader. It saves two
asm instructions in bootup.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Fix unaligned.h for endians
Michal Simek [Fri, 18 Feb 2011 13:29:20 +0000 (14:29 +0100)]
microblaze: Fix unaligned.h for endians

Synchronized with mips unaligned.h.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agomicroblaze: Do not use r0_ram space for hw exception debugging
Michal Simek [Mon, 31 Jan 2011 14:07:53 +0000 (15:07 +0100)]
microblaze: Do not use r0_ram space for hw exception debugging

Remove hw exception counting space from r0_ram. Use special
exception_debug_table poll for exception statistic.

Signed-off-by: Michal Simek <monstr@monstr.eu>
13 years agoLinux 2.6.38-rc8 v2.6.38-rc8
Linus Torvalds [Tue, 8 Mar 2011 05:09:37 +0000 (21:09 -0800)]
Linux 2.6.38-rc8

13 years agoMerge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Mar 2011 04:46:39 +0000 (20:46 -0800)]
Merge branch 's5p-fixes-for-linus' of git://git./linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410
  ARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410
  ARM: S3C64XX: Reduce output of s3c64xx_dma_init1()
  ARM: S3C64XX: Tone down SDHCI debugging
  ARM: S3C64XX: Add clock for i2c1
  ARM: S3C64XX: Staticise non-exported GPIO to interrupt functions
  ARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices
  ARM: S3C64XX: Fix keypad setup to configure correct number of rows
  ARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02
  ARM: S5P64X0: Fix number of GPIO lines in Bank F
  ARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02

13 years agoMerge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 8 Mar 2011 04:45:42 +0000 (20:45 -0800)]
Merge branch 'fixes' of /home/rmk/linux-2.6-arm

* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  davinci: cpufreq: fix section mismatch warning
  DaVinci: fix compilation warnings in <mach/clkdev.h>
  davinci: tnetv107x: fix register indexing for GPIOs numbers > 31
  davinci: da8xx/omap-l1x: add platform device for davinci-pcm-audio
  ARM: pxa/tosa: register wm9712 codec device
  ARM: pxa: enable pxa-pcm-audio on pxa210/pxa25x platform
  ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri platforms
  ARM: pxa/tosa: drop setting LED trigger name, as it's unsupported now
  ARM: 6762/1: Update number of VIC for S5P6442 and S5PC100
  ARM: 6761/1: Update number of VIC for S5PV210
  ARM: 6768/1: hw_breakpoint: ensure debug logic is powered up on v7 cores
  ARM: 6767/1: ptrace: fix register indexing in GETHBPREGS request
  ARM: 6765/1: remove obsolete comment from asm/mach/arch.h
  ARM: 6757/1: fix tlb.h induced linux/swap.h build failure

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Tue, 8 Mar 2011 04:45:12 +0000 (20:45 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: sdio: Allow sdio operations in other threads during sdio_add_func()

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Tue, 8 Mar 2011 04:43:55 +0000 (20:43 -0800)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: index i shadowed in 2nd loop
  drm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously
  drm/nouveau: fix regression causing ttm to not be able to evict vram
  drm/i915: Rebind the buffer if its alignment constraints changes with tiling
  drm/i915: Disable GPU semaphores by default
  drm/i915: Do not overflow the MMADDR write FIFO
  Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"

13 years agodrm: index i shadowed in 2nd loop
roel [Mon, 7 Mar 2011 17:00:34 +0000 (18:00 +0100)]
drm: index i shadowed in 2nd loop

Index i was already used in thhe first loop

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agommc: sdio: Allow sdio operations in other threads during sdio_add_func()
Dmitry Shmidt [Thu, 3 Mar 2011 22:40:10 +0000 (17:40 -0500)]
mmc: sdio: Allow sdio operations in other threads during sdio_add_func()

This fixes a bug introduced by 807e8e40673d ("mmc: Fix sd/sdio/mmc
initialization frequency retries") that prevented SDIO drivers from
performing SDIO commands in their probe routines -- the above patch
called mmc_claim_host() before sdio_add_func(), which causes a deadlock
if an external SDIO driver calls sdio_claim_host().

Fix tested on an OLPC XO-1.75 with libertas on SDIO.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Reviewed-and-Tested-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agoMerge remote branch 'ickle/drm-intel-fixes' into drm-fixes
Dave Airlie [Mon, 7 Mar 2011 21:18:35 +0000 (07:18 +1000)]
Merge remote branch 'ickle/drm-intel-fixes' into drm-fixes

* ickle/drm-intel-fixes:
  drm/i915: Rebind the buffer if its alignment constraints changes with tiling
  drm/i915: Disable GPU semaphores by default
  drm/i915: Do not overflow the MMADDR write FIFO
  Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"

13 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 7 Mar 2011 21:15:02 +0000 (13:15 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  omap: mailbox: resolve hang issue
  OMAP2+: PM: SmartReflex: fix memory leaks in Smartreflex driver
  arm: mach-omap2: smartreflex: fix another memory leak

13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Mon, 7 Mar 2011 21:14:19 +0000 (13:14 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] tape: deadlock on system work queue
  [S390] keyboard: integer underflow bug
  [S390] xpram: remove __initdata attribute from module parameters

13 years agodrm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously
Ben Skeggs [Mon, 7 Mar 2011 07:18:04 +0000 (17:18 +1000)]
drm/nv50-nvc0: prevent multiple vm/bar flushes occuring simultanenously

The per-vm mutex doesn't prevent this completely, a flush coming from the
BAR VM could potentially happen at the same time as one for the channel
VM.  Not to mention that if/when we get per-client/channel VM, this will
happen far more frequently.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/nouveau: fix regression causing ttm to not be able to evict vram
Ben Skeggs [Mon, 7 Mar 2011 07:18:03 +0000 (17:18 +1000)]
drm/nouveau: fix regression causing ttm to not be able to evict vram

TTM assumes an error condition from man->func->get_node() means that
something went horribly wrong, and causes it to bail.

The driver is supposed to return 0, and leave mm_node == NULL to
signal that it couldn't allocate any memory.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/i915: Rebind the buffer if its alignment constraints changes with tiling
Chris Wilson [Mon, 7 Mar 2011 10:42:03 +0000 (10:42 +0000)]
drm/i915: Rebind the buffer if its alignment constraints changes with tiling

Early gen3 and gen2 chipset do not have the relaxed per-surface tiling
constraints of the later chipsets, so we need to check that the GTT
alignment is correct for the new tiling. If it is not, we need to
rebind.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Disable GPU semaphores by default
Chris Wilson [Fri, 4 Mar 2011 18:48:03 +0000 (18:48 +0000)]
drm/i915: Disable GPU semaphores by default

Andi Kleen narrowed his GPU hangs on his Sugar Bay (SNB desktop) rev 09
down to the use of GPU semaphores, and we already know that they appear
broken up to Huron River (mobile) rev 08. (I'm optimistic that disabling
GPU semaphores is simply hiding another bug by the latency and
side-effects of the additional device interaction it introduces...)

However, use of semaphores is a massive performance improvement... Only
as long as the system remains stable. Enable at your peril.

Reported-by: Andi Kleen <andi-fd@firstfloor.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33921
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 6 Mar 2011 18:44:49 +0000 (10:44 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Don't set to D3 in Cirrus errata init verbs
  ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
  ASoC: WM8994: Ensure late enable events are processed for the ADCs
  ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
  ASoC: Fix WM9081 platform data initialisation
  ALSA: hda - Fix unable to record issue on ASUS N82JV
  ALSA: HDA: Realtek: Fixup jack detection to input subsystem

13 years agovirtio: console: Don't access vqs if device was unplugged
Amit Shah [Fri, 4 Mar 2011 03:34:33 +0000 (14:04 +1030)]
virtio: console: Don't access vqs if device was unplugged

If a virtio-console device gets unplugged while a port is open, a
subsequent close() call on the port accesses vqs to free up buffers.
This can lead to a crash.

The buffers are already freed up as a result of the call to
unplug_ports() from virtcons_remove().  The fix is to simply not access
vq information if port->portdev is NULL.

Reported-by: juzhang <juzhang@redhat.com>
CC: stable@kernel.org
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 6 Mar 2011 11:37:42 +0000 (12:37 +0100)]
Merge branch 'fix/asoc' into for-linus

13 years agodrm/i915: Do not overflow the MMADDR write FIFO
Chris Wilson [Fri, 4 Mar 2011 19:22:40 +0000 (19:22 +0000)]
drm/i915: Do not overflow the MMADDR write FIFO

Whilst the GT is powered down (rc6), writes to MMADDR are placed in a
FIFO by the System Agent. This is a limited resource, only 64 entries, of
which 20 are reserved for Display and PCH writes, and so we must take
care not to queue up too many writes. To avoid this, there is counter
which we can poll to ensure there are sufficient free entries in the
fifo.

"Issuing a write to a full FIFO is not supported; at worst it could
result in corruption or a system hang."

Reported-and-Tested-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34056
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoRevert "drm/i915: fix corruptions on i8xx due to relaxed fencing"
Chris Wilson [Sun, 6 Mar 2011 09:03:16 +0000 (09:03 +0000)]
Revert "drm/i915: fix corruptions on i8xx due to relaxed fencing"

This reverts commit c2e0eb167070a6e9dcb49c84c13c79a30d672431.

As it turns out, userspace already depends upon being able to enable
tiling on existing bo which it promises to be large enough for its
purposes i.e. it will not access beyond the end of the last full-tile
row.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35016
Reported-and-tested-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Sat, 5 Mar 2011 18:43:22 +0000 (10:43 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: no .snap inside of snapped namespace
  libceph: fix msgr standby handling
  libceph: fix msgr keepalive flag
  libceph: fix msgr backoff
  libceph: retry after authorization failure
  libceph: fix handling of short returns from get_user_pages
  ceph: do not clear I_COMPLETE from d_release
  ceph: do not set I_COMPLETE
  Revert "ceph: keep reference to parent inode on ceph_dentry"

13 years agomm: use correct numa policy node for transparent hugepages
Andi Kleen [Sat, 5 Mar 2011 01:36:32 +0000 (17:36 -0800)]
mm: use correct numa policy node for transparent hugepages

Pass down the correct node for a transparent hugepage allocation.  Most
callers continue to use the current node, however the hugepaged daemon
now uses the previous node of the first to be collapsed page instead.
This ensures that khugepaged does not mess up local memory for an
existing process which uses local policy.

The choice of node is somewhat primitive currently: it just uses the
node of the first page in the pmd range.  An alternative would be to
look at multiple pages and use the most popular node.  I used the
simplest variant for now which should work well enough for the case of
all pages being on the same node.

[akpm@linux-foundation.org: coding-style fixes]
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm: preserve original node for transparent huge page copies
Andi Kleen [Sat, 5 Mar 2011 01:36:31 +0000 (17:36 -0800)]
mm: preserve original node for transparent huge page copies

This makes a difference for LOCAL policy, where the node cannot be
determined from the policy itself, but has to be gotten from the original
page.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm: add alloc_page_vma_node()
Andi Kleen [Sat, 5 Mar 2011 01:36:30 +0000 (17:36 -0800)]
mm: add alloc_page_vma_node()

Add a alloc_page_vma_node that allows passing the "local" node in.  Used
in a followon patch.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm: change alloc_pages_vma to pass down the policy node for local policy
Andi Kleen [Sat, 5 Mar 2011 01:36:29 +0000 (17:36 -0800)]
mm: change alloc_pages_vma to pass down the policy node for local policy

Currently alloc_pages_vma() always uses the local node as policy node for
the LOCAL policy.  Pass this node down as an argument instead.

No behaviour change from this patch, but will be needed for followons.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoRapidIO: Update MAINTAINERS
Alexandre Bounine [Sat, 5 Mar 2011 01:36:28 +0000 (17:36 -0800)]
RapidIO: Update MAINTAINERS

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/video/backlight/ltv350qv.c: fix a memory leak
Axel Lin [Sat, 5 Mar 2011 01:36:27 +0000 (17:36 -0800)]
drivers/video/backlight/ltv350qv.c: fix a memory leak

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: add maintainer of Samsung Mobile Machine support
Kyungmin Park [Sat, 5 Mar 2011 01:36:26 +0000 (17:36 -0800)]
MAINTAINERS: add maintainer of Samsung Mobile Machine support

Add maintainer of Samsung Mobile machine support.  Currently, Aquila,
Goni, Universal (C210), and Nuri board are supported.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Joe Perches <joe@perches.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopps: make pps_gen_parport depend on BROKEN
Thomas Gleixner [Sat, 5 Mar 2011 01:36:23 +0000 (17:36 -0800)]
pps: make pps_gen_parport depend on BROKEN

This driver causes hard lockups, when the active clock soure is jiffies.

The reason is that it loops with interrupts disabled waiting for a
timestamp to be reached by polling getnstimeofday().  Though with a
jiffies clocksource, when that code runs on the same CPU which is
responsible for updating jiffies, then we loop in circles for ever
simply because the timer interrupt cannot update jiffies.  So both UP
and SMP can be affected.

There is no easy fix for that problem so make it depend on BROKEN for
now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/bmp085.c: add MODULE_DEVICE_TABLE
Axel Lin [Sat, 5 Mar 2011 01:36:22 +0000 (17:36 -0800)]
drivers/misc/bmp085.c: add MODULE_DEVICE_TABLE

The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Shubhrajyoti D <shubhrajyoti@ti.com>
Cc: Christoph Mair <christoph.mair@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocpuset: add a missing unlock in cpuset_write_resmask()
Li Zefan [Sat, 5 Mar 2011 01:36:21 +0000 (17:36 -0800)]
cpuset: add a missing unlock in cpuset_write_resmask()

Don't forget to release cgroup_mutex if alloc_trial_cpuset() fails.

[akpm@linux-foundation.org: avoid multiple return points]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/rtc/rtc-s3c.c: fix prototype for s3c_rtc_setaie()
Axel Lin [Sat, 5 Mar 2011 01:36:19 +0000 (17:36 -0800)]
drivers/rtc/rtc-s3c.c: fix prototype for s3c_rtc_setaie()

Fix s3c_rtc_setaie() prototype to eliminate the following compile
warning:

  drivers/rtc/rtc-s3c.c:383: warning: initialization from incompatible pointer type

(akpm: the rtc_class_ops.alarm_irq_enable() handler is being passed two
arguments where it expects just one, presumably with undesired effects)

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
Linus Torvalds [Sat, 5 Mar 2011 01:31:43 +0000 (17:31 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
  Blackfin: iflush: update anomaly 05000491 workaround
  Blackfin: outs[lwb]: make sure count is greater than 0

13 years agoMerge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 5 Mar 2011 01:31:19 +0000 (17:31 -0800)]
Merge branch 'rmobile-fixes-for-linus' of git://git./linux/kernel/git/lethal/sh-2.6

* 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  ARM: mach-shmobile: mackerel: modify LCDC clock divider value
  ARM: mach-shmobile: ap4evb: modify LCDC clock divider value
  ARM: mach-shmobile: mackerel: fixup memory initialize for zboot
  ARM: mach-shmobile: ap4evb: fixup memory initialize for zboot
  ARM: mach-shmobile: Add sh73a0 MIPI-CSI and CEU clocks
  ARM: mach-shmobile: AG5EVM MIPI-DSI LCD reset delay fix

13 years agoMerge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 5 Mar 2011 01:31:01 +0000 (17:31 -0800)]
Merge branch 'sh-fixes-for-linus' of git://git./linux/kernel/git/lethal/sh-2.6

* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Change __nosave_XXX symbols to long
  sh: Flush executable pages in copy_user_highpage
  sh: Ensure ST40-300 BogoMIPS value is consistent
  sh: sh7750: Fix incompatible pointer type
  sh: sh7750: move machtypes.h to include/generated

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Sat, 5 Mar 2011 01:30:32 +0000 (17:30 -0800)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/nouveau: allocate kernel's notifier object at end of block

13 years agonfs4: Ensure that ACL pages sent over NFS were not allocated from the slab (v3)
Neil Horman [Sat, 5 Mar 2011 00:26:03 +0000 (19:26 -0500)]
nfs4: Ensure that ACL pages sent over NFS were not allocated from the slab (v3)

The "bad_page()" page allocator sanity check was reported recently (call
chain as follows):

  bad_page+0x69/0x91
  free_hot_cold_page+0x81/0x144
  skb_release_data+0x5f/0x98
  __kfree_skb+0x11/0x1a
  tcp_ack+0x6a3/0x1868
  tcp_rcv_established+0x7a6/0x8b9
  tcp_v4_do_rcv+0x2a/0x2fa
  tcp_v4_rcv+0x9a2/0x9f6
  do_timer+0x2df/0x52c
  ip_local_deliver+0x19d/0x263
  ip_rcv+0x539/0x57c
  netif_receive_skb+0x470/0x49f
  :virtio_net:virtnet_poll+0x46b/0x5c5
  net_rx_action+0xac/0x1b3
  __do_softirq+0x89/0x133
  call_softirq+0x1c/0x28
  do_softirq+0x2c/0x7d
  do_IRQ+0xec/0xf5
  default_idle+0x0/0x50
  ret_from_intr+0x0/0xa
  default_idle+0x29/0x50
  cpu_idle+0x95/0xb8
  start_kernel+0x220/0x225
  _sinittext+0x22f/0x236

It occurs because an skb with a fraglist was freed from the tcp
retransmit queue when it was acked, but a page on that fraglist had
PG_Slab set (indicating it was allocated from the Slab allocator (which
means the free path above can't safely free it via put_page.

We tracked this back to an nfsv4 setacl operation, in which the nfs code
attempted to fill convert the passed in buffer to an array of pages in
__nfs4_proc_set_acl, which gets used by the skb->frags list in
xs_sendpages.  __nfs4_proc_set_acl just converts each page in the buffer
to a page struct via virt_to_page, but the vfs allocates the buffer via
kmalloc, meaning the PG_slab bit is set.  We can't create a buffer with
kmalloc and free it later in the tcp ack path with put_page, so we need
to either:

1) ensure that when we create the list of pages, no page struct has
   PG_Slab set

 or

2) not use a page list to send this data

Given that these buffers can be multiple pages and arbitrarily sized, I
think (1) is the right way to go.  I've written the below patch to
allocate a page from the buddy allocator directly and copy the data over
to it.  This ensures that we have a put_page free-able page for every
entry that winds up on an skb frag list, so it can be safely freed when
the frame is acked.  We do a put page on each entry after the
rpc_call_sync call so as to drop our own reference count to the page,
leaving only the ref count taken by tcp_sendpages.  This way the data
will be properly freed when the ack comes in

Successfully tested by myself to solve the above oops.

Note, as this is the result of a setacl operation that exceeded a page
of data, I think this amounts to a local DOS triggerable by an
uprivlidged user, so I'm CCing security on this as well.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
CC: security@kernel.org
CC: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoceph: no .snap inside of snapped namespace
Sage Weil [Thu, 3 Mar 2011 21:44:35 +0000 (13:44 -0800)]
ceph: no .snap inside of snapped namespace

Otherwise you can do things like

# mkdir .snap/foo
# cd .snap/foo/.snap
# ls
<badness>

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibceph: fix msgr standby handling
Sage Weil [Fri, 4 Mar 2011 20:25:05 +0000 (12:25 -0800)]
libceph: fix msgr standby handling

The standby logic used to be pretty dependent on the work requeueing
behavior that changed when we switched to WQ_NON_REENTRANT.  It was also
very fragile.

Restructure things so that:
 - We clear WRITE_PENDING when we set STANDBY.  This ensures we will
   requeue work when we wake up later.
 - con_work backs off if STANDBY is set.  There is nothing to do if we are
   in standby.
 - clear_standby() helper is called by both con_send() and con_keepalive(),
   the two actions that can wake us up again.  Move the connect_seq++
   logic here.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibceph: fix msgr keepalive flag
Sage Weil [Thu, 3 Mar 2011 18:10:15 +0000 (10:10 -0800)]
libceph: fix msgr keepalive flag

There was some broken keepalive code using a dead variable.  Shift to using
the proper bit flag.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibceph: fix msgr backoff
Sage Weil [Fri, 4 Mar 2011 20:24:28 +0000 (12:24 -0800)]
libceph: fix msgr backoff

With commit f363e45f we replaced a bunch of hacky workqueue mutual
exclusion logic with the WQ_NON_REENTRANT flag.  One pieces of fallout is
that the exponential backoff breaks in certain cases:

 * con_work attempts to connect.
 * we get an immediate failure, and the socket state change handler queues
   immediate work.
 * con_work calls con_fault, we decide to back off, but can't queue delayed
   work.

In this case, we add a BACKOFF bit to make con_work reschedule delayed work
next time it runs (which should be immediately).

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMAINTAINERS: Update shaggy's email address
Dave Kleikamp [Fri, 4 Mar 2011 16:13:47 +0000 (10:13 -0600)]
MAINTAINERS: Update shaggy's email address

Signed-off-by: Dave Kleikamp <shaggy@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMark ptrace_{traceme,attach,detach} static
Linus Torvalds [Fri, 4 Mar 2011 17:23:30 +0000 (09:23 -0800)]
Mark ptrace_{traceme,attach,detach} static

They are only used inside kernel/ptrace.c, and have been for a long
time.  We don't want to go back to the bad-old-days when architectures
did things on their own, so make them static and private.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410
Mark Brown [Thu, 3 Mar 2011 23:24:15 +0000 (08:24 +0900)]
ARM: S3C64XX: Update regulator names for debugfs compatiblity on SMDK6410

The debugfs support added to the regulator API (which has been merged
in during this merge window) creates directories for regulators named
after the display names for the regulators so replace / as a separator
for multiple supplies with + in the SMDK6410 machine.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410
Mark Brown [Thu, 3 Mar 2011 22:59:20 +0000 (07:59 +0900)]
ARM: S3C64XX: Fix build with WM1190 disabled and WM1192 enabled on SMDK6410

Avoid relying on implicit inclusion of machine.h

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Reduce output of s3c64xx_dma_init1()
Ben Dooks [Thu, 3 Mar 2011 22:55:44 +0000 (07:55 +0900)]
ARM: S3C64XX: Reduce output of s3c64xx_dma_init1()

Reduce the logging output of s3c64xx_dma_init1() as it is not useful
for normal bootup (and we get an overall indication of the registration
of the PL180 DMA block).

This removes the following output from the log:

s3c64xx_dma_init1: registering DMA 0 (e0808100)
s3c64xx_dma_init1: registering DMA 1 (e0808120)
s3c64xx_dma_init1: registering DMA 2 (e0808140)
s3c64xx_dma_init1: registering DMA 3 (e0808160)
s3c64xx_dma_init1: registering DMA 4 (e0808180)
s3c64xx_dma_init1: registering DMA 5 (e08081a0)
s3c64xx_dma_init1: registering DMA 6 (e08081c0)
s3c64xx_dma_init1: registering DMA 7 (e08081e0)

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Tone down SDHCI debugging
Mark Brown [Thu, 3 Mar 2011 22:55:44 +0000 (07:55 +0900)]
ARM: S3C64XX: Tone down SDHCI debugging

The MMC core calls s3c6400_setup_sdhcp_cfg_card() very frequently, causing
the log message in there at KERN_INFO to be displayed a lot which is slow
and overly chatty. Convert the message into a pr_debug() to tone this down.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Add clock for i2c1
Ben Dooks [Thu, 3 Mar 2011 22:55:44 +0000 (07:55 +0900)]
ARM: S3C64XX: Add clock for i2c1

The clock for i2c1 has been missing for a while, add it to the list of
clocks for the system and ensure it is initialised at startup.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Staticise non-exported GPIO to interrupt functions
Mark Brown [Thu, 3 Mar 2011 22:55:44 +0000 (07:55 +0900)]
ARM: S3C64XX: Staticise non-exported GPIO to interrupt functions

No need to put these in the global namespace and sparse gets upset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices
Mark Brown [Thu, 3 Mar 2011 22:55:44 +0000 (07:55 +0900)]
ARM: SAMSUNG: Include devs.h in dev-uart.c to prototype devices

Ensures that the declaration agrees with the definition and makes sparse
happy.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C64XX: Fix keypad setup to configure correct number of rows
Ben Dooks [Wed, 2 Mar 2011 06:19:15 +0000 (15:19 +0900)]
ARM: S3C64XX: Fix keypad setup to configure correct number of rows

The call to s3c_gpio_cfgrange_nopull() takes a size and base
but this looks like it is trying to do base and end. This means
it is configuring too many GPIOs and on the case of the Cragganmore
means we're seeing an overflow of the ROW pins causing problems
with the keyboard driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02
Lars-Peter Clausen [Mon, 28 Feb 2011 11:20:53 +0000 (20:20 +0900)]
ARM: S3C2440: Fix usage gpio bank j pin definitions on GTA02

The gta02 header file still uses the old S3C2410_GPJx defines instead of the
S3C2410_GPJ(x) macro. Since the S3C2410_GPJx defines have already been removed
this causes the following build failure:

sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_set_spk':
sound/soc/samsung/neo1973_wm8753.c:259: error: 'S3C2440_GPJ2' undeclared (first use in this function)
sound/soc/samsung/neo1973_wm8753.c:259: error: (Each undeclared identifier is reported only once
sound/soc/samsung/neo1973_wm8753.c:259: error: for each function it appears in.)
sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_get_spk':
sound/soc/samsung/neo1973_wm8753.c:267: error: 'S3C2440_GPJ2' undeclared (first use in this function)
sound/soc/samsung/neo1973_wm8753.c: In function 'lm4853_event':
sound/soc/samsung/neo1973_wm8753.c:276: error: 'S3C2440_GPJ1' undeclared (first use in this function)
sound/soc/samsung/neo1973_wm8753.c: At top level:
sound/soc/samsung/neo1973_wm8753.c:439: error: 'S3C2440_GPJ2' undeclared here (not in a function)
sound/soc/samsung/neo1973_wm8753.c:440: error: 'S3C2440_GPJ1' undeclared here (not in a function)

This patches fixes the issue by doing a s,S3C2410_GPJ([\d]+),S3C2410_GPJ(\1),g
on the file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S5P64X0: Fix number of GPIO lines in Bank F
Banajit Goswami [Mon, 28 Feb 2011 07:53:36 +0000 (16:53 +0900)]
ARM: S5P64X0: Fix number of GPIO lines in Bank F

This patch modifies the number of total GPIO lines for Bank F
for Samsung S5P6440 and S5P6450 SoCs from 2 to 16.
This is necessary as the GPIO lines from 0 to 13 are reserved
and only lines 14 and 15 are used. As during initialization,
the line number starts at 0, putting 2 does not solve the
intended purpose.

Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02
Lars-Peter Clausen [Mon, 28 Feb 2011 06:03:46 +0000 (15:03 +0900)]
ARM: S3C2440: Select missing S3C_DEV_USB_HOST on GTA02

The gta02 mach file references the ohci device.
So we need to select S3C_DEV_USB_HOST to have the device available.

This fixes the following linker errors:
arch/arm/mach-s3c2440/built-in.o: In function 'gta02_machine_init':
mach-gta02.c:(.init.text+0x370): undefined reference to 's3c_ohci_set_platdata'
arch/arm/mach-s3c2440/built-in.o:(.init.data+0xac): undefined reference to 's3c_device_ohci'

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoBlackfin: iflush: update anomaly 05000491 workaround
Mike Frysinger [Wed, 2 Feb 2011 01:55:22 +0000 (01:55 +0000)]
Blackfin: iflush: update anomaly 05000491 workaround

Recent feedback from design says we need three NOPs in the hardware loop.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: outs[lwb]: make sure count is greater than 0
Mike Frysinger [Wed, 26 Jan 2011 18:10:44 +0000 (18:10 +0000)]
Blackfin: outs[lwb]: make sure count is greater than 0

Some devices will use the outs* funcs with a length of zero, so make sure
we do not write any data in that case.

Reported-by: Gilbert Inho <gneny@edevice.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoARM: mach-shmobile: mackerel: modify LCDC clock divider value
Kuninori Morimoto [Wed, 2 Mar 2011 09:05:21 +0000 (09:05 +0000)]
ARM: mach-shmobile: mackerel: modify LCDC clock divider value

mackerel WVGA LCDC panel expect 33.3MHz for dot-clock,
but current dot-clock was 50.0MHz.
This patch modify clock divider value.

Signed-off-by: Makoto Ueda <makoto.ueda.ub@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: ap4evb: modify LCDC clock divider value
Kuninori Morimoto [Wed, 2 Mar 2011 09:05:44 +0000 (09:05 +0000)]
ARM: mach-shmobile: ap4evb: modify LCDC clock divider value

ap4evb WVGA LCDC panel expect 33.3MHz for dot-clock,
but current dot-clock was 50.0MHz.
This patch modify clock divider value.

Signed-off-by: Makoto Ueda <makoto.ueda.ub@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agodrm/nouveau: allocate kernel's notifier object at end of block
Ben Skeggs [Thu, 3 Mar 2011 23:58:36 +0000 (09:58 +1000)]
drm/nouveau: allocate kernel's notifier object at end of block

The nv30/nv40 3d driver is about to start using DMA_FENCE from the 3D
object which, it turns out, doesn't like its DMA object to not be
aligned to a 4KiB boundary.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 3 Mar 2011 23:48:01 +0000 (15:48 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  DNS: Fix a NULL pointer deref when trying to read an error key [CVE-2011-1076]

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 3 Mar 2011 23:43:15 +0000 (15:43 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  MAINTAINERS: Add Andy Gospodarek as co-maintainer.
  r8169: disable ASPM
  RxRPC: Fix v1 keys
  AF_RXRPC: Handle receiving ACKALL packets
  cnic: Fix lost interrupt on bnx2x
  cnic: Prevent status block race conditions with hardware
  net: dcbnl: check correct ops in dcbnl_ieee_set()
  e1000e: disable broken PHY wakeup for ICH10 LOMs, use MAC wakeup instead
  igb: fix sparse warning
  e1000: fix sparse warning
  netfilter: nf_log: avoid oops in (un)bind with invalid nfproto values
  dccp: fix oops on Reset after close
  ipvs: fix dst_lock locking on dest update
  davinci_emac: Add Carrier Link OK check in Davinci RX Handler
  bnx2x: update driver version to 1.62.00-6
  bnx2x: properly calculate lro_mss
  bnx2x: perform statistics "action" before state transition.
  bnx2x: properly configure coefficients for MinBW algorithm (NPAR mode).
  bnx2x: Fix ethtool -t link test for MF (non-pmf) devices.
  bnx2x: Fix nvram test for single port devices.
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 3 Mar 2011 23:42:35 +0000 (15:42 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: kill loop_mutex
  blktrace: Remove blk_fill_rwbs_rq.
  block: blk-flush shouldn't call directly into q->request_fn() __blk_run_queue()
  block: add @force_kblockd to __blk_run_queue()
  block: fix kernel-doc format for blkdev_issue_zeroout
  blk-throttle: Do not use kblockd workqueue for throtl work

13 years agoMerge branch 'i_nlink' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Thu, 3 Mar 2011 23:37:59 +0000 (15:37 -0800)]
Merge branch 'i_nlink' of git://git./linux/kernel/git/viro/vfs-2.6

* 'i_nlink' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  hfs: fix rename() over non-empty directory
  udf: fix i_nlink limit
  fix reiserfs mkdir() breakage
  exofs: i_nlink races in rename()
  nilfs2: i_nlink races in rename()
  minix: i_nlink races in rename()
  ufs: i_nlink races in rename()
  sysv: i_nlink races in rename()

13 years agoDNS: Fix a NULL pointer deref when trying to read an error key [CVE-2011-1076]
David Howells [Thu, 3 Mar 2011 11:28:58 +0000 (11:28 +0000)]
DNS: Fix a NULL pointer deref when trying to read an error key [CVE-2011-1076]

When a DNS resolver key is instantiated with an error indication, attempts to
read that key will result in an oops because user_read() is expecting there to
be a payload - and there isn't one [CVE-2011-1076].

Give the DNS resolver key its own read handler that returns the error cached in
key->type_data.x[0] as an error rather than crashing.

Also make the kenter() at the beginning of dns_resolver_instantiate() limit the
amount of data it prints, since the data is not necessarily NUL-terminated.

The buggy code was added in:

commit 4a2d789267e00b5a1175ecd2ddefcc78b83fbf09
Author: Wang Lei <wang840925@gmail.com>
Date:   Wed Aug 11 09:37:58 2010 +0100
Subject: DNS: If the DNS server returns an error, allow that to be cached [ver #2]

This can trivially be reproduced by any user with the following program
compiled with -lkeyutils:

#include <stdlib.h>
#include <keyutils.h>
#include <err.h>
static char payload[] = "#dnserror=6";
int main()
{
key_serial_t key;
key = add_key("dns_resolver", "a", payload, sizeof(payload),
      KEY_SPEC_SESSION_KEYRING);
if (key == -1)
err(1, "add_key");
if (keyctl_read(key, NULL, 0) == -1)
err(1, "read_key");
return 0;
}

What should happen is that keyctl_read() reports error 6 (ENXIO) to the user:

dns-break: read_key: No such device or address

but instead the kernel oopses.

This cannot be reproduced with the 'keyutils add' or 'keyutils padd' commands
as both of those cut the data down below the NUL termination that must be
included in the data.  Without this dns_resolver_instantiate() will return
-EINVAL and the key will not be instantiated such that it can be read.

The oops looks like:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: [<ffffffff811b99f7>] user_read+0x4f/0x8f
PGD 3bdf8067 PUD 385b9067 PMD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:19.0/irq
CPU 0
Modules linked in:

Pid: 2150, comm: dns-break Not tainted 2.6.38-rc7-cachefs+ #468                  /DG965RY
RIP: 0010:[<ffffffff811b99f7>]  [<ffffffff811b99f7>] user_read+0x4f/0x8f
RSP: 0018:ffff88003bf47f08  EFLAGS: 00010246
RAX: 0000000000000001 RBX: ffff88003b5ea378 RCX: ffffffff81972368
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88003b5ea378
RBP: ffff88003bf47f28 R08: ffff88003be56620 R09: 0000000000000000
R10: 0000000000000395 R11: 0000000000000002 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffffffffa1
FS:  00007feab5751700(0000) GS:ffff88003e000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000010 CR3: 000000003de40000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process dns-break (pid: 2150, threadinfo ffff88003bf46000, task ffff88003be56090)
Stack:
 ffff88003b5ea378 ffff88003b5ea3a0 0000000000000000 0000000000000000
 ffff88003bf47f68 ffffffff811b708e ffff88003c442bc8 0000000000000000
 00000000004005a0 00007fffba368060 0000000000000000 0000000000000000
Call Trace:
 [<ffffffff811b708e>] keyctl_read_key+0xac/0xcf
 [<ffffffff811b7c07>] sys_keyctl+0x75/0xb6
 [<ffffffff81001f7b>] system_call_fastpath+0x16/0x1b
Code: 75 1f 48 83 7b 28 00 75 18 c6 05 58 2b fb 00 01 be bb 00 00 00 48 c7 c7 76 1c 75 81 e8 13 c2 e9 ff 4c 8b b3 e0 00 00 00 4d 85 ed <41> 0f b7 5e 10 74 2d 4d 85 e4 74 28 e8 98 79 ee ff 49 39 dd 48
RIP  [<ffffffff811b99f7>] user_read+0x4f/0x8f
 RSP <ffff88003bf47f08>
CR2: 0000000000000010

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
cc: Wang Lei <wang840925@gmail.com>
Signed-off-by: James Morris <jmorris@namei.org>
13 years agolibceph: retry after authorization failure
Sage Weil [Thu, 3 Mar 2011 20:14:53 +0000 (12:14 -0800)]
libceph: retry after authorization failure

If we mark the connection CLOSED we will give up trying to reconnect to
this server instance.  That is appropriate for things like a protocol
version mismatch that won't change until the server is restarted, at which
point we'll get a new addr and reconnect.  An authorization failure like
this is probably due to the server not properly rotating it's secret keys,
however, and should be treated as transient so that the normal backoff and
retry behavior kicks in.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibceph: fix handling of short returns from get_user_pages
Sage Weil [Thu, 3 Mar 2011 00:55:21 +0000 (16:55 -0800)]
libceph: fix handling of short returns from get_user_pages

get_user_pages() can return fewer pages than we ask for.  We were returning
a bogus pointer/error code in that case.  Instead, loop until we get all
the pages we want or get an error we can return to the caller.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMAINTAINERS: Add Andy Gospodarek as co-maintainer.
Jay Vosburgh [Thu, 3 Mar 2011 10:43:10 +0000 (10:43 +0000)]
MAINTAINERS: Add Andy Gospodarek as co-maintainer.

Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 3 Mar 2011 20:44:22 +0000 (12:44 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: zero proper structure size for geometry calls

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Thu, 3 Mar 2011 20:42:48 +0000 (12:42 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix regression that i-flag is not set on changeless checkpoints