Commit graph

544 commits

Author SHA1 Message Date
Uwe Kleine-König 5886269962 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 08:58:16 +02:00
Paul Mundt 1ce7ddd5f4 sh: Truncate MAX_ACTIVE_REGIONS for the common case.
Most SH platforms aren't going to need more than a single active
region, ones that need more can pad this out as necessary.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 13:20:52 +09:00
Paul Mundt b118ca572d sh: Convert to common die chain.
This went in immediately after SH added the die chain notifiers,
so move over to that instead..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 10:55:38 +09:00
Paul Mundt 21ec4c6453 sh: Wire up utimensat syscall.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 10:42:48 +09:00
kogiidena f6a3c1ca00 sh: landisk mv_nr_irqs definition.
Fix up the landisk build. When NR_IRQS was removed, landisk got missed
in the updates. Update the machvec for the landisk IRQs to get it
working again.

Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:02 +00:00
kogiidena c71861e65e sh: Fixup ndelay() xloops calculation for alternate HZ.
Currently the xloops calculation in ndelay() gets set to 0 when
calculated with HZ=250, fix up how we do the HZ factoring in order
to get this right for differing values.

Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:02 +00:00
Paul Mundt 074f98df05 sh: Add 32-bit opcode feature CPU flag.
Add a CPU flag for the CPUs that support 32-bit opcodes, which
gets passed down to userspace.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:01 +00:00
Paul Mundt 53f983a90d sh: Fix PC adjustments for varying opcode length.
There are a few different cases for figuring out how to
size the instruction. We read in the instruction located
at regs->pc - 4 when rewinding the opcode to figure out if
there's a 32-bit opcode before the faulting instruction, with
a default of a - 2 adjustment on a mismatch. In practice this
works for the cases where pc - 4 is just another 16-bit opcode,
or we happen to have a 32-bit and a 16-bit immediately
preceeding the pc value.

In the cases where we aren't rewinding, this is much less ugly..

We also don't bother fixing up the places where we're explicitly
dealing with 16-bit instructions, since this might lead to
confusion regarding the encoding size possibilities on other
CPU variants.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:01 +00:00
Paul Mundt bd0799977c sh: Support for SH-2A 32-bit opcodes.
SH-2A supports both 16 and 32-bit instructions, add a simple helper
for figuring out the instruction size in the places where there are
hardcoded 16-bit assumptions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:01 +00:00
Paul Mundt 51c8b856f5 sh: Kill off redundant __div64_32 symbol export.
modpost noticed that __div64_32 was being exported twice:

WARNING: lib/built-in: '__div64_32' exported twice. Previous export was
in arch/sh/kernel/built-in.ko

kill off the duplicate.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:01 +00:00
Paul Mundt 00bf0610e4 sh: Share exception vector table for SH-3/4.
The only difference between these at the moment are the FPU
exceptions, and these are hidden away under CONFIG_SH_FPU
(which is only set for the SH-4 case anyways..).

This consolidates the two tables, and updates SH-4 to use
the updated copy.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:01 +00:00
Paul Mundt 5f8c9908f2 sh: generic quicklist support.
This moves SH over to the generic quicklists. As per x86_64,
we have special mappings for the PGDs, so these go on their
own list..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-09 01:35:00 +00:00
Bernhard Walle e9485baed0 Add IRQF_IRQPOLL flag on sh
Add IRQF_IRQPOLL on each timer interrupt on SH2.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:22 -07:00
Randy Dunlap e63340ae6b header cleaning: don't include smp_lock.h when not used
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:07 -07:00
Gerd Hoffmann 69331af79c Fixes and cleanups for earlyprintk aka boot console
The console subsystem already has an idea of a boot console, using the
CON_BOOT flag.  The implementation has some flaws though.  The major
problem is that presence of a boot console makes register_console() ignore
any other console devices (unless explicitly specified on the kernel
command line).

This patch fixes the console selection code to *not* consider a boot
console a full-featured one, so the first non-boot console registering will
become the default console instead.  This way the unregister call for the
boot console in the register_console() function actually triggers and the
handover from the boot console to the real console device works smoothly.
Added a printk for the handover, so you know which console device the
output goes to when the boot console stops printing messages.

The disable_early_printk() call is obsolete with that patch, explicitly
disabling the early console isn't needed any more as it works automagically
with that patch.

I've walked through the tree, dropped all disable_early_printk() instances
found below arch/ and tagged the consoles with CON_BOOT if needed.  The
code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).

Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
Ralf, fixed "udbg-immortal" cmd line arg on powerpc.

Signed-off-by: Gerd Hoffmann <kraxel@exsuse.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:04 -07:00
Christoph Hellwig ab1b6f03a1 simplify the stacktrace code
Simplify the stacktrace code:

 - remove the unused task argument to save_stack_trace, it's always
   current
 - remove the all_contexts flag, it's alwasy 0

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <ak@suse.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:58 -07:00
Akinobu Mita 0e6b9c98be use SLAB_PANIC flag cleanup
Use SLAB_PANIC and delete duplicated panic().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:14:57 -07:00
Ryusuke Sakato 39374aadcd sh: R7785RP board updates.
Some fixups for the R7785RP board. Gets iVDR working.

Signed-off-by: Ryusuke Sakato <sakato.ryusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 9c37dc6330 sh: Update r7780rp defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 3a2e117e22 sh: Add die chain notifiers.
Add the atomic die chains in, kprobes needs these.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Kristoffer Ericson 3dde7a3c74 sh: Fix APM emulation on hp6xx.
With the shared APM emulation code being introduced, hp6xx was missed
in the conversion. Get it building again.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Takashi YOSHII 70fe4d87bf sh: Wire up more IRQs for SH7709.
hp6xx requires some additional IRQs that aren't currently enabled in
the SH7709 setup code. Wire them up.

Signed-off-by: Takashi YOSHII <takashi.yoshii.ze@hitachi.com>
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Ryusuke Sakato 6865f0ea6a sh: Solution Engine 7722 board support.
This adds more full-featured support for the SH7722 Solution Engine.
Previously this was using the generic board, and lacked most of the
peripheral support.

Signed-off-by: Ryusuke Sakato <sakato.ryusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 4d5ade5b29 sh: kdump support.
This adds support for kexec based crash dumps.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Paul Mundt db62e5bd29 sh: Move clock reporting to its own proc entry.
Previously this was done in cpuinfo, but with the number of clocks
growing, it makes more sense to place this in a different proc entry.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Nobuhiro Iwamatsu 2a8ff4596c sh: Solution Engine SH7705 board and CPU updates.
This fixes up SH7705 CPU support and the SE7705 board
for some of the recent changes.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
dmitry pervushin 1929cb340b sh: SH7722 clock framework support.
This adds support for the SH7722 (MobileR) to the clock framework.

