linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] to allow EFI_RTC can be selected on ARM64
@ 2015-09-28  5:34 Zhen Lei
  2015-09-28  5:34 ` [PATCH 1/2] char/rtc: " Zhen Lei
  2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
  0 siblings, 2 replies; 11+ messages in thread
From: Zhen Lei @ 2015-09-28  5:34 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, linux-arm-kernel, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Hanjun Guo, Kefeng Wang,
	Zhen Lei

I apart the modification into two parts, and use the same title and main
description for each part.

Zhen Lei (2):
  char/rtc: to allow EFI_RTC can be selected on ARM64
  arm64: to allow EFI_RTC can be selected on ARM64

 arch/arm64/Kconfig   | 2 +-
 drivers/char/Kconfig | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.5.0



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/2] char/rtc: to allow EFI_RTC can be selected on ARM64
  2015-09-28  5:34 [PATCH 0/2] to allow EFI_RTC can be selected on ARM64 Zhen Lei
@ 2015-09-28  5:34 ` Zhen Lei
  2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
  1 sibling, 0 replies; 11+ messages in thread
From: Zhen Lei @ 2015-09-28  5:34 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, linux-arm-kernel, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Hanjun Guo, Kefeng Wang,
	Zhen Lei

Now, ARM64 is also support EFI startup. We hope use EFI runtime services
to get/set current time and date.

Slightly adjust to keep a line not exceed 80 characters.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/char/Kconfig | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index a043107..7ad3fd1 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -280,7 +280,8 @@ if RTC_LIB=n
 config RTC
 	tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
 	depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \
-			&& !ARM && !SUPERH && !S390 && !AVR32 && !BLACKFIN && !UML
+			&& !ARM && !ARM64 && !SUPERH && !S390 && !AVR32 \
+			&& !BLACKFIN && !UML
 	---help---
 	  If you say Y here and create a character special file /dev/rtc with
 	  major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -328,7 +329,9 @@ config JS_RTC

 config GEN_RTC
 	tristate "Generic /dev/rtc emulation"
-	depends on RTC!=y && !IA64 && !ARM && !M32R && !MIPS && !SPARC && !FRV && !S390 && !SUPERH && !AVR32 && !BLACKFIN && !UML
+	depends on RTC!=y && !IA64 && !ARM && !ARM64 && !M32R && !MIPS \
+			&& !SPARC && !FRV && !S390 && !SUPERH && !AVR32 \
+			&& !BLACKFIN && !UML
 	---help---
 	  If you say Y here and create a character special file /dev/rtc with
 	  major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -353,7 +356,7 @@ config GEN_RTC_X

 config EFI_RTC
 	bool "EFI Real Time Clock Services"
-	depends on IA64
+	depends on IA64 || ARM64

 config DS1302
 	tristate "DS1302 RTC support"
--
2.5.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  5:34 [PATCH 0/2] to allow EFI_RTC can be selected on ARM64 Zhen Lei
  2015-09-28  5:34 ` [PATCH 1/2] char/rtc: " Zhen Lei
@ 2015-09-28  5:34 ` Zhen Lei
  2015-09-28  7:35   ` Arnd Bergmann
  2015-09-28  7:40   ` Ard Biesheuvel
  1 sibling, 2 replies; 11+ messages in thread
From: Zhen Lei @ 2015-09-28  5:34 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, linux-arm-kernel, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel
  Cc: Zefan Li, Xinwei Hu, Tianhong Ding, Hanjun Guo, Kefeng Wang,
	Zhen Lei

Now, ARM64 is also support EFI startup. We hope use EFI runtime services
to get/set current time and date.

RTC_LIB only controls some configs in drivers/char/Kconfig(included
EFI_RTC), and will be automatically selected when RTC_CLASS opened. So
this patch have no functional change but give an opportunity to select
EFI_RTC when RTC_CLASS closed.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 07d1811..25cec57 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -85,7 +85,7 @@ config ARM64
 	select PERF_USE_VMALLOC
 	select POWER_RESET
 	select POWER_SUPPLY
