1
linux/arch/mips/kernel
Atsushi Nemoto 656be92f9a [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n
This is a patch to load 64-bit modules to CKSEG0 so that can be
compiled with -msym32 option.  This makes each module ~10% smaller.

* introduce MODULE_START and MODULE_END
* custom module_alloc()
* PGD for modules
* change XTLB refill handler synthesizer
* enable -msym32 for modules again
  (revert ca78b1a5c6a6e70e052d3ea253828e49b5d07c8a)

New XTLB refill handler looks like this:

80000080 dmfc0   k0,C0_BADVADDR
80000084 bltz    k0,800000e4			# goto l_module_alloc
80000088 lui     k1,0x8046			# %high(pgd_current)
8000008c ld      k1,24600(k1)			# %low(pgd_current)
80000090 dsrl    k0,k0,0x1b			# l_vmalloc_done:
80000094 andi    k0,k0,0x1ff8
80000098 daddu   k1,k1,k0
8000009c dmfc0   k0,C0_BADVADDR
800000a0 ld      k1,0(k1)
800000a4 dsrl    k0,k0,0x12
800000a8 andi    k0,k0,0xff8
800000ac daddu   k1,k1,k0
800000b0 dmfc0   k0,C0_XCONTEXT
800000b4 ld      k1,0(k1)
800000b8 andi    k0,k0,0xff0
800000bc daddu   k1,k1,k0
800000c0 ld      k0,0(k1)
800000c4 ld      k1,8(k1)
800000c8 dsrl    k0,k0,0x6
800000cc mtc0    k0,C0_ENTRYLO0
800000d0 dsrl    k1,k1,0x6
800000d4 mtc0    k1,C0_ENTRYL01
800000d8 nop
800000dc tlbwr
800000e0 eret
800000e4 dsll    k1,k0,0x2			# l_module_alloc:
800000e8 bgez    k1,80000008			# goto l_vmalloc
800000ec lui     k1,0xc000
800000f0 dsubu   k0,k0,k1
800000f4 lui     k1,0x8046			# %high(module_pg_dir)
800000f8 beq     zero,zero,80000000
800000fc nop
80000000 beq     zero,zero,80000090		# goto l_vmalloc_done
80000004 daddiu  k1,k1,0x4000
80000008 dsll32  k1,k1,0x0			# l_vmalloc:
8000000c dsubu   k0,k0,k1
80000010 beq     zero,zero,80000090		# goto l_vmalloc_done
80000014 lui     k1,0x8046			# %high(swapper_pg_dir)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-11-30 01:14:44 +00:00
..
apm.c [MIPS] Don't include obsolete <linux/config.h>. 2006-07-13 21:25:58 +01:00
asm-offsets.c [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
binfmt_elfn32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
binfmt_elfo32.c [MIPS] jiffies_to_compat_timeval fix 2006-02-21 16:58:23 +00:00
branch.c [MIPS] Unify mips_fpu_soft_struct and mips_fpu_hard_structs. 2006-06-19 17:39:18 +01:00
cpu-bugs64.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpu-probe.c [MIPS] Fix RM9000 wait instruction detection. 2006-10-09 23:20:45 +01:00
dma-no-isa.c
entry.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
gdb-low.S [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
gdb-stub.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
genex.S [MIPS] ret_from_irq adjustment 2006-10-09 23:20:46 +01:00
head.S [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
i8253.c Input: pcspkr - separate device and driver registration 2006-03-14 00:11:50 -05:00
i8259.c [MIPS] Update i8259 resources. 2006-10-01 23:16:59 +01:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
irix5sys.S
irixelf.c [PATCH] FDPIC: Move roundup() into linux/kernel.h 2006-07-10 13:24:22 -07:00
irixinv.c
irixioctl.c
irixsig.c [MIPS] Move definition of IRIX compat constant into IRIX compat code. 2006-09-27 13:37:45 +01:00
irq_cpu.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq-msc01.c [MIPS] Cleanup unnecessary <asm/ptrace.h> inclusions. 2006-10-09 00:15:28 +01:00
irq-mv6434x.c [MIPS] Cleanup unnecessary <asm/ptrace.h> inclusions. 2006-10-09 00:15:28 +01:00
irq-rm7000.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq-rm9000.c [MIPS] Eleminate interrupt migration helper use. 2006-07-13 21:25:58 +01:00
irq.c [MIPS] Make irq number allocator generally available for fixing EV64120. 2006-11-06 20:55:38 +00:00
kspd.c [MIPS] kpsd and other AP/SP improvements. 2006-04-19 04:14:27 +02:00
linux32.c [MIPS] Fix O32 personality(2) call with 0xffffffff argument. 2006-10-19 17:55:13 +01:00
Makefile [MIPS] Do topology_init even on uniprocessor kernels. 2006-11-29 16:21:34 +00:00
mips_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mips-mt.c [MIPS] MIPS MT: Fix build error. 2006-07-13 21:26:06 +01:00
module.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
proc.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
process.c [MIPS] Use kallsyms_lookup_size_offset() instead of kallsyms_lookup() 2006-10-19 17:55:12 +01:00
ptrace32.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
ptrace.c [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
r4k_fpu.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r4k_switch.S [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
r2300_fpu.S
r2300_switch.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
r6000_fpu.S
reset.c [MIPS] Rename _machine_power_off to pm_power_off so the kernel builds again. 2006-02-07 13:30:22 +00:00
rtlx.c [MIPS] Complete fixes after removal of pt_regs argument to int handlers. 2006-10-08 02:38:28 +01:00
scall32-o32.S [MIPS] Wire up getcpu(2) and epoll_wait(2) syscalls. 2006-10-30 21:41:28 +00:00
scall64-64.S [MIPS] Wire up getcpu(2) and epoll_wait(2) syscalls. 2006-10-30 21:41:28 +00:00
scall64-n32.S [MIPS] Wire up getcpu(2) and epoll_wait(2) syscalls. 2006-10-30 21:41:28 +00:00
scall64-o32.S [MIPS] Wire up getcpu(2) and epoll_wait(2) syscalls. 2006-10-30 21:41:28 +00:00
semaphore.c
setup.c [MIPS] setup.c: clean up initrd related code 2006-11-30 01:14:42 +00:00
signal32.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
signal_n32.c [PATCH] BLOCK: Revert patch to hack around undeclared sigset_t in linux/compat.h 2006-10-02 08:03:31 -07:00
signal-common.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
signal.c [MIPS] Avoid double signal restarting. 2006-09-27 13:37:33 +01:00
smp-mt.c [MIPS] VSMP: Synchronize cp0 counters on bootup. 2006-10-31 20:13:22 +00:00
smp.c [MIPS] Do topology_init even on uniprocessor kernels. 2006-11-29 16:21:34 +00:00
smtc-asm.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
smtc-proc.c [MIPS] MT: Improved multithreading support. 2006-04-19 04:14:28 +02:00
smtc.c [MIPS] SMTC: Synchronize cp0 counters on bootup. 2006-11-01 17:46:09 +00:00
stacktrace.c [MIPS] save_context_stack fix 2006-10-19 17:55:13 +01:00
syscall.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
sysirix.c [PATCH] VFS: Make filldir_t and struct kstat deal in 64-bit inode numbers 2006-10-03 08:03:40 -07:00
time.c [MIPS] Fixup migration to GENERIC_TIME 2006-10-31 20:13:23 +00:00
topology.c [MIPS] Do topology_init even on uniprocessor kernels. 2006-11-29 16:21:34 +00:00
traps.c [MIPS] Fix warning of printk format in mips_srs_init() 2006-10-31 20:13:21 +00:00
unaligned.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vmlinux.lds.S [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
vpe.c [MIPS] MT: Fix setting of XTC. 2006-09-27 13:37:36 +01:00