pandora-kernel.git
17 years agosh: Add support for 4K stacks.
Paul Mundt [Wed, 27 Sep 2006 09:22:14 +0000 (18:22 +0900)]
sh: Add support for 4K stacks.

This enables support for 4K stacks on SH.

Currently this depends on DEBUG_KERNEL, but likely all boards
will switch to this as the default in the future.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Enable /proc/kcore support.
Paul Mundt [Wed, 27 Sep 2006 09:20:58 +0000 (18:20 +0900)]
sh: Enable /proc/kcore support.

This was previously unimplemented..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: stack debugging support.
Paul Mundt [Wed, 27 Sep 2006 09:20:16 +0000 (18:20 +0900)]
sh: stack debugging support.

This adds a DEBUG_STACK_USAGE and DEBUG_STACKOVERFLOW for SH.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: select CONFIG_EMBEDDED.
Paul Mundt [Wed, 27 Sep 2006 09:18:31 +0000 (18:18 +0900)]
sh: select CONFIG_EMBEDDED.

This solution isn't very optimal, but it's generaly the behaviour that
we want..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: machvec rework.
Paul Mundt [Wed, 27 Sep 2006 09:17:31 +0000 (18:17 +0900)]
sh: machvec rework.

Some more machvec overhauling and setup code cleanup. Kill off
get_system_type() and platform_setup(), we can do these both
through the machvec. While we're add it, kill off more useless
mach.c's and drop some legacy cruft from setup.c.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Solution Engine SH7343 board support.
Paul Mundt [Wed, 27 Sep 2006 09:09:34 +0000 (18:09 +0900)]
sh: Solution Engine SH7343 board support.

This adds support for the SE7343 board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: SH7710VoIPGW board support.
Paul Mundt [Wed, 27 Sep 2006 09:08:33 +0000 (18:08 +0900)]
sh: SH7710VoIPGW board support.

This adds support for the SH7710 VoIP Gateway board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Enable verbose BUG() support.
Paul Mundt [Wed, 27 Sep 2006 09:04:36 +0000 (18:04 +0900)]
sh: Enable verbose BUG() support.

Add SH to the list of platforms interested in Verbose BUG().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Cleanup IRQ disabling for hardirq handlers.
Paul Mundt [Wed, 27 Sep 2006 09:03:34 +0000 (18:03 +0900)]
sh: Cleanup IRQ disabling for hardirq handlers.

The generic hardirq layer already takes care of a lot of the
appropriate locking and disabling for us, no need to duplicate
it in the handlers..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: maskreg IRQ support.
Paul Mundt [Wed, 27 Sep 2006 09:01:16 +0000 (18:01 +0900)]
sh: maskreg IRQ support.

Formerly implemented by ADX, we can use this generically,
so move it over.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off dead boards.
Paul Mundt [Wed, 27 Sep 2006 09:00:19 +0000 (18:00 +0900)]
sh: Kill off dead boards.

None of these have been maintained in years, and no one seems to
be interested in doing so, so just get rid of them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agowatchdog: Add a simple mmap() stub for shwdt.
Paul Mundt [Wed, 27 Sep 2006 08:53:59 +0000 (17:53 +0900)]
watchdog: Add a simple mmap() stub for shwdt.

In some applications people have expressed a need for an mmap() method,
so we implement a simple stub for this that maps back a page with the
counter in it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: New atomic ops for SH-4A movli.l/movco.l
Paul Mundt [Wed, 27 Sep 2006 08:52:19 +0000 (17:52 +0900)]
sh: New atomic ops for SH-4A movli.l/movco.l

SH-4A implements LL/SC instructions, so we implement a simple
set of atomic operations using these.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add support for cacheline poking through debugfs.
Paul Mundt [Wed, 27 Sep 2006 08:51:01 +0000 (17:51 +0900)]
sh: Add support for cacheline poking through debugfs.

A simple debugging aid for easier visibility of the respective
cachelines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix memcpy() build error on sh4eb.
Nobuhiro Iwamatsu [Wed, 27 Sep 2006 08:50:03 +0000 (17:50 +0900)]
sh: Fix memcpy() build error on sh4eb.

A trivial bug breaking the build on sh4eb.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off the rest of the legacy rtc mess.
Paul Mundt [Wed, 27 Sep 2006 08:45:01 +0000 (17:45 +0900)]
sh: Kill off the rest of the legacy rtc mess.

