Changeset 46c20c8 in mainline for kernel/arch/ppc32/src/mm/page.c


Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45df59a
Parents:
fb150d78 (diff), ffdd2b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rfb150d78 r46c20c8  
    4545}
    4646
    47 
    4847uintptr_t hw_map(uintptr_t physaddr, size_t size)
    4948{
    5049        if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
    5150            KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    52                 panic("Unable to map physical memory %p (%" PRIs " bytes).",
    53                     physaddr, size);
     51                panic("Unable to map physical memory %p (%zu bytes).",
     52                    (void *) physaddr, size);
    5453       
    5554        uintptr_t virtaddr = PA2KA(last_frame);
    5655        pfn_t i;
     56        page_table_lock(AS_KERNEL, true);
    5757        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
    5858                page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i),
    5959                    physaddr + PFN2ADDR(i), PAGE_NOT_CACHEABLE | PAGE_WRITE);
     60        page_table_unlock(AS_KERNEL, true);
    6061       
    6162        last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
Note: See TracChangeset for help on using the changeset viewer.