Re: [PATCH] altix: Add volatile qualifiers in places where it seems necessary

From: Russ Anderson <rja_at_efs.americas.sgi.com>
Date: 2005-09-03 01:52:31
Mark Maule wrote:
> On Fri, Sep 02, 2005 at 04:38:09PM +0100, Christoph Hellwig wrote:
> > On Fri, Sep 02, 2005 at 10:36:12AM -0500, Mark Maule wrote:
> > > Add missing volatile qualifier to hardware MMR pointers in various SN files.
> > > Cosmetic code rearranging in pcibr_reg.c to avoid line-wraps.
> > 
> > Volatile usage is wrong most of the time, and your use is certainly.
> > It seems you're accessing mmio-space or something similar and should
> > use proper acessors for it.
> > 
> 
> Okay.  In these cases, I am indeed accessing mapped reisters.  I don't know
> what you mean by "proper acessors", so a reference would be appreciated.

The BTE code used HUB_L() and HUB_S() for comperable type useage.

In include/asm-ia64/sn/bte.h:

#define BTE_LNSTAT_LOAD(_bte)                                           \
                        HUB_L(_bte->bte_base_addr)


In include/asm-ia64/sn/addrs.h:

#define HUB_L(x)                        (*((volatile typeof(*x) *)x))
#define HUB_S(x,d)                      (*((volatile typeof(*x) *)x) = (d))


-- 
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          rja@sgi.com
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Sep 03 01:52:37 2005

This archive was generated by hypermail 2.1.8 : 2005-09-03 01:52:43 EST