From 4edf00a46bee692f62578b5280c5774f9b65a08f Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Fri, 6 May 2016 14:36:23 +0100 Subject: MIPS: Retrieve ASID masks using function accepting struct cpuinfo_mips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In preparation for supporting variable ASID masks, retrieve ASID masks using functions in asm/cpu-info.h which accept struct cpuinfo_mips. This will allow those functions to determine the ASID mask based upon the CPU in a later patch. This also allows for the r3k & r8k cases to be handled in Kconfig, which is arguably cleaner than the previous #ifdefs. Signed-off-by: Paul Burton Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13210/ Signed-off-by: Ralf Baechle --- arch/mips/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/mips/Kconfig') diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 95f05826a16f..0cab0da2ab55 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2449,6 +2449,17 @@ config CPU_R4000_WORKAROUNDS config CPU_R4400_WORKAROUNDS bool +config MIPS_ASID_SHIFT + int + default 6 if CPU_R3000 || CPU_TX39XX + default 4 if CPU_R8000 + default 0 + +config MIPS_ASID_BITS + int + default 6 if CPU_R3000 || CPU_TX39XX + default 8 + # # - Highmem only makes sense for the 32-bit kernel. # - The current highmem code will only work properly on physically indexed -- cgit v1.2.3