With the new RTC class driver, we can get rid of most of the
old left over cruft.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: SHMIN board support.
Takashi YOSHII [Wed, 27 Sep 2006 08:41:31 +0000 (17:41 +0900)]
sh: SHMIN board support.

This adds support for the SHMIN SH7706 board.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add support for SH7706/SH7710/SH7343 CPUs.
Paul Mundt [Wed, 27 Sep 2006 08:38:11 +0000 (17:38 +0900)]
sh: Add support for SH7706/SH7710/SH7343 CPUs.

This adds support for the aforementioned CPU subtypes, and cleans
up some build issues encountered as a result.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoserial: Add SERIAL_SH_SCI_NR_UARTS for sh-sci.
Paul Mundt [Wed, 27 Sep 2006 08:32:30 +0000 (17:32 +0900)]
serial: Add SERIAL_SH_SCI_NR_UARTS for sh-sci.

sh-sci needs to be able to define its number of ports to
support, we do this with a config option, like most other
ports do.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add setup code for various CPU subtypes.
Paul Mundt [Wed, 27 Sep 2006 08:30:35 +0000 (17:30 +0900)]
sh: Add setup code for various CPU subtypes.

This adds some simple setup code for most of the CPU subtypes,
primarily simple platform device registration.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: sem2mutex conversion for clock framework.
Paul Mundt [Wed, 27 Sep 2006 08:28:20 +0000 (17:28 +0900)]
sh: sem2mutex conversion for clock framework.

Simple sem2mutex conversion.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: pselect6 and ppoll, along with signal trampoline rework.
Paul Mundt [Wed, 27 Sep 2006 08:27:00 +0000 (17:27 +0900)]
sh: pselect6 and ppoll, along with signal trampoline rework.

This implements support for ppoll() and pselect6()..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: __addr_ok() and other misc nommu fixups.
Yoshinori Sato [Wed, 27 Sep 2006 08:25:07 +0000 (17:25 +0900)]
sh: __addr_ok() and other misc nommu fixups.

A few more outstanding nommu fixups..

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: __NR_restart_syscall support.
Paul Mundt [Wed, 27 Sep 2006 08:22:49 +0000 (17:22 +0900)]
sh: __NR_restart_syscall support.

This implements support for __NR_restart_syscall.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Various nommu fixes.
Yoshinori Sato [Wed, 27 Sep 2006 08:21:02 +0000 (17:21 +0900)]
sh: Various nommu fixes.

This fixes up some of the various outstanding nommu bugs on
SH.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Make PAGE_OFFSET configurable.
Paul Mundt [Wed, 27 Sep 2006 08:19:13 +0000 (17:19 +0900)]
sh: Make PAGE_OFFSET configurable.

nommu needs to be able to shift PAGE_OFFSET, so we switch it to a
non-user-visible CONFIG_PAGE_OFFSET and use that in the few places
where it matters.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Move voyagergx_reg.h to a more sensible place.
Paul Mundt [Wed, 27 Sep 2006 08:17:27 +0000 (17:17 +0900)]
sh: Move voyagergx_reg.h to a more sensible place.

Other boards require this as well, so move it out of the
rts7751r2d directory.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: math-emu support
Takashi YOSHII [Wed, 27 Sep 2006 08:15:32 +0000 (17:15 +0900)]
sh: math-emu support

This implements initial math-emu support, aimed primarily at SH-3.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agortc: New RTC driver for SuperH On-Chip RTC.
Paul Mundt [Wed, 27 Sep 2006 08:13:19 +0000 (17:13 +0900)]
rtc: New RTC driver for SuperH On-Chip RTC.

This replaces the old SH RTC driver, and allows us to
clean quite a lot of things up on the board-specific
side.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Rename rtc_get/set_time() to avoid RTC_CLASS conflict.
Paul Mundt [Wed, 27 Sep 2006 08:11:32 +0000 (17:11 +0900)]
sh: Rename rtc_get/set_time() to avoid RTC_CLASS conflict.

We have a clash with RTC_CLASS over these names, so we
change them..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fixup __strnlen_user() behaviour.
Paul Mundt [Wed, 27 Sep 2006 08:07:07 +0000 (17:07 +0900)]
sh: Fixup __strnlen_user() behaviour.

