Re: [patch] x86, voyager: fix ioremap_nocache()

From: Willy Tarreau
Date: Sun Apr 27 2008 - 18:37:00 EST


On Sun, Apr 27, 2008 at 06:05:59PM -0400, James Bottomley wrote:
> > Index: linux-x86.q/arch/x86/mach-voyager/voyager_cat.c
> > ===================================================================
> > --- linux-x86.q.orig/arch/x86/mach-voyager/voyager_cat.c
> > +++ linux-x86.q/arch/x86/mach-voyager/voyager_cat.c
> > @@ -602,7 +602,7 @@ void __init voyager_cat_init(void)
> >
> > request_resource(&iomem_resource, &res);
> > voyager_SUS = (struct voyager_SUS *)
> > - ioremap(addr, 0x400);
> > + ioremap_cache(addr, 0x400);
>
> Actually, no ... wrong ioremap. That one is the SUS clickmap remap,
> which is irrelevant whether it's cached or not. The QIC cacheline area
> is the next one below it.
>
> I've already got the actual patch (with a nice explanation) in the
> voyager tree. I'll send them all out to the mailing list shortly; I'm
> just trying to chase down a problem with TSCs before the voyager tree is
> ready.

James,

whatever the fix, please add a comment on the sensible line above so
that the same error does not happen again. Code must be readable without
comments, but magic choices must be commented if there's an underlying
reason.

Thanks,
Willy

--
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/