-	select RTC_LIB
+	select RTC_LIB if !EFI
 	select SPARSE_IRQ
 	select SYSCTL_EXCEPTION_TRACE
 	select HAVE_CONTEXT_TRACKING
--
2.5.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
@ 2015-09-28  7:35   ` Arnd Bergmann
  2015-09-28  8:29     ` Leizhen (ThunderTown)
  2015-09-28  7:40   ` Ard Biesheuvel
  1 sibling, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2015-09-28  7:35 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Zhen Lei, Catalin Marinas, Will Deacon, Greg Kroah-Hartman,
	linux-kernel, Kefeng Wang, Xinwei Hu, Zefan Li, Tianhong Ding,
	Hanjun Guo

On Monday 28 September 2015 13:34:38 Zhen Lei wrote:
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 07d1811..25cec57 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -85,7 +85,7 @@ config ARM64
>         select PERF_USE_VMALLOC
>         select POWER_RESET
>         select POWER_SUPPLY
> -       select RTC_LIB
> +       select RTC_LIB if !EFI
>         select SPARSE_IRQ
>         select SYSCTL_EXCEPTION_TRACE
>         select HAVE_CONTEXT_TRACKING

Sorry, we can't do that: enabling EFI has to be done in a way that it only
adds features but not disables them.

Your patch breaks RTC on all non-EFI platforms as soon as CONFIG_EFI
is selected by the user.

	Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
  2015-09-28  7:35   ` Arnd Bergmann
@ 2015-09-28  7:40   ` Ard Biesheuvel
  2015-09-28  8:41     ` Leizhen (ThunderTown)
  1 sibling, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2015-09-28  7:40 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Catalin Marinas, Will Deacon, linux-arm-kernel, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel, Kefeng Wang, Xinwei Hu,
	Zefan Li, Tianhong Ding, Hanjun Guo

On 28 September 2015 at 06:34, Zhen Lei <thunder.leizhen@huawei.com> wrote:
> Now, ARM64 is also support EFI startup. We hope use EFI runtime services
> to get/set current time and date.
>
> RTC_LIB only controls some configs in drivers/char/Kconfig(included
> EFI_RTC), and will be automatically selected when RTC_CLASS opened. So
> this patch have no functional change but give an opportunity to select
> EFI_RTC when RTC_CLASS closed.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  arch/arm64/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 07d1811..25cec57 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -85,7 +85,7 @@ config ARM64
>         select PERF_USE_VMALLOC
>         select POWER_RESET
>         select POWER_SUPPLY
> -       select RTC_LIB
> +       select RTC_LIB if !EFI
>         select SPARSE_IRQ
>         select SYSCTL_EXCEPTION_TRACE
>         select HAVE_CONTEXT_TRACKING

