* [patch] ip27's _flush_cache_all uninitialized
@ 2003-02-13 6:00 Andrew Clausen
2003-02-14 1:58 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Clausen @ 2003-02-13 6:00 UTC (permalink / raw)
To: Linux-MIPS; +Cc: ralf, mg, gnb
Hi all,
_flush_cache_all() and ___flush_cache_all() were uninitialized
(i.e. NULL). Someone probably assumed (incorrectly) that this
was ok, since flush_cache_all() doesn't use _flush_cache_all()
(or so they thought...).
End result: anything that called flush_cache_all() (a macro)
tried to call a function at 0x0, and died. This includes vmalloc().
I'm not sure what the best solution is, but this makes things work:
--- arch/mips64/mm/c-andes.c 9 Feb 2003 22:03:23 -0000 1.1.2.2
+++ arch/mips64/mm/c-andes.c 13 Feb 2003 05:50:54 -0000
@@ -48,6 +48,12 @@
}
}
+static void andes_flush_cache_all(void)
+{
+ andes_flush_cache_l1();
+ andes_flush_cache_l2();
+}
+
void andes_flush_icache_page(unsigned long page)
{
if (scache_lsz64)
@@ -80,6 +86,7 @@
_clear_page = andes_clear_page;
_copy_page = andes_copy_page;
+ _flush_cache_all = ___flush_cache_all = andes_flush_cache_all;
_flush_cache_l1 = andes_flush_cache_l1;
_flush_cache_l2 = andes_flush_cache_l2;
_flush_cache_sigtramp = andes_flush_cache_sigtramp;
Cheers,
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ip27's _flush_cache_all uninitialized
2003-02-13 6:00 [patch] ip27's _flush_cache_all uninitialized Andrew Clausen
@ 2003-02-14 1:58 ` Ralf Baechle
2003-02-14 2:21 ` Andrew Clausen
0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2003-02-14 1:58 UTC (permalink / raw)
To: Andrew Clausen; +Cc: Linux-MIPS, mg, gnb
On Thu, Feb 13, 2003 at 05:00:17PM +1100, Andrew Clausen wrote:
> _flush_cache_all() and ___flush_cache_all() were uninitialized
> (i.e. NULL). Someone probably assumed (incorrectly) that this
> was ok, since flush_cache_all() doesn't use _flush_cache_all()
> (or so they thought...).
>
> End result: anything that called flush_cache_all() (a macro)
> tried to call a function at 0x0, and died. This includes vmalloc().
>
> I'm not sure what the best solution is, but this makes things work:
And is guaranateed to crawl. flush_cache_all() is a no-op for the R10k.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ip27's _flush_cache_all uninitialized
2003-02-14 1:58 ` Ralf Baechle
@ 2003-02-14 2:21 ` Andrew Clausen
2003-02-14 2:36 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Clausen @ 2003-02-14 2:21 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Linux-MIPS
On Fri, Feb 14, 2003 at 02:58:35AM +0100, Ralf Baechle wrote:
> > I'm not sure what the best solution is, but this makes things work:
>
> And is guaranateed to crawl. flush_cache_all() is a no-op for the R10k.
Right-o. But who cares? Apparently it almost never gets called.
Also, I couldn't find any documentation on what callers of
flush_cache_all() expect...
Cheers,
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ip27's _flush_cache_all uninitialized
2003-02-14 2:21 ` Andrew Clausen
@ 2003-02-14 2:36 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2003-02-14 2:36 UTC (permalink / raw)
To: Andrew Clausen; +Cc: Linux-MIPS
On Fri, Feb 14, 2003 at 01:21:18PM +1100, Andrew Clausen wrote:
> On Fri, Feb 14, 2003 at 02:58:35AM +0100, Ralf Baechle wrote:
> > > I'm not sure what the best solution is, but this makes things work:
> >
> > And is guaranateed to crawl. flush_cache_all() is a no-op for the R10k.
>
> Right-o. But who cares? Apparently it almost never gets called.
>
> Also, I couldn't find any documentation on what callers of
> flush_cache_all() expect...
Documentation/cachetlb.txt - but it takes alot of reading between the lines
that is reading of the generic mm code to understand that document.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-14 2:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-13 6:00 [patch] ip27's _flush_cache_all uninitialized Andrew Clausen
2003-02-14 1:58 ` Ralf Baechle
2003-02-14 2:21 ` Andrew Clausen
2003-02-14 2:36 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.