Changeset 7f1c620 in mainline for arch/ppc64/src/mm/page.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ppc64/src/mm/page.c
r991779c5 r7f1c620 66 66 * 67 67 */ 68 static pte_t *find_mapping_and_check(as_t *as, bool lock, __addressbadvaddr, int access,68 static pte_t *find_mapping_and_check(as_t *as, bool lock, uintptr_t badvaddr, int access, 69 69 istate_t *istate, int *pfrc) 70 70 { … … 114 114 115 115 116 static void pht_refill_fail( __addressbadvaddr, istate_t *istate)116 static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) 117 117 { 118 118 char *symbol = ""; … … 129 129 130 130 131 static void pht_insert(const __addressvaddr, const pfn_t pfn)132 { 133 __u32page = (vaddr >> 12) & 0xffff;134 __u32api = (vaddr >> 22) & 0x3f;135 __u32vsid;131 static void pht_insert(const uintptr_t vaddr, const pfn_t pfn) 132 { 133 uint32_t page = (vaddr >> 12) & 0xffff; 134 uint32_t api = (vaddr >> 22) & 0x3f; 135 uint32_t vsid; 136 136 137 137 asm volatile ( … … 142 142 143 143 /* Primary hash (xor) */ 144 __u32h = 0;145 __u32hash = vsid ^ page;146 __u32base = (hash & 0x3ff) << 3;147 __u32i;144 uint32_t h = 0; 145 uint32_t hash = vsid ^ page; 146 uint32_t base = (hash & 0x3ff) << 3; 147 uint32_t i; 148 148 bool found = false; 149 149 … … 159 159 if (!found) { 160 160 /* Secondary hash (not) */ 161 __u32base2 = (~hash & 0x3ff) << 3;161 uint32_t base2 = (~hash & 0x3ff) << 3; 162 162 163 163 /* Find unused or colliding … … 197 197 void pht_refill(bool data, istate_t *istate) 198 198 { 199 __addressbadvaddr;199 uintptr_t badvaddr; 200 200 pte_t *pte; 201 201 int pfrc; … … 253 253 void pht_init(void) 254 254 { 255 memsetb(( __address) phte, 1 << PHT_BITS, 0);255 memsetb((uintptr_t) phte, 1 << PHT_BITS, 0); 256 256 } 257 257 … … 262 262 page_mapping_operations = &pt_mapping_operations; 263 263 264 __addresscur;264 uintptr_t cur; 265 265 int flags; 266 266 … … 277 277 phte_t *physical_phte = (phte_t *) frame_alloc(PHT_ORDER, FRAME_KA | FRAME_ATOMIC); 278 278 279 ASSERT(( __address) physical_phte % (1 << PHT_BITS) == 0);279 ASSERT((uintptr_t) physical_phte % (1 << PHT_BITS) == 0); 280 280 pht_init(); 281 281 … … 283 283 "mtsdr1 %0\n" 284 284 : 285 : "r" (( __address) physical_phte)285 : "r" ((uintptr_t) physical_phte) 286 286 ); 287 287 } … … 289 289 290 290 291 __address hw_map(__addressphysaddr, size_t size)291 uintptr_t hw_map(uintptr_t physaddr, size_t size) 292 292 { 293 293 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 294 294 panic("Unable to map physical memory %p (%d bytes)", physaddr, size) 295 295 296 __addressvirtaddr = PA2KA(last_frame);296 uintptr_t virtaddr = PA2KA(last_frame); 297 297 pfn_t i; 298 298 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
Note:
See TracChangeset
for help on using the changeset viewer.