All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] more sparse I/O accessor fixes
Date: Wed, 20 Oct 2004 22:48:59 +0000	[thread overview]
Message-ID: <200410201548.59622.jbarnes@engr.sgi.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

I forgot to add 'const volatile' to the I/O read/write functions in the last 
patch, and also forgot to update the _relaxed variants.  This patch fixes 
that by adding 'const volatile' to the sn2 specific read/write routines as 
well as the ia64 machine vector wrappers.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>

Thanks,
Jesse


[-- Attachment #2: sparse-io-access-fixes.patch --]
[-- Type: text/plain, Size: 3280 bytes --]

===== include/asm-ia64/machvec.h 1.27 vs edited =====
--- 1.27/include/asm-ia64/machvec.h	2004-10-20 13:38:35 -07:00
+++ edited/include/asm-ia64/machvec.h	2004-10-20 15:25:54 -07:00
@@ -62,14 +62,14 @@
 typedef void ia64_mv_outb_t (unsigned char, unsigned long);
 typedef void ia64_mv_outw_t (unsigned short, unsigned long);
 typedef void ia64_mv_outl_t (unsigned int, unsigned long);
-typedef unsigned char ia64_mv_readb_t (void __iomem *);
-typedef unsigned short ia64_mv_readw_t (void __iomem *);
-typedef unsigned int ia64_mv_readl_t (void __iomem *);
-typedef unsigned long ia64_mv_readq_t (void __iomem *);
-typedef unsigned char ia64_mv_readb_relaxed_t (void __iomem *);
-typedef unsigned short ia64_mv_readw_relaxed_t (void __iomem *);
-typedef unsigned int ia64_mv_readl_relaxed_t (void __iomem *);
-typedef unsigned long ia64_mv_readq_relaxed_t (void __iomem *);
+typedef unsigned char ia64_mv_readb_t (const volatile void __iomem *);
+typedef unsigned short ia64_mv_readw_t (const volatile void __iomem *);
+typedef unsigned int ia64_mv_readl_t (const volatile void __iomem *);
+typedef unsigned long ia64_mv_readq_t (const volatile void __iomem *);
+typedef unsigned char ia64_mv_readb_relaxed_t (const volatile void __iomem *);
+typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *);
+typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *);
+typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *);
 
 static inline void
 machvec_noop (void)
===== include/asm-ia64/sn/io.h 1.2 vs edited =====
--- 1.2/include/asm-ia64/sn/io.h	2004-10-20 13:38:35 -07:00
+++ edited/include/asm-ia64/sn/io.h	2004-10-20 15:27:01 -07:00
@@ -129,7 +129,7 @@
  */
 
 static inline unsigned char
-___sn_readb (void __iomem *addr)
+___sn_readb (const volatile void __iomem *addr)
 {
 	unsigned char val;
 
@@ -140,7 +140,7 @@
 }
 
 static inline unsigned short
-___sn_readw (void __iomem *addr)
+___sn_readw (const volatile void __iomem *addr)
 {
 	unsigned short val;
 
@@ -151,7 +151,7 @@
 }
 
 static inline unsigned int
-___sn_readl (void __iomem *addr)
+___sn_readl (const volatile void __iomem *addr)
 {
 	unsigned int val;
 
@@ -162,7 +162,7 @@
 }
 
 static inline unsigned long
-___sn_readq (void __iomem *addr)
+___sn_readq (const volatile void __iomem *addr)
 {
 	unsigned long val;
 
@@ -215,27 +215,27 @@
 }
 
 static inline unsigned char
-___sn_readb_relaxed (void *addr)
+___sn_readb_relaxed (const volatile void __iomem *addr)
 {
-	return *(volatile unsigned char *)addr;
+	return *(volatile unsigned char __force *)addr;
 }
 
 static inline unsigned short
-___sn_readw_relaxed (void *addr)
+___sn_readw_relaxed (const volatile void __iomem *addr)
 {
-	return *(volatile unsigned short *)addr;
+	return *(volatile unsigned short __force *)addr;
 }
 
 static inline unsigned int
-___sn_readl_relaxed (void *addr)
+___sn_readl_relaxed (const volatile void __iomem *addr)
 {
-	return *(volatile unsigned int *) addr;
+	return *(volatile unsigned int __force *) addr;
 }
 
 static inline unsigned long
-___sn_readq_relaxed (void *addr)
+___sn_readq_relaxed (const volatile void __iomem *addr)
 {
-	return *(volatile unsigned long *) addr;
+	return *(volatile unsigned long __force *) addr;
 }
 
 struct pci_dev;

                 reply	other threads:[~2004-10-20 22:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200410201548.59622.jbarnes@engr.sgi.com \
    --to=jbarnes@engr.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.