Signed-off-by: dmitry pervushin <dimka@nomadgs.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Kristoffer Ericson 34a780a0af sh: hp6xx pata_platform support.
Drop the hd64461 I/O ops and wire up pata_platform for MMIO.

Signed-off-by: Kristoffer Ericson <Kristoffer_e1@hotmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Nobuhiro Iwamatsu b7aee517c8 sh: se7780 PCI support.
Add support for the SH7780 PCIC on the Solution Engine 7780,
missing from the previous board-support patch.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Nobuhiro Iwamatsu b75762302e sh: SH7780 Solution Engine board support.
This adds support for the SH7780-based Solution Engine reference board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt cd6c7ea234 sh: Add a dummy SH-4 PCIC fixup.
By default we don't have anything to fix up for the SH-4 PCIC, boards can
overload this as necessary.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt 0264f16039 sh: Tidy up L-BOX area5 addresses.
L-BOX can use the normal PA_AREA5_IO, there's no reason for it to
reproduce it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt 652b9672cf sh: Add defconfig for se7722.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt cdf50b23bf sh: Kill off udivdi3 div64_32 wrapping.
Previously we've been handling udivdi3 references and wrapping
them in to div64_32() automatically. This doesn't get a lot of
use, however, and as akpm noted in the recent thread on l-k:

	http://lkml.org/lkml/2007/2/27/241

we're better off simply ripping it out and going the do_div()
route if there happen to be any places that need it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt 01066625e9 sh: bootmem tidying for discontig/sparsemem preparation.
This reworks some of the node 0 bootmem initialization in
preparation for discontigmem and sparsemem support.

ARCH_POPULATES_NODE_MAP is switched to as a result of this.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:54 +00:00
Nobuhiro Iwamatsu 759ab068c4 sh: Add defconfig for se7712.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:54 +00:00
Nobuhiro Iwamatsu 9465a54fa4 sh: MS7712SE01 board support.
Support the SH7712 (SH3-DSP) Solution Engine reference board.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:54 +00:00
Nobuhiro Iwamatsu c86c5a9104 sh: L-BOX RE2 support.
This adds support for the L-BOX RE2 router.

	http://www.nttcom.co.jp/l-box/

L-BOX RE2 is a SH7751R-based router. It has CF, Cardbus, serial,
and LAN x2. This is one of the very few SH boards that a general
person can obtain now.

The L-BOX shipped with a 2.4.28 kernel, this is a rewritten patch
adding it to current git.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:54 +00:00
kogiidena 00e8c494a1 sh: landisk updates.
Updates for the landisk board:

	- The push_switch framework was used.
	- landisk_pwb.c was divided into psw.c and gio.c.
	- pata_platform was supported in USL-5P.
	- irq.c was rewritten.
	- io.c was replaced with generic I/O routines.

Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:54 +00:00
Takashi YOSHII f6072896e3 sh: heartbeat double 0 fix.
This implements stricter and more compliant knightrider strobing in the
heartbeat handler. While there still seems to be some debate as to
whether the double 0 is "more" correct or not, this updated version
appears to have general consensus. Fixes a long-term "bug".

Signed-off-by: Takashi YOSHII <takashi.yoshii.ze@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:53 +00:00
Nobuhiro Iwamatsu f987fc880d sh: pata_platform pcmcia support for SolutionEngine boards.
This enables pata_platform support for the PCMCIA slot on the
SolutionEngine.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:53 +00:00
Paul Mundt 32351a28a7 sh: Add SH7785 Highlander board support (R7785RP).
This adds preliminary support for the SH7785-based Highlander board.
Some of the Highlander support code is reordered so that most of it
can be reused directly.

This also plugs in missing SH7785 checks in the places that need it,
as this is the first board to support the CPU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:53 +00:00
Paul Mundt be782df54c sh: NR_IRQS consolidation.
Each board sets the total number of IRQs that it's interested in via
the machvec. Previously we cared about the off vs on-chip IRQ range,
but any code relying on that is long dead. Set NR_IRQS to something
sensible given the vector range, and allow boards to cap it if they
really care.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:53 +00:00
Paul Mundt fa69151173 sh: generic BUG() support.
Wire up GENERIC_BUG for SH. This moves off of the special bug
frame and on to the generic struct bug_entry. Roughly the same
semantics are retained, and we can kill off some of the verbose
BUG() reporting code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:53 +00:00
Paul Mundt 45ed285b54 sh: speculative execution support for SH7780.
SH7780 has a speculative execution mode where it can speculatively
perform an instruction fetch for subroutine returns, this allows it
to be enabled. There are some various pitfalls associated with this
mode, so it's left as depending on CONFIG_EXPERIMENTAL and not
enabled by default.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:51 +00:00
Paul Mundt fc31b80957 sh: Rip out broken kgdb thread support.
The kgdb thread support is woefully out of date (it predates
the pidhash), and needs a complete rewrite before it's useful
again. Just rip it out entirely.

Updating the unified kgdb stub is a more worthwhile endeavour
for anyone that happens to be interested in this, at present
it's just limping along.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:51 +00:00
Paul Mundt fa5da2f7bd sh: Bring kgdb back from the dead.
This code has suffered quite a bit of bitrot, do some basic
tidying to get it to a reasonably functional state again.
This gets the basic support and the console working again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:10:51 +00:00
Jeremy Fitzhardinge b6e3590f81 [PATCH] x86: Allow percpu variables to be page-aligned
Let's allow page-alignment in general for per-cpu data (wanted by Xen, and
Ingo suggested KVM as well).

