• David S. Miller's avatar
    [SPARC64]: Add CONFIG_DEBUG_PAGEALLOC support. · 56425306
    David S. Miller authored
    The trick is that we do the kernel linear mapping TLB miss starting
    with an instruction sequence like this:
    
    	ba,pt		%xcc, kvmap_load
    	 xor		%g2, %g4, %g5
    
    succeeded by an instruction sequence which performs a full page table
    walk starting at swapper_pg_dir.
    
    We first take over the trap table from the firmware.  Then, using this
    constant PTE generation for the linear mapping area above, we build
    the kernel page tables for the linear mapping.
    
    After this is setup, we patch that branch above into a "nop", which
    will cause TLB misses to fall through to the full page table walk.
    
    With this, the page unmapping for CONFIG_DEBUG_PAGEALLOC is trivial.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    56425306
vmlinux.lds.S 2.33 KB