aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel
AgeCommit message (Collapse)AuthorFilesLines
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 <[email protected]> Acked-by: Haavard Skinnemoen <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Martin Schwidefsky <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-16sh: sh-rtc support for SH7709.Kristoffer Ericson1-0/+28
Signed-off-by: Kristoffer Ericson <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
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 <[email protected]>
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-07-12sh: Add a .bss.page_aligned section for 4K stacks.Paul Mundt1-8/+8
Signed-off-by: Paul Mundt <[email protected]>
2007-06-20sh: Preliminary support for the SH-X3 CPU.Paul Mundt7-4/+254
This adds basic support for UP SH-X3. Signed-off-by: Paul Mundt <[email protected]>
2007-06-20sh: Hook up hard_smp_processor_id() for INTC2 block.Paul Mundt1-2/+7
We need to know the CPU ID in order to calculate the mask and ack registers effectively. Stub this in for UP. Signed-off-by: Paul Mundt <[email protected]>
2007-06-19sh: Handle -ERESTART_RESTARTBLOCK for restartable syscalls.Paul Mundt1-3/+4
The current implementation only handles -ERESTARTNOHAND, whereas we also need to handle -ERESTART_RESTARTBLOCK in the handle_signal() case for restartable system calls. As noted by Carl: This fixes the LTP test nanosleep03 - the current kernel causes -ERESTART_RESTARTBLOCK to reach user space rather than the correct -EINTR. Reported-by: Carl Shaw <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-06-18sh: oops_enter()/oops_exit() in die().Paul Mundt1-0/+3
As Russell helpfully pointed out on linux-arch: http://marc.info/?l=linux-arch&m=118208089204630&w=2 We were missing the oops_enter/exit() in the sh die() implementation. As we do support lockdep, it's beneficial to add these calls so lockdep properly disables itself in the die() case. Signed-off-by: Paul Mundt <[email protected]>
2007-06-18sh: Fix restartable syscall arg5 clobbering.Kaz Kojima1-2/+4
We use R0 as the 5th argument of syscall. When the syscall restarts after signal handling, we should restore the old value of R0. The attached patch does it. Without this patch, I've experienced random failures in the situation which signals are issued frequently. Signed-off-by: Kaz Kojima <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-06-15sh: rework ipr codeMagnus Damm9-155/+229
This patch reworks the ipr code by grouping the offset array together with the ipr_data structure in a new data structure called ipr_desc. This new structure also contains the name of the controller in struct irq_chip. The idea behind putting struct irq_chip in there is that we can use offsetof() to locate the base addresses in the irq_chip callbacks. This strategy has much in common with the recently merged intc2 code. One logic change has been made - the original ipr code enabled the interrupts by default but with this patch they are all disabled by default. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-06-15sh: rework intc2 codeMagnus Damm4-34/+70
The shared intc2 code currently contains cpu-specific #ifdefs. This is a tad unclean and it prevents us from using the shared code to drive board-specific irqs on the se7780 board. This patch reworks the intc2 code by moving the base addresses of the intc2 registers into struct intc2_desc. This new structure also contains the name of the controller in struct irq_chip. The idea behind putting struct irq_chip in there is that we can use offsetof() to locate the base addresses in the irq_chip callbacks. One logic change has been made - the original shared intc2 code enabled the interrupts by default but with this patch they are all disabled by default. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-06-11sh: Fixup misaligned data for sh2 lockdep.Paul Mundt1-0/+1
lockdep/irqflags tracing on SH-2 ends up with a misaligned branch, fix it. Signed-off-by: Paul Mundt <[email protected]>
2007-06-11sh: Tidy up dependencies for SH-2 build.Paul Mundt3-19/+3
SH-2 can presently get in to some pretty bogus states, so we tidy up the dependencies a bit and get it all building again. This gets us a bit closer to a functional allyesconfig and allmodconfig, though there are still a few things to fix up. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Kill off dead SH7604 support.Paul Mundt2-10/+2
This was added during 2.5.x, but was never moved along. This can easily be resurrected if someone has one they wish to work with, but it's not worth keeping around in its current form. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Fix up cpu to node mapping in sysfs.Paul Mundt1-0/+21
Currently cpu_to_node() is always 0 in the UP case, though we do want to have the CPU association linked in under sysfs even in the cases where we're only on a single CPU. Fix this up, so we have the cpu0 link on all of the available nodes that don't already have a CPU link of their own. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Fix the SH7722 flatmem build.Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: URAM node support for SH7722.Paul Mundt1-1/+8
This adds the URAM block on SH7722 as a separate node. Sparsemem is required for this, or it can simply be disabled by explicitly selecting a flatmem model. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Wire up mempolicy syscalls.Paul Mundt1-3/+3
Wire up mbind and get/set_mempolicy() in their reserved places. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Tidy compiler warnings for SH-2A build.Paul Mundt2-1/+1
Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Mark sparsemem regions present earlier.Paul Mundt1-4/+5
We have to call in to sparse_memory_present_with_active_regions() earlier in order for sparsemem to be happy. This was being called too late, and was causing troubles with the platforms that needed to enable sparsemem. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Register multiple nodes in topology_init().Paul Mundt1-0/+7
If we have multiple nodes, register these at topology_init() time. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: sparsemem support.Paul Mundt1-2/+6
This implements basic sparsemem support for SH. Presently this only uses static sparsemem, and we still permit explicit selection of flatmem. Those boards that want sparsemem can select it as usual. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Align .machvec.init section on a 4-byte boundary.Takashi YOSHII1-0/+1
.machvec.init can be misaligned with the recent machvec changes, forcibly align it on the boundary that it expects, as before. Signed-off-by: Takashi YOSHII <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Fix SH-4 CPU selects.Paul Mundt1-0/+4
Now that select no longer works for selecting the "closest" CPU, we have to explicitly reference the precise sub-type in the few places where it actually matters (presently only setup code and some legacy sh-sci cruft). Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Rip out special unknown machvec.Paul Mundt3-8/+12
This kills off the BareCPU board as a "special" machvec, rather, we leave this as a default for when no other vector is available, or when we want to use it in combination with other vectors for testing with generic ops. As sh_mv is copied out anyways (or overloaded when an alternate vector is explicitly selected), this doesn't consume any additional memory. The generic machvec can be forcibly selected with sh_mv=generic, or by not having any other boards enabled. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Kill off machvec aliases.Paul Mundt2-14/+38
We now throw all of the machvecs in to .machvec.init and either select one on the command line, or copy out the first (and usually only) one to sh_mv. The rest are freed as usual. This gets rid of all of the silly sh_mv aliasing and makes the selection explicit rather than link-order dependent. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Fixup cmdline handling from machvec changes.Paul Mundt1-6/+7
The command line wasn't being saved off properly after the machvec changes went in, fix it up. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Shut up SH2-DSP compile warnings.Paul Mundt2-2/+2
Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Fixup machvec support.Paul Mundt4-150/+122
This fixes up much of the machvec handling, allowing for it to be overloaded on boot. Making practical use of this still requires some Kconfig munging, however. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: __user annotations for __get/__put_user().Paul Mundt4-14/+12
This adds in some more __user annotations. These weren't being handled properly in some of the __get_user and __put_user paths, so tidy those up. Signed-off-by: Paul Mundt <[email protected]>
2007-06-08sh: Split out CPU topology initialization.Paul Mundt3-19/+26
Split out the CPU topology initialization to a separate file, and switch it to a percpu type, rather than an NR_CPUS array. At the same time, switch to only registering present CPUs, rather than using the possible CPU map. Signed-off-by: Paul Mundt <[email protected]>
2007-06-04sh: Fix SH4-202 clock fwk set_rate() mismatch.Paul Mundt1-1/+1
With the SH7722 changes, ->set_rate() also takes an algo_id, SH4-202 was overlooked when this change went in. Signed-off-by: Paul Mundt <[email protected]>
2007-06-04sh: Fix in_nmi symbol build error.Paul Mundt1-0/+2
If CONFIG_KGDB_NMI is disabled, we're left with a stray in_nmi reference that can't be resolved. Move the symbol under the ifdef, too. Signed-off-by: Paul Mundt <[email protected]>
2007-05-31sh: trivial build cleanups.Evgeniy Polyakov3-0/+9
Several errors were spotted during building for custom config (SMP included). Although SMP still does not compile (no ipi and __smp_call_function) and does not work, this looks a bit cleaner. Some other errors obtained via gcc-4.1.0 build. Signed-off-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-05-31sh: Fix vsyscall build failure.Manuel Lauss1-0/+1
CC arch/sh/kernel/vsyscall/vsyscall.o a/arch/sh/kernel/vsyscall/vsyscall.c: In function 'arch_setup_additional_pages': a/arch/sh/kernel/vsyscall/vsyscall.c:63: error: dereferencing pointer to incomplete type a/arch/sh/kernel/vsyscall/vsyscall.c:67: error: dereferencing pointer to incomplete type a/arch/sh/kernel/vsyscall/vsyscall.c:82: error: dereferencing pointer to incomplete type a/arch/sh/kernel/vsyscall/vsyscall.c:85: error: dereferencing pointer to incomplete type a/arch/sh/kernel/vsyscall/vsyscall.c: In function 'arch_vma_name': a/arch/sh/kernel/vsyscall/vsyscall.c:91: error: dereferencing pointer to incomplete type Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-05-31sh: Fix pcrel too far for in_nmi label.Takashi YOSHII1-0/+1
Add lost in_nmi definition to solve pcrel too far. Signed-off-by: Takashi YOSHII <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-05-23sh: section mismatch fixes for system timer.Paul Mundt1-3/+2
Fix up a couple of section mismatch warnings regarding sys_timer. Signed-off-by: Paul Mundt <[email protected]>
2007-05-22Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds10-24/+78
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix dreamcast build for IRQ changes. sh: Fix clock multiplier on SH7722. sh: Wire up kdump crash kernel exec in die(). sh: sr.bl toggling around idle sleep. sh: disable genrtc support. fs: Kill sh dependency for binfmt_flat. sh: Disable psw support for R7785RP. sh: Fix page size alignment in __copy_user_page(). sh: Fix up various compile warnings for SE boards. sh: Wire up signalfd/timerfd/eventfd syscalls. sh: revert addition of page fault notifiers spelling fixes: arch/sh/ input: hp680_ts compile fixes. sh: landisk: Header cleanups. sh: landisk: rtc-rs5c313 support. sh: Kill off pmb slab cache destructor. sh: Fix up psw build rules for r7780rp. sh: Shut up compiler warnings in __do_page_fault().
2007-05-21sh: Fix clock multiplier on SH7722.dmitry pervushin2-12/+29
This fixes up the master clock multiplier and initial rate propagation for the SH7722 clocks. Signed-off-by: dmitry pervushin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-05-21sh: Wire up kdump crash kernel exec in die().Paul Mundt1-0/+11
Now that we have the basic kdump support in place, add it in to die() so we can enter the crash kernel automatically. Signed-off-by: Paul Mundt <[email protected]>
2007-05-21sh: sr.bl toggling around idle sleep.Paul Mundt1-6/+27
As pointed out by Saito-san, without the sr.bl manipulation we can occasionally hit delays in the idle loop due to interrupt handling, so ensure that interrupts are blocked before going to sleep. At the same time, we throw in TIF_POLLING_NRFLAG for the !hlt_counter case (primarily used by the ST-40 parts). Signed-off-by: Paul Mundt <[email protected]>
2007-05-21sh: Fix up various compile warnings for SE boards.Paul Mundt1-0/+2
- setup-sh7750.c only defines the sh7751_ipr_map when building with SH7751 support. - 7722 Solution Engine was missing a mach-type entry, causing the macro in cf-enabler to be undefined. - arch/sh/mm/init.c needs linux/pagemap.h. Signed-off-by: Paul Mundt <[email protected]>
2007-05-21sh: Wire up signalfd/timerfd/eventfd syscalls.Paul Mundt1-0/+3
Signed-off-by: Paul Mundt <[email protected]>
2007-05-21spelling fixes: arch/sh/Simon Arlott5-6/+6
Spelling fixes in arch/sh/. Signed-off-by: Simon Arlott <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2007-05-19all-archs: consolidate .data section definition in asm-genericSam Ravnborg1-1/+1
With this consolidation we can now modify the .data section definition in one spot for all archs. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-19all-archs: consolidate .text section definition in asm-genericSam Ravnborg1-1/+1
Move definition of .text section to asm-generic. Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-09Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds16-295/+260
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix stacktrace simplification fallout. sh: SH7760 DMABRG support. sh: clockevent/clocksource/hrtimers/nohz TMU support. sh: Truncate MAX_ACTIVE_REGIONS for the common case. rtc: rtc-sh: Fix rtc_dev pointer for rtc_update_irq(). sh: Convert to common die chain. sh: Wire up utimensat syscall. sh: landisk mv_nr_irqs definition. sh: Fixup ndelay() xloops calculation for alternate HZ. sh: Add 32-bit opcode feature CPU flag. sh: Fix PC adjustments for varying opcode length. sh: Support for SH-2A 32-bit opcodes. sh: Kill off redundant __div64_32 symbol export. sh: Share exception vector table for SH-3/4. sh: Always define TRAPA_BUG_OPCODE. sh: __GFP_REPEAT for pte allocations, too. rtc: rtc-sh: Fix up dev_dbg() warnings. sh: generic quicklist support.
2007-05-09sh: Fix stacktrace simplification fallout.Paul Mundt1-1/+1
When the stacktrace simplification changes went in the function definition on SH got skipped, fix it up so things build again. Signed-off-by: Paul Mundt <[email protected]>
2007-05-09sh: clockevent/clocksource/hrtimers/nohz TMU support.Paul Mundt3-190/+167
This adds basic support for clockevents and clocksources, presently only implemented for TMU-based systems (which are the majority of SH-3 and SH-4 systems). The old NO_IDLE_HZ implementation is also dropped completely, the only users of this were on TMU-based systems anyways. More work needs to be done to generalize the TMU handling, in that the current implementation is rather tied to the notion of TMU0 and TMU1 utilization. Additionally, as more SH timers switch over to this scheme, we'll be able to gut most of the remaining system timer infrastructure that existed before. Signed-off-by: Paul Mundt <[email protected]>