public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: bjorn.helgaas@hp.com, Robert.Picco@hp.com,
	venkatesh.pallipadi@intel.com, linux-kernel@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: Re: [PATCH] fix HPET time_interpolator registration
Date: Thu, 04 Nov 2004 04:47:06 +0000	[thread overview]
Message-ID: <20041103204706.1c85d30a.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0411031951110.3414@schroedinger.engr.sgi.com>

Christoph Lameter <clameter@sgi.com> wrote:
>
> On Wed, 3 Nov 2004, Andrew Morton wrote:
> 
> > Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> > >
> > >  Fixup after mid-air collision between Christoph adding time_interpolator.mask,
> > >  and me removing a static time_interpolator struct from hpet.
> > >
> > >  Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> > >
> > >  === drivers/char/hpet.c 1.14 vs edited ==> > >  --- 1.14/drivers/char/hpet.c	2004-11-02 07:40:42 -07:00
> > >  +++ edited/drivers/char/hpet.c	2004-11-03 10:05:26 -07:00
> > >  @@ -712,6 +712,7 @@
> > >   	ti->addr = &hpetp->hp_hpet->hpet_mc;
> > >   	ti->frequency = hpet_time_div(hpets->hp_period);
> > >   	ti->drift = ti->frequency * HPET_DRIFT / 1000000;
> > >  +	ti->mask = 0xffffffffffffffffLL;
> > >
> > >   	hpetp->hp_interpolator = ti;
> > >   	register_time_interpolator(ti);
> > >
> >
> > ti->mask is u64, and on some architectures u64 is `long'.  Compilers might
> > whine about this.   I'll make it
> >
> > 	ti->mask = -1;
> >
> > which just works.
> 
> Hmmm... How do you then specify a 64 bit mask without running into issues
> with the compilers?

Well with 0xffffffff[ffffffff] it's easy: use -1 and sign extension.

The only problem I can see is if you want to propagate a bit pattern across
the scalar but you don't know its size.  Say 0x5a5a5a5a versus
0x5a5a5a5a5a5a5a5a.  But nobody ever wants to do that.



      reply	other threads:[~2004-11-04  4:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03 17:24 [PATCH] fix HPET time_interpolator registration Bjorn Helgaas
2004-11-04  2:57 ` Andrew Morton
2004-11-04  3:52   ` Christoph Lameter
2004-11-04  4:47     ` Andrew Morton [this message]

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=20041103204706.1c85d30a.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Robert.Picco@hp.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=clameter@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --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