pandora-kernel.git
14 years agosh: fix CPU_SH7723/7724 numbering bug
Kuninori Morimoto [Wed, 26 Aug 2009 10:49:44 +0000 (10:49 +0000)]
sh: fix CPU_SH7723/7724 numbering bug

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix an off-by-1 in FTRACE_SYSCALL_MAX.
Paul Mundt [Tue, 25 Aug 2009 09:39:33 +0000 (18:39 +0900)]
sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX.

This is supposed to be the equivalent of __NR_syscalls, not
__NR_syscalls -1. The x86 code this was based on had simply fallen
out of sync at the time this was implemented. Fix it up now.

As a result, tracing of __NR_perf_counter_open works as advertised.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'sh/st-integration'
Paul Mundt [Mon, 24 Aug 2009 13:49:17 +0000 (22:49 +0900)]
Merge branch 'sh/st-integration'

14 years agosh: Move the FTRACE_SYSCALL_MAX definition in to asm/ftrace.h.
Paul Mundt [Mon, 24 Aug 2009 13:48:27 +0000 (22:48 +0900)]
sh: Move the FTRACE_SYSCALL_MAX definition in to asm/ftrace.h.

Needed by ftrace changes in -tip.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: gadget: m66592-udc needs linux/err.h.
Paul Mundt [Mon, 24 Aug 2009 13:45:15 +0000 (22:45 +0900)]
usb: gadget: m66592-udc needs linux/err.h.

In certain configurations linux/err.h is not included through alternate
means, resulting in:

