diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-06-27 21:53:56 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-06-28 01:18:58 -0400 |
| commit | a240da35a1087804cbdc3faba949445e64d1eecb (patch) | |
| tree | 682cba196837dc7c31513dd53ae51f2c3e98d5ef | |
| parent | 9b47569a9d410199aea6386917fd0662809c60be (diff) | |
[POWERPC] Remove unused function call_with_mmu_off
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
| -rw-r--r-- | arch/powerpc/kernel/misc_64.S | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index e8883d42c43c..6bf4a4637209 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
| @@ -101,48 +101,6 @@ _GLOBAL(call___do_IRQ) | |||
| 101 | blr | 101 | blr |
| 102 | #endif /* CONFIG_IRQSTACKS */ | 102 | #endif /* CONFIG_IRQSTACKS */ |
| 103 | 103 | ||
| 104 | /* | ||
| 105 | * To be called by C code which needs to do some operations with MMU | ||
| 106 | * disabled. Note that interrupts have to be disabled by the caller | ||
| 107 | * prior to calling us. The code called _MUST_ be in the RMO of course | ||
| 108 | * and part of the linear mapping as we don't attempt to translate the | ||
| 109 | * stack pointer at all. The function is called with the stack switched | ||
| 110 | * to this CPU emergency stack | ||
| 111 | * | ||
| 112 | * prototype is void *call_with_mmu_off(void *func, void *data); | ||
| 113 | * | ||
| 114 | * the called function is expected to be of the form | ||
| 115 | * | ||
| 116 | * void *called(void *data); | ||
| 117 | */ | ||
| 118 | _GLOBAL(call_with_mmu_off) | ||
| 119 | mflr r0 /* get link, save it on stackframe */ | ||
| 120 | std r0,16(r1) | ||
| 121 | mr r1,r5 /* save old stack ptr */ | ||
| 122 | ld r1,PACAEMERGSP(r13) /* get emerg. stack */ | ||
| 123 | subi r1,r1,STACK_FRAME_OVERHEAD | ||
| 124 | std r0,16(r1) /* save link on emerg. stack */ | ||
| 125 | std r5,0(r1) /* save old stack ptr in backchain */ | ||
| 126 | ld r3,0(r3) /* get to real function ptr (assume same TOC) */ | ||
| 127 | bl 2f /* we need LR to return, continue at label 2 */ | ||
| 128 | |||
| 129 | ld r0,16(r1) /* we return here from the call, get LR and */ | ||
| 130 | ld r1,0(r1) /* .. old stack ptr */ | ||
| 131 | mtspr SPRN_SRR0,r0 /* and get back to virtual mode with these */ | ||
| 132 | mfmsr r4 | ||
| 133 | ori r4,r4,MSR_IR|MSR_DR | ||
| 134 | mtspr SPRN_SRR1,r4 | ||
| 135 | rfid | ||
| 136 | |||
| 137 | 2: mtspr SPRN_SRR0,r3 /* coming from above, enter real mode */ | ||
| 138 | mr r3,r4 /* get parameter */ | ||
| 139 | mfmsr r0 | ||
| 140 | ori r0,r0,MSR_IR|MSR_DR | ||
| 141 | xori r0,r0,MSR_IR|MSR_DR | ||
| 142 | mtspr SPRN_SRR1,r0 | ||
| 143 | rfid | ||
| 144 | |||
| 145 | |||
| 146 | .section ".toc","aw" | 104 | .section ".toc","aw" |
| 147 | PPC64_CACHES: | 105 | PPC64_CACHES: |
| 148 | .tc ppc64_caches[TC],ppc64_caches | 106 | .tc ppc64_caches[TC],ppc64_caches |
