All of lore.kernel.org
 help / color / mirror / Atom feed
From: thunder.leizhen@huawei.com (Leizhen (ThunderTown))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
Date: Mon, 28 Sep 2015 17:44:40 +0800	[thread overview]
Message-ID: <56090C08.8070003@huawei.com> (raw)
In-Reply-To: <2245172.1ESUGv0DKo@wuerfel>



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

WARNING: multiple messages have this Message-ID (diff)
From: "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Xinwei Hu <huxinwei@huawei.com>, Zefan Li <lizefan@huawei.com>,
	Tianhong Ding <dingtianhong@huawei.com>,
	Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH 2/2] arm64: to allow EFI_RTC can be selected on ARM64
Date: Mon, 28 Sep 2015 17:44:40 +0800	[thread overview]
Message-ID: <56090C08.8070003@huawei.com> (raw)
In-Reply-To: <2245172.1ESUGv0DKo@wuerfel>



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


  reply	other threads:[~2015-09-28  9:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/2] char/rtc: " Zhen Lei
2015-09-28  5:34   ` Zhen Lei
2015-09-28  5:34 ` [PATCH 2/2] arm64: " Zhen Lei
2015-09-28  5:34   ` Zhen Lei
2015-09-28  7:35   ` Arnd Bergmann
2015-09-28  7:35     ` Arnd Bergmann
2015-09-28  8:29     ` Leizhen (ThunderTown)
2015-09-28  8:29       ` Leizhen (ThunderTown)
2015-09-28  8:42       ` Arnd Bergmann
2015-09-28  8:42         ` Arnd Bergmann
2015-09-28  9:44         ` Leizhen (ThunderTown) [this message]
2015-09-28  9:44           ` Leizhen (ThunderTown)
2015-09-28  9:56           ` Arnd Bergmann
2015-09-28  9:56             ` Arnd Bergmann
2015-10-08  9:07           ` Leizhen (ThunderTown)
2015-10-08  9:07             ` Leizhen (ThunderTown)
2015-09-28  7:40   ` Ard Biesheuvel
2015-09-28  7:40     ` Ard Biesheuvel
2015-09-28  8:41     ` Leizhen (ThunderTown)
2015-09-28  8:41       ` Leizhen (ThunderTown)

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=56090C08.8070003@huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.