• Paul Burton's avatar
    MIPS: Use enums to make asm/pgtable-bits.h readable · 69497700
    Paul Burton authored
    asm/pgtable-bits.h has grown to become an unreadable mess of #ifdef
    directives defining bits conditionally upon other bits all at the
    preprocessing stage, for no good reason.
    
    Instead of having quite so many #ifdef's, simply use enums to provide
    sequential numbering for bit shifts, without having to keep track
    manually of what the last bit defined was. Masks are defined separately,
    after the shifts, which allows for most of their definitions to be
    reused for all systems rather than duplicated.
    
    This patch is not intended to make any behavioural change to the code -
    all bits should be used in the same way they were before this patch.
    Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
    Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Cc: Maciej W. Rozycki <macro@linux-mips.org>
    Cc: Alex Smith <alex.smith@imgtec.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/13115/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    69497700
pgtable-bits.h 7.44 KB