drivers/usb/gadget/m66592-udc.c:1646: error: implicit declaration of function 'IS_ERR'
drivers/usb/gadget/m66592-udc.c:1649: error: implicit declaration of function 'PTR_ERR'
distcc[15083] ERROR: compile drivers/usb/gadget/m66592-udc.c on localhost failed
make[3]: *** [drivers/usb/gadget/m66592-udc.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Caught with an ARM config in -next.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Simplify "multi-evt" interrupt handling.
Pawel Moll [Mon, 24 Aug 2009 10:52:38 +0000 (19:52 +0900)]
sh: Simplify "multi-evt" interrupt handling.

This patch changes the way in which "multi-evt" interrups are handled.
The intc_evt2irq_table and related intc_evt2irq() have been removed and
the "redirecting" handler is installed for the coupled interrupts.

Thanks to that the do_IRQ() function don't have to use another level
of indirection for all the interrupts...

Signed-off-by: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: fix sys_cacheflush error checking
Giuseppe Cavallaro [Mon, 24 Aug 2009 09:59:09 +0000 (18:59 +0900)]
sh: fix sys_cacheflush error checking

sys_cacheflush should return with EINVAL if the cache parameter is not
one of ICACHE, DCACHE or BCACHE.
So, we need to include 0 in the first check.

It also adds the three definitions above as wrapper of the existent macros.

PS: ltp cacheflush01 test now passes.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix problems with cache flushing when cache is in write-through mode
Stuart Menefy [Mon, 24 Aug 2009 09:39:39 +0000 (18:39 +0900)]
sh: Fix problems with cache flushing when cache is in write-through mode

Change the method used to flush the cache in write-through mode to
avoid corrupted data being written back to memory.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix overzealous checking in __ioremap()
Stuart Menefy [Mon, 24 Aug 2009 09:29:25 +0000 (18:29 +0900)]
sh: Fix overzealous checking in __ioremap()

Allow peripherals before the start of RAM to be remapped.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fixes some write posting issues in the interrupt handling for SH
Stuart Menefy [Mon, 24 Aug 2009 09:27:33 +0000 (18:27 +0900)]
sh: Fixes some write posting issues in the interrupt handling for SH

It is possible for the CPU to re-enable it's interrupt block bit
before the write to the interrupt controller has actually masked out
the external interupt at the controller. We get around this by
reading back from the interrupt controller which will ensure the
write has happened.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix underflow in SH udelay() code.
Stuart Menefy [Mon, 24 Aug 2009 09:18:50 +0000 (18:18 +0900)]
sh: Fix underflow in SH udelay() code.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Add sys_cacheflush() call for SH CPUs.
Stuart Menefy [Mon, 24 Aug 2009 09:16:56 +0000 (18:16 +0900)]
sh: Add sys_cacheflush() call for SH CPUs.

Adds a system call to allow user code to flush code from the cache.
You can use instructions for the data side, but the iside can
only be done by a flush ROM which really only works with a direct
mapped cache. The later SH4's have 2 way Iside, so this call allows
a portable way to flush the cache.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Improve comments int SH4 cache flushing code
Stuart Menefy [Mon, 24 Aug 2009 08:36:24 +0000 (17:36 +0900)]
sh: Improve comments int SH4 cache flushing code

This is a pure documentation, to try to explain why the cache flushing code
for the SH4 is implemented the way it is.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Optimise memcpy_to/fromio for SH4
Stuart Menefy [Mon, 24 Aug 2009 08:35:07 +0000 (17:35 +0900)]
sh: Optimise memcpy_to/fromio for SH4

Optimise memcpy_to/fromio. This is used extensivly by MTD, so is a
worthwhile performance gain. The main savings come from not repeatedly
calling readl/writel, and doing word instead of byte at a time
transfers. Also using "movca.l" on SH4 gives a small performance win.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: generic_in/outs{bwl} optimizations.
Stuart Menefy [Mon, 24 Aug 2009 08:26:39 +0000 (17:26 +0900)]
sh: generic_in/outs{bwl} optimizations.

After performing the port2addr conversion, and checking that the data is
correctly aligned, simply call __raw_readsX/writesX. These have already been
optimised.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Read from CCN_PVR instead of ROM for delay.
Stuart Menefy [Mon, 24 Aug 2009 08:13:52 +0000 (17:13 +0900)]
sh: Read from CCN_PVR instead of ROM for delay.

Reading from the ROM is not a good idea as it could disturb some
flash operation that it is in progress.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Remove implicit sign extension from assembler immediates
Stuart Menefy [Mon, 24 Aug 2009 08:09:53 +0000 (17:09 +0900)]
sh: Remove implicit sign extension from assembler immediates

The SH instruction set has several instructions which accept an 8 bit
immediate operand. For logical instructions this operand is zero extended,
for arithmetic instructions the operand is sign extended. After adding an
option to the assembler to check this, it was found that several pieces
of assembly code were assuming this behaviour, and in one case
getting it wrong.

So this patch explicitly sign extends any immediate operands, which makes
it obvious what is happening, and fixes the one case which got it wrong.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Allow for kernel command line concatenation.
Pawel Moll [Mon, 24 Aug 2009 07:25:38 +0000 (16:25 +0900)]
sh: Allow for kernel command line concatenation.

So far kernel command line arguments could be passed in by a bootloader
or defined as CONFIG_CMDLINE, which completely overwriting the first one.

This change allows a developer to declare selected kernel parameters in
a kernel configuration (eg. project-specific defconfig), retaining
possibility of passing others by a bootloader.

The obvious examples of the first type are MTD partition or
bigphysarea-like region definitions, while "debug" option or network
configuration should be given by a bootloader or a JTAG boot script.

Signed-off-by: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Use internal watchdog timer to perform reset
Jon Frosdick [Mon, 24 Aug 2009 07:20:44 +0000 (16:20 +0900)]
sh: Use internal watchdog timer to perform reset

This patches will trigger a reboot using the watchdog
timer instead of double fault.  Unlike the previous
method, this one actually works in 32 bit mode.

Reset should also be cleaner.

Signed-off-by: Jon Frosdick <jon.frosdick@st.com>
Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: kgdb: do not reload VBR while handling debugger breackpoint
Giuseppe Cavallaro [Mon, 24 Aug 2009 07:14:03 +0000 (16:14 +0900)]
sh: kgdb: do not reload VBR while handling debugger breackpoint

Save the VBR allowing GDB to dump full registers set but do not reload it
as soon as the kgdb_handle_exception is invoked.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Allow use of GENERIC_IOMAP
David McKay [Mon, 24 Aug 2009 07:10:40 +0000 (16:10 +0900)]
sh: Allow use of GENERIC_IOMAP

The synopsys PCI cell used in the later STMicro chips requires code to
be run in order to do IO cycles, rather than just memory mapping the IO
space. Rather than extending the existing SH infrastructure to allow
this, use the GENERIC_IOMAP implmentation to save re-inventing the
wheel.

This set of changes allows the SH to be built with GENERIC_IOMAP
enabled, it just ifdef's out the functions provided by the GENERIC_IOMAP
implementation, and provides a few required missing functions.

Signed-off-by: David McKay <david.mckay@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Improve unwind info for signals
Carl Shaw [Mon, 24 Aug 2009 06:07:08 +0000 (15:07 +0900)]
sh: Improve unwind info for signals

GCC does not issue unwind information for function epilogues.
Unfortunately we can catch a signal during an epilogue.  The signal
handler writes the current context and signal return code onto the stack
overwriting previous contents.  During unwinding, libgcc can try to
restore registers from the stack and restores corrupted ones. This can
lead to segmentation, misaligned access and sigbus faults.

For example, consider the following code:

    mov.l   r12,@-r15
    mov.l   r14,@-r15
    sts.l   pr,@-r15
    mov     r15,r14

    <do stuff>

    mov r14, r15
    lds.l @r15+, pr
<<< SIGNAL HERE
    mov.l @r15+, r14
    mov.l @r15+, r12
    rts

Unwind is aware that pr was pushed to stack in prolog, so tries to
restore it.  Unfortunately it restores the last word of the signal
handler code placed on the stack by the kernel.

This patch tries to avoid the problem by adding a guard region on the
stack between where the function pushes data and where the signal handler
pushes its return code.  We probably don't see this problem often because
exception handling unwinding in an epilogue only occurs due to a pthread
cancel signal.  Also the kernel signal stack handler alignment of 8 bytes
could hide the occurance of this problem sometimes as the stack may not
be trampled at a particular required word.

This is not guaranteed to always work.  It relies on a frame pointer
existing for the function (so it can get the correct sp value) which is
not always the case for the SH4.

Modifications will also be made to libgcc for the case where there is no
fp.

Signed-off-by: Carl Shaw <carl.shaw@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: cleanup of do_address_error()
Andre Draszik [Mon, 24 Aug 2009 06:01:10 +0000 (15:01 +0900)]
sh: cleanup of do_address_error()

This patch fixes a few problems with the existing code in do_address_error().

a) the variable used to printk()d the offending instruction wasn't
   initialized correctly. This is a fix to bug 5727

b) behaviour for CONFIG_CPU_SH2A wasn't correct

c) the 'ignore address error' behaviour didn't update the PC, causing an
   infinite loop.

Signed-off-by: Andre Draszik <andre.draszik@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Allow user control over misaligned fixup handling
Andre Draszik [Mon, 24 Aug 2009 05:53:46 +0000 (14:53 +0900)]
sh: Allow user control over misaligned fixup handling

This patch brings the SH4 misaligned trap handler in line with what
happens on ARM:
Add a /proc/cpu/alignment which can be read from to get alignment
trap statistics and written to to influence the behaviour of the
alignment trap handling. The value to write is a bitfield, which
has the following meaning: 1 warn, 2 fixup, 4 signal
In addition, we add a /proc/cpu/kernel_alignment, to enable or
disable warnings in case of kernel code causing alignment errors.

Signed-off by: Andre Draszik <andre.draszik@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: ratelimit unaligned fixups
Andre Draszik [Mon, 24 Aug 2009 05:38:27 +0000 (14:38 +0900)]
sh: ratelimit unaligned fixups

This patch makes sure we see messages about unaligned access fixups
every now and then. Else especially userspace apps suffering from
bad programming won't ever be noticed...

