aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/kernel
AgeCommit message (Collapse)AuthorFilesLines
2007-02-11Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds8-442/+422
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] signal: do not inline handle_signal() [MIPS] signal: do not use save_static_function() anymore [MIPS] signal32: no need to save c0_status register in setup_sigcontext32() [MIPS] signal32: reduce {setup,restore}_sigcontext32 sizes [MIPS] signal: factorize debug code [MIPS] signal: test return value of install_sigtramp() [MIPS] signal32: remove duplicate code [MIPS] signal: clean up sigframe structure [MIPS] signal: do not inline functions in signal-common.h [MIPS] signals: reduce {setup,restore}_sigcontext sizes [MIPS] Fix warning in get_user when fetching pointer object from userspace. [MIPS] Fix eth2 platform device id for jaguar_atx and ocelot_3 platforms [MIPS] JMR3927 and RBTX49x7 support little endian [MIPS] RBTX49x7: declare prom_getcmdline() [MIPS] RTLX: Sprinkle device model code into code to make udev happier. [MIPS] VPE: Sprinkle device model code into code to make udev happier.
2007-02-11[PATCH] Common compat_sys_sysinfoKyle McMartin3-46/+2
I noticed that almost all architectures implemented exactly the same sys32_sysinfo... except parisc, where a bug was to be found in handling of the uptime. So let's remove a whole whack of code for fun and profit. Cribbed compat_sys_sysinfo from x86_64's implementation, since I figured it would be the best tested. This patch incorporates Arnd's suggestion of not using set_fs/get_fs, but instead extracting out the common code from sys_sysinfo. Cc: Christoph Hellwig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-11[PATCH] Consolidate default sched_clock()Alexey Dobriyan1-5/+0
Use attribute(weak). Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-11[PATCH] disable init/initramfs.c: architecturesJean-Paul Saman1-0/+2
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 <[email protected]> Cc: Al Viro <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-10[MIPS] signal: do not inline handle_signal()Franck Bui-Huu1-1/+1
Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal: do not use save_static_function() anymoreFranck Bui-Huu3-30/+10
This macro was used to save static registers before calling sys_sigsuspend() and sys_sigreturn(). For the sys_sigreturn() case, there's no point to save them since they have been already saved by setup_sigcontext() before calling the signal handler. For the sys_sigsuspend() case, I don't see any reasons... Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal32: no need to save c0_status register in setup_sigcontext32()Franck Bui-Huu2-2/+0
All the information in the MIPS c0_status register is priviledged. Nothing that would constitute part of the thread context. The one flag one could possibly argument about might be c0_status.fr but none of the ABIs or tools or application software can make use of it. So for consistency with restore_sigcontext32(), which does not restore c0_status register, this patch remove the saving part. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal32: reduce {setup,restore}_sigcontext32 sizesFranck Bui-Huu1-114/+97
This trivial changes should decrease a lot the size of these 2 functions. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal: factorize debug codeFranck Bui-Huu4-24/+20
Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal: test return value of install_sigtramp()Franck Bui-Huu1-3/+3
Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal32: remove duplicate codeFranck Bui-Huu1-46/+4
There's no point for signal32.c to redefine get_sigframe(). It should use the one define in signal.c instead. The same stands for install_sigtramp(). Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal: clean up sigframe structureFranck Bui-Huu4-69/+81
This patch makes 'struct sigframe' declaration avalaible for all signals code. It allows signal32 to not have its own declaration. This patch also removes all ICACHE_REFILLS_WORKAROUND_WAR tests in structure declaration and hopefully make them more readable. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signal: do not inline functions in signal-common.hFranck Bui-Huu2-136/+153
These functions are quite big and there are no points to make them inlined. So this patch moves the functions implementation in signal.c and make them available for others source files which need them. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] signals: reduce {setup,restore}_sigcontext sizesFranck Bui-Huu1-45/+21
This trivial change reduces considerably code size of these 2 functions callers. For instance, here is the figures for arch/kernel/signal.o objects: text data bss dec hex filename 11972 0 0 11972 2ec4 arch/mips/kernel/signal.o~old 5380 0 0 5380 1504 arch/mips/kernel/signal.o~new Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] RTLX: Sprinkle device model code into code to make udev happier.Ralf Baechle1-1/+22
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-10[MIPS] VPE: Sprinkle device model code into code to make udev happier.Ralf Baechle2-1/+40
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-09[APM] MIPS: Convert to use shared APM emulation.Ralf Baechle2-606/+0
Also convert to use generic kernel/power/Kconfig to make the use of the shared APM emulation possible. Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Move .set reorder out of conditional codeChris Dearman1-1/+2
Signed-off-by: Chris Dearman <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Check FCSR for pending interrupts before restoring from a context.Chris Dearman1-0/+16
Signed-off-by: Chris Dearman <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] SMTC: Make a bunch of functions and variables static.Ralf Baechle1-9/+9
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Use compat_sys_pselect6Joseph S. Myers2-2/+2
The N32 and O32 pselect6 syscalls need to use compat_sys_pselect6 to translate arguments from 32-bit to 64-bit layout. Signed-off-by: Joseph Myers <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] SMTC: Cleanup idle hook invocation.Ralf Baechle1-4/+2
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] SELinux: Add security hooks to mips-mt {get,set}affinityDavid Quigley1-2/+7
This patch adds LSM hooks into the setaffinity and getaffinity functions for the mips architecture to enable security modules to control these operations between tasks with different security attributes. This implementation uses the existing task_setscheduler and task_getscheduler LSM hooks. Signed-Off-By: David Quigley <[email protected]> Acked-by: Stephen Smalley <[email protected]> Signed-off-by: James Morris <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] IRIX: Linux coding style cleanups.Ralf Baechle1-153/+178
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Whitespace cleanups.Ralf Baechle12-56/+56
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] vpe_elfload and vpe_run are only used locally, make them static.Ralf Baechle1-2/+2
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] SMTC: remove unused atomic_postclearRalf Baechle1-22/+0
Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Move some kernel globals from asm file to C file.Atsushi Nemoto3-29/+3
This get rid of some undesirable hole in BSS section due to random order of placement. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] use name instead of typename for each irq_chipAtsushi Nemoto5-8/+8
The "typename" field was obsoleted by the "name" field. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] FLATMEM: introduce PHYS_OFFSET.Franck Bui-Huu1-4/+8
The old code was assuming that min_low_pfn was always 0. This means that platforms having a big hole at their memory start paid the price of wasting some memory for the allocation of unused entries in mem_map[]. This patch prevents this waste. It introduces PHYS_OFFSET define which is the start of the physical memory and uses it wherever needed. Specially when converting physical/virtual addresses into virtual/physical ones. Currently all platforms defines PHYS_OFFSET to 0. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Setup min_low_pfn/max_low_pfn correctlyFranck Bui-Huu1-9/+27
This patch makes a better usage of these two globals. 'min_low_pfn' is now correctly setup for all configs, which allow us to rely on it in boot memory code init. Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Make I8259A_IRQ_BASE customizableAtsushi Nemoto1-6/+14
Move I8259A_IRQ_BASE from asm/i8259.h to asm/mach-generic/irq.h and make it really customizable. And remove I8259_IRQ_BASE declared on some platforms. Currently only NEC_CMBVR4133 is using custom I8259A_IRQ_BASE value. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Define MIPS_CPU_IRQ_BASE in generic headerAtsushi Nemoto6-42/+22
The irq_base for {mips,rm7k,rm9k}_cpu_irq_init() are constant on all platforms and are same value on most platforms (0 or 16, depends on CONFIG_I8259). Define them in asm-mips/mach-generic/irq.h and make them customizable. This will save a few cycle on each CPU interrupt. A good side effect is removing some dependencies to MALTA in generic SMTC code. Although MIPS_CPU_IRQ_BASE is customizable, this patch changes irq mappings on DDB5477, EMMA2RH and MIPS_SIM, since really customizing them might cause some header dependency problem and there seems no good reason to customize it. So currently only VR41XX is using custom MIPS_CPU_IRQ_BASE value, which is 0 regardless of CONFIG_I8259. Testing this patch on those platforms is greatly appreciated. Thank you. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-02-06[MIPS] Remove unused rm9k_cpu_irq_disable()Atsushi Nemoto1-9/+0
rm9k_cpu_irq_disable() is unused since commit 1603b5aca4f15b34848fb5594d0c7b6333b99144. Remove it. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-01-24[MIPS] VPE loader: Initialize lists before they're actually being used ...Ralf Baechle1-4/+5
kspd which due to makefile order happens to be initialized before the vpe loader causes references to vpecontrol lists before they're actually been initialized. Signed-off-by: Ralf Baechle <[email protected]>
2007-01-24[MIPS] SMTC: Fix module build by exporting symbolRalf Baechle1-0/+3
Signed-off-by: Ralf Baechle <[email protected]>
2007-01-24[MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entriesRalf Baechle1-2/+5
Signed-off-by: Ralf Baechle <[email protected]>
2007-01-23[MIPS] SMTC: Instant IPI replay.Ralf Baechle1-21/+33
SMTC pseudo-interrupts between TCs are deferred and queued if the target TC is interrupt-inhibited (IXMT). In the first SMTC prototypes, these queued IPIs were serviced on return to user mode, or on entry into the kernel idle loop. The INSTANT_REPLAY option dispatches them as part of local_irq_restore() processing, which adds runtime overhead (hence the option to turn it off), but ensures that IPIs are handled promptly even under heavy I/O interrupt load. Signed-off-by: Ralf Baechle <[email protected]>
2007-01-19[MIPS] SMTC: Fix cp0 hazard.Ralf Baechle1-0/+1
Signed-off-by: Ralf Baechle <[email protected]>
2007-01-11[PATCH] Change cpu_up and co from __devinit to __cpuinitGautham R Shenoy1-1/+1
Compiling the kernel with CONFIG_HOTPLUG = y and CONFIG_HOTPLUG_CPU = n with CONFIG_RELOCATABLE = y generates the following modpost warnings WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between '_cpu_up' (at offset 0xc0141b7d) and 'cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between '_cpu_up' (at offset 0xc0141b9c) and 'cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.text:__cpu_up from .text between '_cpu_up' (at offset 0xc0141bd8) and 'cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between '_cpu_up' (at offset 0xc0141c05) and 'cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between '_cpu_up' (at offset 0xc0141c26) and 'cpu_up' WARNING: vmlinux - Section mismatch: reference to .init.data: from .text between '_cpu_up' (at offset 0xc0141c37) and 'cpu_up' This is because cpu_up, _cpu_up and __cpu_up (in some architectures) are defined as __devinit AND __cpu_up calls some __cpuinit functions. Since __cpuinit would map to __init with this kind of a configuration, we get a .text refering .init.data warning. This patch solves the problem by converting all of __cpu_up, _cpu_up and cpu_up from __devinit to __cpuinit. The approach is justified since the callers of cpu_up are either dependent on CONFIG_HOTPLUG_CPU or are of __init type. Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would land up in .init section. Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1. Signed-off-by: Gautham R Shenoy <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "David S. Miller" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-01-10[MIPS] Fix N32 SysV IPC routinesAtsushi Nemoto2-4/+16
Add wrappers for N32 msg{snd,rcv}. compat_sys_msg{snd,rcv} can not not be used as system call entries as is. This fix is based on Kaz Kylheku's patch. Also change a type of last argument of sysn32_semctl to match its true size. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-01-08[MIPS] PNX8550: Fix system timer supportVitaly Wool1-2/+0
the patch inlined below restores proper time accounting for PNX8550-based boards. It also gets rid of #ifdef in the generic code which becomes unnecessary then. It's functionally identical to the previous patch with the same name but it has minor comments from Atsushi and Sergei taken into account. Signed-off-by: Vitaly Wool <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2007-01-08[MIPS] csum_partial and copy in parallelAtsushi Nemoto1-0/+2
Implement optimized asm version of csum_partial_copy_nocheck, csum_partial_copy_from_user and csum_and_copy_to_user which can do calculate and copy in parallel, based on memcpy.S. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2006-12-13[PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day1-1/+1
Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <[email protected]>, Ian Molton <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Roman Zippel <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Greg KH <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Paul Fulghum <[email protected]> Cc: Alan Cox <[email protected]> Cc: Karsten Keil <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Jeff Garzik <[email protected]> Cc: James Bottomley <[email protected]> Cc: Ian Kent <[email protected]> Cc: Steven French <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Neil Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-12[MIPS] Discard .exit.text and .exit.data at runtime.Ralf Baechle1-2/+4
While the recent cset 86384d544157db23879064cde36061cdcafc6794 did improve things it didn't resolve all the problems. So bite the bullet and discard .exit.text and .exit.data at runtime. Which of course sucks because it bloats binaries with code that will never ever be used but it's the only thing that will work reliable as demonstrated by the function sd_major() in drivers/scsi/sd.c. Gcc may compile sd_major() using a jump table which it will put into .rodata. If it also inlines sd_major's function body into exit_sd() which gcc > 3.4.x does. If CONFIG_BLK_DEV_SD has been set to y we would like ld to discard exit_sd's code at link time. However sd_major happens to contain a switch statement which gcc will compile using a jump table in .rodata on the architectures I checked. So, when ld later discards .exit.text only the jump table in .rodata with its stale references to the discard .exit.text will be left which any no antique ld will honor with a link error. Signed-off-by: Ralf Baechle <[email protected]>
2006-12-10[MIPS] Export pm_power_offRalf Baechle1-0/+2
This is required for ipmi_poweroff.c to work as a module. Signed-off-by: Ralf Baechle <[email protected]>
2006-12-10[MIPS] Discard .exit.text at linktime.Ralf Baechle1-3/+1
This fixes fairly unobvious breakage of various drivers. Signed-off-by: Ralf Baechle <[email protected]>
2006-12-10[PATCH] fdtable: Make fdarray and fdsets equal in sizeVadim Lobanov1-1/+1
Currently, each fdtable supports three dynamically-sized arrays of data: the fdarray and two fdsets. The code allows the number of fds supported by the fdarray (fdtable->max_fds) to differ from the number of fds supported by each of the fdsets (fdtable->max_fdset). In practice, it is wasteful for these two sizes to differ: whenever we hit a limit on the smaller-capacity structure, we will reallocate the entire fdtable and all the dynamic arrays within it, so any delta in the memory used by the larger-capacity structure will never be touched at all. Rather than hogging this excess, we shouldn't even allocate it in the first place, and keep the capacities of the fdarray and the fdsets equal. This patch removes fdtable->max_fdset. As an added bonus, most of the supporting code becomes simpler. Signed-off-by: Vadim Lobanov <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Al Viro <[email protected]> Cc: Dipankar Sarma <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-09[MIPS] Qemu now has an ELF loader.Ralf Baechle1-1/+1
So nuke kludge for flat binaries. Signed-off-by: Ralf Baechle <[email protected]>
2006-12-08[PATCH] add process_session() helper routineCedric Le Goater1-1/+1
Replace occurences of task->signal->session by a new process_session() helper routine. It will be useful for pid namespaces to abstract the session pid number. Signed-off-by: Cedric Le Goater <[email protected]> Cc: Kirill Korotaev <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>