Konrad, A couple of comments. On Wed, Jun 10, 2009 at 20:24, <konrad@xxxxxxxxxxx> wrote: > From: Konrad Eisele <konrad@xxxxxxxxxxx> > > sparc-leon specific SRMMU initialization and > bootup fixes. The sparc-leon caches are virtually tagged so a flush is needed on ctx > switch. > --- > arch/sparc/mm/srmmu.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 67 insertions(+), 0 deletions(-) > > diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c > index 06c9a7d..0cf201b 100644 > --- a/arch/sparc/mm/srmmu.c > +++ b/arch/sparc/mm/srmmu.c > @@ -46,6 +46,10 @@ #include <asm/tsunami.h> > #include <asm/swift.h> > #include <asm/turbosparc.h> > > +#ifdef CONFIG_SPARC_LEON > +#include <asm/leon.h> > +#endif > + Hm, you don't need to ifdef this anymore =) > #include <asm/btfixup.h> > > enum mbus_module srmmu_modtype; > @@ -568,6 +572,11 @@ static void srmmu_switch_mm(struct mm_st > srmmu_ctxd_set(&srmmu_context_table[mm->context], mm->pgd); > } > > +#ifdef CONFIG_SPARC_LEON > + flush_tlb_mm(0); > + if (leon_flush_during_switch) > + leon_flush_cache_all(); > +#endif > if (is_hypersparc) > hyper_flush_whole_icache(); > Hmm... it would be nice to match the style of the statement after this, something like: if (is_leon) { flush_tlb_mm(0); if (leon_flush_during_switch) leon_flush_cache_all(); } But that would mean that the leon_flush_during_switch and leon_flush_cache_all() would have to be defined for the non-SPARC_LEON case, which isn't what you're trying to do here, however if leon_flush_cache_all() is defined as a blank function, the compiler *should* optimise all this away. Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx .Plan: http://sites.google.com/site/juliancalaby/ -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html