summaryrefslogtreecommitdiff
path: root/arch/mn10300/kernel
AgeCommit message (Collapse)Author
2009-04-09MN10300: Convert obsolete no_irq_type to no_irq_chipThomas Gleixner
Convert the last remaining users to no_irq_chip. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-02Simplify copy_thread()Alexey Dobriyan
First argument unused since 2.3.11. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-30cpumask: remove references to struct irqaction's mask field.Rusty Russell
Impact: cleanup It's unused, since about 1995. So remove all initialization of it in preparation for actually removing the field. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2009-03-27Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2Ingo Molnar
Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-13Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/coreIngo Molnar
2009-01-21Merge branch 'x86/mm' into core/percpuIngo Molnar
Conflicts: arch/x86/mm/fault.c
2009-01-15irq: update all arches for new irq_desc, fixMike Travis
Impact: fix build errors Since the SPARSE IRQS changes redefined how the kstat irqs are organized, arch's must use the new accessor function: kstat_incr_irqs_this_cpu(irq, DESC); If CONFIG_SPARSE_IRQS is set, then DESC is a pointer to the irq_desc which has a pointer to the kstat_irqs. If not, then the .irqs field of struct kernel_stat is used instead. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-14[CVE-2009-0029] Rename old_readdir to sys_old_readdirHeiko Carstens
This way it matches the generic system call name convention. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2009-01-11sparseirq: use kstat_irqs_cpu insteadYinghai Lu
Impact: build fix Ingo Molnar wrote: > tip/arch/blackfin/kernel/irqchip.c: In function 'show_interrupts': > tip/arch/blackfin/kernel/irqchip.c:85: error: 'struct kernel_stat' has no member named 'irqs' > make[2]: *** [arch/blackfin/kernel/irqchip.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > So could move kstat_irqs array to irq_desc struct. (s390, m68k, sparc) are not touched yet, because they don't support genirq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-31take init_fs to saner placeAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-10MN10300: Give correct size when reserving interrupt vector tableAkira Takeuchi
Give the correct size when reserving the interrupt vector table. It should be a page not a single byte. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-10MN10300: Fix the preemption resume_kernel() routineAkira Takeuchi
Fix the preemption resume_kernel() routine by inverting the test to see whether interrupts are off (IM7 is all enabled, not all disabled). Furthermore, interrupts should be disabled on entry to resume_kernel() so that they're correctly set for jumping to restore_all() and doing the need reschedule test. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-10MN10300: Discard low-priority Tx interrupts when closing an on-chip serial portAkira Takeuchi
Discard low-prioriy Tx interrupts when closing an MN10300 on-chip serial port. The MN10300 on-chip serial port uses three interrupts to manage its serial ports: (1) A very high priority interrupt that drives virtual DMA for Rx. (2) A very high priority interrupt that drives virtual DMA for Tx. (3) A normal priority virtual interrupt that does the normal UART interrupt stuff and is shared between Rx and Tx. mn10300_serial_stop_tx() only disables the high priority Tx interrupt. It doesn't also disable the normal priority one because it is shared with Rx. However, the high priority interrupt may interrupt local_irq_disabled() sections, and so may have queued up a low priority virtual interrupt whilst the UART driver is asking for the Tx interrupt to be disabled. The result of this can be an oops when we try to process the interrupt in mn10300_serial_transmit_interrupt() as port->uart.info and port->uart.info->tty may have gone away. To deal with this, if either of those pointers is NULL, we make sure the high-priority Tx interrupt is disabled and discard the interrupt. The low priority interrupt is disabled by the mn10300_serial_pic irq_chip table. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-10MN10300: vmlinux.lds.S cleanup - use PAGE_SIZE, PERCPU macrosCyrill Gorcunov
Include the linux/page.h header into the MN10300 kernel linker script thus allowing us to use PAGE_SIZE macro instead of a numeric constant. Also use the PERCPU macro instead of an explicit section definition. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-03MN10300: Introduce barriers to replace removed volatiles in gdbstub 16550 driverDavid Howells
Introduce into the MN10300 gdbstub 16550 driver a couple of barrier() calls to replace the removed volatility of the input/output index variables for the Rx ring buffer. A previous patch added them into the on-chip serial port driver. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-02MN10300: Fix application of kernel module relocationsMark Salter
This fixes the MN10300 kernel module linking to match the toolchain. RELA relocs don't use the value at the location being relocated. This has been working because the tools always leave the value at the target location cleared. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30MN10300: Tighten up the code using case rangesRobert P. J. Day
Compress a set of consecutive switch cases into a case-range. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20mn10300: use bcd2bin/bin2bcdAdrian Bunk
Change mn10300 to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-01MN10300: Fix IRQ handlingDavid Howells
Fix the IRQ handling on the MN10300 arch. This patch makes a number of significant changes: (1) It separates the irq_chip definition for edge-triggered interrupts from the one for level-triggered interrupts. This is necessary because the MN10300 PIC latches the IRQ channel's interrupt request bit (GxICR_REQUEST), even after the device has ceased to assert its interrupt line and the interrupt channel has been disabled in the PIC. So for level-triggered interrupts we need to clear this bit when we re-enable - which is achieved by setting GxICR_DETECT but not GxICR_REQUEST when writing to the register. Not doing this results in spurious interrupts occurring because calling mask_ack() at the start of handle_level_irq() is insufficient - it fails to clear the REQUEST latch because the device that caused the interrupt is still asserting its interrupt line at this point. (2) IRQ disablement [irq_chip::disable_irq()] shouldn't clear the interrupt request flag for edge-triggered interrupts lest it lose an interrupt. (3) IRQ unmasking [irq_chip::unmask_irq()] also shouldn't clear the interrupt request flag for edge-triggered interrupts lest it lose an interrupt. (4) The end() operation is now left to the default (no-operation) as __do_IRQ() is compiled out. This may affect misrouted_irq(), but according to Thomas Gleixner it's the correct thing to do. (5) handle_level_irq() is used for edge-triggered interrupts rather than handle_edge_irq() as the MN10300 PIC latches interrupt events even on masked IRQ channels, thus rendering IRQ_PENDING unnecessary. It is sufficient to call mask_ack() at the start and unmask() at the end. (6) For level-triggered interrupts, ack() is now NULL as it's not used, and there is no effective ACK function on the PIC. mask_ack() is now the same as mask() as the latch continues to latch, even when the channel is masked. Further, the patch discards the disable() op implementation as its now the same as the mask() op implementation, which is used instead. It also discards the enable() op implementations as they're now the same as the unmask() op implementations, which are used instead. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-24MN10300: Make sched_clock() report time since bootDavid Howells
Make sched_clock() report time since boot rather than time since last timer interrupt. Make sched_clock() expand and scale the 32-bit TSC value running at IOCLK speed (~33MHz) to a 64-bit nanosecond counter, using cnt32_to_63() acquired from the ARM arch and without using slow DIVU instructions every call. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04mn10300: Fix up __bug_table handling in module loader.Paul Mundt
Platforms that are using GENERIC_BUG must call in to module_bug_finalize()/module_bug_cleanup() in order to scan modules with their own __bug_table sections that are otherwise unaccounted. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-01MN10300: Wire up new system callsDavid Howells
Wire up system calls added in the last merge window for the MN10300 arch. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26mn10300: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20MN10300: Fix MN10300's serial port driver to get at its tty_structDavid Howells
Fix MN10300's serial port driver to get at its tty_struct as this moved from struct uart_info into struct tty_port in patch: Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-04mn10300: provide __ucmpdi2() for MN10300David Howells
Provide __ucmpdi2() for MN10300 so that allmodconfig can be built. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-04mn10300: export certain arch symbols required to build allmodconfigDavid Howells
Export kernel_thread() and empty_zero_page so that allmodconfig can be built for MN10300. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-16MN10300: Kill linux/a.out.h inclusionsDavid Howells
Kill linux/a.out.h inclusions in the MN10300 arch code. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-16[PATCH] take init_files to fs/file.cAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-05-03unified (weak) sys_pipe implementationUlrich Drepper
This replaces the duplicated arch-specific versions of "sys_pipe()" with one unified implementation. This removes almost 250 lines of duplicated code. It's marked __weak, so that *if* an architecture wants to override the default implementation it can do so by simply having its own replacement version, since many architectures use alternate calling conventions for the 'pipe()' system call for legacy reasons (ie traditional UNIX implementations often return the two file descriptors in registers) I still haven't changed the cris version even though Linus says the BKL isn't needed. The arch maintainer can easily do it if there are really no obstacles. Signed-off-by: Ulrich Drepper <drepper@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29mn10300: use kbuild.h instead of defining macros in asm-offsets.cChristoph Lameter
Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-17Generic semaphore implementationMatthew Wilcox
Semaphores are no longer performance-critical, so a generic C implementation is better for maintainability, debuggability and extensibility. Thanks to Peter Zijlstra for fixing the lockdep warning. Thanks to Harvey Harrison for pointing out that the unlikely() was unnecessary. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu>
2008-02-19MN10300: Make the kernel jump into gdbstub on a BUGDavid Howells
Make the kernel jump into gdbstub (if configured) on a BUG with the register set from the BUG rather than interpolating another illegal instruction and leaving gdbstub's idea of the process counter in unsupported_syscall() where the original BUG was detected. With this patch, gdbstub reports a SIGABRT to the compiler and reports the program counter at the original BUG, allowing the execution state at the time of the BUG to be examined with GDB. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19MN10300: Introduce barriers to replace removed volatiles in gdbstubDavid Howells
Introduce into the MN10300 gdbstub a couple of barrier() calls to replace the removed volatility of the input/output index variables for the Rx ring buffer. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19MN10300: Call update_process_times() outside of the xtime_lockDavid Howells
Call update_process_times() outside of the xtime_lock. Somewhere somewhere inside one of the functions called by that, xtime_lock is readlocked, which ends up in a deadlock situation. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08mn10300: add the MN10300/AM33 architecture to the kernelDavid Howells
Add architecture support for the MN10300/AM33 CPUs produced by MEI to the kernel. This patch also adds board support for the ASB2303 with the ASB2308 daughter board, and the ASB2305. The only processor supported is the MN103E010, which is an AM33v2 core plus on-chip devices. [akpm@linux-foundation.org: nuke cvs control strings] Signed-off-by: Masakazu Urade <urade.masakazu@jp.panasonic.com> Signed-off-by: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>