ioremap of pci region on pSeries LPAR vs SMP

Paul Mackerras paulus at samba.org
Tue Jan 11 08:41:48 EST 2005


Linas Vepstas writes:

> Please note that someone removed the EEH_REGION stuff recently,
> october-ish I think.  I don't know why, I thought it was something 
> you condoned.  And so in the latest kernels, it *is* legal to directly 
> dereference the result of ioremap. 

It might work, but it's not legal on any architecture.  I thought
there was a file in the Documentation directory explaining that, but I
can't find it now.  Certainly it has been discussed on various mailing
lists in the past.  See for example:

http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0591.html

On ppc and ppc64, the ioremap return happens to be a valid effective
address, but dereferencing it directly is still not right, since if
you do that you miss out on the barriers you need to ensure that your
loads and stores hit the device in program order.

> Was removing this mechanism the right thing to do?  If so, why?

It was an enormous simplification and Linus was keen to do it.  He
actually looks at our code from time to time now that his desktop
machine is a G5. :)

> It seemed like a great way to force everyone to use the 
> readb/etc macros.

Some architectures do in fact use ioremap cookie poisoning for that
reason.  We could do that as a debug option.

Paul.



More information about the Linuxppc64-dev mailing list