Changeset 7e752b2 in mainline for kernel/arch/ppc32/src/mm


Ignore:
Timestamp:
2010-11-26T01:33:20Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf61d3a
Parents:
202f57b
Message:
  • correct printf() formatting strings and corresponding arguments
  • minor cstyle changes and other small fixes
Location:
kernel/arch/ppc32/src/mm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/frame.c

    r202f57b r7e752b2  
    4949        size_t i;
    5050        for (i = 0; i < memmap.cnt; i++) {
    51                 printf("%#10x %#10x\n", memmap.zones[i].start,
     51                printf("%p %#0zx\n", memmap.zones[i].start,
    5252                    memmap.zones[i].size);
    5353        }
  • kernel/arch/ppc32/src/mm/page.c

    r202f57b r7e752b2  
    4949        if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
    5050            KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    51                 panic("Unable to map physical memory %p (%" PRIs " bytes).",
    52                     physaddr, size);
     51                panic("Unable to map physical memory %p (%zu bytes).",
     52                    (void *) physaddr, size);
    5353       
    5454        uintptr_t virtaddr = PA2KA(last_frame);
  • kernel/arch/ppc32/src/mm/tlb.c

    r202f57b r7e752b2  
    111111static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate)
    112112{
    113         fault_if_from_uspace(istate, "PHT Refill Exception on %p.", badvaddr);
     113        fault_if_from_uspace(istate, "PHT Refill Exception on %p.",
     114            (void *) badvaddr);
    114115        panic_memtrap(istate, PF_ACCESS_UNKNOWN, badvaddr,
    115116            "PHT Refill Exception.");
     
    459460                length = 0; \
    460461        \
    461         printf(name ": page=%.*p frame=%.*p length=%d KB (mask=%#x)%s%s\n", \
    462             sizeof(upper) * 2, upper & 0xffff0000, sizeof(lower) * 2, \
    463             lower & 0xffff0000, length, mask, \
     462        printf(name ": page=%#0" PRIx32 " frame=%#0" PRIx32 \
     463            " length=%#0" PRIx32 " KB (mask=%#0" PRIx32 ")%s%s\n", \
     464            upper & UINT32_C(0xffff0000), lower & UINT32_C(0xffff0000), \
     465            length, mask, \
    464466            ((upper >> 1) & 1) ? " supervisor" : "", \
    465467            (upper & 1) ? " user" : "");
    466468
    467 
    468469void tlb_print(void)
    469470{
     
    473474                uint32_t vsid = sr_get(sr << 28);
    474475               
    475                 printf("sr[%02u]: vsid=%.*p (asid=%u)%s%s\n", sr,
    476                     sizeof(vsid) * 2, vsid & 0xffffff, (vsid & 0xffffff) >> 4,
     476                printf("sr[%02" PRIu32 "]: vsid=%#0" PRIx32 " (asid=%" PRIu32 ")"
     477                    "%s%s\n", sr, vsid & UINT32_C(0x00ffffff),
     478                    (vsid & UINT32_C(0x00ffffff)) >> 4,
    477479                    ((vsid >> 30) & 1) ? " supervisor" : "",
    478480                    ((vsid >> 29) & 1) ? " user" : "");
Note: See TracChangeset for help on using the changeset viewer.