Drop TIF_USERSPACE and add addr_limit to the thread_info struct.
Subsequently, use that for address checking in strnlen_user() to
ward off bogus -EFAULTs.

Make __strnlen_user() return 0 on exception, rather than -EFAULT.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: More cosmetic cleanups and trivial fixes.
Paul Mundt [Wed, 27 Sep 2006 08:03:56 +0000 (17:03 +0900)]
sh: More cosmetic cleanups and trivial fixes.

Nothing exciting here, just trivial fixes..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fixup TEI IRQ requests in request_dma().
Paul Mundt [Wed, 27 Sep 2006 07:55:24 +0000 (16:55 +0900)]
sh: Fixup TEI IRQ requests in request_dma().

If a channel is not TEI capable, don't try to request_irq()..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: G2 DMA IRQ and residue sampling.
Paul Mundt [Wed, 27 Sep 2006 07:53:40 +0000 (16:53 +0900)]
sh: G2 DMA IRQ and residue sampling.

This fixes a long-standing FIXME for G2 DMA, where we finally
wire up the IRQ handler and allow for sampling remaining bytes
while in-flight.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: VoyagerGX cleanups and 8250 UART support.
Paul Mundt [Wed, 27 Sep 2006 07:48:46 +0000 (16:48 +0900)]
sh: VoyagerGX cleanups and 8250 UART support.

This adds the VoyagerGX UART to the RTS7751R2D setup
code, and cleans up a few build issues.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Inhibit mapping PCI apertures through page tables.
Paul Mundt [Wed, 27 Sep 2006 07:45:22 +0000 (16:45 +0900)]
sh: Inhibit mapping PCI apertures through page tables.

Inhibit mapping through page tables in __ioremap() for PCI memory
apertures on SH7751 and SH7780-style PCI controllers, translation is
not possible for these areas. For other users that map a small window
in P1/P2 space, ioremap() traps that already, and should never make
it to __ioremap().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Consolidated SH7751/SH7780 PCI support.
Paul Mundt [Wed, 27 Sep 2006 07:43:28 +0000 (16:43 +0900)]
sh: Consolidated SH7751/SH7780 PCI support.

This cleans up quite a lot of the PCI mess that we
currently have, and attempts to consolidate the
duplication in the SH7780 and SH7751 PCI controllers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoserial: Rework sh-sci for driver model.
Paul Mundt [Wed, 27 Sep 2006 07:32:13 +0000 (16:32 +0900)]
serial: Rework sh-sci for driver model.

sh-sci was turning in to an unmaintainable mess, especially with
regards to the port list. This cleans it up quite a bit, and
switches over to a platform device model where subtypes will
register their port list individually in their setup code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: kgdb stub cleanups.
Paul Mundt [Wed, 27 Sep 2006 07:24:55 +0000 (16:24 +0900)]
sh: kgdb stub cleanups.

Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can
be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being
done by the kgdb stub.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Use generic CONFIG_FRAME_POINTER.
Paul Mundt [Wed, 27 Sep 2006 07:22:33 +0000 (16:22 +0900)]
sh: Use generic CONFIG_FRAME_POINTER.

We had our own version, which serves no purpose. Simply
hook SH in to the generic one.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: APM/PM support.
Andriy Skulysh [Wed, 27 Sep 2006 07:20:22 +0000 (16:20 +0900)]
sh: APM/PM support.

This adds some simple PM stubs and the basic APM interfaces,
primarily for use by hp6xx, where the existing userland
expects it.

Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Free up some and document PTEL flags.
Paul Mundt [Wed, 27 Sep 2006 07:17:17 +0000 (16:17 +0900)]
sh: Free up some and document PTEL flags.

Drop _PAGE_SHARED/_PAGE_U0_SHARED and document Linux PTE encodings in
the PTEL value. Preserve the swap cache entry encoding semantics for
now, though it will need rework to free up _PAGE_WT from _PAGE_FILE.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Update new-machine.txt so it's more accurate.
Paul Mundt [Wed, 27 Sep 2006 07:15:48 +0000 (16:15 +0900)]
sh: Update new-machine.txt so it's more accurate.

This fell behind a bit, get it updated so the documentation
has something in common with reality.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: SE73180 updates for IRQ changes.
Paul Mundt [Wed, 27 Sep 2006 07:14:54 +0000 (16:14 +0900)]
sh: SE73180 updates for IRQ changes.

