• Andrew Morton's avatar
    [PATCH] ARM-related ptep_to_address() fix · d8fbf4f1
    Andrew Morton authored
    From: William Lee Irwin III <wli@holomorphy.com>
    
    rmk mentioned that ARM was borked as the relation, assumed by generic rmap,
    PTRS_PER_PTE*sizeof(pte_t) == PAGE_SIZE, fails to hold.  The following
    patch, developed jointly with him (or depending on POV, by him with me
    acting as codemonkey), is reported to resolve the issue.
    
    Specifically, while ARM dedicates an entire PAGE_SIZE -sized block of
    memory to each PTE table, the PTE table itself only spans half that, the
    remainder being dedicated to hardware-interpreted structures.  As the
    hardware structure must be contiguous, wider ptes can't be used.  So the
    core-visible PTE table only spans PAGE_SIZE/2 bytes, violating the
    assumption.  This corrects masking and scaling done in ptep_to_address().
    d8fbf4f1
rmap.h 2.48 KB