lkml.org 
[lkml]   [2008]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [1/3] Only do century BCD conversion when we know the RTC is BCD
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


\
 
 \ /
  Last update: 2008-02-09 15:59    [W:0.110 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site