SE73180 can use the generic support, we just need to
wire up the IRQ demuxing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agovideo: Update header location in hp680_bl.
Andriy Skulysh [Wed, 27 Sep 2006 07:09:59 +0000 (16:09 +0900)]
video: Update header location in hp680_bl.

Trivial build fix.

Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Make O= builds work again.
Paul Mundt [Wed, 27 Sep 2006 07:08:24 +0000 (16:08 +0900)]
sh: Make O= builds work again.

Some of the paths were a bit broken, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: xchg()/__xchg() always_inline fixes for gcc4.
Paul Mundt [Wed, 27 Sep 2006 07:05:56 +0000 (16:05 +0900)]
sh: xchg()/__xchg() always_inline fixes for gcc4.

Make __xchg() a macro, so that gcc 4.0 doesn't blow up thanks to
always_inline..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Drop incdir rule for SE7751.
Paul Mundt [Wed, 27 Sep 2006 07:04:51 +0000 (16:04 +0900)]
sh: Drop incdir rule for SE7751.

No longer needed..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agovideo: Update pvr2fb for sq API changes.
Paul Mundt [Wed, 27 Sep 2006 07:03:25 +0000 (16:03 +0900)]
video: Update pvr2fb for sq API changes.

With the store queue API rework, we need to change the in-kernel
users too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Cleanup and document register bank usage.
Paul Mundt [Wed, 27 Sep 2006 07:01:12 +0000 (16:01 +0900)]
sh: Cleanup and document register bank usage.

Initial register bank cleanup. Make SR.RB configurable, and add some
preliminary documentation on register bank usage within the kernel.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add support for R7780RP and R7780MP boards.
Paul Mundt [Wed, 27 Sep 2006 06:59:17 +0000 (15:59 +0900)]
sh: Add support for R7780RP and R7780MP boards.

This adds support for the Renesas SH7780 development boards,
R7780RP and R7780MP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Store Queue API rework.
Paul Mundt [Wed, 27 Sep 2006 06:49:57 +0000 (15:49 +0900)]
sh: Store Queue API rework.

Rewrite the store queue API for a per-cpu interface in the driver
model. The old miscdevice is dropped, due to TASK_SIZE limitations,
and no one was using it anyways.

Carve up and allocate store queue space with a bitmap, back sq
mapping objects with a slab cache, and let userspace worry about
its own prefetching.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Board updates for I/O routine rework.
Paul Mundt [Wed, 27 Sep 2006 06:41:24 +0000 (15:41 +0900)]
sh: Board updates for I/O routine rework.

This updates the various boards for some of the recent I/O routine
updates.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix split ptlock for user mappings in __do_page_fault().
Paul Mundt [Wed, 27 Sep 2006 06:30:24 +0000 (15:30 +0900)]
sh: Fix split ptlock for user mappings in __do_page_fault().

There was a bug that got introduced when the split ptlock changes
went in where mm could be unintialized for user mappings, this
fixes it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fixup SHMLBA definition for SH7705.
Paul Mundt [Wed, 27 Sep 2006 06:29:18 +0000 (15:29 +0900)]
sh: Fixup SHMLBA definition for SH7705.

We need this set to something sensible anywhere were we have
an aliasing dcache..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: ioremap() overhaul.
Paul Mundt [Wed, 27 Sep 2006 06:16:42 +0000 (15:16 +0900)]
sh: ioremap() overhaul.

ioremap() overhaul. Add support for transparent PMB mapping, get rid of
p3_ioremap(), etc. Also drop ioremap() and iounmap() routines from the
machvec, as everyone can use the generic ioremap() API instead. For PCI
memory apertures and other special cases, use the pci_iomap() API, as
boards are already required to get the mapping right there.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: page table alloc cleanups and page fault optimizations.
Paul Mundt [Wed, 27 Sep 2006 06:13:36 +0000 (15:13 +0900)]
sh: page table alloc cleanups and page fault optimizations.

Cleanup of page table allocators, using generic folded PMD and PUD
helpers. TLB flushing operations are moved to a more sensible spot.

