Changeset 43d6401 in mainline for kernel/arch/ppc32/include/mm/page.h


Ignore:
Timestamp:
2009-01-29T18:24:40Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
917c427
Parents:
f817d3a
Message:

ppc32: add support for cache disable page access control

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/mm/page.h

    rf817d3a r43d6401  
    121121/* Macros for querying the last-level PTEs. */
    122122#define PTE_VALID_ARCH(pte)                     (*((uint32_t *) (pte)) != 0)
    123 #define PTE_PRESENT_ARCH(pte)                   ((pte)->p != 0)
     123#define PTE_PRESENT_ARCH(pte)                   ((pte)->present != 0)
    124124#define PTE_GET_FRAME_ARCH(pte)                 ((pte)->pfn << 12)
    125125#define PTE_WRITABLE_ARCH(pte)                  1
     
    135135        pte_t *p = &pt[i];
    136136       
    137         return ((1 << PAGE_CACHEABLE_SHIFT) |
    138             ((!p->p) << PAGE_PRESENT_SHIFT) |
     137        return (((!p->page_cache_disable) << PAGE_CACHEABLE_SHIFT) |
     138            ((!p->present) << PAGE_PRESENT_SHIFT) |
    139139            (1 << PAGE_USER_SHIFT) |
    140140            (1 << PAGE_READ_SHIFT) |
    141141            (1 << PAGE_WRITE_SHIFT) |
    142142            (1 << PAGE_EXEC_SHIFT) |
    143             (p->g << PAGE_GLOBAL_SHIFT));
     143            (p->global << PAGE_GLOBAL_SHIFT));
    144144}
    145145
     
    148148        pte_t *p = &pt[i];
    149149       
    150         p->p = !(flags & PAGE_NOT_PRESENT);
    151         p->g = (flags & PAGE_GLOBAL) != 0;
     150        p->page_cache_disable = !(flags & PAGE_CACHEABLE);
     151        p->present = !(flags & PAGE_NOT_PRESENT);
     152        p->global = (flags & PAGE_GLOBAL) != 0;
    152153        p->valid = 1;
    153154}
Note: See TracChangeset for help on using the changeset viewer.