All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Ralf Baechle <ralf@linux-mips.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Doug Thompson <norsk5@yahoo.com>,
	dougthompson@xmission.com, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/1] edac x38: new MC driver module
Date: Sun, 30 Nov 2008 09:37:00 +0100	[thread overview]
Message-ID: <20081130083700.GA31644@elte.hu> (raw)
In-Reply-To: <20081130171604.dc3c8715.h.mitake@gmail.com>


* Hitoshi Mitake <h.mitake@gmail.com> wrote:

> On Sat, 29 Nov 2008 19:01:44 +0100
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > I see both rationales and you combine them in your patch - OK.
> > 
> > And the reason why you cannot just add this to
> > include/linux/io.h is that not all architectures
> > provide a readl()/writel() I assume.
> >
> Yes, I can't say all architectures provide readl/writel.
> And there may be some architecture depended problems,
> so I can't decide to add my readq/writeq as architecture independent ones.
> 
> > Feel free to add my Acked-by: to the patch.
> 
> Thanks, I added your Acked-by to new patch.

applied to tip/x86/io, thanks! I also did the small cleanup below.

	Ingo

------------>
From 458102461ccedc3ab7847132b5db6a53782dc9a8 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Sun, 30 Nov 2008 09:33:55 +0100
Subject: [PATCH] x86: provide readq()/writeq() on 32-bit too, cleanup

Impact: cleanup

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/io.h |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 2594644..3ccfaf6 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
 #define __raw_readq __readq
 #define __raw_writeq writeq
 
-/* Let people know we have them */
-#define readq readq
-#define writeq writeq
-
 #else  /* CONFIG_X86_32 from here */
 
 static inline __u64 readq(const volatile void __iomem *addr)
 {
 	const volatile u32 __iomem *p = addr;
-	u32 l, h;
+	u32 low, high;
 
-	l = readl(p);
-	h = readl(p + 1);
+	low = readl(p);
+	high = readl(p + 1);
 
-	return l + ((u64)h << 32);
+	return low + ((u64)high << 32);
 }
 
 static inline void writeq(__u64 val, volatile void __iomem *addr)
@@ -78,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
 	writel(val >> 32, addr+4);
 }
 
+#endif
+
+/* Let people know that we have them */
 #define readq		readq
 #define writeq		writeq
 
-#endif
-
 extern int iommu_bio_merge;
 
 #ifdef CONFIG_X86_32

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Ralf Baechle <ralf@linux-mips.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Doug Thompson <norsk5@yahoo.com>,
	dougthompson@xmission.com, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/1] edac x38: new MC driver module
Date: Sun, 30 Nov 2008 09:37:00 +0100	[thread overview]
Message-ID: <20081130083700.GA31644@elte.hu> (raw)
In-Reply-To: <20081130171604.dc3c8715.h.mitake@gmail.com>


* Hitoshi Mitake <h.mitake@gmail.com> wrote:

> On Sat, 29 Nov 2008 19:01:44 +0100
> Sam Ravnborg <sam@ravnborg.org> wrote:
> 
> > I see both rationales and you combine them in your patch - OK.
> > 
> > And the reason why you cannot just add this to
> > include/linux/io.h is that not all architectures
> > provide a readl()/writel() I assume.
> >
> Yes, I can't say all architectures provide readl/writel.
> And there may be some architecture depended problems,
> so I can't decide to add my readq/writeq as architecture independent ones.
> 
> > Feel free to add my Acked-by: to the patch.
> 
> Thanks, I added your Acked-by to new patch.

applied to tip/x86/io, thanks! I also did the small cleanup below.

	Ingo

------------>
>From 458102461ccedc3ab7847132b5db6a53782dc9a8 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Sun, 30 Nov 2008 09:33:55 +0100
Subject: [PATCH] x86: provide readq()/writeq() on 32-bit too, cleanup

Impact: cleanup

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/include/asm/io.h |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 2594644..3ccfaf6 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -55,21 +55,17 @@ build_mmio_write(__writeq, "q", unsigned long, "r", )
 #define __raw_readq __readq
 #define __raw_writeq writeq
 
-/* Let people know we have them */
-#define readq readq
-#define writeq writeq
-
 #else  /* CONFIG_X86_32 from here */
 
 static inline __u64 readq(const volatile void __iomem *addr)
 {
 	const volatile u32 __iomem *p = addr;
-	u32 l, h;
+	u32 low, high;
 
-	l = readl(p);
-	h = readl(p + 1);
+	low = readl(p);
+	high = readl(p + 1);
 
-	return l + ((u64)h << 32);
+	return low + ((u64)high << 32);
 }
 
 static inline void writeq(__u64 val, volatile void __iomem *addr)
