mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Robert.Picco@hp.com, jgarzik@pobox.com,
	linux-kernel@vger.kernel.org, venkatesh.pallipadi@intel.com
Subject: Re: [PATCH] HPET driver
Date: Mon, 17 May 2004 16:12:12 -0700	[thread overview]
Message-ID: <20040517161212.659746db.akpm@osdl.org> (raw)
In-Reply-To: <20040517160508.63e1ddf0.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> wrote:
>
> Robert Picco <Robert.Picco@hp.com> wrote:
> >
> > O.K.  Did this but had to add a writeq and readq for i386.
> 
> You implementation of these is private to hpet.c.  From what Jeff is
> saying, it looks like it should be in include/asm-i386/io.h?

This look OK?

readq()/writeq() are supposed to be defined in terms of u64's.




---

 25-akpm/drivers/char/hpet.c   |   15 ---------------
 25-akpm/include/asm-i386/io.h |   11 +++++++++++
 2 files changed, 11 insertions(+), 15 deletions(-)

diff -puN drivers/char/hpet.c~hpet-driver-updates-move-readq drivers/char/hpet.c
--- 25/drivers/char/hpet.c~hpet-driver-updates-move-readq	Mon May 17 16:06:34 2004
+++ 25-akpm/drivers/char/hpet.c	Mon May 17 16:06:47 2004
@@ -90,21 +90,6 @@ static struct hpets *hpets;
 #define	read_counter(MC)	readl(MC)
 #endif
 
-#ifndef readq
-static unsigned long long __inline readq(void *addr)
-{
-	return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL);
-}
-#endif
-
-#ifndef writeq
-static void __inline writeq(unsigned long long v, void *addr)
-{
-	writel(v & 0xffffffff, addr);
-	writel(v >> 32, addr + 4);
-}
-#endif
-
 static irqreturn_t hpet_interrupt(int irq, void *data, struct pt_regs *regs)
 {
 	struct hpet_dev *devp;
diff -puN include/asm-i386/io.h~hpet-driver-updates-move-readq include/asm-i386/io.h
--- 25/include/asm-i386/io.h~hpet-driver-updates-move-readq	Mon May 17 16:06:34 2004
+++ 25-akpm/include/asm-i386/io.h	Mon May 17 16:11:11 2004
@@ -364,4 +364,15 @@ BUILDIO(b,b,char)
 BUILDIO(w,w,short)
 BUILDIO(l,,int)
 
+static inline u64 readq(void *addr)
+{
+	return readl(addr) | (((u64)readl(addr + 4)) << 32);
+}
+
+static inline void writeq(u64 v, void *addr)
+{
+	writel(v & 0xffffffff, addr);
+	writel(v >> 32, addr + 4);
+}
+
 #endif

_


  parent reply	other threads:[~2004-05-17 23:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-13 22:34 Robert Picco
2004-05-13 23:17 ` Jeff Garzik
2004-05-13 23:42   ` Andrew Morton
2004-05-13 23:46     ` Andrew Morton
2004-05-13 23:53       ` HPET docs Jeff Garzik
2004-05-13 23:49     ` [PATCH] HPET driver Jeff Garzik
2004-05-14 11:19       ` Vojtech Pavlik
2004-05-14 16:59         ` Jeff Garzik
2004-05-17 22:33   ` Robert Picco
2004-05-17 22:39     ` Jeff Garzik
2004-05-17 22:43     ` Jeff Garzik
2004-05-17 23:05     ` Andrew Morton
2004-05-17 23:06       ` Jeff Garzik
2004-05-17 23:12       ` Andrew Morton [this message]
2004-05-17 23:18         ` Jeff Garzik
2004-05-17 23:25           ` Russell King
2004-05-17 23:41             ` Jeff Garzik
2004-05-17 23:33           ` Andrew Morton
2004-05-17 23:42             ` Jeff Garzik
2004-05-18  1:46               ` Andrew Morton
2004-05-18  1:59                 ` Jeff Garzik
     [not found]                   ` <m1vfit3939.fsf_-_@ebiederm.dsl.xmission.com>
     [not found]                     ` <52fz9xpp5l.fsf@topspin.com>
2004-05-18 23:01                       ` readq/writeq on 32bit machines Eric W. Biederman
2004-05-19  0:58                         ` Roland Dreier
2004-05-19  3:14                           ` Eric W. Biederman
     [not found]                   ` <16553.28862.590897.171478@napali.hpl.hp.com>
2004-05-20  2:01                     ` [PATCH] HPET driver Jeff Garzik
2004-05-13 23:18 ` Andrew Morton
     [not found] <200406181616.i5IGGECd003812@hera.kernel.org>
2004-06-18 20:57 ` Jeff Garzik
2004-06-18 21:55   ` Andrew Morton
2004-06-18 22:45     ` Jeff Garzik
2004-06-23 21:34       ` Robert Picco
2004-06-23 21:41         ` Jeff Garzik
2004-06-23 22:23           ` Andrew Morton

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=20040517161212.659746db.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Robert.Picco@hp.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=venkatesh.pallipadi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome