Commit graph android_kernel_sony_sdm845/arch/mips/kernel
Message SHA1
[MIPS] Cleanup memory managment initialization.
Historically plat_mem_setup did the entire platform initialization.  This
was rather impractical because it meant plat_mem_setup had to get away
without any kind of memory allocator.  To keep old code from breaking
plat_setup was just renamed to plat_setup and a second platform
initialization hook for anything else was introduced.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-19 17:39:23 +01:00
2925aba422
[MIPS] APM emu support
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Rodolfo Giometti   authored and   Ralf Baechle   commited 2006-06-19 17:39:22 +01:00
952fa954a6
[MIPS] C99-ify struct resource initialization.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-19 17:39:20 +01:00
5e46c3aefe
[MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs.
The struct mips_fpu_soft_struct and mips_fpu_hard_struct are
completely same now and the kernel fpu emulator assumes that.  This
patch unifies them to mips_fpu_struct and get rid of mips_fpu_union.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-19 17:39:18 +01:00
eae89076e6
[MIPS] Fix fpu_save_double on 64-bit.
> Without this fix, _save_fp() in 64-bit kernel is seriously broken.
>
> ffffffff8010bec0 <_save_fp>:
> ffffffff8010bec0:       400d6000        mfc0    t1,c0_status
> ffffffff8010bec4:       000c7140        sll     t2,t0,0x5
> ffffffff8010bec8:       05c10011        bgez    t2,ffffffff8010bf10 <_save_fp+0x50>
> ffffffff8010becc:       00000000        nop
> ffffffff8010bed0:       f4810328        sdc1    $f1,808(a0)
> ...

Fix register usage in fpu_save_double() and make fpu_restore_double()
more symmetric with fpu_save_double().

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-19 17:39:13 +01:00
c138e12f3a
[MIPS] Fix sparsemem support.
Move memory_present() in arch/mips/kernel/setup.c. When using sparsemem
extreme, this function does an allocate for bootmem. This would always
fail since init_bootmem hasn't been called yet.
    
Move memory_present after free_bootmem. This only marks actual memory
ranges as present instead of the entire address space.
    
Signed-off-by: Chad Reese  <creese@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Chad Reese   authored and   Ralf Baechle   commited 2006-06-06 00:15:20 +01:00
b1c231f5a5
[MIPS] Fix compiler warnings (field width, unused variable)
Fix following warnings:
linux/arch/mips/kernel/setup.c:432: warning: field width is not type int (arg 2)
linux/arch/mips/kernel/setup.c:432: warning: field width is not type int (arg 4)
linux/arch/mips/kernel/syscall.c:279: warning: unused variable `len'
linux/arch/mips/kernel/syscall.c:280: warning: unused variable `name'
linux/arch/mips/math-emu/dp_fint.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/dp_flong.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/sp_fint.c:32: warning: unused variable `xc'
linux/arch/mips/math-emu/sp_flong.c:32: warning: unused variable `xc'
    
(original patch by Atsushi, slight changes to the setup.c part by me.)
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-06 00:15:20 +01:00
ecf52d3c89
[MIPS] Fix sparse warnings about too big constants.
Fix following warnings:
linux/arch/mips/kernel/setup.c:249:12: warning: constant 0xffffffff00000000 is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:209:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:227:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:283:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
linux/arch/mips/kernel/cpu-bugs64.c:299:10: warning: constant 0xffffffffffffdb9a is so big it is unsigned long
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-06 00:15:19 +01:00
460c0422c3
[MIPS] SB1: Only pass1 FPUs are broken beyond recovery.
The wrong revision number in the check was forcing a fallback to FPU
emulation for all SB1 cores in 2.6.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-06 00:15:18 +01:00
aa32374aaa
[MIPS] open() forces O_LARGEFILE for o32 on 64bit kernels
open() always sets the O_LARGEFILE flag for the o32 ABI implementation
of a 64bit kernel. The appended patch fixes it.
    
Signed-off-by: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Thiemo Seufer   authored and   Ralf Baechle   commited 2006-06-06 00:15:17 +01:00
7155262e18
[MIPS] Print more information if we're struck by a machine check exception.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-06 00:15:13 +01:00
cac4bcbce0
[MIPS] Ignore unresolved weak symbols in modules.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-06 00:15:10 +01:00
f3bf07b9a3
[MIPS] Fix SMP now that fixup_cpu_present_map is gone.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-06 00:15:09 +01:00
320e6aba26
[MIPS] Treat R14000 like R10000.
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Kumba   authored and   Ralf Baechle   commited 2006-06-01 00:28:35 +01:00
44d921b246
[MIPS] Use generic STABS_DEBUG macro.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-01 00:28:33 +01:00
78665aaa96
[MIPS] Use generic DWARF_DEBUG
When debugging a kernel compiled by gcc 4.1 with gdb 6.4, gdb could
not show filename, linenumber, etc.  It seems fixed if I used generic
DWARF_DEBUG macro.  Although gcc 3.x seems work without this change,
it would be better to use the generic macro unless there were
something MIPS specific.
    
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-01 00:28:32 +01:00
04b6b3b651
[MIPS] Fix kgdb exception handler from user mode.
Fix a calculation of saved vector address in trap_low.
    
(damage done by lmo f4c72cc737)
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2006-06-01 00:28:32 +01:00
867a521b4c
[MIPS] Update struct sigcontext member names
Rename the 64-bit sc_hi and sc_lo arrays to use the same names
as the 32-bit struct sigcontext (sc_mdhi, sc_hi1, et cetera).
    
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Daniel Jacobowitz   authored and   Ralf Baechle   commited 2006-06-01 00:28:31 +01:00
1c0c1ae4f3
[MIPS] Remove support for sysmips(2) SETNAME and MIPS_RDNVRAM operations.
SETNAME only had a minor defect but probably never had a user and
MIPS_RDNVRAM was unimplemented anyway.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-01 00:28:31 +01:00
235a9d3eee
[MIPS] Fix detection and handling of the 74K processor.
Nothing exciting; Linux just didn't know it yet so this is most adding
a value to a case statement.
    
Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Chris Dearman   authored and   Ralf Baechle   commited 2006-06-01 00:28:30 +01:00
c620953c32
[MIPS] Add missing 34K processor IDs
The 34K is very much like a 24K on steroids.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Nigel Stephens   authored and   Ralf Baechle   commited 2006-06-01 00:28:30 +01:00
98a41de99a
[MIPS] Fix typo
Found by Chris Dearman (chris@mips.com).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-06-01 00:28:29 +01:00
477654fc5d
[PATCH] drop task argument of audit_syscall_{entry,exit}
... it's always current, and that's a good thing - allows simpler locking.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro   commited 2006-05-01 06:06:18 -04:00
5411be59db
[MIPS] Fix branch emulation for floating-point exceptions.
In the branch emulation for floating-point exceptions, __compute_return_epc
must determine for bc1f et al which condition code bit to test. This is
based on bits <4:2> of the rt field. The switch statement to distinguish
bc1f et al needs to use only the two low bits of rt, but the old code tests
on the whole rt field.  This patch masks off the proper bits.
    
Signed-off-by: Win Treese <treese@acm.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-27 15:13:50 +01:00
ee1cca1b06
[MIPS] Cleanup inode->r_dev usage.
imajor()/iminor() should be used instead of accessing r_dev directly.

Based on patch from Eric Sesterhenn (snakebyte@gmx.de).
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-27 15:13:50 +01:00
79e55bcf24
[PATCH] fix mips sys32_p{read,write}
Switched to use of sys_pread64()/sys_pwrite64() rather than keep duplicating
their guts; among the little things that had been missing there were such as
	ret = security_file_permission (file, MAY_READ);
Gotta love the LSM robustness, right?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Al Viro   authored and   Linus Torvalds   commited 2006-04-26 07:52:21 -07:00
6ad0013b31
[MIPS] Make mips_srs_init static.
Nothing outside traps.c uses it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:29 +02:00
bb12d612d4
[MIPS] FPU affinity for MT ASE.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:28 +02:00
f088fc84f9
[MIPS] MT: Improved multithreading support.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:28 +02:00
41c594ab65
[MIPS] kpsd and other AP/SP improvements.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:27 +02:00
2600990e64
[MIPS] R2: Instruction hazard barrier.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:22 +02:00
bce1a28686
[MIPS] R2: Implement shadow register allocation without spinlock.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:22 +02:00
193dd2ce2a
[MIPS] Rewrite all the assembler interrupt handlers to C.
Saves like 1,600 lines of code, is way easier to debug, compilers
frequently do a better job than the cut and paste type of handlers many
boards had.  And finally having all the stuff done in a single place
also means alot of bug potencial for the MT ASE is gone.

The only surviving handler in assembler is the DECstation one; I hope
Maciej will rewrite it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:21 +02:00
e4ac58afdf
[MIPS] Rewrite spurious_interrupt from assembler to C.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:18 +02:00
93373ed4d8
[MIPS] Sort out duplicate exports.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:14 +02:00
e49ed7f591
[MIPS] Wire up sync_file_range(2).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:14 +02:00
a8d587a71b
[MIPS] Wire splice syscall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:13 +02:00
f115da9cd6
[MIPS] Some formatting fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:13 +02:00
ff3eab2a98
[MIPS] Fixup printk in mips_srs_init.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:13 +02:00
7acb783ecd
[MIPS] Remove redundant initialization of sr_allocated.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:13 +02:00
e76038dcc0
[MIPS] Make set_vi_srs_handler static.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2006-04-19 04:14:12 +02:00
b4d05cb9cb
[PATCH] No arch-specific strpbrk implementations
While cleaning up parisc_ksyms.c earlier, I noticed that strpbrk wasn't
being exported from lib/string.c.  Investigating further, I noticed a
changeset that removed its export and added it to _ksyms.c on a few more
architectures.  The justification was that "other arches do it."

I think this is wrong, since no architecture currently defines
__HAVE_ARCH_STRPBRK, there's no reason for any of them to be exporting it
themselves.  Therefore, consolidate the export to lib/string.c.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Kyle McMartin   authored and   Linus Torvalds   commited 2006-04-11 06:18:40 -07:00
894b5779ce
Manual merge with Linus.
Conflicts:
	arch/powerpc/kernel/setup-common.c
	drivers/input/keyboard/hil_kbd.c
	drivers/input/mouse/hil_ptr.c

Dmitry Torokhov   commited 2006-04-02 00:08:05 -05:00
95d465fd75
[PATCH] unexport get_wchan
The only user of get_wchan is the proc fs - and proc can't be built modular.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Adrian Bunk   authored and   Linus Torvalds   commited 2006-03-31 12:19:01 -08:00
0cb3463f04
[PATCH] remove add_parent()'s parent argument
add_parent(p, parent) is always called with parent == p->parent, and it makes
no sense to do it differently.  This patch removes this argument.

No changes in affected .o files.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Oleg Nesterov   authored and   Linus Torvalds   commited 2006-03-28 18:36:41 -08:00
8fafabd86f
[PATCH] mips: fixed collision of rtc function name
Fix the collision of rtc function name.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Yoichi Yuasa   authored and   Linus Torvalds   commited 2006-03-27 08:44:50 -08:00
d23ee8fe6e
[PATCH] unify PFN_* macros
Just about every architecture defines some macros to do operations on pfns.
 They're all virtually identical.  This patch consolidates all of them.

One minor glitch is that at least i386 uses them in a very skeletal header
file.  To keep away from #include dependency hell, I stuck the new
definitions in a new, isolated header.

Of all of the implementations, sh64 is the only one that varied by a bit.
It used some masks to ensure that any sign-extension got ripped away before
the arithmetic is done.  This has been posted to that sh64 maintainers and
the development list.

Compiles on x86, x86_64, ia64 and ppc64.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Dave Hansen   authored and   Linus Torvalds   commited 2006-03-27 08:44:48 -08:00
22a9835c35
[PATCH] consolidate sys32/compat_adjtimex
Create compat_sys_adjtimex and use it an all appropriate places.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Stephen Rothwell   authored and   Linus Torvalds   commited 2006-03-26 08:56:57 -08:00
3158e9411a
[PATCH] create struct compat_timex and use it everywhere
We had a copy of the compatibility version of struct timex in each 64 bit
architecture.  This patch just creates a global one and replaces all the
usages of the old ones.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kyle McMartin <kyle@parisc-linux.org>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Stephen Rothwell   authored and   Linus Torvalds   commited 2006-03-26 08:56:57 -08:00
88959ea968
[PATCH] sys_alarm() unsigned signed conversion fixup
alarm() calls the kernel with an unsigend int timeout in seconds.  The
value is stored in the tv_sec field of a struct timeval to setup the
itimer.  The tv_sec field of struct timeval is of type long, which causes
the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.

Before the hrtimer merge (pre 2.6.16) such a negative value was converted
to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
not clear whether this was intended or just happened to be done by the
timeval_to_jiffies code.

hrtimers expect a timeval in canonical form and treat a negative timeout as
already expired.  This breaks the legitimate usage of alarm() with a
timeout value > INT_MAX seconds.

For 32 bit machines it is therefor necessary to limit the internal seconds
value to avoid API breakage.  Instead of doing this in all implementations
of sys_alarm the duplicated sys_alarm code is moved into a common function
in itimer.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Thomas Gleixner   authored and   Linus Torvalds   commited 2006-03-25 08:22:48 -08:00
c08b8a4910