Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260703 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-11-02 16:00 +0100 |
| Last post | 2015-11-04 16:00 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] efirtc: replace 1998 with EFI_RTC_EPOCH Geliang Tang <geliangtang@163.com> - 2015-11-02 16:00 +0100
[PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Geliang Tang <geliangtang@163.com> - 2015-11-02 16:00 +0100
Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Arnd Bergmann <arnd@arndb.de> - 2015-11-02 16:40 +0100
Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Geliang Tang <geliangtang@163.com> - 2015-11-04 15:50 +0100
Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Arnd Bergmann <arnd@arndb.de> - 2015-11-04 16:00 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-02 16:00 +0100 |
| Subject | [PATCH 1/2] efirtc: replace 1998 with EFI_RTC_EPOCH |
| Message-ID | <qqoKv-6yI-29@gated-at.bofh.it> |
EFI_RTC_EPOCH macre has been defined. So I replace 1998 with it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/char/efirtc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index dc62568..5323d8c 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -82,8 +82,9 @@ compute_wday(efi_time_t *eft)
int y;
int ndays = 0;
- if ( eft->year < 1998 ) {
- printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n");
+ if ( eft->year < EFI_RTC_EPOCH ) {
+ printk(KERN_ERR "efirtc: EFI year < %d, invalid date\n",
+ EFI_RTC_EPOCH);
return -1;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-02 16:00 +0100 |
| Subject | [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init |
| Message-ID | <qqoKv-6yI-31@gated-at.bofh.it> |
| In reply to | #1260703 |
Add efi_enabled check in efi_rtc_init() to make sure that efi is enabled. Signed-off-by: Geliang Tang <geliangtang@163.com> --- drivers/char/efirtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c index 5323d8c..80058bd 100644 --- a/drivers/char/efirtc.c +++ b/drivers/char/efirtc.c @@ -378,6 +378,9 @@ efi_rtc_init(void) int ret; struct proc_dir_entry *dir; + if (!efi_enabled(EFI_RUNTIME_SERVICES)) + return 0; + printk(KERN_INFO "EFI Time Services Driver v%s\n", EFI_RTC_VERSION); ret = misc_register(&efi_rtc_dev); -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-11-02 16:40 +0100 |
| Subject | Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init |
| Message-ID | <qqpnb-70J-3@gated-at.bofh.it> |
| In reply to | #1260704 |
On Monday 02 November 2015 22:49:01 Geliang Tang wrote: > diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c > index 5323d8c..80058bd 100644 > --- a/drivers/char/efirtc.c > +++ b/drivers/char/efirtc.c > @@ -378,6 +378,9 @@ efi_rtc_init(void) > int ret; > struct proc_dir_entry *dir; > > + if (!efi_enabled(EFI_RUNTIME_SERVICES)) > + return 0; > Are there any Itanium machines that don't enable runtime services? This seems a little redundant otherwise. Are you trying to run the ancient driver on non-Itanium systems? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-11-04 15:50 +0100 |
| Subject | Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init |
| Message-ID | <qr7xT-1HX-1@gated-at.bofh.it> |
| In reply to | #1260726 |
On Mon, Nov 02, 2015 at 04:37:51PM +0100, Arnd Bergmann wrote: > On Monday 02 November 2015 22:49:01 Geliang Tang wrote: > > diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c > > index 5323d8c..80058bd 100644 > > --- a/drivers/char/efirtc.c > > +++ b/drivers/char/efirtc.c > > @@ -378,6 +378,9 @@ efi_rtc_init(void) > > int ret; > > struct proc_dir_entry *dir; > > > > + if (!efi_enabled(EFI_RUNTIME_SERVICES)) > > + return 0; > > > > Are there any Itanium machines that don't enable runtime services? > This seems a little redundant otherwise. > > Are you trying to run the ancient driver on non-Itanium systems? Yes. I did run this driver on a EFI-based X86_64 machine. Geliang Tang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-11-04 16:00 +0100 |
| Subject | Re: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init |
| Message-ID | <qr7HB-1LY-31@gated-at.bofh.it> |
| In reply to | #1262311 |
On Wednesday 04 November 2015 22:45:42 Geliang Tang wrote: > On Mon, Nov 02, 2015 at 04:37:51PM +0100, Arnd Bergmann wrote: > > On Monday 02 November 2015 22:49:01 Geliang Tang wrote: > > > diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c > > > index 5323d8c..80058bd 100644 > > > --- a/drivers/char/efirtc.c > > > +++ b/drivers/char/efirtc.c > > > @@ -378,6 +378,9 @@ efi_rtc_init(void) > > > int ret; > > > struct proc_dir_entry *dir; > > > > > > + if (!efi_enabled(EFI_RUNTIME_SERVICES)) > > > + return 0; > > > > > > > Are there any Itanium machines that don't enable runtime services? > > This seems a little redundant otherwise. > > > > Are you trying to run the ancient driver on non-Itanium systems? > > Yes. I did run this driver on a EFI-based X86_64 machine. There should already be a Kconfig dependency that prevents you from doing this. Just use the normal rtc-efi driver instead of the old efirtc driver. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web