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

From: Linus Torvalds
Date: Tue Sep 21 2004 - 17:18:07 EST




On Tue, 21 Sep 2004, Roland Dreier wrote:
>
> That means using __raw_writel() is pretty much guaranteed to blow up
> on IBM pSeries (and I do care about pSeries for my driver).

Oh, that's true. And that's pretty clearly a bug, since it just means that
__raw_writel() can't even work in general.

> Maybe something like the patch below would make sense? (Reordering of
> code is to make sure IO_TOKEN_TO_ADDR() is defined before the
> __raw_*() functions; eeh.h has to be included after the in_*() and
> out_*() functions are defined)

I wonder if we could just remove the TOKEN/ADDR games. I think they were
done entirely as a debugging aid (but I could be wrong). In particular,
the compile-time type safefy should hopefully be better at finding these
things in the long run, and in the short run the TOKEN games have
obviously played their part.

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?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/