Subject: Re: [patch 5/6] ps3: BD/DVD/CD-ROM Storage Driver

From: Arnd Bergmann <[email-masked]>
Date: Fri, 13 Jul 2007 16:19:54 +0200

On Friday 13 July 2007, James Bottomley wrote:
>=20
> > IC.
> >=20
> > =A0 - flush_kernel_dcache_page() is a no-op on ppc64
> > =A0 =A0 (ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE is defined on parisc only).
> >=20
> > =A0 - For reference, drivers/scsi/ipr.c (another ppc64 driver) just use=
s a plain
> > =A0 =A0 kmap/memcpy/kunmap sequence
> >=20
> > So what should I do?
>=20
> Ask someone who knows the architecture ... Anton, Paulus or Benh ... I'm
> fairly certain PPC is VIPT and will need some kind of alias
> resolution ... perhaps its associative enough not to let the aliases be
> a problem.

I'm pretty sure that no ppc64 machine needs alias resolution in the kernel,
although some are VIPT. Last time we discussed this, Segher explained it
to me, but I don't remember which way Cell does it. IIRC, it automatically
flushes cache lines that are accessed through aliases.

It's probably a good idea to have the flush_kernel_dcache_page() in there
anyway, if only to serve as an example for people that copy it into
architecture-independent drivers, same as what we do for the
k{,un}map_atomic() that is also not required on ppc64.

	Arnd <><