The page fault handler is also optimized slightly, we no longer waste
cycles on IRQ disabling for flushing of the page from the ITLB, since
we're already under CLI protection by the initial exception handler.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: export clear_user_page() for the modules that need it.
Paul Mundt [Wed, 27 Sep 2006 06:09:48 +0000 (15:09 +0900)]
sh: export clear_user_page() for the modules that need it.

Some modules seem to need this, so we export it..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: SH-4A Privileged Space Mapping Buffer (PMB) support.
Paul Mundt [Wed, 27 Sep 2006 06:08:07 +0000 (15:08 +0900)]
sh: SH-4A Privileged Space Mapping Buffer (PMB) support.

Add support for 32-bit physical addressing through the SH-4A
Privileged Space Mapping Buffer (PMB).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Titan board support.
Jamie Lenehan [Wed, 27 Sep 2006 06:05:39 +0000 (15:05 +0900)]
sh: Titan board support.

Add support for the titan board.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: BSS init bugfix and barrier in entry point.
Paul Mundt [Wed, 27 Sep 2006 06:00:04 +0000 (15:00 +0900)]
sh: BSS init bugfix and barrier in entry point.

A synco is needed before we jump to start_kernel().

While we're at it, also move the sh_cpu_init() jump until after
we've zeroed BSS, as this has caused some undesirable results
in sh_cpu_init().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add control register barriers.
Paul Mundt [Wed, 27 Sep 2006 05:57:44 +0000 (14:57 +0900)]
sh: Add control register barriers.

Currently when making changes to control registers, we
typically need some time for changes to take effect (8
nops, generally).  However, for sh4a we simply need to
do an icbi..

This is a simple patch for implementing a general purpose
ctrl_barrier() which functions as a control register write
barrier. There's some additional documentation in the patch
itself, but it's pretty self explanatory.

There were also some places where we were not doing the
barrier, which didn't seem to have any adverse effects on
legacy parts, but certainly did on sh4a. It's safer to have
the barrier in place for legacy parts as well in these cases,
though this does make flush_tlb_all() more expensive (by an
order of 8 nops).  We can ifdef around the flush_tlb_all()
case for now if it's clear that all legacy parts won't have
a problem with this.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add flag for MMU PTEA capability.
Paul Mundt [Wed, 27 Sep 2006 05:55:41 +0000 (14:55 +0900)]
sh: Add flag for MMU PTEA capability.

Add CPU_HAS_PTEA, refactor some of the cpu flag settings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: landisk board support.
kogiidena [Wed, 27 Sep 2006 05:53:35 +0000 (14:53 +0900)]
sh: landisk board support.

This adds support for the I-O DATA Landisk.

Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix libata build.
Paul Mundt [Wed, 27 Sep 2006 05:48:09 +0000 (14:48 +0900)]
sh: Fix libata build.

Drop virt_to_bus() from sg_dma_address() so libata builds.
While we're at it, move sg_dma_address() and sg_dma_len()
from pci.h to scatterlist.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix TCP payload csum bug in csum_partial_copy_generic().
Ollie Wild [Wed, 27 Sep 2006 05:46:24 +0000 (14:46 +0900)]
sh: Fix TCP payload csum bug in csum_partial_copy_generic().

There's a bug in the Hitachi SuperH csum_partial_copy_generic()
implementation.  If the supplied length is 1 (and several alignment
conditions are met), the function immediately branches to label 4.
However, the assembly at label 4 expects the length to be stored in
register r2.  Since this has not occurred, subsequent behavior is
undefined.

This can cause bad payload checksums in TCP connections.

I've fixed the problem by initializing register r2 prior to the branch
instruction.

Signed-off-by: Ollie Wild <aaw@rincewind.tv>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix fatal oops in copy_user_page() on sh4a (SH7780).
Paul Mundt [Wed, 27 Sep 2006 05:38:02 +0000 (14:38 +0900)]
sh: Fix fatal oops in copy_user_page() on sh4a (SH7780).

We had a pretty interesting oops happening, where copy_user_page()
was down()'ing p3map_sem[] with a bogus offset (particularly, an
offset that hadn't been initialized with sema_init(), due to the
mismatch between cpu_data->dcache.n_aliases and what was assumed
based off of the old CACHE_ALIAS value).

Luckily, spinlock debugging caught this for us, and so we drop
the old hardcoded CACHE_ALIAS for sh4 completely and rely on the
run-time probed cpu_data->dcache.alias_mask. This in turn gets
the p3map_sem[] index right, and everything works again.

