LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andi Kleen <ak@suse.de>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [1/5] Only do century BCD conversion when we know the RTC is BCD
Date: Mon, 11 Feb 2008 09:30:05 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.1.00.0802110924050.12988@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080209416.271135970@suse.de>
On Sat, 9 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.
I checked that whole rtc / BCD logic again. We always set RTC_ALWAYS_BCD:
#ifndef RTC_PORT
#define RTC_PORT(x) (0x70 + (x))
#define RTC_ALWAYS_BCD 1 /* RTC operates in BCD mode */
#endif
Nothing ever defines RTC_PORT and RTC_ALWAYS_BCD
So we can get rid of that stuff completely.
> Signed-off-by: Andi Kleen <ak@suse.de>
>
> ---
> arch/x86/kernel/rtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/arch/x86/kernel/rtc.c
> ===================================================================
> --- linux.orig/arch/x86/kernel/rtc.c
> +++ linux/arch/x86/kernel/rtc.c
> @@ -130,10 +130,10 @@ unsigned long mach_get_cmos_time(void)
> BCD_TO_BIN(day);
> BCD_TO_BIN(mon);
> BCD_TO_BIN(year);
> + BCD_TO_BIN(century);
This should probably go here:
if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
acpi_gbl_FADT.century) {
--->
}
It does not matter much, because BCD_TO_BIN(0) is 0, but it makes a
lot of sense.
Thanks,
tglx
next prev parent reply other threads:[~2008-02-11 8:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 15:16 Andi Kleen
2008-02-09 15:16 ` [PATCH] [2/5] Use 2000 offset for 32bit kernels Andi Kleen
2008-02-16 19:24 ` Thomas Gleixner
2008-02-20 10:07 ` Thomas Gleixner
2008-02-20 10:23 ` Andi Kleen
2008-02-09 15:16 ` [PATCH] [3/5] Add warning when RTC clock reports binary Andi Kleen
2008-02-16 19:38 ` Thomas Gleixner
2008-02-09 15:17 ` [PATCH] [4/5] Fix wrong comment Andi Kleen
2008-02-09 15:17 ` [PATCH] [5/5] Enable ACPI extended century handling for 32bit too v2 Andi Kleen
2008-02-16 19:38 ` Thomas Gleixner
2008-02-11 8:30 ` Thomas Gleixner [this message]
2008-02-11 8:56 ` [PATCH] [1/5] Only do century BCD conversion when we know the RTC is BCD Andi Kleen
2008-02-11 22:08 ` Thomas Gleixner
2008-02-11 22:15 ` Andi Kleen
2008-02-12 20:36 ` Thomas Gleixner
2008-02-13 13:49 ` Andi Kleen
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=alpine.LFD.1.00.0802110924050.12988@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--subject='Re: [PATCH] [1/5] 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).