Signed-off by: Andre Draszik <andre.draszik@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branches 'sh/hwblk' and 'sh/pm-runtime'
Paul Mundt [Sun, 23 Aug 2009 09:04:07 +0000 (18:04 +0900)]
Merge branches 'sh/hwblk' and 'sh/pm-runtime'

14 years agosh: drop static UIO clocks for sh7722, sh7723 and sh7724
Magnus Damm [Wed, 19 Aug 2009 10:39:05 +0000 (10:39 +0000)]
sh: drop static UIO clocks for sh7722, sh7723 and sh7724

The Runtime PM patch for UIO driver implements coarse grained
dynamic power management for UIO devices. With that patch in
place we can get rid of the static clock configuration. Which
in turn makes it possible for cpuidle to enter deeper sleep.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: let ARCH_SHMOBILE select PM and PM_RUNTIME
Magnus Damm [Wed, 19 Aug 2009 10:31:53 +0000 (10:31 +0000)]
sh: let ARCH_SHMOBILE select PM and PM_RUNTIME

With the Runtime PM driver changes in place, we must have
Runtime PM support in place. Otherwise there is no way to
enable clocks to the Runtime PM enabled hardware blocks.
This patch makes Runtime PM mandatory on SuperH Mobile.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix section mismatch in platform bus notifier.
Paul Mundt [Tue, 18 Aug 2009 01:41:06 +0000 (10:41 +0900)]
sh: Fix section mismatch in platform bus notifier.

The runtime PM for SH-Mobile code had platform_bus_notify() as __devinit,
which is rather bogus. Kill off the annotation, which subsequently
silences the section mismatch warnings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agouio: Runtime PM for UIO devices
Magnus Damm [Fri, 14 Aug 2009 10:49:38 +0000 (10:49 +0000)]
uio: Runtime PM for UIO devices

This patch modifies the uio_pdrv_genirq driver to support
Runtime PM. The power management implementation simply
runtime resumes the device at open() time and runtime
suspends it at release() time. The user space driver is
responsible for re-initializing the hardware after open().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agov4l2: Runtime PM for SuperH Mobile CEU
Magnus Damm [Fri, 14 Aug 2009 10:49:17 +0000 (10:49 +0000)]
v4l2: Runtime PM for SuperH Mobile CEU

This patch modifies the SuperH Mobile CEU driver to support
Runtime PM. Driver callbacks for Runtime PM are empty because
the device registers are always re-initialized after
pm_runtime_get_sync(). The Runtime PM functions replaces the
clock framework module stop bit handling in this driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agovideo: Runtime PM for SuperH Mobile LCDC
Magnus Damm [Fri, 14 Aug 2009 10:49:08 +0000 (10:49 +0000)]
video: Runtime PM for SuperH Mobile LCDC

This patch modifies the SuperH Mobile LCDC framebuffer driver
to support Runtime PM. The driver is using the functions

 - pm_runtime_get_sync()
 - pm_runtime_put_sync()

to inform the bus code if the hardware is idle or not. If the
hardware is idle then the bus code may call the runtime dev_pm_ops
callbacks to save and restore state. pm_runtime_resume() is used
to allow the driver to access the hardware from probe().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoi2c: Runtime PM for SuperH Mobile I2C
Magnus Damm [Fri, 14 Aug 2009 10:48:59 +0000 (10:48 +0000)]
i2c: Runtime PM for SuperH Mobile I2C

This patch modifies the SuperH Mobile I2C driver to support
Runtime PM. These changes is all that is needed for proper
Runtime PM support in this driver. Driver callbacks for
Runtime PM are empty because the device registers are always
re-initialized after pm_runtime_get_sync().

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Runtime PM for SuperH Mobile platform bus devices
Magnus Damm [Fri, 14 Aug 2009 10:48:16 +0000 (10:48 +0000)]
sh: Runtime PM for SuperH Mobile platform bus devices

This patch is V3 of the SuperH Mobile Runtime PM platform bus
implentation matching Rafael's Runtime PM v16.

The code gets invoked from the SuperH specific Runtime PM
platform bus functions that override the weak symbols for:
 - platform_pm_runtime_suspend()
 - platform_pm_runtime_resume()
 - platform_pm_runtime_idle()

This Runtime PM implementation performs two levels of power
management. At the time of platform bus runtime suspend the
clock to the device is stopped instantly. Later on if all
devices within the power domain has their clocks stopped
then the device driver ->runtime_suspend() callbacks are
used to save hardware register state for each device.

Device driver ->runtime_suspend() calls are scheduled from
cpuidle context using platform_pm_runtime_suspend_idle().
When all devices have been fully suspended the processor
is allowed to enter deep sleep from cpuidle.

The runtime resume operation turns on clocks and also
restores registers if needed. It is worth noting that the
devices start in a suspended state and the device driver
is responsible for calling runtime resume before accessing
the actual hardware.

In this particular platform bus implementation runtime
resume is not allowed from interrupt context. Runtime
suspend is however allowed from interrupt context as
long as the synchronous functions are avoided.

[ updated for v17 -- PFM. ]

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'sh/hwblk' into sh/pm-runtime
Paul Mundt [Sun, 23 Aug 2009 09:02:59 +0000 (18:02 +0900)]
Merge branch 'sh/hwblk' into sh/pm-runtime

14 years agoPM: Run-time PM platform device bus support
Magnus Damm [Thu, 20 Aug 2009 18:25:32 +0000 (20:25 +0200)]
PM: Run-time PM platform device bus support

This patch adds default Runtime PM callbacks to the dev_pm_ops
belonging to the platform bus. The callbacks are weak symbols
that architecture specific code can override.

Allows Runtime PM even though CONFIG_PM_SLEEP=n.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Introduce core framework for run-time PM of I/O devices (rev. 17)
Rafael J. Wysocki [Tue, 18 Aug 2009 21:38:32 +0000 (23:38 +0200)]
PM: Introduce core framework for run-time PM of I/O devices (rev. 17)