You can currently enable EFI_RTC just fine on arm64 when EFI is enabled.
Why exactly do you need this patch on top?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  7:35   ` Arnd Bergmann
@ 2015-09-28  8:29     ` Leizhen (ThunderTown)
  2015-09-28  8:42       ` Arnd Bergmann
  0 siblings, 1 reply; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2015-09-28  8:29 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arm-kernel
  Cc: Catalin Marinas, Will Deacon, Greg Kroah-Hartman, linux-kernel,
	Kefeng Wang, Xinwei Hu, Zefan Li, Tianhong Ding, Hanjun Guo



On 2015/9/28 15:35, Arnd Bergmann wrote:
> On Monday 28 September 2015 13:34:38 Zhen Lei wrote:
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 07d1811..25cec57 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -85,7 +85,7 @@ config ARM64
>>         select PERF_USE_VMALLOC
>>         select POWER_RESET
>>         select POWER_SUPPLY
>> -       select RTC_LIB
>> +       select RTC_LIB if !EFI
>>         select SPARSE_IRQ
>>         select SYSCTL_EXCEPTION_TRACE
>>         select HAVE_CONTEXT_TRACKING
> 
> Sorry, we can't do that: enabling EFI has to be done in a way that it only
> adds features but not disables them.

I run "make ARCH=arm64 menuconfig" and found that RTC_CLASS is selected by default. Actually, RTC_LIB only
controls whether to display some configs when run "make menuconfig". I list all informations below:

---------make ARCH=arm64 menuconfig-----
  [*] Real Time Clock  --->

---------drivers/rtc/Kconfig-------
menuconfig RTC_CLASS
        bool "Real Time Clock"
        default n
        depends on !S390 && !UML
        select RTC_LIB

-----------------------------------
find . -name "*Kconfig*" | xargs grep RTC_LIB
./drivers/rtc/Kconfig:config RTC_LIB
./drivers/rtc/Kconfig:	select RTC_LIB
./drivers/char/Kconfig:if RTC_LIB=n
./drivers/char/Kconfig:endif # RTC_LIB
./arch/x86/Kconfig:	select RTC_LIB
./arch/arm/Kconfig:	select RTC_LIB
./arch/arm64/Kconfig:	select RTC_LIB if !EFI
./arch/sh/Kconfig:	select RTC_LIB
./arch/mips/Kconfig:	select RTC_LIB if !MACH_LOONGSON64

--------------drivers/char/Kconfig--------------
if RTC_LIB=n

config RTC
        tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"

.......

endif # RTC_LIB


> 
> Your patch breaks RTC on all non-EFI platforms as soon as CONFIG_EFI
> is selected by the user.

No, on non-EFI platforms, they can still use RTC as before. As I mentioned above,
RTC_LIB only controls whether to display some configs when run "make menuconfig".
On ARM64, (in this patch) I only allowed EFI_RTC can be showed when RTC_LIB was not selected.

--------------drivers/char/Kconfig--------------
if RTC_LIB=n

config RTC
tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"

.......

config EFI_RTC
        bool "EFI Real Time Clock Services"
        depends on IA64 || ARM64

.......

endif # RTC_LIB

> 
> 	Arnd
> 
> .
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  7:40   ` Ard Biesheuvel
@ 2015-09-28  8:41     ` Leizhen (ThunderTown)
  0 siblings, 0 replies; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2015-09-28  8:41 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Catalin Marinas, Will Deacon, linux-arm-kernel, Arnd Bergmann,
	Greg Kroah-Hartman, linux-kernel, Kefeng Wang, Xinwei Hu,
	Zefan Li, Tianhong Ding, Hanjun Guo



On 2015/9/28 15:40, Ard Biesheuvel wrote:
> On 28 September 2015 at 06:34, Zhen Lei <thunder.leizhen@huawei.com> wrote:
>> Now, ARM64 is also support EFI startup. We hope use EFI runtime services
>> to get/set current time and date.
>>
>> RTC_LIB only controls some configs in drivers/char/Kconfig(included
>> EFI_RTC), and will be automatically selected when RTC_CLASS opened. So
>> this patch have no functional change but give an opportunity to select
>> EFI_RTC when RTC_CLASS closed.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>>  arch/arm64/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 07d1811..25cec57 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -85,7 +85,7 @@ config ARM64
>>         select PERF_USE_VMALLOC
>>         select POWER_RESET
>>         select POWER_SUPPLY
>> -       select RTC_LIB
>> +       select RTC_LIB if !EFI
>>         select SPARSE_IRQ
>>         select SYSCTL_EXCEPTION_TRACE
>>         select HAVE_CONTEXT_TRACKING
> 
> You can currently enable EFI_RTC just fine on arm64 when EFI is enabled.
> Why exactly do you need this patch on top?

Because when we run "make ARCH=arm64 menuconfig", RTC_LIB is always selected. And we have no opportunity
to deselect it. And EFI_RTC can be displayed only when RTC_LIB=n.

--------drivers/rtc/Kconfig-------
config RTC_LIB
        bool

menuconfig RTC_CLASS
        bool "Real Time Clock"
        default n
        depends on !S390 && !UML
        select RTC_LIB

--------------drivers/char/Kconfig--------------
if RTC_LIB=n

......

config EFI_RTC
        bool "EFI Real Time Clock Services"
        depends on IA64 || ARM64

.......

endif # RTC_LIB

> 
> .
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  8:29     ` Leizhen (ThunderTown)
@ 2015-09-28  8:42       ` Arnd Bergmann
  2015-09-28  9:44         ` Leizhen (ThunderTown)
  0 siblings, 1 reply; 11+ messages in thread
