diff options
-rw-r--r-- | arch/mips/include/asm/cpu-info.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mmu.h | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mmu_context.h | 10 | ||||
-rw-r--r-- | arch/mips/mm/c-r3k.c | 2 |
4 files changed, 7 insertions, 9 deletions
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index a41059d47d31..ed7ffe4e63a3 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -50,7 +50,7 @@ struct guest_info { | |||
50 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ | 50 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ |
51 | 51 | ||
52 | struct cpuinfo_mips { | 52 | struct cpuinfo_mips { |
53 | unsigned long asid_cache; | 53 | u64 asid_cache; |
54 | #ifdef CONFIG_MIPS_ASID_BITS_VARIABLE | 54 | #ifdef CONFIG_MIPS_ASID_BITS_VARIABLE |
55 | unsigned long asid_mask; | 55 | unsigned long asid_mask; |
56 | #endif | 56 | #endif |
diff --git a/arch/mips/include/asm/mmu.h b/arch/mips/include/asm/mmu.h index 0740be7d5d4a..24d6b42345fb 100644 --- a/arch/mips/include/asm/mmu.h +++ b/arch/mips/include/asm/mmu.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
8 | 8 | ||
9 | typedef struct { | 9 | typedef struct { |
10 | unsigned long asid[NR_CPUS]; | 10 | u64 asid[NR_CPUS]; |
11 | void *vdso; | 11 | void *vdso; |
12 | atomic_t fp_mode_switching; | 12 | atomic_t fp_mode_switching; |
13 | 13 | ||
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 94414561de0e..a589585be21b 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -76,14 +76,14 @@ extern unsigned long pgd_current[]; | |||
76 | * All unused by hardware upper bits will be considered | 76 | * All unused by hardware upper bits will be considered |
77 | * as a software asid extension. | 77 | * as a software asid extension. |
78 | */ | 78 | */ |
79 | static unsigned long asid_version_mask(unsigned int cpu) | 79 | static inline u64 asid_version_mask(unsigned int cpu) |
80 | { | 80 | { |
81 | unsigned long asid_mask = cpu_asid_mask(&cpu_data[cpu]); | 81 | unsigned long asid_mask = cpu_asid_mask(&cpu_data[cpu]); |
82 | 82 | ||
83 | return ~(asid_mask | (asid_mask - 1)); | 83 | return ~(u64)(asid_mask | (asid_mask - 1)); |
84 | } | 84 | } |
85 | 85 | ||
86 | static unsigned long asid_first_version(unsigned int cpu) | 86 | static inline u64 asid_first_version(unsigned int cpu) |
87 | { | 87 | { |
88 | return ~asid_version_mask(cpu) + 1; | 88 | return ~asid_version_mask(cpu) + 1; |
89 | } | 89 | } |
@@ -102,14 +102,12 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
102 | static inline void | 102 | static inline void |
103 | get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) | 103 | get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) |
104 | { | 104 | { |
105 | unsigned long asid = asid_cache(cpu); | 105 | u64 asid = asid_cache(cpu); |
106 | 106 | ||
107 | if (!((asid += cpu_asid_inc()) & cpu_asid_mask(&cpu_data[cpu]))) { | 107 | if (!((asid += cpu_asid_inc()) & cpu_asid_mask(&cpu_data[cpu]))) { |
108 | if (cpu_has_vtag_icache) | 108 | if (cpu_has_vtag_icache) |
109 | flush_icache_all(); | 109 | flush_icache_all(); |
110 | local_flush_tlb_all(); /* start new asid cycle */ | 110 | local_flush_tlb_all(); /* start new asid cycle */ |
111 | if (!asid) /* fix version if needed */ | ||
112 | asid = asid_first_version(cpu); | ||
113 | } | 111 | } |
114 | 112 | ||
115 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; | 113 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; |
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c index 3466fcdae0ca..01848cdf2074 100644 --- a/arch/mips/mm/c-r3k.c +++ b/arch/mips/mm/c-r3k.c | |||
@@ -245,7 +245,7 @@ static void r3k_flush_cache_page(struct vm_area_struct *vma, | |||
245 | pmd_t *pmdp; | 245 | pmd_t *pmdp; |
246 | pte_t *ptep; | 246 | pte_t *ptep; |
247 | 247 | ||
248 | pr_debug("cpage[%08lx,%08lx]\n", | 248 | pr_debug("cpage[%08llx,%08lx]\n", |
249 | cpu_context(smp_processor_id(), mm), addr); | 249 | cpu_context(smp_processor_id(), mm), addr); |
250 | 250 | ||
251 | /* No ASID => no such page in the cache. */ | 251 | /* No ASID => no such page in the cache. */ |