Introduce a core framework for run-time power management of I/O
devices.  Add device run-time PM fields to 'struct dev_pm_info'
and device run-time PM callbacks to 'struct dev_pm_ops'.  Introduce
a run-time PM workqueue and define some device run-time PM helper
functions at the core level.  Document all these things.

Special thanks to Alan Stern for his help with the design and
multiple detailed reviews of the pereceding versions of this patch
and to Magnus Damm for testing feedback.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@igel.co.jp>
14 years agoMerge branch 'master' into for-linus
Rafael J. Wysocki [Sat, 22 Aug 2009 22:03:00 +0000 (00:03 +0200)]
Merge branch 'master' into for-linus

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Sat, 22 Aug 2009 19:14:01 +0000 (12:14 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: check saved state before restore

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sat, 22 Aug 2009 15:30:58 +0000 (08:30 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] mpt2sas: fix config request and diag reset deadlock
  [SCSI] mpt2sas: Bump driver version 01.100.04.00
  [SCSI] mpt2sas: fix oops because drv data points to NULL on resume from hibernate
  [SCSI] mpt2sas: fix crash due to Watchdog is active while OS in standby mode
  [SCSI] mpt2sas: fix infinite loop inside config request
  [SCSI] mpt2sas: Excessive log info causes sas iounit page time out
  [SCSI] mpt2sas: Raid 10 Value is showing as Raid 1E in /va/log/messages
  [SCSI] mpt2sas: Expander fix oops saying "Already part of another port"
  [SCSI] mpt2sas: Introduced check for enclosure_handle to avoid crash

14 years agosh: unwinder: cacheline align slab cache objects.
Paul Mundt [Sat, 22 Aug 2009 10:03:25 +0000 (19:03 +0900)]
sh: unwinder: cacheline align slab cache objects.

The CIE and FDE structs are big enough and accessed regularly enough in
certain configurations to make cacheline alignment useful.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoLinux 2.6.31-rc7 v2.6.31-rc7
Linus Torvalds [Sat, 22 Aug 2009 01:00:46 +0000 (18:00 -0700)]
Linux 2.6.31-rc7

14 years agoRe-introduce page mapping check in mark_buffer_dirty()
Linus Torvalds [Sat, 22 Aug 2009 00:40:08 +0000 (17:40 -0700)]
Re-introduce page mapping check in mark_buffer_dirty()

In commit a8e7d49aa7be728c4ae241a75a2a124cdcabc0c5 ("Fix race in
create_empty_buffers() vs __set_page_dirty_buffers()"), I removed a test
for a NULL page mapping unintentionally when some of the code inside
__set_page_dirty() was moved to the callers.

That removal generally didn't matter, since a filesystem would serialize
truncation (which clears the page mapping) against writing (which marks
the buffer dirty), so locking at a higher level (either per-page or an
inode at a time) should mean that the buffer page would be stable.  And
indeed, nothing bad seemed to happen.

Except it turns out that apparently reiserfs does something odd when
under load and writing out the journal, and we have a number of bugzilla
entries that look similar:

http://bugzilla.kernel.org/show_bug.cgi?id=13556
http://bugzilla.kernel.org/show_bug.cgi?id=13756
http://bugzilla.kernel.org/show_bug.cgi?id=13876

and it looks like reiserfs depended on that check (the common theme
seems to be "data=journal", and a journal writeback during a truncate).

I suspect reiserfs should have some additional locking, but in the
meantime this should get us back to the pre-2.6.29 behavior.

Pattern-pointed-out-by: Roland Kletzing <devzero@web.de>
Cc: stable@kernel.org (2.6.29 and 2.6.30)
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'sh/dwarf-unwinder'
Paul Mundt [Fri, 21 Aug 2009 20:37:14 +0000 (05:37 +0900)]
Merge branch 'sh/dwarf-unwinder'

Conflicts:
arch/sh/kernel/cpu/sh3/entry.S

14 years agosh64: dummy unwinder BUG wrappers.
Paul Mundt [Fri, 21 Aug 2009 20:31:45 +0000 (05:31 +0900)]
sh64: dummy unwinder BUG wrappers.

sh64 does not yet support GENERIC_BUG, but still wants unwinder support.
Alias UNWINDER_BUG and UNWINDER_BUG_ON to their BUG counterparts until
the conversion to GENERIC_BUG is completed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: unwinder: Use a special bug flag for unwinder traps.
Paul Mundt [Fri, 21 Aug 2009 20:28:25 +0000 (05:28 +0900)]
sh: unwinder: Use a special bug flag for unwinder traps.

This simplifies the unwinder trap handling, dropping the use of the
special trapa vector and simply piggybacking on top of the BUG support. A
new BUGFLAG_UNWINDER is added for flagging the unwinder fault, before
continuing on with regular BUG dispatch.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'sh/dwarf-unwinder' of git://github.com/mfleming/linux-2.6 into sh/dwarf...
Paul Mundt [Fri, 21 Aug 2009 18:49:58 +0000 (03:49 +0900)]
Merge branch 'sh/dwarf-unwinder' of git://github.com/mfleming/linux-2.6 into sh/dwarf-unwinder

14 years agosh: Export unwind_stack() to satisfy modular oprofile.
Paul Mundt [Fri, 21 Aug 2009 18:43:15 +0000 (03:43 +0900)]
sh: Export unwind_stack() to satisfy modular oprofile.

If the oprofile code is built as a module, unwind_stack() as used by the
oprofile backtrace code is not available, causing build breakage.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 21 Aug 2009 17:45:09 +0000 (10:45 -0700)]
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/radeon: add GET_PARAM/INFO support for Z pipes
  drm/radeon/kms: add r100/r200 OQ support.
  drm: Fix sysfs device confusion.
  drm/radeon/kms: implement the bo busy ioctl properly.

14 years agoMerge branch 'btrfs' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 21 Aug 2009 16:56:55 +0000 (09:56 -0700)]
Merge branch 'btrfs' of git://git.kernel.dk/linux-2.6-block