From: Arnd Bergmann @ 2015-09-28  8:42 UTC (permalink / raw)
  To: Leizhen (ThunderTown)
  Cc: linux-arm-kernel, Catalin Marinas, Will Deacon,
	Greg Kroah-Hartman, linux-kernel, Kefeng Wang, Xinwei Hu,
	Zefan Li, Tianhong Ding, Hanjun Guo

On Monday 28 September 2015 16:29:57 Leizhen wrote:
> 
> On 2015/9/28 15:35, Arnd Bergmann wrote:
> > On Monday 28 September 2015 13:34:38 Zhen Lei wrote:
> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> >> index 07d1811..25cec57 100644
> >> --- a/arch/arm64/Kconfig
> >> +++ b/arch/arm64/Kconfig
> >> @@ -85,7 +85,7 @@ config ARM64
> >>         select PERF_USE_VMALLOC
> >>         select POWER_RESET
> >>         select POWER_SUPPLY
> >> -       select RTC_LIB
> >> +       select RTC_LIB if !EFI
> >>         select SPARSE_IRQ
> >>         select SYSCTL_EXCEPTION_TRACE
> >>         select HAVE_CONTEXT_TRACKING
> > 
> > Sorry, we can't do that: enabling EFI has to be done in a way that it only
> > adds features but not disables them.
> 
> I run "make ARCH=arm64 menuconfig" and found that RTC_CLASS is selected by default. Actually, RTC_LIB only
> controls whether to display some configs when run "make menuconfig". I list all informations below:
> 
> ---------make ARCH=arm64 menuconfig-----
>   [*] Real Time Clock  --->
> 
> ---------drivers/rtc/Kconfig-------
> menuconfig RTC_CLASS
>         bool "Real Time Clock"
>         default n
>         depends on !S390 && !UML
>         select RTC_LIB

Ok, I see. So your patch here has no effect at all and can be dropped, or
we can remove the 'select RTC_LIB' without the EFI dependency.

> -----------------------------------
> find . -name "*Kconfig*" | xargs grep RTC_LIB
> ./drivers/rtc/Kconfig:config RTC_LIB
> ./drivers/rtc/Kconfig:	select RTC_LIB
> ./drivers/char/Kconfig:if RTC_LIB=n
> ./drivers/char/Kconfig:endif # RTC_LIB
> ./arch/x86/Kconfig:	select RTC_LIB
> ./arch/arm/Kconfig:	select RTC_LIB
> ./arch/arm64/Kconfig:	select RTC_LIB if !EFI
> ./arch/sh/Kconfig:	select RTC_LIB
> ./arch/mips/Kconfig:	select RTC_LIB if !MACH_LOONGSON64
> 
> --------------drivers/char/Kconfig--------------
> if RTC_LIB=n
> 
> config RTC
>         tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
> 
> .......
> 
> endif # RTC_LIB
> 
> 
> > 
> > Your patch breaks RTC on all non-EFI platforms as soon as CONFIG_EFI
> > is selected by the user.
> 
> No, on non-EFI platforms, they can still use RTC as before. As I mentioned above,
> RTC_LIB only controls whether to display some configs when run "make menuconfig".
> On ARM64, (in this patch) I only allowed EFI_RTC can be showed when RTC_LIB was
> not selected.
>

but that is the wrong driver that uses the legacy API, we cannot have that
on ARM because it conflicts with the normal RTC_CLASS drivers.

> --------------drivers/char/Kconfig--------------
> if RTC_LIB=n
> 
> config RTC
> tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
> 
> .......
> 
> config EFI_RTC
>         bool "EFI Real Time Clock Services"
>         depends on IA64 || ARM64
> 
> .......
> 
> endif # RTC_LIB

