• James Hogan's avatar
    MIPS: mm: Don't do MTHC0 if XPA not present · 4b6f99d3
    James Hogan authored
    Performing an MTHC0 instruction without XPA being present will trigger a
    reserved instruction exception, therefore conditionalise the use of this
    instruction when building TLB handlers (build_update_entries()), and in
    __update_tlb().
    
    This allows an XPA kernel to run on non XPA hardware without that
    instruction implemented, just like it can run on XPA capable hardware
    without XPA in use (with the noxpa kernel argument) or with XPA not
    configured in hardware.
    
    [paul.burton@imgtec.com:
      - Rebase atop other TLB work.
      - Add "mm" to subject.
      - Handle the __kmap_pgprot case.]
    
    Fixes: c5b36783 ("MIPS: Add support for XPA.")
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
    Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
    Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Jerome Marchand <jmarchan@redhat.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/13124/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    4b6f99d3
tlb-r4k.c 12.9 KB