aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-09-21rtc: rtc-sh: Support 4-digit year on SH7705/SH7710/SH7712.Paul Mundt2-3/+19
All SH-4 parts have a 4-digit year, while the SH-3 parts typically only use a 2-digit one. The SH7705, SH7710, and SH7712 SH-3 parts however opted to extend it to 4-digit and still look and act like an SH-3 RTC in all other ways. This adds a capability flag (RTC_CAP_4_DIGIT_YEAR) that these corner-case CPU subtypes can set in their platform data and cleans up some of the ifdef mess in the driver as a result. Reported-by: Markus Brunner <super.firetwister@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: Initial multiple-node support for SH-X3.Paul Mundt1-0/+14
Wire up CPU#0 URAM as node 1 on SH-X3. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for x3Magnus Damm1-16/+188
This patch converts the cpu specific interrupt setup code for x3 from intc2 to intc. New vectors are also added to match the preliminary information. Use plat_irq_setup_pins() to select between IRQ and IRL mode for IRQ0-3. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - fix IRQ4 and IRQ5 typo on sh3Magnus Damm3-3/+3
The intc tables for sh3 currently contain a typo where the bit fields in IPRD are mixed up for IRQ4 and IRQ5. This patch makes sure the correct bit fields are used - all according to the datasheets. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for SH7760Magnus Damm1-107/+146
This patch converts the cpu specific interrupt setup code for sh7760 from ipr + intc2 to intc. New vectors are also added to match the information provided by the datasheet. Vectors for IRQ4-IRQ7 are enabled by default. Use plat_irq_setup_pins() if pins IRL0-3 should be used in IRLM mode. The patch also adds the SIM block to the serial port platform data. Version two of this patch fixes MMCIF problems reported by Manuel Lauss. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for SH7785Magnus Damm1-33/+222
This patch converts the cpu specific interrupt setup code for sh7785 from intc2 to intc. New vectors are also added to match the information provided by the datasheet. No IRQ/IRL pin vectors are enabled by default. Use plat_irq_setup_pins() to select between IRL and IRQ mode. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: Support explicit L1 cache disabling.Paul Mundt2-7/+11
This reworks the cache mode configuration in Kconfig, and allows for explicit selection of write-back/write-through/off configurations. All of the cache flushing routines are optimized away for the off case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - avoid SH7710 specific vector on SH7712Magnus Damm1-2/+7
This patch makes sure that the sh7710 specific ipsec vector is missing if building for a sh7712. All according to the datasheet. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add missing vectors for SH7707Magnus Damm1-0/+8
This patch adds a few missing vectors for sh7707. The only interrupt controller differences between sh7707 and sh7709 seem to be added vectors for one LCD controller and two PCMCIA slots. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for SH7706, SH7707, SH7708, SH7709Magnus Damm4-192/+216
This patch unifies the cpu specific interrupt setup code for sh7706, sh7707, sh7708 and sh7709 and moves the code into a new file called setup-sh770x.c. It makes sense to share the setup code between these processors because most hardware blocks are identical from a software point of view. With this patch the sh770x processors now have a complete set of vectors that match with the information provided by the data sheets. This is a big improvement for sh7708. Vectors for IRQ4 and IRQ5 are enabled by default. Use plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode. This patch also unifies the platform device setup code which means that the rtc driver now has platform data for all sh770x processors. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for SH7710Magnus Damm1-53/+130
This patch converts the cpu specific interrupt setup code for sh7710 from ipr to intc. While at it new vectors are added to match the information provided by the datasheet. Version two simplifies the Kconfig part. Vectors for IRQ4 and IRQ5 are enabled by default. Use plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode. This patch also adds sh7710 specific platform data for the rtc driver. The base address of SCIF1 is adjusted to match the datasheet. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-09-21sh: intc - add support for SH7705Magnus Damm1-44/+118
This patch converts the cpu specific interrupt setup code for sh7705 from ipr to intc. While at it new vectors are added to match the information provided by the datasheet. Vectors for IRQ4 and IRQ5 are enabled by default. Use plat_irq_setup_pins() if pins IRQ0-3 should be used in IRQ mode. This patch also adds sh7705 specific platform data for the rtc driver. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-22sh: missing symbol fix for sh4-202Magnus Damm1-0/+5
This patch adds a plat_irq_setup() symbol for sh4-202. Without this fix it is impossible to build a working kernel using the microdev_defconfig. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-17sh: remove extraneous ; on scif_sercon_putc wait loopAndy Whitcroft1-1/+1
It seems we have gained an extraneous trailing ';' on one of the wait loops in scif_sercon_putc(). Although this is completely benign as the apparent payload is also the empty statement, it invites error in the future. Clean it up now. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-07sh: panic on machvec section misalignment.Paul Mundt1-0/+7
Now that __initmv references the machvec section unconditionally there have been cases where folks have been mistakenly flagging non-machvec structures with the machvec section attribute (presumably to shut up modpost). This leads to obscure breakage in earlyprintk amongst other places and is rather non-obvious. Add a simple sanity check to try and catch __initmv misuse and panic early. Reported-by: Markus Brunner <super.firetwister@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-04sh: Fix PTRACE_PEEKTEXT/PEEKDATA fallout from generic_ptrace_peekdata().Paul Mundt1-0/+1
When generic_ptrace_peekdata() was merged, the break for these cases ended up getting dropped, which lead to each PEEKTEXT/PEEKDATA op leaking in to PEEKUSR and get_user_pages() always -EFAULTing. Add the break back in. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-01sh: Fix SH-X3 FPU exception handling.Paul Mundt1-0/+5
SH-X3 has the FPU exceptions on different vectors completely, patch in do_fpu_state_restore() to the proper vectors. Results in a much happier userspace. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-01sh: Fix lockdep debugging oops on SH-3/4.Paul Mundt1-2/+1
In the SH-3/4 TLB access violation path we were enabling IRQs before the call in to trace_hardirqs_on(), which ended up triggering: if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) return; in kernel/lockdep.c:2031. Fix this up by removing the early re-enable, we were already re-enabling IRQs post-trace_hardirqs_on() already, so the semantics are now as was initially intended. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-31sh: Fix fs.h removal from mm.h regressions.Paul Mundt4-1/+4
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-26sh: fix get_wchan() for SH kernels without framepointersDavid McCullough1-2/+4
Do not follow the frame pointers (/proc/X/task/1/stat) unless we were compiled with them. Signed-off-by: David McCullough <david_mccullough@au.securecomputing.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-26sh: remove support for sh7300 and solution engine 7300Magnus Damm6-63/+16
This patch removes old dead code: - kill off sh7300 cpu support - get rid of broken solution engine 7300 board support Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-26sh: Silence sq compile warning on sh4 nommu.Paul Mundt1-6/+12
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-25sh: remove support for sh73180 and solution engine 73180Magnus Damm5-133/+1
This patch removes old dead code: - kill off sh73180 cpu support - get rid of broken solution engine 73180 board support Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-25sh: remove old broken pint codeMagnus Damm2-221/+0
The code in arch/sh/kernel/cpu/irq/pint.c doesn't compile, so let's get rid of it to make space for a future pint implementation on top of intc. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-21clockevents: fix resume logicThomas Gleixner1-0/+1
We need to make sure, that the clockevent devices are resumed, before the tick is resumed. The current resume logic does not guarantee this. Add CLOCK_EVT_MODE_RESUME and call the set mode functions of the clock event devices before resuming the tick / oneshot functionality. Fixup the existing users. Thanks to Nigel Cunningham for tracking down a long standing thinko, which affected the jinxed VAIO. [akpm@linux-foundation.org: xen build fix] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: john stultz <johnstul@us.ibm.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-20sh: intc - add support for SH7750 and its variantsMagnus Damm1-64/+189
This patch converts the cpu specific 7750 setup code to use the new intc controller. Many new vectors are added and multiple processor variants including 7091, 7750, 7750s, 7750r, 7751 and 7751r should all have the correct vectors hooked up. IRLM interrupts can be enabled using ipr_irq_enable_irlm() which now is marked as __init. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Move entry point code to .text.head.Paul Mundt2-1/+3
Follow Al Viro's m68k change from l-k: i.e. tell modpost that entry point code (that has to be outside of .init.text for external reasons) is OK to refer to .init.* Shuts up some section mismatch warnings from modpost. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Many symbol exports for nommu allmodconfig.Paul Mundt3-2/+43
allmodconfig generates a lot of interesting code, a lot of the generated symbols we've never exported before, so this fixes those up. Verified with both GCC3 and GCC4 toolchains. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: cpufreq: Fix up the build for SH-2.Paul Mundt1-5/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20Merge branch 'clkfwk'Paul Mundt3-134/+111
2007-07-20sh: cpufreq: clock framework support.Paul Mundt1-134/+80
This gets the SH cpufreq working again. We follow the changes in the AVR32 implementation for wrapping in to the clock framework. CPUs that wish to use this are required to define rate rounding primitives in order to satisfy clk_round_rate(). This works well enough for the common case, though we should look at unifying this driver across all of the platforms that implement clock framework support in one capacity or another. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Support rate rounding for SH7722 FRQCR clocks.Paul Mundt1-0/+15
Now that the round_rate() op is supported, hook it up on SH7722 for the FRQCR (CPU, PCLK, etc.) clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Implement clk_round_rate() in the clock framework.Paul Mundt1-0/+16
This is an optional component of the clock framework. However, as we're going to be using this in the cpufreq drivers, add support for it to the framework. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Wire up fallocate() syscall.Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: intc - add support for 7780Magnus Damm1-29/+190
This patch converts the cpu specific 7780 setup code to use the new intc controller. Many new vectors are added and also support for external interrupt sense configuration. So with this patch it is now possible to configure external interrupt pins as edge or level triggered using set_irq_type(). No external interrupts are registered by default. Use plat_irq_setup_pins() to select between IRQ or IRL mode. This patch also fixes the Alarm IRQ for the RTC. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: intc - improve group supportMagnus Damm1-20/+73
This patch improves intc group support, ie it makes it possible to group interrupts together and mask / unmask the entire group. This also works with priorities, so setting a priority for an entire group is also possible. This patch is needed to properly support certain processors such as the 7780. Fixes for NULL pointers in DECLARE_INTC_DESC() are also included. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: IPR/INTC2 IRQ setup consolidation.Magnus Damm12-24/+13
This patch unifies the cpu specific interrupt setup functions for interrupt controller blocks such as ipr, intc2 and intc. There is no point in having separate functions for each interrupt controller, so let's clean this up. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: intc - add support for 7722 processorMagnus Damm1-29/+129
This patch converts the cpu specific 7722 setup code to use the new intc controller. Many new vectors are added and also support for external interrupt sense configuration. So with this patch it is now possible to configure external interrupt pins as edge or level triggered using set_irq_type(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: intc - shared IPR and INTC2 controllerMagnus Damm2-0/+353
This is the second version of the shared interrupt controller patch for the sh architecture, fixing up handling of intc_reg_fns[]. The three main advantages with this controller over the existing ones are: - Both priority (ipr) and bitmap (intc2) registers are supported - External pin sense configuration is supported, ie edge vs level triggered - CPU/Board specific code maps 1:1 with datasheet for easy verification This controller can easily coexist with the current IPR and INTC2 controllers, but the idea is that CPUs/Boards should be moved over to this controller over time so we have a single code base to maintain. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20sh: Fix irq assignment for uarts on sh7722Magnus Damm1-6/+18
This patch contains two serial port related fixes for sh7722: - Make sure the irqs for the first serial port is correct - Add the second and third serial port to the platform data Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-20mm: Remove slab destructors from kmem_cache_create().Paul Mundt1-2/+1
Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-19define new percpu interface for shared dataFenghua Yu1-4/+1
per cpu data section contains two types of data. One set which is exclusively accessed by the local cpu and the other set which is per cpu, but also shared by remote cpus. In the current kernel, these two sets are not clearely separated out. This can potentially cause the same data cacheline shared between the two sets of data, which will result in unnecessary bouncing of the cacheline between cpus. One way to fix the problem is to cacheline align the remotely accessed per cpu data, both at the beginning and at the end. Because of the padding at both ends, this will likely cause some memory wastage and also the interface to achieve this is not clean. This patch: Moves the remotely accessed per cpu data (which is currently marked as ____cacheline_aligned_in_smp) into a different section, where all the data elements are cacheline aligned. And as such, this differentiates the local only data and remotely accessed data cleanly. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Christoph Lameter <clameter@sgi.com> Cc: <linux-arch@vger.kernel.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17PTRACE_POKEDATA consolidationAlexey Dobriyan1-4/+1
Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata() function. AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless return EPERM. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Christoph Hellwig <hch@lst.de> 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-07-17PTRACE_PEEKDATA consolidationAlexey Dobriyan1-11/+2
Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata() function. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Christoph Hellwig <hch@lst.de> 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-07-17Report that kernel is tainted if there was an OOPSPavel Emelianov1-0/+1
If the kernel OOPSed or BUGed then it probably should be considered as tainted. Thus, all subsequent OOPSes and SysRq dumps will report the tainted kernel. This saves a lot of time explaining oddities in the calltraces. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> [ Added parisc patch from Matthew Wilson -Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds35-435/+863
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (68 commits) sh: sh-rtc support for SH7709. sh: Revert __xdiv64_32 size change. sh: Update r7785rp defconfig. sh: Export div symbols for GCC 4.2 and ST GCC. sh: fix race in parallel out-of-tree build sh: Kill off dead mach.c for hp6xx. sh: hd64461.h cleanup and added comments. sh: Update the alignment when 4K stacks are used. sh: Add a .bss.page_aligned section for 4K stacks. sh: Don't let SH-4A clobber SH-4 CFLAGS. sh: Add parport stub for SuperIO ports. sh: Drop -Wa,-dsp for DSP tuning. sh: Update dreamcast defconfig. fb: pvr2fb: A few more __devinit annotations for PCI. fb: pvr2fb: Fix up section mismatch warnings. sh: Select IPR-IRQ for SH7091. sh: Correct __xdiv64_32/div64_32 return value size. sh: Fix timer-tmu build for SH-3. sh: Add cpu and mach links to CLEAN_FILES. sh: Preliminary support for the SH-X3 CPU. ...
2007-07-16generic bug: use show_regs() instead of dump_stack()Heiko Carstens1-1/+1
The current generic bug implementation has a call to dump_stack() in case a WARN_ON(whatever) gets hit. Since report_bug(), which calls dump_stack(), gets called from an exception handler we can do better: just pass the pt_regs structure to report_bug() and pass it to show_regs() in case of a warning. This will give more debug informations like register contents, etc... In addition this avoids some pointless lines that dump_stack() emits, since it includes a stack backtrace of the exception handler which is of no interest in case of a warning. E.g. on s390 the following lines are currently always present in a stack backtrace if dump_stack() gets called from report_bug(): [<000000000001517a>] show_trace+0x92/0xe8) [<0000000000015270>] show_stack+0xa0/0xd0 [<00000000000152ce>] dump_stack+0x2e/0x3c [<0000000000195450>] report_bug+0x98/0xf8 [<0000000000016cc8>] illegal_op+0x1fc/0x21c [<00000000000227d6>] sysc_return+0x0/0x10 Acked-by: Jeremy Fitzhardinge <jeremy@goop.org> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andi Kleen <ak@suse.de> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16sh: sh-rtc support for SH7709.Kristoffer Ericson1-0/+28
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-13sh: Export div symbols for GCC 4.2 and ST GCC.Paul Mundt1-0/+10
GCC 4.2 can emit integer variants of the FP division routines, so these need to be exported in order to keep the modules happy. 4.1.x versions of the ST compiler have these things backported, and so also generate these symbols (whereas vanilla gcc 4.1.x does not), so handle the __GNUC_STM_RELEASE__ case to accomodate updated versions of the 4.1.x toolchain. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-12sh: Update the alignment when 4K stacks are used.Robert P. J. Day1-6/+2
Use the newly added .bss.page_aligned section for aligning the stacks rather than THREAD_SIZE. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>