While we're at it, also convert to 4-level page tables..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up new syscalls.
Paul Mundt [Wed, 27 Sep 2006 05:36:44 +0000 (14:36 +0900)]
sh: Wire up new syscalls.

The syscall table has lagged behind a bit, wire up the new ones..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: remove cpu_online() definition from <asm/smp.h>
Alexey Dobriyan [Wed, 27 Sep 2006 05:32:57 +0000 (14:32 +0900)]
sh: remove cpu_online() definition from <asm/smp.h>

It's defined in <linux/cpumask.h> and log is horribly flooded by
"redefined" messages.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Support for SH7770/SH7780 CPU subtypes.
Paul Mundt [Wed, 27 Sep 2006 05:31:40 +0000 (14:31 +0900)]
sh: Support for SH7770/SH7780 CPU subtypes.

Merge support for SH7770 and SH7780 SH-4A subtypes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add SH7750S/SH7091 rules for SH7750 oprofile driver.
Paul Mundt [Wed, 27 Sep 2006 05:30:11 +0000 (14:30 +0900)]
sh: Add SH7750S/SH7091 rules for SH7750 oprofile driver.

Update oprofile build rules for additional subtypes,
particularly SH7750S/SH7091.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: earlyprintk= support and cleanups.
Paul Mundt [Wed, 27 Sep 2006 05:26:53 +0000 (14:26 +0900)]
sh: earlyprintk= support and cleanups.

Allow multiple early printk consoles via earlyprintk=.

With this change earlyprintk is no longer enabled by default,
it must be specified on the kernel command line. Optionally
with ,keep to prevent unreg by tty_io.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: prefetch()/prefetchw() support.
Paul Mundt [Wed, 27 Sep 2006 05:20:54 +0000 (14:20 +0900)]
sh: prefetch()/prefetchw() support.

SH-2/3/4 are able to prefetch, add support for it..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix a sign extension bug in memset().
Toshinobu Sugioka [Wed, 27 Sep 2006 05:13:14 +0000 (14:13 +0900)]
sh: Fix a sign extension bug in memset().

Minor sign-extension bug in SH-specific memset()..

Signed-off-by: Toshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Refactor PRR masking to catch newer SH7760 cuts.
Paul Mundt [Wed, 27 Sep 2006 05:11:33 +0000 (14:11 +0900)]
sh: Refactor PRR masking to catch newer SH7760 cuts.

Newer SH7760 cuts have a range of acceptable PRR values..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Optimized cache handling for SH-4/SH-4A caches.
Richard Curnow [Wed, 27 Sep 2006 05:09:26 +0000 (14:09 +0900)]
sh: Optimized cache handling for SH-4/SH-4A caches.

This reworks some of the SH-4 cache handling code to more easily
accomodate newer-style caches (particularly for the > direct-mapped
case), as well as optimizing some of the old code.

Signed-off-by: Richard Curnow <richard.curnow@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Support for SH-4A memory barriers.
Paul Mundt [Wed, 27 Sep 2006 05:05:52 +0000 (14:05 +0900)]
sh: Support for SH-4A memory barriers.

SH-4A supports 'synco' as a barrier, sprinkle it around
the cache ops as necessary..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: RTS7751R2D board updates.
Paul Mundt [Wed, 27 Sep 2006 05:02:09 +0000 (14:02 +0900)]
sh: RTS7751R2D board updates.

More of the same, trivial cleanups, and moving options to their
own board-specific Kconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: HS7751RVoIP board updates.
Paul Mundt [Wed, 27 Sep 2006 04:56:28 +0000 (13:56 +0900)]
sh: HS7751RVoIP board updates.

Various cleanups for HS7751RVoIP. Mostly just getting
rid of the old mach.c and splitting codec configuration
in to its own Kconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosound: SH DAC audio driver updates.
Andriy Skulysh [Wed, 27 Sep 2006 04:48:32 +0000 (13:48 +0900)]
sound: SH DAC audio driver updates.

Update the SH DAC audio driver for the clock framework.

Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agovideo: hitfb suspend/resume and updates.
Andriy Skulysh [Wed, 27 Sep 2006 04:47:22 +0000 (13:47 +0900)]
video: hitfb suspend/resume and updates.