Because larger alignments can use more room, we increase the max per-cpu
memory to 64k rather than 32k: it's getting a little tight.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-05-02 19:27:12 +02:00
Johannes Berg e8c9c50269 power management: implement pm_ops.valid for everybody
Almost all users of pm_ops only support mem sleep, don't check in .valid and
don't reject any others in .prepare so users can be confused if they check
/sys/power/state, especially when new states are added (these would then
result in s-t-r although they're supposed to be something different).

This patch implements a generic pm_valid_only_mem function that is then
exported for users and puts it to use in almost all existing pm_ops.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@lists.linux-foundation.org
Cc: Len Brown <lenb@kernel.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 16:40:40 -07:00
Johannes Berg fe0c935a6c rework pm_ops pm_disk_mode, kill misuse
This patch series cleans up some misconceptions about pm_ops.  Some users of
the pm_ops structure attempt to use it to stop the user from entering suspend
to disk, this, however, is not possible since the user can always use
"shutdown" in /sys/power/disk and then the pm_ops are never invoked.  Also,
platforms that don't support suspend to disk simply should not allow
configuring SOFTWARE_SUSPEND (read the help text on it, it only selects
suspend to disk and nothing else, all the other stuff depends on PM).

The pm_ops structure is actually intended to provide a way to enter
platform-defined sleep states (currently supported states are "standby" and
"mem" (suspend to ram)) and additionally (if SOFTWARE_SUSPEND is configured)
allows a platform to support a platform specific way to enter low-power mode
once everything has been saved to disk.  This is currently only used by ACPI
(S4).

This patch:

The pm_ops.pm_disk_mode is used in totally bogus ways since nobody really
seems to understand what it actually does.

This patch clarifies the pm_disk_mode description.

It also removes all the arm and sh users that think they can veto suspend to
disk via pm_ops; not so since the user can always do echo shutdown >
/sys/power/disk, they need to find a better way involving Kconfig or such.

ACPI is the only user left with a non-zero pm_disk_mode.

The patch also sets the default mode to shutdown again, but when a new pm_ops
is registered its pm_disk_mode is selected as default, that way the default
stays for ACPI where it is apparently required.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: <linux-pm@lists.linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 16:40:40 -07:00
David S. Miller ded220bd8f [STRING]: Move strcasecmp/strncasecmp to lib/string.c
We have several platforms using local copies of identical
code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-26 01:54:39 -07:00
Paul Mundt 9c5b406b9a sh: Kill bogus GCC4 symbol exports.
__sdivsi3_i4i, __udiv_qrnnd_16, and __udivsi3_i4i don't exist
outside of the ST compiler, so kill them off.

This causes compile failures with other GCC4 compilers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-28 17:24:47 +09:00
Paul Mundt 3afb209a43 sh: Fix bogus regs pointer in do_IRQ().
SH-3 and SH-4 were trampling the register, and SH-2 wasn't even
setting it in the first place. This ended up with some rather
broken behaviour in the sysrq show_regs().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-14 13:03:35 +09:00
Paul Mundt ffe1b4e9f4 sh: Fix SH-3 cache entry_mask and way_size calculation.
The code for performing the calculation was only in the SH-4 probe
path, move it out to the common path so the other parts get this
right too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 16:15:22 +09:00
Hideo Saito bb68660943 sh: Fix PCI BAR address-space wraparound.
When a SH7751R system includes a card that has wide range space
like a graphics card, the pci-pci bridge controller can't set the
correct address range.

For example, when *lower_limit is 0xfd000000 and bar_size is
0x4000000, in the following code at arch/sh/drivers/pci/pci-auto.c,
0x0 is set in bar_value.

pciauto_setup_bars()
{
...
                bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size;
...
                *lower_limit = bar_value + bar_size;
}

As a result, 0x4000000 is set in *lower_limit, but this value is wrong.

The following patch avoids this problem by checking the range of the
value and refusing to update the BAR if the calculated value ends up
being bogus.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-12 14:50:49 +09:00
Paul Mundt ccd45ad405 sh: Kill off I/O cruft for R7780RP.
We don't have any use for these machvec fixups anymore, kill them all
off and go with the generic instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 20:19:57 +09:00
Paul Mundt 39e688a94b sh: Revert lazy dcache writeback changes.
These ended up causing too many problems on older parts,
revert for now..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 19:46:47 +09:00
Paul Mundt c87a711134 sh: Enable SM501 support for RTS7751R2D.
This enables the SM501 drivers for the R2D board. Additional
work needs to be done to migrate off of the VoyagerGX cchip
code to make use of the rest of the mfd infrastructure.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:26 +09:00
Paul Mundt 87e29cacb7 sh: Use L1_CACHE_BYTES for .data.cacheline_aligned.
Previously this was using a hardcoded 32, use L1_CACHE_BYTES for
cacheline alignment instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:26 +09:00
Hideo Saito e6bcf562e5 sh: Fix kernel thread stack corruption with preempt.
When I run a preemptive kernel-2.6.20 for SH7780, a created
kthread(pdflush) can not exit by do_exit() in kernel_thread_helper. I
think that the created kthread should have a room for 'struct pt_regs'
space on the stack top, because __switch_to() will refer to the space as
follows using 'regs = task_pt_regs(prev)' and next condition may be true.

Signed-off-by: Hideo Saito <saito@densan.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:26 +09:00
Ryusuke Sakato c8bfa1fdc8 sh: Fix sigmask trampling in signal delivery.
There was a missing return in do_signal() that caused the saved
sigmask to be written back after having successfully delivered
the signal.

Signed-off-by: Ryusuke Sakato <sakato@hsdv.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:25 +09:00
Stuart Menefy 9432f96803 sh: Clear UBC when not in use.
This takes care of tearing down the UBC so it's not inadvertently
left configured at the next context switch time. Failure to do
this results in spurious SIGTRAPs in certain debug sequences.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-03-05 14:13:25 +09:00
Tobias Klauser c5a69d57eb Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 20:11:19 +01:00
Paul Mundt 9c57548f17 sh: rts7751r2d board updates.
This tidies up some of the rts7751r2d mess and gets it booting
again. Update the defconfig, too.

Signed-off-by: Masayuki Hosokawa <hosokawa@ace-jp.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-15 18:20:52 +09:00
Paul Mundt e65fa9f59e sh: Kill off dead bigsur and ec3104 boards.
Neither of these have had any maintenance in years, and there's
no interest in keeping them straggling along. These have already
been slated for removal some time, so finally just get rid of them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-14 15:06:09 +09:00
Paul Mundt 71074d3a2c sh: Fixup r7780rp pata_platform for devres conversion.
Tidy up the R7780RP I/O mapping routines and switch the
pata_platform resources to IORESOURCE_MEM types, killing off
the useless port->addr conversion.

This fixes up R7780RP to boot after the recent devres conversion.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-14 14:49:04 +09:00
Paul Mundt db2e1fa3f0 sh: Revert TLB miss fast-path changes that broke PTEA parts.
This ended up causing problems for older parts (particularly ones
using PTEA). Revert this for now, it can be added back in once it's
had some more testing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-14 14:13:10 +09:00
Paul Mundt 401e9093a3 sh: Compile fix for heartbeat consolidation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 15:46:39 +09:00
Paul Mundt 3b4d953962 sh: heartbeat consolidation for banked LEDs.
This consolidates the various board heartbeat LED implementations,
used for strobing the load average across a LED bank. Those boards
not implementing a full bank can hook in via the LED class.

We leave the compat hook in the machvec for now until those non-banked
boards are able to migrate to the drivers/leds.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 15:42:28 +09:00
Paul Mundt ca43ecbf6e sh: Kill dead/unused ISA code from __ioremap().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:46 +09:00
Paul Mundt b37814352d sh: Fix syscall numbering breakage.
We accidentally broke the inotify syscalls, fix those up again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:46 +09:00
Paul Mundt 5904539b7f sh: dcache write-back for R7780RP PIO.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Paul Mundt 0072032d7b sh: Switch to local TLB flush variants in additional callsites.
Convert some of the global flush users over to using the local variants
that don't need to use the global routines.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Paul Mundt ea9af69481 sh: Local TLB flushing variants for SMP prep.
Rename the existing flush routines to local_ variants for use by
the IPI-backed global flush routines on SMP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Paul Mundt 11c1965687 sh: Fixup cpu_data references for the non-boot CPUs.
There are a lot of bogus cpu_data-> references that only end up working
for the boot CPU, convert these to current_cpu_data to fixup SMP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Paul Mundt aec5e0e1c1 sh: Use a per-cpu ASID cache.
Previously this was implemented using a global cache, cache
this per-CPU instead and bump up the number of context IDs to
match NR_CPUS.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Andrew Morton 506b85f411 sh: add SH_CLK_MD Kconfig default.
This option needs a default - otherwise `make allmodconfig' gets
stuck in an infinite loop.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Nobuhiro Iwamatsu dbbfa2da27 sh: Fixup SHMIN INTC register definitions.
Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Manuel Lauss 9f8a5e3a44 sh: SH-DMAC compile fixes
This patch does the following:
- remove the make_ipr_irq stuff from dma-sh.c and replace it
  with a simple channel<->irq mapping table.
- add DMTEx_IRQ constants for sh4 cpus
- fix sh7751 DMAE irq number

The SH7780 uses the same IRQs for DMA as other SH4 types, so
I put the constants on top of the dma.h file.

Other CPU types need to #define their own DMTEx_IRQ contants
in their appropriate header.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Manuel Lauss 6dcda6f1ec sh: add SH7760 IPR IRQ data
Add SH7760 IPR IRQ data; makes 2.6.20-rc bootable again.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Nobuhiro Iwamatsu 86b67ef751 sh: Fix handle_BUG() compile error.
handle_BUG() uses TRAPA_BUG_OPCODE which is only defined for
CONFIG_BUG, make sure it's not built when CONFIG_BUG=n.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:45 +09:00
Paul Mundt adac957096 sh: Don't set reserved _PAGE_WT bit on SH-3.
Only SH-4 needs to set _PAGE_WT when using write-through caching,
don't attempt to set it on SH-3 where it ends up being a reserved
bit.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Paul Mundt 26b7a78c55 sh: Lazy dcache writeback optimizations.
This converts the lazy dcache handling to the model described in
Documentation/cachetlb.txt and drops the ptep_get_and_clear() hacks
used for the aliasing dcaches on SH-4 and SH7705 in 32kB mode. As a
bonus, this slightly cuts down on the cache flushing frequency.

With that and the PTEA handling out of the way, the update_mmu_cache()
implementations can be consolidated, and we no longer have to worry
about which configuration the cache is in for the SH7705 case.

And finally, explicitly disable the lazy writeback on SMP (SH-4A).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Paul Mundt 7a847f8190 sh: More tidying for large base pages.
There were a few more things that needed fixing up, namely THREAD_SIZE
and the TLB miss handler where certain PTRS_PER_PGD == PTRS_PER_PTE
assumptions were being made.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Nobuhiro Iwamatsu aa4a5db52a sh: Solution Engine 770x IPR irq setup.
Fixups for external IPR IRQs for the SE770x FPGA.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Nobuhiro Iwamatsu 08d2e099fb sh: Solution Engine 7750's defconfig update.
Update se7750_defconfig.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Takashi YOSHII f725b5ee1e sh: shmin updates.
This fixes up shmin (and SH7706/SH7708) IPR support for some of the
recent API changes.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Paul Mundt 2c081e71ba sh: Fixup R7780RP iVDR clock enable.
The iVDR clock enable bit happens to actually reside in a rather
different place than what is documented, so fix it up accordingly.
This fixes up SATA boot for some of the R7780RP boards that didn't
default-enable the clock in the loader.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Jamie Lenehan 703404ea44 sh: allow earlyprintk baud rate to be set via command line
This allows the baud rate for earlyprintk for sh4 without the
standard BIOS to be set via the command line. This uses the same
format as i386 and x86_64, which is:

	earlyprintk=serial,ttySC1,38400

The second parameter (ttySC1 above) is usually the console device
name or the io address of the serial port. I allow that to be
specified but ignore it in order to keep the format the same as
i386/x86_64.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:44 +09:00
Yoshinori Sato 5c67cd05e3 sh: sh7619 / sh7206 IPR initialize update
IPR initialize proceduere update.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:43 +09:00
Yoshinori Sato 4aa362bbdd sh: Update SH-2 to use the debug trap jump table.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:43 +09:00
Paul Mundt 702dd80375 sh: Use proper SH-2A CFLAGS on newer compilers.
-m2 doesn't end up working particularly well when we've got a constrained
toolchain target. Switch to the same semantics used by SH-4A to attempt
to get it right. Spotted by Alex Song <songqf9@yahoo.ca>.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:43 +09:00
Paul Mundt f413d0d9fa sh: Use a jump call table for debug trap handlers.
This rips out most of the needlessly complicated sh_bios and kgdb
trap handling, and forces it all through a common fast dispatch path.
As more debug traps are inserted, it's important to keep them in sync
for all of the parts, not just SH-3/4.

As the SH-2 parts are unable to do traps in the >= 0x40 range, we
restrict the debug traps to the 0x30-0x3f range on all parts, and
also bump the kgdb breakpoint trap down in to this range (from 0xff
to 0x3c) so it's possible to use for nommu.

Optionally, this table can be padded out to catch spurious traps for
SH-3/4, but we don't do that yet..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-02-13 10:54:43 +09:00
Arjan van de Ven 5dfe4c964a [PATCH] mark struct file_operations const 2
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

[akpm@osdl.org: sparc64 fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:44 -08:00
Alon Bar-Lev 53c82622c2 [PATCH] Dynamic kernel command-line: sh
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:39 -08:00
Alexey Dobriyan b035b6de24 [PATCH] Consolidate default sched_clock()
Use attribute(weak).

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jean-Paul Saman 67d38229df [PATCH] disable init/initramfs.c: architectures
Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs
when CONFIG_BLK_DEV_INITRAMFS is not selected.  This saves another 4 kbytes
on most platfoms (some reserve PAGE_SIZE for initramfs).

Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Christoph Lameter 339ba9b15d [PATCH] optional ZONE_DMA: remove ZONE_DMA remains from sh/sh64
sh / sh64: Remove ZONE_DMA remains.

Both arches do not need ZONE_DMA

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:18 -08:00
Linus Torvalds 2fd592e45b Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm:
  [APM] SH: Convert to use shared APM emulation.
  [APM] MIPS: Convert to use shared APM emulation.
  [APM] ARM: Convert to use shared APM emulation.
  [APM] Add shared version of APM emulation
2007-02-09 09:44:28 -08:00
Paul Mundt 2affc857ef [PATCH] SH vdso: use install_special_mapping()
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:25:47 -08:00
Paul Mundt 0a9b0db192 [APM] SH: Convert to use shared APM emulation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-09 17:08:58 +00:00
Yoshinori Sato e9cfc147df sh: Fixup SH-2 BUG() trap handling.
This adds in support for the BUG() trap on SH-2.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 09:11:45 +09:00
Paul Mundt b641fe016a sh: Use early_param() for earlyprintk parsing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 09:00:47 +09:00
Paul Mundt e2dfb912d3 sh: Fix .empty_zero_page alignment for PAGE_SIZE > 4096.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:53:29 +09:00
Paul Mundt f668f55c39 sh: Fixup .data.page_aligned.
This had a bogus .data.idt reference, fix it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:50:36 +09:00
Paul Mundt 05c8690d95 sh: Hook up SH7722 scif ipr interrupts.
Add the SCIF IRQs to the IPR table for SH7722.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:49:06 +09:00
Paul Mundt 1dc417d039 sh: Fixup sh_bios() trap handling.
This was inadvertently broken when the entry.S code split up,
restore the missing branch and get subsequent traps working
under debug again. This manifested itself as a lockup when
attempting to reload the VBR base.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:09 +09:00
Paul Mundt 41504c3972 sh: SH-MobileR SH7722 CPU support.
This adds CPU support for the SH7722.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:09 +09:00
Paul Mundt 37bda1da45 sh: Convert remaining remap_area_pages() users to ioremap_page_range().
A couple of these were missed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Paul Mundt 79890c5124 sh: Fixup kernel_execve() for syscall cleanups.
SH-2 and SH-2A need to use a different syscall base for the trapa
vector than the other parts, so fixup the logic in the kernel_execve()
case.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Paul Mundt b652c23cb0 sh: Fix get_wchan().
Some time ago the schedule frame size changed and we failed to reflect
this in get_wchan() at the time. This first popped up as a problem on
SH7751R where schedule_frame ended up being unaligned and generating
an unaligned trap. This fixes it up again..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Paul Mundt dc34d312c7 sh: BUG() handling through trapa vector.
Previously we haven't been doing anything with verbose BUG() reporting,
and we've been relying on the oops path for handling BUG()'s, which is
rather sub-optimal.

This switches BUG handling to use a fixed trapa vector (#0x3e) where we
construct a small bug frame post trapa instruction to get the context
right. This also makes it trivial to wire up a DIE_BUG for the atomic
die chain, which we couldn't really do before.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Yoshinori Sato 55eec11a50 sh: Kill off unused SE7619 I/O ops.
This can use the generic routines, so kill off the board-specific ones.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Yoshinori Sato a45e724ba0 sh: Fix Solution Engine 7619 build.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Yoshinori Sato 11cbb70ea3 sh: Trivial build fixes for SH-2 support.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Yoshinori Sato 780a156888 sh: IPR IRQ updates for SH7619/SH7206.
This updates the SH7619 and SH7206 code for the IPR IRQ changes.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Stuart Menefy ff4e2ca7c6 sh: gcc4 symbol export fixups.
gcc 4 for sh changes the names of some compiler intrinsic functions
and adds some additional ones. This patch adds the new ones, and
fixes up various module symbol resolution issues.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Paul Mundt b6250e3729 sh: landisk board build fixes.
Get the landisk board building again..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Jamie Lenehan 417d6b9edb sh: register rtc resources for sh775x.
Register the RTC resources for the sh775x subtype so that the new
generic RTC support in drivers/rtc/rtc-sh.c will work.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Yoshinori Sato d79b8741f2 sh: SH-2 defconfig updates.
This adds a new defconfig for SE7619 and updates SE7206.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Paul Mundt cf00e20444 sh: Add uImage and S-rec generation support.
Add a couple of new targets, both for uImage and S-rec generation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Paul Mundt fce3a24e70 sh: push-switch fixups for work_struct API damage.
INIT_WORK() dropped the data arg, so now we have to stash an extra
pointer and backpedal instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Haavard Skinnemoen 5b3e1a85c2 [PATCH] Generic ioremap_page_range: sh conversion
Convert SH to use generic ioremap_page_range()

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:52 -08:00
David Howells f0d1b0b30d [PATCH] LOG2: Implement a general integer log2 facility in the kernel
This facility provides three entry points:

	ilog2()		Log base 2 of unsigned long
	ilog2_u32()	Log base 2 of u32
	ilog2_u64()	Log base 2 of u64

These facilities can either be used inside functions on dynamic data:

	int do_something(long q)
	{
		...;
		y = ilog2(x)
		...;
	}

Or can be used to statically initialise global variables with constant values:

	unsigned n = ilog2(27);

When performing static initialisation, the compiler will report "error:
initializer element is not constant" if asked to take a log of zero or of
something not reducible to a constant.  They treat negative numbers as
unsigned.

When not dealing with a constant, they fall back to using fls() which permits
them to use arch-specific log calculation instructions - such as BSR on
x86/x86_64 or SCAN on FRV - if available.

[akpm@osdl.org: MMC fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Howells <dhowells@redhat.com>
Cc: Wojtek Kaniewski <wojtekka@toxygen.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:51 -08:00
Josef Sipek c943c4b49c [PATCH] struct path: convert sh
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:49 -08:00
Henry Nestler 19e5d9c0d2 [PATCH] initrd: remove unused false condition for initrd_start
After LOADER_TYPE && INITRD_START are true, the short if-condition
for INITRD_START can never be false.

Remove unused code from the else condition.

Signed-off-by: Henry Nestler <henry.ne@arcor.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:38 -08:00
Ralf Baechle 4cf303487d [PATCH] Export pm_suspend for the shared APM emulation
The new shared APM emulation just like its ARM and MIPS predecessors uses
pm_suspend() which was only exported on SH.  Move export to close to it's
definition where it really should be anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:32 -08:00
Nigel Cunningham 7dfb71030f [PATCH] Add include/linux/freezer.h and move definitions from sched.h
Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.

[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:27 -08:00
Christoph Lameter e18b890bb0 [PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:25 -08:00
Christoph Lameter e94b176609 [PATCH] slab: remove SLAB_KERNEL
SLAB_KERNEL is an alias of GFP_KERNEL.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:24 -08:00
Chen, Kenneth W 39dde65c99 [PATCH] shared page table for hugetlb page
Following up with the work on shared page table done by Dave McCracken.  This
set of patch target shared page table for hugetlb memory only.

The shared page table is particular useful in the situation of large number of
independent processes sharing large shared memory segments.  In the normal
page case, the amount of memory saved from process' page table is quite
significant.  For hugetlb, the saving on page table memory is not the primary
objective (as hugetlb itself already cuts down page table overhead
significantly), instead, the purpose of using shared page table on hugetlb is
to allow faster TLB refill and smaller cache pollution upon TLB miss.

With PT sharing, pte entries are shared among hundreds of processes, the cache
consumption used by all the page table is smaller and in return, application
gets much higher cache hit ratio.  One other effect is that cache hit ratio
with hardware page walker hitting on pte in cache will be higher and this
helps to reduce tlb miss latency.  These two effects contribute to higher
application performance.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Dave McCracken <dmccr@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:21 -08:00
Jamie Lenehan ea0f8feaa0 sh: sh775x/titan fixes for irq header changes.
The following moves the creation of IPR interupts into setup-7750.c
and updates a few other things to make it all work after the "Drop
CPU subtype IRQ headers" commit. It boots and runs fine on my titan
board.

 - adds an ipr_idx to the ipr_data and uses a function in the subtype
   code to calculate the address of the IPR registers

 - adds a function to enable individual interrupt mode for externals
   in the subtype code and calls that from the titan board code
   instead of doing it directly.

 - I changed the shift in the ipr_data to be the actual # of bits to
   shift, instead of the numnber / 4 - made it easier to match with
   the manual.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 12:05:02 +09:00
Paul Mundt fe9687dec0 sh: update r7780rp defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 12:02:01 +09:00
Paul Mundt 65e5d90de6 sh: compile fixes for header cleanup.
Since some header inclusion paths were cleaned up, compilation
broke. Add in the headers we need directly to build again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 11:24:48 +09:00
Paul Mundt f36af73304 sh: set KBUILD_IMAGE to something sensible.
This was missing for sh too, wire it up..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 11:08:49 +09:00
Paul Mundt 9b8c90eb0d sh: show held locks in stack trace with lockdep.
Follows the same change as other architectures..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 11:07:51 +09:00
Paul Mundt 0c020e3dfb sh: platform_pata support for R7780RP
This adds a platform device for the directly connected
CF interface on R7780RP boards, for use with the
pata_platform libata driver.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:40 +09:00
Paul Mundt afbfb52e47 sh: stacktrace/lockdep/irqflags tracing support.
Wire up all of the essentials for lockdep..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:40 +09:00
Paul Mundt bd156147eb sh: dyntick infrastructure.
This adds basic NO_IDLE_HZ support to the SH timer API so timers
are able to wire it up. Taken from the ARM version, as it fit in
to our API with very few changes needed.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:40 +09:00
Paul Mundt 1d118562c2 sh: Clock framework tidying.
This syncs up the SH clock framework with the linux/clk.h API,
for which there were only some minor changes required, namely
the clk_get() dev_id and subsequent callsites.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:40 +09:00
Paul Mundt e74b56800e sh: Turn off IRQs around get_timer_offset() calls.
Since all of the sys_timer sources currently do this on their own
within the ->get_offset() path, it's more sensible to just have
the caller take care of it when grabbing xtime_lock. Incidentally,
this is more in line with what others (ie, ARM) are doing already.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt bca7c20764 sh: Get the PGD right in oops case with 64-bit PTEs.
Previously this was using a static pgd shift in the reporting
code, simply flip this to PGDIR_SHIFT which does the right
thing depending on varying PTE magnitudes on the SH-X2 MMU.

While we're at it, and since it's been recently added, use
get_TTB() for fetching the TTB, rather than the open coded
instructions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 9f650cf2b8 sh: Fix store queue bitmap end.
The end of the store queue bitmap is miscalculated when searching
for a free range in sq_remap(), missing the PAGE_SHIFT shift that's
done in sq_api_init(). This runs in to workloads where we can scan
beyond the end of the bitmap.

Spotted by Paul Jackson:

	http://marc.theaimsgroup.com/?l=linux-kernel&m=116493191224097&w

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 6fc21b82ef sh: More flexible + SH7780 earlyprintk SCIF support.
This makes the early printk support somewhat more flexible,
moving the port definition to a config option, and making the
port initialization configurable for sh-ipl+g users.

At the same time, this allows us to trivially wire up the
SH7780 SCIF0, so that's thrown in too more or less for free.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 510c72ad2d sh: Fixup various PAGE_SIZE == 4096 assumptions.
There were a number of places that made evil PAGE_SIZE == 4k
assumptions that ended up breaking when trying to play with
8k and 64k page sizes, this fixes those up.

The most significant change is the way we load THREAD_SIZE,
previously this was done via:

	mov	#(THREAD_SIZE >> 8), reg
	shll8	reg

to avoid a memory access and allow the immediate load. With
a 64k PAGE_SIZE, we're out of range for the immediate load
size without resorting to special instructions available in
later ISAs (movi20s and so on). The "workaround" for this is
to bump up the shift to 10 and insert a shll2, which gives a
bit more flexibility while still being much cheaper than a
memory access.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 1dc41e58a5 sh: Fixup 4K irq stacks.
There was a clobber issue with the register we were saving
the stack in, so we switch to a register that we handle in
the clobber list properly already.

This also follows the x86 changes for allowing the softirq
checks from hardirq context.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Mark Glaisher db9b99d461 sh: dma-api channel capability extensions.
This extends the SH DMA API for allowing handling of DMA
channels based off of their respective capabilities.

A couple of functions are added to the existing API,
the core bits are register_chan_caps() for registering
channel capabilities, and request_dma_bycap() for fetching
a channel dynamically based off of a capability set.

Signed-off-by: Mark Glaisher <mark.glaisher@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt e803aaf63a sh: Drop name overload in dma-sh.
Pass along the dev_id from request_dma() all the way down,
rather than inserting an artificial name relating to the TEI
line that we were doing before.

This makes the line a bit less obvious, but dev_id is the proper
behaviour for this regardless.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 49f860bb5d sh: Make dma-isa depend on ISA_DMA_API.
Previously we linked in the ISA DMA wrapper unconditionally.
As there are very few users of this, it's better to make it
conditional.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Paul Mundt 4dfc119f1c sh: dma-sysfs fixes.
Handle the case where no registered DMACs exist somewhat more
gracefully. While we're at it, check for sysdev_create_file()
failing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:39 +09:00
Stuart Menefy e0969e0c9b sh: Fix syscall tracing ordering.
The implementation of system call tracing in the kernel has a
couple of ordering problems:

 - the validity of the system call number is checked before
   calling out to system call tracing code, and should be
   done after

 - the system call number used when tracing is the one the
   system call was invoked with, while the system call tracing
   code can legitimatly change the call number (for example
   strace permutes fork into clone)

This patch fixes both of these problems, and also reoders the
code slightly to make the direct path through the code the
common case.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Stuart Menefy 9b3a53ab76 sh: TLB miss fast-path optimizations.
Handle simple TLB miss faults which can be resolved completely
from the page table in assembler.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Paul Mundt 9daa0c257d sh: R7780RP push-switch support.
This adds simple push-switch support for the RDBRP-1/RDBREVRP-1 debug
boards found on the R7780RP-1.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Paul Mundt 9f5e8eee5c sh: generic push-switch framework.
This adds support for a generic push switch framework. Adaptable for
various switches, including GPIO switches and the push switches commonly
found on Renesas debug boards.

This allows switch states to be trivially reported through sysfs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Stuart Menefy 99a596f93b sh: pmd rework.
Remove extra bits from the pmd structure and store a kernel logical
address rather than a physical address. This allows it to be directly
dereferenced. Another piece of wierdness inherited from x86.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Stuart Menefy 6e4662ff49 sh: Use MMU.TTB register as pointer to current pgd.
Add TTB accessor functions and give it a sensible default
value. We will use this later for optimizing the fault
path.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Stuart Menefy b5a1bcbee4 sh: Set up correct siginfo structures for page faults.
Remove the previous saving of fault codes into the thread_struct
as they are never used, and appeared to be inherited from x86.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Stuart Menefy f0bc814cfb sh: gcc4 support.
This fixes up the kernel for gcc4. The existing exception handlers
needed some wrapping for pt_regs access, acessing the registers
via a RELOC_HIDE() pointer.

The strcpy() issues popped up here too, so add -ffreestanding and
kill off the symbol export.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Paul Mundt 53644087a6 sh: Explicit endian selection support.
Previously big endian was simply assumed if little endian was
not set, which led to some cflags ordering issues. There's not
much point to not having a big endian option, so shove one in
a choice and wire it up in the Makefile.

This lets us clean up some of the cflags ordering while we're
at it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:38 +09:00
Paul Mundt 52e27782e1 sh: p3map_sem sem2mutex conversion.
Simple sem2mutex conversion for the p3map semaphores.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt 21440cf04a sh: Preliminary support for SH-X2 MMU.
This adds some preliminary support for the SH-X2 MMU, used by
newer SH-4A parts (particularly SH7785).

This MMU implements a 'compat' mode with SH-X MMUs and an
'extended' mode for SH-X2 extended features. Extended features
include additional page sizes (8kB, 4MB, 64MB), as well as the
addition of page execute permissions.

The extended mode attributes are placed in a second data array,
which requires us to switch to 64-bit PTEs when in X2 mode.

With the addition of the exec perms, we also overhaul the mmap
prots somewhat, now that it's possible to handle them more
intelligently.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt b552c7e8bc sh: Hook SH7785 in to the build system.
Simple 7785 placeholders to start hooking up other bits of code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt 9a7ef6d59f sh: Drop CPU subtype IRQ headers.
This drops the various IRQ headers that were floating around
and primarily providing hardcoded IRQ definitions for the
various CPU subtypes. This quickly got to be an unmaintainable
mess, made even more evident by the subtle breakage introduced
by the SH-2 and SH-2A changes.

Now that subtypes are able to register IRQ maps directly, just
rip all of the headers out.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt 417528a2e3 sh: Configurable timer IRQ.
All of the various CPU subtypes currently hardcode TIMER_IRQ,
switch this to a config option in the few places we need this.

This allows further removal of hardcoded IRQ headers..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt 716067f289 sh: Fixup entry-common path breakage for SH-3.
The nommu patches broke the path for the common bits, get it building
for the SH-3/4 case again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Paul Mundt 710ee0cc45 sh: SE7206 build fixes.
A number of API changes happened underneath the 7206 patches, update
for everything that broke.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Yoshinori Sato f36af3fd37 sh: Add support for Solution Engine 7206 and 7619 boards.
This adds support for the Solution Engine 7206 and 7619.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:37 +09:00
Yoshinori Sato de39840646 sh: Exception vector rework and SH-2/SH-2A support.
This splits out common bits from the existing exception handler for
use between SH-2/SH-2A and SH-3/4, and adds support for the SH-2/2A
exceptions.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:36 +09:00
Yoshinori Sato 0983b31849 sh: Wire up division and address error exceptions on SH-2A.
SH-2A has special division hardware as opposed to a full-fledged FPU,
wire up the exception handlers for this.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:36 +09:00
Yoshinori Sato 9d4436a6fb sh: Add support for SH7206 and SH7619 CPU subtypes.
This implements initial support for the SH7206 (SH-2A) and SH7619
(SH-2) MMU-less CPUs.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-06 10:45:36 +09:00
Al Viro 3277c39f8d [NET]: Kill direct includes of asm/checksum.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02 21:22:59 -08:00
Matt LaPlante 3cb2fccc5f Fix misc Kconfig typos
Fix various Kconfig typos.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30 05:22:59 +01:00
Jamie Lenehan 4731f2dfd5 sh: Titan defconfig update.
Small defconfig update for titan for 2.6.19-rc3, adding SH-RTC.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-31 12:53:29 +09:00
Jamie Lenehan bd71ab88de sh: Fix IPR-IRQ's for IRQ-chip change breakage.
The conversion from IPR-IRQ to IRQ-chip resulted in the
ipr data being allocated in a local variable in
make_ipr_irq - breaking anything using IPR interrupts.

This changes all of the callers of make_ipr_irq to
allocate a static structure containing the IPR data which
is then passed to make_ipr_irq. This removes the need for
make_ipr_irq to allocate any additional space for the IPR
information.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-31 12:53:28 +09:00
Paul Mundt 1f6c526c40 sh: Update r7780rp_defconfig.
Small defconfig updates for R7780RP, enabling SH-RTC.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-31 12:53:28 +09:00
Paul Mundt 6887d83d6a sh: Wire up new syscalls.
This wires up sys_move_pages, sys_getcpu, and sys_epoll_pwait.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-31 12:53:28 +09:00
Andrew Morton 61ce1efe6e [PATCH] vmlinux.lds: consolidate initcall sections
Add a vmlinux.lds.h helper macro for defining the eight-level initcall table,
teach all the architectures to use it.

This is a prerequisite for a patch which performs initcall synchronisation for
multithreaded-probing.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
[ Added AVR32 as well ]
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-27 15:34:51 -07:00
Paul Mundt 66a740572d sh: Convert INTC2 to IRQ table registration.
Currently the INTC2 code contains a fixed IRQ table that it
iterates through to set the handler type, we move this in to
the CPU subtype setup code instead and allow for submitting
the table that way.

This drops the ST40 tables, as nothing has been happening
with those processors, while converting the only existing
users to use the new table directly (SH7760 and SH7780).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-20 15:30:55 +09:00
Paul Mundt 709bc44c31 sh: Updates for irq-flow-type naming changes.
handle_irq_name() and set_irq_chip_and_handler() disappeared,
update for desc->name and set_irq_chip_and_handler_name() use.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-19 17:32:56 +09:00
Paul Mundt 1f666587db sh: Fix exception_handling_table alignment.
With the recent change ripping out interrupt_table, explicit
padding of the table was missing, causing bad things to happen
when manually inserting handlers in to the table. This problem
particularly showed up in relation to do_fpu_state_restore()
which was inserted quite deeply in to the table and ended up
scribbling over a slab object.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-19 16:30:32 +09:00
Paul Mundt 082c44d20e sh: Cleanup board header directories.
Now with the ide.h mess sorted out, most of these boards
don't need their own directory. Move the headers out, and
update the driver paths.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-19 16:30:32 +09:00
Paul Mundt 6b0022305f sh: Proper show_stack/show_trace() implementation.
This splits out some of the previous show_stack() implementation which
was mostly doing the show_trace() work without actually dumping any of
the stack contents. This now gets split in to two sections, where we
do the fetching of the stack pointer and subsequent stack dumping in
show_stack(), while moving the call trace in to show_trace().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-19 16:30:31 +09:00
Ryusuke Sakato 8ae91b9ad8 sh: SH-4A UBC support
A simple patch to enable the UBC on SH-4A.

Signed-off-by: Ryusuke Sakato <sakato@hsdv.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-12 12:16:13 +09:00
Paul Mundt baf4326e49 sh: interrupt exception handling rework
Kill off interrupt_table for all of the CPU subtypes, we now
default in to stepping in to do_IRQ() for _all_ IRQ exceptions
and counting the spurious ones, rather than simply flipping on
the ones we cared about. This and enabling the IRQ by default
automatically has already uncovered a couple of bugs and IRQs
that weren't being caught, as well as some that are being
generated far too often (SCI Tx Data Empty, for example).

The general rationale is to use a marker for interrupt exceptions,
test for it in the handle_exception() path, and skip out to
do_IRQ() if it's found. Everything else follows the same behaviour
of finding the cached EXPEVT value in r2/r2_bank, we just rip out
the INTEVT read from entry.S entirely (except for in the kGDB NMI
case, which is another matter).

Note that while this changes the do_IRQ() semantics regarding r4
handling, they were fundamentally broken anyways (relying entirely
on r2_bank for the cached code). With this, we do the INTEVT read
from do_IRQ() itself (in the CONFIG_CPU_HAS_INTEVT case), or fall
back on r4 for the muxed IRQ number, which should also be closer
to what SH-2 and SH-2A want anyways.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-12 12:03:04 +09:00
Paul Mundt 8884c4cb8b sh: Default enable R7780RP IRQs.
Now that we've started accounting for spurious IRQs, change the
logic somewhat so that we have a better chance of catching them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-12 11:56:31 +09:00
Paul Mundt 833abf7fe0 sh: Zero-out coherent buffer in consistent_alloc().
Be sure to zero out the buffer, this was causing occasional problems
under heavier PCI tests.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-10 18:33:10 +09:00
Paul Mundt 0f13804ae9 sh: Convert IPR-IRQ to IRQ chip.
One more initial conversion..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 17:55:25 +09:00
Paul Mundt 525ccc452c sh: Convert INTC2 IRQ handler to irq_chip.
More struct irq_chip conversions, this time the INTC2 handlers.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 17:35:48 +09:00
Jamie Lenehan 580410005d sh: Fix pr_debug statements for sh4
Fix a problem uncovered by the recent change to always check the
arguments to pr_debug. The sh7751 was using the wrong name for the
PCI IO base address.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:36:15 +09:00
Paul Mundt 257440b00b sh: Convert r7780rp IRQ handler to IRQ chip.
Simple conversion of the R7780RP IRQ handler to struct irq_chip.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:33:00 +09:00
Paul Mundt 35f3c5185b sh: Updates for IRQ handler changes.
Trivial fixes for build breakage introduced by IRQ handler changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:31:16 +09:00
Paul Mundt a700f3594d sh: Kill off timer_ops get_frequency().
We're not using this anywhere these days, kill it off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:26:21 +09:00
Paul Mundt 4588214526 sh: First step at generic timeofday support.
At the moment we wrap GENERIC_TIME around our existing timer API.
As boards start providing their own clocksources, they're able to
select GENERIC_TIME accordingly and optimize out most of the timer
API.

Once the current timers have been reworked as proper clocksource
drivers, the rest of the place holders for the timer API can go
away and we can flip on GENERIC_TIME unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-06 15:26:21 +09:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Paul Mundt 2914d4da17 sh: Kill off remaining config.h references.
A few of these managed to sneak back in, get rid of them once
and for all.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-03 13:19:02 +09:00
Paul Mundt 3e6c999de9 sh: Initial gitignore list
Ignore build-time generated files.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-03 13:16:15 +09:00
Paul Mundt 711fa80968 sh: build fixes for defconfigs.
Get all of the defconfigs building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-03 13:14:04 +09:00
Paul Mundt c91485676e sh: Set pclk default for SH7705.
CPU sub-types set the pclk default in Kconfig, add one
for SH7705.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-03 13:11:00 +09:00
Paul Mundt af3e17c448 sh: defconfig updates.
Sync up all of the defconfigs, and kill off a few old ones..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-10-03 13:08:20 +09:00
Arnd Bergmann fe74290d51 [PATCH] provide kernel_execve on all architectures
This adds the new kernel_execve function on all architectures that were using
_syscall3() to implement execve.

The implementation uses code from the _syscall3 macros provided in the
unistd.h header file.  I don't have cross-compilers for any of these
architectures, so the patch is untested with the exception of i386.

Most architectures can probably implement this in a nicer way in assembly or
by combining it with the sys_execve implementation itself, but this should do
it for now.

[bunk@stusta.de: m68knommu build fix]
[markh@osdl.org: build fix]
[bero@arklinux.org: build fix]
[ralf@linux-mips.org: mips fix]
[schwidefsky@de.ibm.com: s390 fix]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:23 -07:00