LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@suse.de>, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD
Date: Sat, 9 Feb 2008 15:55:45 +0100	[thread overview]
Message-ID: <20080209145545.GA6773@basil.nowhere.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0802091108170.3145@apollo.tec.linutronix.de>

On Sat, Feb 09, 2008 at 11:28:01AM +0100, Thomas Gleixner wrote:
> On Fri, 8 Feb 2008, Andi Kleen wrote:
> 
> > 
> > Minor logic fix. The century change was previously always BCD,
> > even when the CMOS data would report itself not being BCD.
> 
> Where was it previously always BCD ?
> 
> The code flow is taken 1:1 from the original x8664 code. Just the
> BCD_TO_BIN code has been made conditional for i386, which is not
> chanining the logic at all, because RTC_ALWAYS_BCD is always true on
> x8664.

Ah that's true -- i missed that indeed. I don't actually 
remember why it was hardcoded like this on x86-64. I don't think
there is a good reason for it and if there's a bit for this
in the CMOS it ought be better checked.

> 
> While your change does not do any harm due to BCD_TO_BIN(0) = 0, it
> is just not fixing anything.

In theory it would make sense with the followup change to
do the extended century on 32bit too, but in practice all these
systems should be BCD anyways (I hope) 


-Andi

      reply	other threads:[~2008-02-09 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 12:14 Andi Kleen
2008-02-08 12:14 ` [PATCH] [2/3] Use 2000 offset for 32bit kernels Andi Kleen
2008-02-08 12:14 ` [PATCH] [3/3] Enable ACPI extended century handling for 32bit too Andi Kleen
2008-02-09 10:39   ` Thomas Gleixner
2008-02-09 10:28 ` [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD Thomas Gleixner
2008-02-09 14:55   ` Andi Kleen [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=20080209145545.GA6773@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).