745x coherency fix for 2.4?
Mikael Pettersson
mikpe at csd.uu.se
Sat Oct 16 21:35:48 EST 2004
Benjamin Herrenschmidt writes:
> >
> > -#ifdef CONFIG_SMP
> > - if ((flags & _PAGE_NO_CACHE) == 0)
> > + if (((flags & _PAGE_NO_CACHE) == 0) &&
> > + (cur_cpu_spec[0]->cpu_features & CPU_FTR_NEED_COHERENT))
> > flags |= _PAGE_COHERENT;
> > -#endif
>
> Wouldn't your patch result in _not_ setting _PAGE_COHERENT on non-broken
> CPUs when CONFIG_SMP is set ?
The cputable.c change adds CPU_FTR_NEED_COHERENT to all CPUs when
CONFIG_SMP is set. That's why the changes from #ifdef CONFIG_SMP
to checking this feature flag work for both SMP and 745x.
The logic is straight from the 2.6 kernel; I only adapted it where
the 2.4 kernel was different, like some of the cputable entries
were missing in 2.4.
/Mikael
More information about the Linuxppc-dev
mailing list