The driver you want is RTC_DRV_EFI, not EFI_RTC.

	Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  8:42       ` Arnd Bergmann
@ 2015-09-28  9:44         ` Leizhen (ThunderTown)
  2015-09-28  9:56           ` Arnd Bergmann
  2015-10-08  9:07           ` Leizhen (ThunderTown)
  0 siblings, 2 replies; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2015-09-28  9:44 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Catalin Marinas, Will Deacon,
	Greg Kroah-Hartman, linux-kernel, Kefeng Wang, Xinwei Hu,
	Zefan Li, Tianhong Ding, Hanjun Guo



On 2015/9/28 16:42, Arnd Bergmann wrote:
> On Monday 28 September 2015 16:29:57 Leizhen wrote:
>>
>> On 2015/9/28 15:35, Arnd Bergmann wrote:
>>> On Monday 28 September 2015 13:34:38 Zhen Lei wrote:
>>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>>> index 07d1811..25cec57 100644
>>>> --- a/arch/arm64/Kconfig
>>>> +++ b/arch/arm64/Kconfig
>>>> @@ -85,7 +85,7 @@ config ARM64
>>>>         select PERF_USE_VMALLOC
>>>>         select POWER_RESET
>>>>         select POWER_SUPPLY
>>>> -       select RTC_LIB
>>>> +       select RTC_LIB if !EFI
>>>>         select SPARSE_IRQ
>>>>         select SYSCTL_EXCEPTION_TRACE
>>>>         select HAVE_CONTEXT_TRACKING
>>>
>>> Sorry, we can't do that: enabling EFI has to be done in a way that it only
>>> adds features but not disables them.
>>
>> I run "make ARCH=arm64 menuconfig" and found that RTC_CLASS is selected by default. Actually, RTC_LIB only
>> controls whether to display some configs when run "make menuconfig". I list all informations below:
>>
>> ---------make ARCH=arm64 menuconfig-----
>>   [*] Real Time Clock  --->
>>
>> ---------drivers/rtc/Kconfig-------
>> menuconfig RTC_CLASS
>>         bool "Real Time Clock"
>>         default n
>>         depends on !S390 && !UML
>>         select RTC_LIB
> 
> Ok, I see. So your patch here has no effect at all and can be dropped, or
> we can remove the 'select RTC_LIB' without the EFI dependency.

Oh, I described the reason in the reply to Ard Biesheuvel.

https://lkml.org/lkml/2015/9/28/124

> 
>> -----------------------------------
>> find . -name "*Kconfig*" | xargs grep RTC_LIB
>> ./drivers/rtc/Kconfig:config RTC_LIB
>> ./drivers/rtc/Kconfig:	select RTC_LIB
>> ./drivers/char/Kconfig:if RTC_LIB=n
>> ./drivers/char/Kconfig:endif # RTC_LIB
>> ./arch/x86/Kconfig:	select RTC_LIB
>> ./arch/arm/Kconfig:	select RTC_LIB
>> ./arch/arm64/Kconfig:	select RTC_LIB if !EFI
>> ./arch/sh/Kconfig:	select RTC_LIB
>> ./arch/mips/Kconfig:	select RTC_LIB if !MACH_LOONGSON64
>>
>> --------------drivers/char/Kconfig--------------
>> if RTC_LIB=n
>>
>> config RTC
>>         tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
>>
>> .......
>>
>> endif # RTC_LIB
>>
>>
>>>
>>> Your patch breaks RTC on all non-EFI platforms as soon as CONFIG_EFI
>>> is selected by the user.
>>
>> No, on non-EFI platforms, they can still use RTC as before. As I mentioned above,
>> RTC_LIB only controls whether to display some configs when run "make menuconfig".
>> On ARM64, (in this patch) I only allowed EFI_RTC can be showed when RTC_LIB was
>> not selected.
>>
> 
> but that is the wrong driver that uses the legacy API, we cannot have that
> on ARM because it conflicts with the normal RTC_CLASS drivers.

Yes, RTC_CLASS will automatically select RTC_LIB, and will not display EFI_RTC, because
RTC_LIB=y now.

We can select EFI_RTC only when RTC_CLASS is not selected(meanwhile RTC_LIB=n)