@@ -78,11 +74,12 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
 	writel(val >> 32, addr+4);
 }
 
+#endif
+
+/* Let people know that we have them */
 #define readq		readq
 #define writeq		writeq
 
-#endif
-
 extern int iommu_bio_merge;
 
 #ifdef CONFIG_X86_32

  reply	other threads:[~2008-11-30  8:37 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-29  0:56 [PATCH 1/1] edac x38: new MC driver module H. Peter Anvin
2008-11-29  0:56 ` H. Peter Anvin
2008-11-29  7:47 ` Hitoshi Mitake
2008-11-29  7:47   ` Hitoshi Mitake
2008-11-29  9:38   ` Ingo Molnar
2008-11-29 10:26     ` Hitoshi Mitake
2008-11-29 10:52       ` Sam Ravnborg
2008-11-29 13:24         ` Hitoshi Mitake
2008-11-29 18:01           ` Sam Ravnborg
2008-11-30  8:16             ` Hitoshi Mitake
2008-11-30  8:37               ` Ingo Molnar [this message]
2008-11-30  8:37                 ` Ingo Molnar
2008-11-30  9:24                 ` Ingo Molnar
2008-11-30  9:24                   ` Ingo Molnar
2008-11-30 15:20                   ` Hitoshi Mitake
2008-11-30 16:15                     ` Ingo Molnar
2008-12-01 13:51                       ` Hitoshi Mitake
2008-12-01 13:59                         ` Ingo Molnar
2008-12-01 23:58                           ` Hitoshi Mitake
2008-12-04 15:58                             ` Hitoshi Mitake
2009-01-16  1:24                               ` Hitoshi Mitake
2009-02-21 10:11                             ` Hitoshi Mitake
2009-02-21 10:39                               ` Russell King
2009-02-21 13:09                               ` Sam Ravnborg
2009-02-22 14:15                                 ` Hitoshi Mitake
2009-02-22 14:16                                 ` Hitoshi Mitake
2009-02-22 14:16                                   ` Hitoshi Mitake
2009-02-22 14:16                                   ` Hitoshi Mitake
2009-02-22 14:18                                 ` Hitoshi Mitake
2009-02-22 14:18                                   ` Hitoshi Mitake
2009-02-22 14:18                                   ` Hitoshi Mitake
2009-02-22 14:19                                 ` Hitoshi Mitake
2009-02-22 14:20                                 ` Hitoshi Mitake
2009-02-22 14:21                                 ` Hitoshi Mitake
  -- strict thread matches above, loose matches on Subject: below --
2008-10-17 21:39 dougthompson
2008-10-20 23:32 ` Andrew Morton
2008-11-05 22:29   ` Hitoshi Mitake
2008-11-05 16:26     ` Doug Thompson
2008-11-07  0:46       ` Andrew Morton
2008-11-07 15:28         ` Hitoshi Mitake
2008-11-07  6:31           ` Andrew Morton
2008-11-07 15:38             ` Hitoshi Mitake
2008-11-07  7:11               ` Andrew Morton
2008-11-09 15:10                 ` Hitoshi Mitake
2008-11-09 19:26                   ` Andrew Morton
2008-11-11  6:11                     ` Paul Mundt
2008-11-13 15:15                       ` Hitoshi Mitake
2008-11-18 12:16                     ` Ralf Baechle
2008-11-18 12:32                       ` Russell King
2008-11-20 16:19                         ` Hitoshi Mitake
2008-11-23 23:52                           ` H. Peter Anvin
2008-11-24 17:18                             ` Luck, Tony
2008-11-24 17:18                               ` Luck, Tony
2008-11-24 18:02                               ` H. Peter Anvin
2008-11-25  2:55                                 ` Hitoshi Mitake
2008-11-25  5:13                                   ` H. Peter Anvin
2008-11-25 15:30                                     ` Hitoshi Mitake
2008-11-25 15:46                                       ` Geert Uytterhoeven
2008-11-25 16:10                                         ` Hitoshi Mitake
2008-11-29  0:11                                           ` Hitoshi Mitake

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=20081130083700.GA31644@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=dougthompson@xmission.com \
    --cc=geert@linux-m68k.org \
    --cc=h.mitake@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=norsk5@yahoo.com \
    --cc=ralf@linux-mips.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@intel.com \
    /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.