linux/arch/mips/mm
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
..
c-r3k.c [MIPS] Remove __flush_icache_page 2006-10-01 23:16:58 +01:00
c-r4k.c [MIPS] Remove __flush_icache_page 2006-10-01 23:16:58 +01:00
c-sb1.c [MIPS] Hack for SB1 cache issues 2006-11-22 23:34:01 +00:00
c-tx39.c [MIPS] Remove __flush_icache_page 2006-10-01 23:16:58 +01:00
cache.c [MIPS] Remove __flush_icache_page 2006-10-01 23:16:58 +01:00
cerr-sb1.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cex-gen.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cex-sb1.S [MIPS] Sibyte: #if CONFIG_* doesn't fly. 2006-02-21 16:58:23 +00:00
dma-coherent.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
dma-ip27.c [PATCH] gfp_t: dma-mapping (mips) 2005-10-28 08:16:48 -07:00
dma-ip32.c [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
dma-noncoherent.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
extable.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fault.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
highmem.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init.c [MIPS] Make free_init_pages() arguments to be physical addresses 2006-11-30 01:14:42 +00:00
ioremap.c [MIPS] Fix iounmap argument to const volatile. 2006-10-19 17:55:14 +01:00
Makefile [MIPS] MIPS32/MIPS64 secondary cache management 2006-06-29 21:10:52 +01:00
pg-r4k.c [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
pg-sb1.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pgtable-32.c [MIPS] Fix aliasing bug in copy_to_user_page / copy_from_user_page 2006-10-21 23:17:35 +01:00
pgtable-64.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
pgtable.c [MIPS] sparsemem: fix crash in show_mem 2006-07-13 21:26:22 +01:00
sc-ip22.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sc-mips.c [MIPS] MIPS32/MIPS64 S-cache fix and cleanup 2006-06-29 21:10:54 +01:00
sc-r5k.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sc-rm7k.c [MIPS] Use __ffs() instead of ffs() for waybit calculation. 2006-04-19 04:14:30 +02:00
tlb-r3k.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
tlb-r4k.c [MIPS] Replace BARRIER with more appropriate hazard barrier. 2006-09-27 13:37:54 +01:00
tlb-r8k.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
tlbex-fault.S [MIPS] Stacktrace build-fix and improvement 2006-10-01 23:16:58 +01:00
tlbex.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00