> 
>> --------------drivers/char/Kconfig--------------
>> if RTC_LIB=n
>>
>> config RTC
>> tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
>>
>> .......
>>
>> config EFI_RTC
>>         bool "EFI Real Time Clock Services"
>>         depends on IA64 || ARM64
>>
>> .......
>>
>> endif # RTC_LIB
> 
> The driver you want is RTC_DRV_EFI, not EFI_RTC.

OK, I will try it tommorrow.

> 
> 	Arnd
> 
> .
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  9:44         ` Leizhen (ThunderTown)
@ 2015-09-28  9:56           ` Arnd Bergmann
  2015-10-08  9:07           ` Leizhen (ThunderTown)
  1 sibling, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2015-09-28  9:56 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Leizhen (ThunderTown), Kefeng Wang, Hanjun Guo, Catalin Marinas,
	Tianhong Ding, Will Deacon, linux-kernel, Xinwei Hu, Zefan Li,
	Greg Kroah-Hartman

On Monday 28 September 2015 17:44:40 Leizhen wrote:
> >> No, on non-EFI platforms, they can still use RTC as before. As I mentioned above,
> >> RTC_LIB only controls whether to display some configs when run "make menuconfig".
> >> On ARM64, (in this patch) I only allowed EFI_RTC can be showed when RTC_LIB was
> >> not selected.
> >>
> > 
> > but that is the wrong driver that uses the legacy API, we cannot have that
> > on ARM because it conflicts with the normal RTC_CLASS drivers.
> 
> Yes, RTC_CLASS will automatically select RTC_LIB, and will not display EFI_RTC, because
> RTC_LIB=y now.
> 
> We can select EFI_RTC only when RTC_CLASS is not selected(meanwhile RTC_LIB=n)

I understood that, and my initial point was that we cannot allow
such a situation, all drivers that we might use must be able to coexist
in one kernel.

If you have any applications that are ported from Itanium and that rely on
specific behavior of the ia64 rtc driver, we should either enable those in the
normal rtc-efi driver, or you need to change your application to use the
portable RTC interfaces.

	Arnd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
  2015-09-28  9:44         ` Leizhen (ThunderTown)
  2015-09-28  9:56           ` Arnd Bergmann
@ 2015-10-08  9:07           ` Leizhen (ThunderTown)
  1 sibling, 0 replies; 11+ messages in thread
From: Leizhen (ThunderTown) @ 2015-10-08  9:07 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Catalin Marinas, Will Deacon,
	Greg Kroah-Hartman, linux-kernel, Kefeng Wang, Xinwei Hu,
	Zefan Li, Tianhong Ding, Hanjun Guo



On 2015/9/28 17:44, Leizhen (ThunderTown) wrote:
>> > 
>>> >> --------------drivers/char/Kconfig--------------
>>> >> if RTC_LIB=n
>>> >>
>>> >> config RTC
>>> >> tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
>>> >>
>>> >> .......
>>> >>
>>> >> config EFI_RTC
>>> >>         bool "EFI Real Time Clock Services"
>>> >>         depends on IA64 || ARM64
>>> >>
>>> >> .......
>>> >>
>>> >> endif # RTC_LIB
>> > 
>> > The driver you want is RTC_DRV_EFI, not EFI_RTC.
> OK, I will try it tommorrow.

Sorry, the coach called me to learn to drive these days. I opened RTC_DRV_EFI and the RTC worked fine, thanks a lot.

> 
>> > 
>> > 	Arnd
>> > 
>> > .
>> > 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-08  9:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28  5:34 [PATCH 0/2] to allow EFI_RTC can be selected on ARM64 Zhen Lei
2015-09-28  5:34 ` [PATCH 1/2] char/rtc: " Zhen Lei
2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
2015-09-28  7:35   ` Arnd Bergmann
2015-09-28  8:29     ` Leizhen (ThunderTown)
2015-09-28  8:42       ` Arnd Bergmann
2015-09-28  9:44         ` Leizhen (ThunderTown)
2015-09-28  9:56           ` Arnd Bergmann
2015-10-08  9:07           ` Leizhen (ThunderTown)
2015-09-28  7:40   ` Ard Biesheuvel
2015-09-28  8:41     ` Leizhen (ThunderTown)

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).