* 'btrfs' of git://git.kernel.dk/linux-2.6-block:
  btrfs: fix inode rbtree corruption

14 years agox86: don't call '->send_IPI_mask()' with an empty mask
Linus Torvalds [Fri, 21 Aug 2009 16:48:10 +0000 (09:48 -0700)]
x86: don't call '->send_IPI_mask()' with an empty mask

As noted in 83d349f35e1ae72268c5104dbf9ab2ae635425d4 ("x86: don't send
an IPI to the empty set of CPU's"), some APIC's will be very unhappy
with an empty destination mask.  That commit added a WARN_ON() for that
case, and avoided the resulting problem, but didn't fix the underlying
reason for why those empty mask cases happened.

This fixes that, by checking the result of 'cpumask_andnot()' of the
current CPU actually has any other CPU's left in the set of CPU's to be
sent a TLB flush, and not calling down to the IPI code if the mask is
empty.

The reason this started happening at all is that we started passing just
the CPU mask pointers around in commit 4595f9620 ("x86: change
flush_tlb_others to take a const struct cpumask"), and when we did that,
the cpumask was no longer thread-local.

Before that commit, flush_tlb_mm() used to create it's own copy of
'mm->cpu_vm_mask' and pass that copy down to the low-level flush
routines after having tested that it was not empty.  But after changing
it to just pass down the CPU mask pointer, the lower level TLB flush
routines would now get a pointer to that 'mm->cpu_vm_mask', and that
could still change - and become empty - after the test due to other
CPU's having flushed their own TLB's.

See

http://bugzilla.kernel.org/show_bug.cgi?id=13933

for details.

Tested-by: Thomas Björnell <thomas.bjornell@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMake bitmask 'and' operators return a result code
Linus Torvalds [Fri, 21 Aug 2009 16:26:15 +0000 (09:26 -0700)]
Make bitmask 'and' operators return a result code

When 'and'ing two bitmasks (where 'andnot' is a variation on it), some
cases want to know whether the result is the empty set or not.  In
particular, the TLB IPI sending code wants to do cpumask operations and
determine if there are any CPU's left in the final set.

So this just makes the bitmask (and cpumask) functions return a boolean
for whether the result has any bits set.

Cc: stable@kernel.org (2.6.30, needed by TLB shootdown fix)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agox86: don't send an IPI to the empty set of CPU's
Linus Torvalds [Fri, 21 Aug 2009 16:23:57 +0000 (09:23 -0700)]
x86: don't send an IPI to the empty set of CPU's

The default_send_IPI_mask_logical() function uses the "flat" APIC mode
to send an IPI to a set of CPU's at once, but if that set happens to be
empty, some older local APIC's will apparently be rather unhappy.  So
just warn if a caller gives us an empty mask, and ignore it.

This fixes a regression in 2.6.30.x, due to commit 4595f9620 ("x86:
change flush_tlb_others to take a const struct cpumask"), documented
here:

http://bugzilla.kernel.org/show_bug.cgi?id=13933

which causes a silent lock-up.  It only seems to happen on PPro, P2, P3
and Athlon XP cores.  Most developers sadly (or not so sadly, if you're
a developer..) have more modern CPU's.  Also, on x86-64 we don't use the
flat APIC mode, so it would never trigger there even if the APIC didn't
like sending an empty IPI mask.

Reported-by: Pavel Vilim <wylda@volny.cz>
Reported-and-tested-by: Thomas Björnell <thomas.bjornell@gmail.com>
Reported-and-tested-by: Martin Rogge <marogge@onlinehome.de>
Cc: Mike Travis <travis@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosh: Handle the DWARF op, DW_CFA_undefined
Matt Fleming [Thu, 20 Aug 2009 18:53:49 +0000 (19:53 +0100)]
sh: Handle the DWARF op, DW_CFA_undefined

Allow a DWARF register to have an undefined value. When applied to the
DWARF return address register this lets lets us label a function as
having no direct caller, e.g. kernel_thread_helper().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agosh: Fix bug calculating the end of the FDE instructions
Matt Fleming [Thu, 20 Aug 2009 18:42:34 +0000 (19:42 +0100)]
sh: Fix bug calculating the end of the FDE instructions

The 'end' member of struct dwarf_fde denotes one byte past the end of
the CFA instruction stream for an FDE. The value of 'end' was being
calcualted incorrectly, it was being set too high. This resulted in
dwarf_cfa_execute_insns() interpreting data past the end of valid
instructions, thus causing all sorts of weird crashes.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agosh: Setup the frame pointer in handle_interrupt
Matt Fleming [Thu, 20 Aug 2009 16:00:21 +0000 (17:00 +0100)]
sh: Setup the frame pointer in handle_interrupt

When CONFIG_DWARF_UNWINDER is enabled setup r14 in handle_interrupt, so
that we can figure out what function was running when we were
interrupted.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agosh: unwinder: Introduce UNWINDER_BUG() and UNWINDER_BUG_ON()
Matt Fleming [Sun, 16 Aug 2009 20:54:48 +0000 (21:54 +0100)]
sh: unwinder: Introduce UNWINDER_BUG() and UNWINDER_BUG_ON()

We can't assume that if we execute the unwinder code and the unwinder
was already running that it has faulted. Clearly two kernel threads can
invoke the unwinder at the same time and may be running simultaneously.

The previous approach used BUG() and BUG_ON() in the unwinder code to
detect whether the unwinder was incapable of unwinding the stack, and
that the next available unwinder should be used instead. A better
approach is to explicitly invoke a trap handler to switch unwinders when
the current unwinder cannot continue.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agosh: unwinder: Set the flags for DW_CFA_val_offset ops as DWARF_VAL_OFFSET
Matt Fleming [Sun, 16 Aug 2009 14:56:35 +0000 (15:56 +0100)]
sh: unwinder: Set the flags for DW_CFA_val_offset ops as DWARF_VAL_OFFSET

The handling of DW_CFA_val_offset ops was incorrectly using the
DWARF_REG_OFFSET flag but the register's value cannot be calculated
using the DWARF_REG_OFFSET method. Create a new flag to indicate that a
different method must be used to calculate the register's value even
though there is no implementation for DWARF_VAL_OFFSET yet; it's mainly
just a place holder.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agosh: unwinder: Fix memory leak and create our own kmem cache
Matt Fleming [Sun, 16 Aug 2009 14:44:08 +0000 (15:44 +0100)]
sh: unwinder: Fix memory leak and create our own kmem cache

Plug a memory leak in dwarf_unwinder_dump() where we didn't free the
memory that we had previously allocated for the DWARF frames and DWARF
registers.

Now is also a opportune time to implement our own mempool and kmem
cache. It's a good idea to have a certain number of frame and register
objects in reserve at all times, so that we are guaranteed to have our
allocation satisfied even when memory is scarce. Since we have pools to
allocate from we can implement the registers for each frame as a linked
list as opposed to a sparsely populated array. Whilst it's true that the
lookup time for a linked list is larger than for arrays, there's only
usually a maximum of 8 registers per frame. So the overhead isn't that
much of a concern.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
14 years agodrm/radeon: add GET_PARAM/INFO support for Z pipes
Alex Deucher [Wed, 19 Aug 2009 23:11:39 +0000 (19:11 -0400)]
drm/radeon: add GET_PARAM/INFO support for Z pipes

Needed for occlusion queries on rv530 chips.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agosh: Add initial support for SH7757 CPU subtype
Yoshihiro Shimoda [Fri, 21 Aug 2009 07:30:28 +0000 (16:30 +0900)]
sh: Add initial support for SH7757 CPU subtype

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agobtrfs: fix inode rbtree corruption
From: Nick Piggin [Fri, 21 Aug 2009 08:09:44 +0000 (10:09 +0200)]
btrfs: fix inode rbtree corruption

Node may not be inserted over existing node. This causes inode tree
corruption and I was seeing crashes in inode_tree_del which I can not
reproduce after this patch.

The other way to fix this would be to tie inode lifetime in the rbtree
with inode while not in freeing state. I had a look at this but it is
not so trivial at this point. At least this patch gets things working again.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Chris Mason <chris.mason@oracle.com>
Acked-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agodrm/radeon/kms: add r100/r200 OQ support.
Dave Airlie [Fri, 21 Aug 2009 00:07:54 +0000 (10:07 +1000)]
drm/radeon/kms: add r100/r200 OQ support.

This adds the relocation necessary for OQ support on the r100/r200
chipsets.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: Fix sysfs device confusion.
Thomas Hellstrom [Thu, 20 Aug 2009 09:02:31 +0000 (19:02 +1000)]
drm: Fix sysfs device confusion.

The drm sysfs class suspend / resume methods could not distinguish
between different device types wich could lead to illegal type casts.

Use struct device_type and make sure the class suspend / resume callbacks
are aware of those. There is no per device-type suspend / resume. Only
new-style PM.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: implement the bo busy ioctl properly.
Dave Airlie [Thu, 20 Aug 2009 23:47:45 +0000 (09:47 +1000)]
drm/radeon/kms: implement the bo busy ioctl properly.

The previous patch assumes the ioctl already existed, when
it actually didn't.

It also didn't return the correct error code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agousb: r8a66597-udc: implement the set_wedge method
Yoshihiro Shimoda [Thu, 20 Aug 2009 07:01:06 +0000 (07:01 +0000)]
usb: r8a66597-udc: implement the set_wedge method

fix the problem that MSC Tests of USBCV detects some warnings.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: update kfr2r09 defconfig
Magnus Damm [Thu, 20 Aug 2009 14:02:24 +0000 (14:02 +0000)]
sh: update kfr2r09 defconfig

Update the kfr2r09 defconfig with support for LCDC and USB gadget.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: add kfr2r09 romimage defconfig
Magnus Damm [Thu, 20 Aug 2009 14:01:24 +0000 (14:01 +0000)]
sh: add kfr2r09 romimage defconfig

Add romImage defconfig for the kfr2r09 board. This defconfig
should be used to build the kernel based boot loader.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: jump to p1 during boot on kfr2r09
Magnus Damm [Thu, 20 Aug 2009 13:59:26 +0000 (13:59 +0000)]
sh: jump to p1 during boot on kfr2r09

Add a P1 jump to the the kfr2r09 romimage code. With this
patch applied the initial zImage assembly code will run
with instruction cache enabled.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: invalidate icache and tlbs during boot on kfr2r09
Magnus Damm [Thu, 20 Aug 2009 13:58:38 +0000 (13:58 +0000)]
sh: invalidate icache and tlbs during boot on kfr2r09

Add instruction cache and TLB invalidation code for the
the kfr2r09 romimage target.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: i2c compile fix for kfr2r09
Magnus Damm [Thu, 20 Aug 2009 13:57:36 +0000 (13:57 +0000)]
sh: i2c compile fix for kfr2r09

Fix the kfr2r09 board code so it compiles if CONFIG_I2C=n.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'i2c-fixes-rc6' of git://aeryn.fluff.org.uk/bjdooks/linux
Linus Torvalds [Thu, 20 Aug 2009 21:55:24 +0000 (14:55 -0700)]
Merge branch 'i2c-fixes-rc6' of git://aeryn.fluff.org.uk/bjdooks/linux

* 'i2c-fixes-rc6' of git://aeryn.fluff.org.uk/bjdooks/linux:
  i2c-stu300: I2C STU300 stability updates
  i2c-omap: Enable workaround for Errata 1.153 based on
  i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts
  i2c-omap: Fix I2C status ACK

14 years agoi2c-stu300: I2C STU300 stability updates
Linus Walleij [Thu, 13 Aug 2009 20:14:23 +0000 (22:14 +0200)]
i2c-stu300: I2C STU300 stability updates

- blk clk is enabled when an irq arrives. The clk should be enabled,
  but just to make sure.
- All error bits are handled no matter state machine state
- All irq's will run complete() except for irq's that wasn't an event.
- No more looking into status registers just in case an interrupt
  has happend and the irq handle wasn't executed.
- irq_disable/enable are now separete functions.
- clk settings calculation changed to round upwards instead of
  downwards.
- Number of address send attempts before giving up is increased to 12
  from 10 since it most times take 8 tries before getting through.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-omap: Enable workaround for Errata 1.153 based on
Moiz Sonasath [Thu, 20 Aug 2009 16:21:16 +0000 (11:21 -0500)]
i2c-omap: Enable workaround for Errata 1.153 based on

Silicon Errata 1.153 has been fixed on OMAP 3630|4430 with the use of a later
version of I2C IP block.

The errata impacts OMAP 2420|2430|3430, enable the workaround for these based
on I2C IP block revision number instead of OMAP CPU type

Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts
Moiz Sonasath [Thu, 20 Aug 2009 16:21:15 +0000 (11:21 -0500)]
i2c-omap: ACK pending [R/X]DR and [R/X]RDY interrupts

ACK any pending read/write interrupts before exiting the ISR either after
completing the operation [ARDY interrupt] or in case of an error
[NACK|AL interrupt]

Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-omap: Fix I2C status ACK
Nishanth Menon [Thu, 20 Aug 2009 16:21:14 +0000 (11:21 -0500)]
i2c-omap: Fix I2C status ACK

I2C status ack for [RX]RDR and [RX]RDY could
cause race conditions of clearing the event
twice and a violation of the programing
sequence as defined in TRM This patch fixes
the same.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoMerge branch 'master' into for-linus
Rafael J. Wysocki [Thu, 20 Aug 2009 18:24:33 +0000 (20:24 +0200)]
Merge branch 'master' into for-linus

14 years agoMerge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 20 Aug 2009 17:19:39 +0000 (10:19 -0700)]
Merge branch 'fix/hda' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix probe of Toshiba laptops with ALC268 codec
  ALSA: hda: add model for Intel DG45ID/DG45FC boards
  ALSA: hda: enable speaker output for Compaq 6530s/6531s

14 years agoPCI: check saved state before restore
Alek Du [Sat, 8 Aug 2009 00:46:19 +0000 (08:46 +0800)]
PCI: check saved state before restore

Without the check, the config space may be filled with zeros. Though
the driver should try to avoid call restoring before saving, but the
pci layer also should check this.

Also removes the existing check in pci_restore_standard_config, since
it's superfluous with the new check in restore_state.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agosh: enable rtc-ds1302 in snapgear_defconfig.
Paul Mundt [Thu, 20 Aug 2009 06:06:47 +0000 (15:06 +0900)]
sh: enable rtc-ds1302 in snapgear_defconfig.

This is the only board that presently supports this rtc, so make sure it
is enabled by default to get some build coverage.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agortc: rtc-ds1302: Kill off unused variables.
Paul Mundt [Thu, 20 Aug 2009 06:06:04 +0000 (15:06 +0900)]
rtc: rtc-ds1302: Kill off unused variables.

There were a few stray unused variables left over, kill them off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: DSP save/restore ordering and a0 sign extension fixups.
Paul Mundt [Thu, 20 Aug 2009 05:02:20 +0000 (14:02 +0900)]
sh: DSP save/restore ordering and a0 sign extension fixups.

As an excellent indicator of how much testing the DSP code gets, a couple
of rather glaring bugs in the DSP save/restore paths were found:

- In the DSP restore case a0 needs to be popped off before a0g,
  or the value of a0g is clobbered by the MSB of a0 in the case
  of sign extension.

- Beyond that, the save and restore orders were out of sync,
  so this fixes that up as well. At the same time, we switch over
  to using movs.l for both the save and restore of the general DSP
  registers as opposed to using sts.l (which was initially put in
  place to work around a bug in ancient binutils versions which
  the kernel no longer supports).

Reported-by: Chee Soon Yip <yip.cheesoon@renesas.com>
Cc: Chu Lih Kwek <kwek.chulih@renesas.com>,
Cc: General Lai <general.lai@renesas.com>,
Cc: Robert Cozens <Robert.Cozens@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Better description of SH-4 PTEA register update.
Michael Trimarchi [Thu, 20 Aug 2009 04:27:44 +0000 (13:27 +0900)]
sh: Better description of SH-4 PTEA register update.

Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agortc: rtc-sh fixes
Alessandro Zummo [Thu, 20 Aug 2009 04:25:11 +0000 (13:25 +0900)]
rtc: rtc-sh fixes

- simplifies irq set freq
- ioctl() was duplicating functionalities of rtc-dev core
- corrected initialization sequence
- use platform_driver_probe

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Angelo Castello <angelo.castello@st.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agortc: rtc-ds1302 fixes
Alessandro Zummo [Thu, 20 Aug 2009 03:31:49 +0000 (12:31 +0900)]
rtc: rtc-ds1302 fixes

- removed spinlock protection, it's handled by the rtc class
- use platform_driver_probe
- return appropriate code for rtc_read_time
- style issues

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix up the CONFIG_FTRACE_SYSCALLS=n build.
Paul Mundt [Thu, 20 Aug 2009 03:07:46 +0000 (12:07 +0900)]
sh: Fix up the CONFIG_FTRACE_SYSCALLS=n build.

-tip can't be bothered keeping interfaces stable long enough for anyone
to use them without having their builds broken without notification, so
just ifdef around the problematic symbols until the new interfaces become
available upstream.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'sh/r8a66597-udc'
Paul Mundt [Thu, 20 Aug 2009 02:54:38 +0000 (11:54 +0900)]
Merge branch 'sh/r8a66597-udc'

14 years agosh: add r8a66597 usb1 gadget to the se7724 board
Magnus Damm [Wed, 19 Aug 2009 09:52:02 +0000 (09:52 +0000)]
sh: add r8a66597 usb1 gadget to the se7724 board

Add USB gadget support for port CN26 on the Solution Engine 7724
board. The r8a66597-udc driver is hooked up as a platform device
and some registers are configured to enable the USB in gadget mode.
The hardware driving the USB port is the on-chip USB1 block in
the sh7724 processor configured as USB gadget controller.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: add r8a66597 usb0 gadget to the kfr2r09 board
Magnus Damm [Wed, 19 Aug 2009 14:39:15 +0000 (14:39 +0000)]
sh: add r8a66597 usb0 gadget to the kfr2r09 board

Add USB gadget support for port YC301 on the KFR2R09 board.

The r8a66597-udc driver is hooked up as a platform device,
clocks are enabled via I2C and some registers are configured
to enable the USB in gadget mode. The hardware driving the
USB port is the on-chip USB0 block in the sh7724 processor
configured as USB gadget controller.

This board is using external hardware to detect USB hotplug
events and allows the processor to dynamically start and stop
clocks. This well thought out hardware feature is unused at
this point and plug and play is unfortunately unsupported.
To properly support all hardware features the USB gadget
stack may need some adjustment.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: r8a66597-udc disable interrupts on shutdown fix
Magnus Damm [Wed, 19 Aug 2009 14:26:10 +0000 (14:26 +0000)]
usb: r8a66597-udc disable interrupts on shutdown fix

This patch improves the disable_controller() function in the
r8a66597-udc driver to disable all interrupts and also clear
status flags. With this patch in place the driver survives
kexec.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: r8a66597-udc buffer management update
Magnus Damm [Wed, 19 Aug 2009 14:19:08 +0000 (14:19 +0000)]
usb: r8a66597-udc buffer management update

This patch updates the r8a66597-udc buffer management code.

Use fixed buffers for bulk and isochronous pipes, also make
sure to handle the isochronous-as-bulk case. With fixed buffers
there is no need to keep track of used buffers with bi_bufnum.

Also, this fixes a potential buffer offset problem where the
base offset incorrectly varies with the number of pipes used.

The m66592 driver recently got fixed in a similar way.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: add clock support to r8a66597 gadget driver
Magnus Damm [Wed, 19 Aug 2009 09:50:49 +0000 (09:50 +0000)]
usb: add clock support to r8a66597 gadget driver

Add support for the clock framework to the r8a66597 gadget driver.
This is needed to control the clock driving the USB block.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agousb: gadget: R8A66597 peripheral controller support.
Yoshihiro Shimoda [Wed, 19 Aug 2009 04:59:39 +0000 (04:59 +0000)]
usb: gadget: R8A66597 peripheral controller support.

While in-tree support for the R8A66597 host side has been supported for
some time, the peripheral side has so far been unsupported. This adds a
new USB gadget driver which bridges the gap and finally wires up the
peripheral side as well.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Tested-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Add mach-types entry for EcoVec board.
Paul Mundt [Thu, 20 Aug 2009 01:14:29 +0000 (10:14 +0900)]
sh: Add mach-types entry for EcoVec board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Add EcoVec (SH7724) board support
Kuninori Morimoto [Wed, 19 Aug 2009 12:08:33 +0000 (12:08 +0000)]
sh: Add EcoVec (SH7724) board support

This adds preliminary support for the EcoVec board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoALSA: hda - Fix probe of Toshiba laptops with ALC268 codec
Takashi Iwai [Wed, 19 Aug 2009 18:05:02 +0000 (20:05 +0200)]
ALSA: hda - Fix probe of Toshiba laptops with ALC268 codec

There are many variants of Toshiba laptops with ALC268 codec, and
it seems that a few of them don't work with model=toshiba preset
since they have the secondary ALC268 codec just for HDMI output.
This is a regression due to the previous clean-up work to merge all
Toshiba quirk entries into a single check.

This patch adds the identification of such laptops to apply the
standard BIOS-probing method.  Unfortunately, Toshiba laptops have
all the same PCI SSID, so we need to check the codec SSID to identify
each device.

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Wed, 19 Aug 2009 17:40:24 +0000 (10:40 -0700)]
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 oopses with doubly mounted snapshots
  nilfs2: missing a read lock for segment writer in nilfs_attach_checkpoint()

14 years agoAFS: Documentation updates
Anton Blanchard [Wed, 19 Aug 2009 15:10:16 +0000 (16:10 +0100)]
AFS: Documentation updates

Fix some issues with the AFS documentation, found when testing AFS on ppc64:

- Update AFS features: reading/writing, local caching
- Typo in kafs sysfs debug file
- Use modprobe instead of insmod in example
- Update IPs for grand.central.org

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 19 Aug 2009 17:38:36 +0000 (10:38 -0700)]
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/kms: teardown crtc correctly when fb is destroyed.
  drm/kms/radeon: cleanup combios TV table like DDX.
  drm/radeon/kms: memset the allocated framebuffer before using it.
  drm/radeon/kms: although LVDS might be possible on crtc 1 don't do it.
  drm/radeon/kms: implement bo busy check + current domain
  drm/radeon/kms: cut down indirects in register accesses.
  drm/radeon/kms: Fix up vertical blank interrupt support.
  drm/radeon/kms: add rv530 R300_SU_REG_DEST + reloc for ZPASS_ADDR
  drm/edid: fixup detailed timings like the X server.
  drm/radeon/kms: Add specific rs690 authorized register table

14 years agoMerge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Wed, 19 Aug 2009 16:44:51 +0000 (09:44 -0700)]
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Update Microblaze defconfigs
  microblaze: Use klimit instead of _end for memory init
  microblaze: Enable ppoll syscall
  microblaze: Sane handling of missing timer/intc in device tree
  microblaze: use the generic ack_bad_irq implementation