Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360186
b: refs/heads/master
c: d626f54
h: refs/heads/master
v: v3
  • Loading branch information
Vineet Gupta committed Feb 15, 2013
1 parent 389dbd1 commit 9e9bc63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db8e35d5b28fe6608e73913c919e4a6568f7c09c
refs/heads/master: d626f547dd0457ab36f6151673fcc78fc3c63eaa
21 changes: 9 additions & 12 deletions trunk/arch/arc/mm/cache_arc700.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,18 @@ void __init read_decode_cache_bcr(void)
void __init arc_cache_init(void)
{
unsigned int temp;
#ifdef CONFIG_ARC_CACHE
unsigned int cpu = smp_processor_id();
#endif
#ifdef CONFIG_ARC_HAS_ICACHE
struct cpuinfo_arc_cache *ic;
#endif
#ifdef CONFIG_ARC_HAS_DCACHE
struct cpuinfo_arc_cache *dc;
#endif
struct cpuinfo_arc_cache *ic = &cpuinfo_arc700[cpu].icache;
struct cpuinfo_arc_cache *dc = &cpuinfo_arc700[cpu].dcache;
int way_pg_ratio = way_pg_ratio;
char str[256];

printk(arc_cache_mumbojumbo(0, str, sizeof(str)));

#ifdef CONFIG_ARC_HAS_ICACHE
ic = &cpuinfo_arc700[cpu].icache;
if (!ic->ver)
goto chk_dc;

#ifdef CONFIG_ARC_HAS_ICACHE
/* 1. Confirm some of I-cache params which Linux assumes */
if ((ic->assoc != ARC_ICACHE_WAYS) ||
(ic->line_len != ARC_ICACHE_LINE_LEN)) {
Expand Down Expand Up @@ -213,9 +208,11 @@ void __init arc_cache_init(void)

write_aux_reg(ARC_REG_IC_CTRL, temp);

#ifdef CONFIG_ARC_HAS_DCACHE
dc = &cpuinfo_arc700[cpu].dcache;
chk_dc:
if (!dc->ver)
return;

#ifdef CONFIG_ARC_HAS_DCACHE
if ((dc->assoc != ARC_DCACHE_WAYS) ||
(dc->line_len != ARC_DCACHE_LINE_LEN)) {
panic("Cache H/W doesn't match kernel Config");
Expand Down

0 comments on commit 9e9bc63

Please sign in to comment.