suspend/resume support for hitfb, as well as some other
minor cleanups.

Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Move hd64461.h to a more sensible location.
Paul Mundt [Wed, 27 Sep 2006 04:42:57 +0000 (13:42 +0900)]
sh: Move hd64461.h to a more sensible location.

With the I/O rework for hd64461 we're down to a single header,
so move it by itself and get rid of the directory.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fixup TMU_TOCR definition for SH7300.
Paul Mundt [Wed, 27 Sep 2006 04:30:08 +0000 (13:30 +0900)]
sh: Fixup TMU_TOCR definition for SH7300.

SH7300 has a different TMU_TOCR, make the TMU code work again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off dead code for SE and SystemH boards.
Paul Mundt [Wed, 27 Sep 2006 04:28:23 +0000 (13:28 +0900)]
sh: Kill off dead code for SE and SystemH boards.

Some of these have suffered some bitrot, and so there is
some degree of dead code that has been left sitting around,
clean it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agovideo: Disable vgacon for SuperH.
Paul Mundt [Wed, 27 Sep 2006 04:20:22 +0000 (13:20 +0900)]
video: Disable vgacon for SuperH.

We don't support this on SH, so just disable it..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hugetlb updates.
Paul Mundt [Wed, 27 Sep 2006 04:11:57 +0000 (13:11 +0900)]
sh: hugetlb updates.

For some of the larger sizes we permitted spanning pages
across several PTEs, but this turned out to not be generally
useful. This reverts the sh hugetlbpage interface to something
more sensible using huge pages at single PTE granularity.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: hp6xx mach-type cleanups.
Andriy Skulysh [Wed, 27 Sep 2006 04:07:38 +0000 (13:07 +0900)]
sh: hp6xx mach-type cleanups.

Some minor cleanups for the updated consolidated hp6xx
mach-type.

Signed-off-by: Andriy Skulysh <askulysh@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Various cosmetic cleanups.
Paul Mundt [Wed, 27 Sep 2006 03:31:01 +0000 (12:31 +0900)]
sh: Various cosmetic cleanups.

We had quite a bit of whitespace damage, clean most of it up..

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Make hs7751rvoip/rts7751r2d use pm_power_off.
Paul Mundt [Wed, 27 Sep 2006 02:43:24 +0000 (11:43 +0900)]
sh: Make hs7751rvoip/rts7751r2d use pm_power_off.

These were previously sprinkled in machine_power_off(),
though missed being updated when the rest of the boards
switched over.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off the .stack section.
Paul Mundt [Wed, 27 Sep 2006 02:40:05 +0000 (11:40 +0900)]
sh: Kill off the .stack section.

We had a special .stack section in the ld script that
was being used to position r15 initially. This is
nonsensical, as we can just use a THREAD_SIZE offset
from the init_thread_union instead (as every other arch
does).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix kGDB NMI handling.
Paul Mundt [Wed, 27 Sep 2006 02:37:33 +0000 (11:37 +0900)]
sh: Fix kGDB NMI handling.

in_nmi shifted down a few labels, so we were inadvertently
clearing the lower byte of do_syscall_trace, badness ensues.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Move syscall table in to syscall.S.
Paul Mundt [Wed, 27 Sep 2006 02:36:10 +0000 (11:36 +0900)]
sh: Move syscall table in to syscall.S.

Move the syscall table in to its own file, as per sh64. The entry.S
bits will end up being considerably different in the sh2/sh2a cases,
so this lets us keep things in sync somewhat..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fixup some uninitialized spinlocks.
Paul Mundt [Wed, 27 Sep 2006 02:31:32 +0000 (11:31 +0900)]
sh: Fixup some uninitialized spinlocks.

Fix use of uninitialized spinlocks, caught with spinlock debugging..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: flush_cache_range() cleanup and optimizations.
Paul Mundt [Wed, 27 Sep 2006 02:29:55 +0000 (11:29 +0900)]
sh: flush_cache_range() cleanup and optimizations.

flush_cache_range() wasn't page aligning the end of the range,
we can't assume that it will always be page aligned, and we
ended up getting unaligned faults in some rare call paths.

Additionally, we add a small optimization to just purge the
dcache entirely if the range is large enough that the page
table walking will take longer. We use an arbitrary value of
64 pages for the large range size, as per sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add a simple cmpxchg().
Tom Rini [Wed, 27 Sep 2006 02:28:20 +0000 (11:28 +0900)]
sh: Add a simple cmpxchg().

