Re: [PATCH] ppc64: Fix __raw_* IO accessors

Paul Mackerras
2004-09-22T02:16:20Z

Linus Torvalds writes:

> I wasn't using pp64 back when, maybe there's some other reason for playing
> games with the tokens? Who's the guity/knowledgeable party? Ben?

I believe this was done so that we could quickly work out the pci
bus/device/function inside read/write[bwl]. We needed that for coping
with the "Enhanced Error Handling" (EEH) stuff on pSeries machines.
I think we used to stuff the pci bus/dev/fn in the high bits and then
change the top 4 bits to make quite clear that it wasn't a valid
pointer. These days we don't put the pci bus/dev/fn in the high bits
and we could certainly get rid of the IO_TOKEN_TO_ADDR games.

This stuff predates Ben's involvement in ppc64 by a long way, and was
put in before Anton or I had much influence. We'll clean it up.

Paul.