mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: mingo@elte.hu, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: SGU UV Add volatile to macros that access chipset registers
Date: Wed, 9 Sep 2009 10:42:46 -0500	[thread overview]
Message-ID: <20090909154246.GA26716@sgi.com> (raw)

Add "volatile" to the SGI UV read/write macros that are used to access chipset
memory mapped registers.

Signed-off-by: Jack Steiner <steiner@sgi.com>


---
 arch/x86/include/asm/uv/uv_hub.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux/arch/x86/include/asm/uv/uv_hub.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv_hub.h	2009-08-10 01:45:42.000000000 -0500
+++ linux/arch/x86/include/asm/uv/uv_hub.h	2009-08-10 11:43:39.000000000 -0500
@@ -248,7 +248,7 @@ static inline int uv_apicid_to_pnode(int
  * Access global MMRs using the low memory MMR32 space. This region supports
  * faster MMR access but not all MMRs are accessible in this space.
  */
-static inline unsigned long *uv_global_mmr32_address(int pnode,
+static inline volatile unsigned long *uv_global_mmr32_address(int pnode,
 				unsigned long offset)
 {
 	return __va(UV_GLOBAL_MMR32_BASE |
@@ -271,7 +271,7 @@ static inline unsigned long uv_read_glob
  * Access Global MMR space using the MMR space located at the top of physical
  * memory.
  */
-static inline unsigned long *uv_global_mmr64_address(int pnode,
+static inline volatile unsigned long *uv_global_mmr64_address(int pnode,
 				unsigned long offset)
 {
 	return __va(UV_GLOBAL_MMR64_BASE |
@@ -294,7 +294,7 @@ static inline unsigned long uv_read_glob
  * Access hub local MMRs. Faster than using global space but only local MMRs
  * are accessible.
  */
-static inline unsigned long *uv_local_mmr_address(unsigned long offset)
+static inline volatile unsigned long *uv_local_mmr_address(unsigned long offset)
 {
 	return __va(UV_LOCAL_MMR_BASE | offset);
 }
@@ -311,12 +311,12 @@ static inline void uv_write_local_mmr(un
 
 static inline unsigned char uv_read_local_mmr8(unsigned long offset)
 {
-	return *((unsigned char *)uv_local_mmr_address(offset));
+	return *((volatile unsigned char *)uv_local_mmr_address(offset));
 }
 
 static inline void uv_write_local_mmr8(unsigned long offset, unsigned char val)
 {
-	*((unsigned char *)uv_local_mmr_address(offset)) = val;
+	*((volatile unsigned char *)uv_local_mmr_address(offset)) = val;
 }
 
 /*

             reply	other threads:[~2009-09-09 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 15:42 Jack Steiner [this message]
2009-09-09 16:10 ` Daniel Walker
2009-09-09 18:01   ` Jack Steiner
2009-09-09 18:11     ` Daniel Walker
2009-09-09 18:54       ` Chris Friesen
2009-09-09 19:38         ` Jack Steiner
2009-09-10  0:44           ` H. Peter Anvin
2009-09-10  2:21             ` Jack Steiner
2009-09-10  2:22             ` [PATCH V2] x86: SGU UV Add volatile semantics " Jack Steiner
2009-09-10  3:05               ` H. Peter Anvin
2009-09-10  3:23                 ` Jack Steiner
2009-09-10 14:31                 ` [PATCH V3] " Jack Steiner
2009-09-18 12:06                   ` [tip:x86/urgent] x86: SGI UV: " tip-bot for Jack Steiner
2009-09-09 19:20       ` [PATCH] x86: SGU UV Add volatile " Jack Steiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090909154246.GA26716@sgi.com \
    --to=steiner@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome