Changeset 7f1c620 in mainline for arch/ppc64/src/mm/page.c


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc64/src/mm/page.c

    r991779c5 r7f1c620  
    6666 *
    6767 */
    68 static pte_t *find_mapping_and_check(as_t *as, bool lock, __address badvaddr, int access,
     68static pte_t *find_mapping_and_check(as_t *as, bool lock, uintptr_t badvaddr, int access,
    6969                                     istate_t *istate, int *pfrc)
    7070{
     
    114114
    115115
    116 static void pht_refill_fail(__address badvaddr, istate_t *istate)
     116static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate)
    117117{
    118118        char *symbol = "";
     
    129129
    130130
    131 static void pht_insert(const __address vaddr, const pfn_t pfn)
    132 {
    133         __u32 page = (vaddr >> 12) & 0xffff;
    134         __u32 api = (vaddr >> 22) & 0x3f;
    135         __u32 vsid;
     131static 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;
    136136       
    137137        asm volatile (
     
    142142       
    143143        /* Primary hash (xor) */
    144         __u32 h = 0;
    145         __u32 hash = vsid ^ page;
    146         __u32 base = (hash & 0x3ff) << 3;
    147         __u32 i;
     144        uint32_t h = 0;
     145        uint32_t hash = vsid ^ page;
     146        uint32_t base = (hash & 0x3ff) << 3;
     147        uint32_t i;
    148148        bool found = false;
    149149       
     
    159159        if (!found) {
    160160                /* Secondary hash (not) */
    161                 __u32 base2 = (~hash & 0x3ff) << 3;
     161                uint32_t base2 = (~hash & 0x3ff) << 3;
    162162               
    163163                /* Find unused or colliding
     
    197197void pht_refill(bool data, istate_t *istate)
    198198{
    199         __address badvaddr;
     199        uintptr_t badvaddr;
    200200        pte_t *pte;
    201201        int pfrc;
     
    253253void pht_init(void)
    254254{
    255         memsetb((__address) phte, 1 << PHT_BITS, 0);
     255        memsetb((uintptr_t) phte, 1 << PHT_BITS, 0);
    256256}
    257257
     
    262262                page_mapping_operations = &pt_mapping_operations;
    263263               
    264                 __address cur;
     264                uintptr_t cur;
    265265                int flags;
    266266               
     
    277277                phte_t *physical_phte = (phte_t *) frame_alloc(PHT_ORDER, FRAME_KA | FRAME_ATOMIC);
    278278               
    279                 ASSERT((__address) physical_phte % (1 << PHT_BITS) == 0);
     279                ASSERT((uintptr_t) physical_phte % (1 << PHT_BITS) == 0);
    280280                pht_init();
    281281               
     
    283283                        "mtsdr1 %0\n"
    284284                        :
    285                         : "r" ((__address) physical_phte)
     285                        : "r" ((uintptr_t) physical_phte)
    286286                );
    287287        }
     
    289289
    290290
    291 __address hw_map(__address physaddr, size_t size)
     291uintptr_t hw_map(uintptr_t physaddr, size_t size)
    292292{
    293293        if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    294294                panic("Unable to map physical memory %p (%d bytes)", physaddr, size)
    295295       
    296         __address virtaddr = PA2KA(last_frame);
     296        uintptr_t virtaddr = PA2KA(last_frame);
    297297        pfn_t i;
    298298        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
Note: See TracChangeset for help on using the changeset viewer.