sc-mips.c (c7d77a7980e434c3af17de19e3348157f9b9ccce) | sc-mips.c (05513992c69d159e698bb4b5f651abd0ceff525c) |
---|---|
1/* 2 * Copyright (C) 2006 Chris Dearman (chris@mips.com), 3 */ 4#include <linux/init.h> 5#include <linux/kernel.h> 6#include <linux/sched.h> 7#include <linux/mm.h> 8 --- 148 unchanged lines hidden (view full) --- 157 return 0; 158 159 config2 = read_c0_config2(); 160 161 if (!mips_sc_is_activated(c)) 162 return 0; 163 164 tmp = (config2 >> 8) & 0x0f; | 1/* 2 * Copyright (C) 2006 Chris Dearman (chris@mips.com), 3 */ 4#include <linux/init.h> 5#include <linux/kernel.h> 6#include <linux/sched.h> 7#include <linux/mm.h> 8 --- 148 unchanged lines hidden (view full) --- 157 return 0; 158 159 config2 = read_c0_config2(); 160 161 if (!mips_sc_is_activated(c)) 162 return 0; 163 164 tmp = (config2 >> 8) & 0x0f; |
165 if (0 <= tmp && tmp <= 7) | 165 if (tmp <= 7) |
166 c->scache.sets = 64 << tmp; 167 else 168 return 0; 169 170 tmp = (config2 >> 0) & 0x0f; | 166 c->scache.sets = 64 << tmp; 167 else 168 return 0; 169 170 tmp = (config2 >> 0) & 0x0f; |
171 if (0 <= tmp && tmp <= 7) | 171 if (tmp <= 7) |
172 c->scache.ways = tmp + 1; 173 else 174 return 0; 175 176 c->scache.waysize = c->scache.sets * c->scache.linesz; 177 c->scache.waybit = __ffs(c->scache.waysize); 178 179 c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; --- 13 unchanged lines hidden --- | 172 c->scache.ways = tmp + 1; 173 else 174 return 0; 175 176 c->scache.waysize = c->scache.sets * c->scache.linesz; 177 c->scache.waybit = __ffs(c->scache.waysize); 178 179 c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; --- 13 unchanged lines hidden --- |