Re: [patch 05/18] PS3: Fix sparse warnings
From: Arnd Bergmann <arnd@arndb.de>
Date: 2007-06-06 14:22:06
On Wednesday 06 June 2007, Geoff Levand wrote:
-=A0=A0=A0=A0=A0=A0=A0spu->local_store =3D ioremap(spu->local_store_phys,=
LS_SIZE);
+=A0=A0=A0=A0=A0=A0=A0spu->local_store =3D (__force void *)ioremap(spu->l=
ocal_store_phys,
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 L= S_SIZE); I haven't noticed this before, but it seems to be a preexisting bug: You map the local_store as with the guarded page table bit set, which causes a performance degradation when accessing the memory from kernel space. If you're lucky, your hypervisor knows this and will fix it up for you, but I would replace the ioremap call with an ioremap_flags(..., _PAGE_NO_CACHE); to be on the safe side. If you want to measure the impact, I'd suggest timing a user space read() on the mem file of a running SPU context. Arnd <><