aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/kernel
AgeCommit message (Collapse)Author
2007-04-27[MIPS] Remove unused _THREAD_SIZE_ORDER from asm-offset.c.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-27[MIPS] Register PCI host bridge resource earlierThomas Bogendoerfer
PCI based SNI RM machines have their EISA bus behind an Intel PCI/EISA bridge. So the PCI IO range must start at 0x0000. Changing that will break the PCI bus, because i8259.c already has registered it's IO addresses before the PCI bus gets initialized. Below is a patch, which will register the PCI host bridge resources inside register_pci_controller(). It also changes i8259.c to use insert_region(), because request_resource() will fail, if the IO space of the PIT hanging of the PCI host bridge (maybe passing the resource parent to init_i8259_irqs() is a cleaner fix for that). Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-27[MIPS] Fix AP/SP to work in the reality of modern kernels.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20[MIPS] Fix BUG(), BUG_ON() handlingAtsushi Nemoto
With commit 63dc68a8cf60cb110b147dab1704d990808b39e2, kernel can not handle BUG() and BUG_ON() properly since get_user() returns false for kernel code. Use __get_user() to skip unnecessary access_ok(). This patch also make BRK_BUG code encoded in the TNE instruction. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20[MIPS] Retry {save,restore}_fp_context if failed in atomic context.Atsushi Nemoto
The save_fp_context()/restore_fp_context() might sleep on accessing user stack and therefore might lose FPU ownership in middle of them. If these function failed due to "in_atomic" test in do_page_fault, touch the sigcontext area in non-atomic context and retry these save/restore operation. This is a replacement of a (broken) fix which was titled "Allow CpU exception in kernel partially". Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-04-20[MIPS] Disallow CpU exception in kernel again.Atsushi Nemoto
The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU exception in kernel partially") was broken. The commit was to fix theoretical problem but broke usual case. Revert it for now. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29[MIPS] SMTC: Fix recursion in instant IPI replay code.Ralf Baechle
local_irq_restore -> raw_local_irq_restore -> irq_restore_epilog -> smtc_ipi_replay -> smtc_ipi_dq -> spin_unlock_irqrestore -> _spin_unlock_irqrestore -> local_irq_restore The recursion does abort when there is no more IPI queued for a CPU, so this isn't usually fatal which is why we got away with this for so long until this was discovered by code inspection. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29[MIPS] SMTC: Fix false trigger of debug code on single VPE.Ralf Baechle
Make smtc_setup_irq() update the list of interrupts which need to be watched by the debug code itself. Also there is no need to initialize the IPI swint when running with a single VPE, so don't initialize it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29[MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29[MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGSChris Dearman
Between the mtc0 or di instruction that disables interrupts and the following hazard barrier a processor may still take interrupts. If an interrupt is taken after interrupts are disabled but before the state is updated it will appear to restore_all that it is incorrectly returning with interrupts disabled. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-29[MIPS] lockdep: Handle interrupts in R3000 style c0_status register.Chris Dearman
Check the IEP bit for R3000 style processors when checking to see if interrupts will be reenabled in restore_all. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] Export except_vec_vi_{mori,lui,ori} as text symbols.Ralf Baechle
Otherwise objdump will screw up disassembly. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] VI: TRACE_IRQS_OFF clobbers $v0, so save & restore around call.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] RTLX: Handle copy_*_user return values.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] RTLX: Protect rtlx_{read,write} with mutex.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] RTLX: Harden against compiler reordering and optimization.Ralf Baechle
RTLX communication is based on lock-free shared memory buffers. It happened to be working by luck so far but relies on the optimizer doing certain optimizations but no reordering. Fixed by inserting proper barriers in rtlx_read and rtlx_write, and careful pointer dereferencing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] RTLX: Don't use volatile; it's fragile.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] FPU ownership management & preemption fixesAtsushi Nemoto
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-17[MIPS] Check FCSR for pending interrupts, alternative versionAtsushi Nemoto
Commit 6d6671066a311703bca1b91645bb1e04cc983387 is incomplete and misses non-r4k CPUs. This patch reverts the commit and fixes in other way. o Do FCSR checking in caller of restore_fp_context. o Send SIGFPE if the signal handler set any FPU exception bits. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-13[MIPS] kspd: ioctl needs a translation entry.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-08[PATCH] Add epoll compat_ code to fs/compat.cDavide Libenzi
IA64 and ARM-OABI are currently using their own version of epoll compat_ code. An architecture needs epoll_event translation if alignof(u64) in 32 bit mode is different from alignof(u64) in 64 bit mode. If an architecture needs epoll_event translation, it must define struct compat_epoll_event in asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use compat_sys_epoll_ctl and compat_sys_epoll_wait. All 64 bit architecture should use compat_sys_epoll_pwait. [sfr: restructure and move to fs/compat.c, remove MIPS version of compat_sys_epoll_pwait, use __put_user_unaligned] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-07[MIPS] Wire up ioprio_set and ioprio_get.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-07[MIPS] Export __copy_user_inatomic.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.Ralf Baechle
early_printk is a so much saner thing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-04[MIPS] N32 waitid is the same as o32.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] Make SMTC_IDLE_HOOK_DEBUG a proper option in Kconfig.debug.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] Fix foobar in wiring up compat_sys_epoll_pwait syscall.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] Always fixup unaligned accesses in kernel mode.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] RTLX: Delete multiple definition of ret shaddowing each other.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] RTLX, VPE: Make open actually atomic.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] Kill redundant EXTRA_AFLAGSAtsushi Nemoto
Many Makefiles in arch/mips have EXTRA_AFLAGS := $(CFLAGS) line. This is redundant while AFLAGS contains $(cflags-y) and any options only listed in CFLAGS (not in cflags-y) should be unnecessary for asm sources. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-26[MIPS] RTLX: Handle signals when sleeping.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-22[MIPS] SMP: Get smp_tune_scheduling to do something useful.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-22[MIPS] Add basic SMARTMIPS ASE supportFranck Bui-Huu
This patch adds trivial support for SMARTMIPS extension. This extension is currently implemented by 4KS[CD] CPUs. Basically it saves/restores ACX register, which is part of the SMARTMIPS ASE, when needed. This patch does *not* add any support for Smartmips MMU features. Futhermore this patch does not add explicit support for 4KS[CD] CPUs since they are respectively mips32 and mips32r2 compliant. So with the current processor configuration, a platform that has such CPUs needs to select both configs: CPU_HAS_SMARTMIPS SYS_HAS_CPU_MIPS32_R[12] This is due to the processor configuration which is mixing up all the architecture variants and the processor types. The drawback of this, is that we currently pass '-march=mips32' option to gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This can lead to a kernel image a little bit bigger than required. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012] [MIPS] Drop __init from init_8259A() [MIPS] Fix Kconfig typo bug [MIPS] Fix double signal on trap and break instruction [MIPS] sigset_32 has been made redundand by compat_sigset_t. [MIPS] emma2rh: Remove needless <asm/i8259.h> inclusion. [MIPS] Add MTD device support for Cobalt
2007-02-20[MIPS] Drop __init from init_8259A()Atsushi Nemoto
init_8259A() is called from i8259A_resume() so should not be marked as __init. And add some tests for whether 8259A was already initialized or not. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20[MIPS] Fix double signal on trap and break instructionAtsushi Nemoto
This commit broke gdb, since any BREAK or TRAP instruction cause SIGSEGV. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20[MIPS] sigset_32 has been made redundand by compat_sigset_t.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-20[MIPS] Make some __setup functions staticAtsushi Nemoto
This fixes some sparse warnings. ("warning: symbol 'foo' was not declared. Should it be static?") Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-19Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Update defconfigs [MIPS] Support for several more SNI RM models. [MIPS] Include <asm/bugs> to for declaration of check_bugs32. [MIPS] Add external declaration of pagetable_init() to pgalloc.h [MIPS] Make kernel_thread_helper() static [MIPS] Make __declare_dbe_table static and avoid it getting optimized away [MIPS] Use MIPS R2 instructions for bitops. [MIPS] signals: Share even more code. [MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n build [MIPS] Iomap implementation. [MIPS] <asm/compat-signal.h> needs to include <asm/uaccess.h>. [MIPS] IP27: Fix warning. [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
2007-02-18[MIPS] Include <asm/bugs> to for declaration of check_bugs32.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Make kernel_thread_helper() staticAtsushi Nemoto
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Make __declare_dbe_table static and avoid it getting optimized awayRalf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] signals: Share even more code.Ralf Baechle
native and compat do_signal and handle_signal are identical and can easily be unified. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n buildRalf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-18[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Atsushi Nemoto
access_ok in compat-signal.h is wrong (checking destination instead of source) and redundant (already checked before calling this function). Also sf_mask in struct sigframe32 should be compat_sigset_t type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-17Storage class should be before const qualifierTobias Klauser
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>