diff options
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
| -rw-r--r-- | arch/sparc64/kernel/entry.S | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 3e0badb820c5..b48349527853 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
| @@ -42,19 +42,15 @@ | |||
| 42 | * executing (see inherit_locked_prom_mappings() rant). | 42 | * executing (see inherit_locked_prom_mappings() rant). |
| 43 | */ | 43 | */ |
| 44 | sparc64_vpte_nucleus: | 44 | sparc64_vpte_nucleus: |
| 45 | /* Load 0xf0000000, which is LOW_OBP_ADDRESS. */ | 45 | /* Note that kvmap below has verified that the address is |
| 46 | mov 0xf, %g5 | 46 | * in the range MODULES_VADDR --> VMALLOC_END already. So |
| 47 | sllx %g5, 28, %g5 | 47 | * here we need only check if it is an OBP address or not. |
| 48 | 48 | */ | |
| 49 | /* Is addr >= LOW_OBP_ADDRESS? */ | 49 | sethi %hi(LOW_OBP_ADDRESS), %g5 |
| 50 | cmp %g4, %g5 | 50 | cmp %g4, %g5 |
| 51 | blu,pn %xcc, sparc64_vpte_patchme1 | 51 | blu,pn %xcc, sparc64_vpte_patchme1 |
| 52 | mov 0x1, %g5 | 52 | mov 0x1, %g5 |
| 53 | |||
| 54 | /* Load 0x100000000, which is HI_OBP_ADDRESS. */ | ||
| 55 | sllx %g5, 32, %g5 | 53 | sllx %g5, 32, %g5 |
| 56 | |||
| 57 | /* Is addr < HI_OBP_ADDRESS? */ | ||
| 58 | cmp %g4, %g5 | 54 | cmp %g4, %g5 |
| 59 | blu,pn %xcc, obp_iaddr_patch | 55 | blu,pn %xcc, obp_iaddr_patch |
| 60 | nop | 56 | nop |
| @@ -156,26 +152,29 @@ obp_daddr_patch: | |||
| 156 | * rather, use information saved during inherit_prom_mappings() using 8k | 152 | * rather, use information saved during inherit_prom_mappings() using 8k |
| 157 | * pagesize. | 153 | * pagesize. |
| 158 | */ | 154 | */ |
| 155 | .align 32 | ||
| 159 | kvmap: | 156 | kvmap: |
| 160 | /* Load 0xf0000000, which is LOW_OBP_ADDRESS. */ | 157 | sethi %hi(MODULES_VADDR), %g5 |
| 161 | mov 0xf, %g5 | 158 | cmp %g4, %g5 |
| 162 | sllx %g5, 28, %g5 | 159 | blu,pn %xcc, longpath |
| 160 | mov (VMALLOC_END >> 24), %g5 | ||
| 161 | sllx %g5, 24, %g5 | ||
| 162 | cmp %g4, %g5 | ||
| 163 | bgeu,pn %xcc, longpath | ||
| 164 | nop | ||
| 163 | 165 | ||
| 164 | /* Is addr >= LOW_OBP_ADDRESS? */ | 166 | kvmap_check_obp: |
| 167 | sethi %hi(LOW_OBP_ADDRESS), %g5 | ||
| 165 | cmp %g4, %g5 | 168 | cmp %g4, %g5 |
| 166 | blu,pn %xcc, vmalloc_addr | 169 | blu,pn %xcc, kvmap_vmalloc_addr |
| 167 | mov 0x1, %g5 | 170 | mov 0x1, %g5 |
| 168 | |||
| 169 | /* Load 0x100000000, which is HI_OBP_ADDRESS. */ | ||
| 170 | sllx %g5, 32, %g5 | 171 | sllx %g5, 32, %g5 |
| 171 | |||
| 172 | /* Is addr < HI_OBP_ADDRESS? */ | ||
| 173 | cmp %g4, %g5 | 172 | cmp %g4, %g5 |
| 174 | blu,pn %xcc, obp_daddr_patch | 173 | blu,pn %xcc, obp_daddr_patch |
| 175 | nop | 174 | nop |
| 176 | 175 | ||
| 177 | vmalloc_addr: | 176 | kvmap_vmalloc_addr: |
| 178 | /* If we get here, a vmalloc addr accessed, load kernel VPTE. */ | 177 | /* If we get here, a vmalloc addr was accessed, load kernel VPTE. */ |
| 179 | ldxa [%g3 + %g6] ASI_N, %g5 | 178 | ldxa [%g3 + %g6] ASI_N, %g5 |
| 180 | brgez,pn %g5, longpath | 179 | brgez,pn %g5, longpath |
| 181 | nop | 180 | nop |
