--- zzzz-none-000/linux-3.10.107/arch/mips/include/asm/fixmap.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/mips/include/asm/fixmap.h 2021-11-10 11:53:53.000000000 +0000 @@ -20,6 +20,7 @@ #include #endif +#ifndef CONFIG_EVA_3GB /* * Here we define all the compile-time 'special' virtual * addresses. The point is to have a constant address at @@ -46,7 +47,19 @@ * fix-mapped? */ enum fixed_addresses { + +/* must be <= 8, last_pkmap_nr_arr[] is initialized to 8 elements, + keep the total L1 size <= 512KB with 4 ways */ +#ifdef CONFIG_PAGE_SIZE_64KB +#define FIX_N_COLOURS 2 +#endif +#ifdef CONFIG_PAGE_SIZE_32KB +#define FIX_N_COLOURS 4 +#endif +#ifndef FIX_N_COLOURS #define FIX_N_COLOURS 8 +#endif + FIX_CMAP_BEGIN, #ifdef CONFIG_MIPS_MT_SMTC FIX_CMAP_END = FIX_CMAP_BEGIN + (FIX_N_COLOURS * NR_CPUS * 2), @@ -56,7 +69,7 @@ #ifdef CONFIG_HIGHMEM /* reserved pte's for temporary kernel mappings */ FIX_KMAP_BEGIN = FIX_CMAP_END + 1, - FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, + FIX_KMAP_END = FIX_KMAP_BEGIN+(8*NR_CPUS*FIX_N_COLOURS)-1, #endif __end_of_fixed_addresses }; @@ -115,3 +128,4 @@ #endif +#endif