We didn't have one of these before, a simple implementation
borrowed from MIPS as well as the __HAVE_ARCH_CMPXCHG bits.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Move smc37c93x.h for SystemH board use.
Paul Mundt [Wed, 27 Sep 2006 02:16:20 +0000 (11:16 +0900)]
sh: Move smc37c93x.h for SystemH board use.

SystemH needs this header as well, not just 770x SE.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoMerge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
Linus Torvalds [Tue, 26 Sep 2006 20:07:55 +0000 (13:07 -0700)]
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6

* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (225 commits)
  [PATCH] Don't set calgary iommu as default y
  [PATCH] i386/x86-64: New Intel feature flags
  [PATCH] x86: Add a cumulative thermal throttle event counter.
  [PATCH] i386: Make the jiffies compares use the 64bit safe macros.
  [PATCH] x86: Refactor thermal throttle processing
  [PATCH] Add 64bit jiffies compares (for use with get_jiffies_64)
  [PATCH] Fix unwinder warning in traps.c
  [PATCH] x86: Allow disabling early pci scans with pci=noearly or disallowing conf1
  [PATCH] x86: Move direct PCI scanning functions out of line
  [PATCH] i386/x86-64: Make all early PCI scans dependent on CONFIG_PCI
  [PATCH] Don't leak NT bit into next task
  [PATCH] i386/x86-64: Work around gcc bug with noreturn functions in unwinder
  [PATCH] Fix some broken white space in ia32_signal.c
  [PATCH] Initialize argument registers for 32bit signal handlers.
  [PATCH] Remove all traces of signal number conversion
  [PATCH] Don't synchronize time reading on single core AMD systems
  [PATCH] Remove outdated comment in x86-64 mmconfig code
  [PATCH] Use string instructions for Core2 copy/clear
  [PATCH] x86: - restore i8259A eoi status on resume
  [PATCH] i386: Split multi-line printk in oops output.
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Tue, 26 Sep 2006 18:49:46 +0000 (11:49 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/driver-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (47 commits)
  Driver core: Don't call put methods while holding a spinlock
  Driver core: Remove unneeded routines from driver core
  Driver core: Fix potential deadlock in driver core
  PCI: enable driver multi-threaded probe
  Driver Core: add ability for drivers to do a threaded probe
  sysfs: add proper sysfs_init() prototype
  drivers/base: check errors
  drivers/base: Platform notify needs to occur before drivers attach to the device
  v4l-dev2: handle __must_check
  add CONFIG_ENABLE_MUST_CHECK
  add __must_check to device management code
  Driver core: fixed add_bind_files() definition
  Driver core: fix comments in drivers/base/power/resume.c
  sysfs_remove_bin_file: no return value, dump_stack on error
  kobject: must_check fixes
  Driver core: add ability for devices to create and remove bin files
  Class: add support for class interfaces for devices
  Driver core: create devices/virtual/ tree
  Driver core: add device_rename function
  Driver core: add ability for classes to handle devices properly
  ...

17 years ago[PATCH] s390: fix cmm kernel thread handling
Heiko Carstens [Tue, 26 Sep 2006 06:33:11 +0000 (23:33 -0700)]
[PATCH] s390: fix cmm kernel thread handling

Convert cmm's usage of kernel_thread to kthread_run.  Also create the
cmmthread at module load time, so it is possible to check if creation of
the thread fails.

In addition the cmmthread now gets terminated when the module gets unloaded
instead of leaving a stale kernel thread.  Also check the return values of
other registration functions at module load and handle their return values
appropriately.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Make UML use ptrace-abi.h
Jeff Dike [Tue, 26 Sep 2006 06:33:10 +0000 (23:33 -0700)]
[PATCH] Make UML use ptrace-abi.h

Include the host architecture's ptrace-abi.h instead of ptrace.h.

There was some cpp mangling of names around the ptrace.h include to avoid
symbol clashes between UML and the host architecture.  Most of these can go
away.  The exception is struct pt_regs, which is convenient to have in
userspace, but must be renamed in order that UML can define its own.

ptrace-x86_64.h needed to have some now-obsolete cpp cruft and a declaration
removed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>