linux-mips
[Top] [All Lists]

Re: [patch] blast_scache nop for sc cpus without scache

To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Re: [patch] blast_scache nop for sc cpus without scache
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Mon, 27 Jun 2005 20:43:40 +0100 (BST)
Cc: Ralf Baechle <ralf@linux-mips.org>, Florian Lohoff <flo@rfc822.org>, linux-mips@linux-mips.org
In-reply-to: <20050627190910.GA13292@alpha.franken.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20050625131938.GA7669@paradigm.rfc822.org> <20050625160316.GP6953@linux-mips.org> <20050625175048.GA25276@alpha.franken.de> <Pine.LNX.4.61L.0506271309500.15406@blysk.ds.pg.gda.pl> <20050627190910.GA13292@alpha.franken.de>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 27 Jun 2005, Thomas Bogendoerfer wrote:

> >  Are you sure CONF_SC isn't set?
> 
> I've checked that after we saw a crash in __flush_cache_all().

 I see -- that's OK.

> > That would be weird, it's one of the boot-mode settings so it would be
> > hard to get it wrong.  What's printed upon bootstrap about caches?
> 
> I don't have the console working yet, we just put enough prom_printf()s
> to work out, what was going wron.

 How about using these prom_printf()s to implement a real early printk()?  
You'd save yourself and perhaps others a lot of hassle.

> I'm also not sure, whether adding the blast_scache_nop() stuff is
> the way to go. I'd probably throw out the switch case over CPU types
> and use a single test before calling r4k_blast_scache(). Hmm, the
> probably cheapest version would be:
> 
>       if (r4k_blast_scache)
>               r4k_blast_scache();
> 
> Problem solved.

 Probably, but there are actually other conditions already used, which may 
happen to fit, or otherwise you are rather after creating "cpu_has_scache" 
which would expand to a bit test for cpu_data[0].options or 0 or 1 as 
appropriate, depending on platform settings.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>