All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Olof Johansson <olof@lixom.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Jon Masters <jonathan@jonmasters.org>,
	"patches@linaro.org" <patches@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro>
Subject: Re: [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init()
Date: Thu, 05 Dec 2013 21:09:29 +0800	[thread overview]
Message-ID: <52A07B09.9010007@linaro.org> (raw)
In-Reply-To: <20131204150709.GF29200@e106331-lin.cambridge.arm.com>

On 2013年12月04日 23:07, Mark Rutland wrote:
> On Wed, Dec 04, 2013 at 02:27:22PM +0000, Hanjun Guo wrote:
>> On 2013年12月04日 01:08, Mark Rutland wrote:
>>> On Tue, Dec 03, 2013 at 04:41:31PM +0000, Hanjun Guo wrote:
>>>> Use arch_timer_acpi_init() on ARM64 to initialise arch timer
>>>> in ACPI way when DT is not available.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>    arch/arm64/kernel/time.c |    4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c
>>>> index 29c39d5..fb009da 100644
>>>> --- a/arch/arm64/kernel/time.c
>>>> +++ b/arch/arm64/kernel/time.c
>>>> @@ -67,6 +67,10 @@ void __init time_init(void)
>>>>    
>>>>    	clocksource_of_init();
>>>>    
>>>> +	/* if can't be initialised from DT, try ACPI way */
>>>> +	if (!arch_timer_get_rate())
>>>> +		arch_timer_acpi_init();
>>>> +
>>> As mentioned on the previous patch, I think for the timebeing we should
>>> rely on CNTFREQ.
>>>
>>> Additionally, if you need to do this we should have an analagous
>>> mechanism to clocksource_of_init() that performs this initialisation for
>>> ACPI, and here we can call a clocksource_*_init function that does the
>>> right thing.
>>>
>>> There's no need for this file to know anything about ACPI.
>> Oh, Amit already have some patches to introduce clocksource_acpi_init()
>> like clocksource_of_init() did, please refer to the link below.
>>
>> http://marc.info/?l=linaro-acpi&m=138131929721943&w=2
>>
>> is this the idea you mentioned in your comments?
> Something along those lines is far better than hardcoding
> arch_timer_acpi_init here.

Thanks for the suggestion, will update it.

Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: hanjun.guo@linaro.org (Hanjun Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init()
Date: Thu, 05 Dec 2013 21:09:29 +0800	[thread overview]
Message-ID: <52A07B09.9010007@linaro.org> (raw)
In-Reply-To: <20131204150709.GF29200@e106331-lin.cambridge.arm.com>

On 2013?12?04? 23:07, Mark Rutland wrote:
> On Wed, Dec 04, 2013 at 02:27:22PM +0000, Hanjun Guo wrote:
>> On 2013?12?04? 01:08, Mark Rutland wrote:
>>> On Tue, Dec 03, 2013 at 04:41:31PM +0000, Hanjun Guo wrote:
>>>> Use arch_timer_acpi_init() on ARM64 to initialise arch timer
>>>> in ACPI way when DT is not available.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>    arch/arm64/kernel/time.c |    4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c
>>>> index 29c39d5..fb009da 100644
>>>> --- a/arch/arm64/kernel/time.c
>>>> +++ b/arch/arm64/kernel/time.c
>>>> @@ -67,6 +67,10 @@ void __init time_init(void)
>>>>    
>>>>    	clocksource_of_init();
>>>>    
>>>> +	/* if can't be initialised from DT, try ACPI way */
>>>> +	if (!arch_timer_get_rate())
>>>> +		arch_timer_acpi_init();
>>>> +
>>> As mentioned on the previous patch, I think for the timebeing we should
>>> rely on CNTFREQ.
>>>
>>> Additionally, if you need to do this we should have an analagous
>>> mechanism to clocksource_of_init() that performs this initialisation for
>>> ACPI, and here we can call a clocksource_*_init function that does the
>>> right thing.
>>>
>>> There's no need for this file to know anything about ACPI.
>> Oh, Amit already have some patches to introduce clocksource_acpi_init()
>> like clocksource_of_init() did, please refer to the link below.
>>
>> http://marc.info/?l=linaro-acpi&m=138131929721943&w=2
>>
>> is this the idea you mentioned in your comments?
> Something along those lines is far better than hardcoding
> arch_timer_acpi_init here.

Thanks for the suggestion, will update it.

Hanjun

WARNING: multiple messages have this Message-ID (diff)
From: Hanjun Guo <hanjun.guo@linaro.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Olof Johansson <olof@lixom.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Jon Masters <jonathan@jonmasters.org>,
	"patches@linaro.org" <patches@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>
Subject: Re: [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init()
Date: Thu, 05 Dec 2013 21:09:29 +0800	[thread overview]
Message-ID: <52A07B09.9010007@linaro.org> (raw)
In-Reply-To: <20131204150709.GF29200@e106331-lin.cambridge.arm.com>

On 2013年12月04日 23:07, Mark Rutland wrote:
> On Wed, Dec 04, 2013 at 02:27:22PM +0000, Hanjun Guo wrote:
>> On 2013年12月04日 01:08, Mark Rutland wrote:
>>> On Tue, Dec 03, 2013 at 04:41:31PM +0000, Hanjun Guo wrote:
>>>> Use arch_timer_acpi_init() on ARM64 to initialise arch timer
>>>> in ACPI way when DT is not available.
>>>>
>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>> ---
>>>>    arch/arm64/kernel/time.c |    4 ++++
>>>>    1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c
>>>> index 29c39d5..fb009da 100644
>>>> --- a/arch/arm64/kernel/time.c
>>>> +++ b/arch/arm64/kernel/time.c
>>>> @@ -67,6 +67,10 @@ void __init time_init(void)
>>>>    
>>>>    	clocksource_of_init();
>>>>    
>>>> +	/* if can't be initialised from DT, try ACPI way */
>>>> +	if (!arch_timer_get_rate())
>>>> +		arch_timer_acpi_init();
>>>> +
>>> As mentioned on the previous patch, I think for the timebeing we should
>>> rely on CNTFREQ.
>>>
>>> Additionally, if you need to do this we should have an analagous
>>> mechanism to clocksource_of_init() that performs this initialisation for
>>> ACPI, and here we can call a clocksource_*_init function that does the
>>> right thing.
>>>
>>> There's no need for this file to know anything about ACPI.
>> Oh, Amit already have some patches to introduce clocksource_acpi_init()
>> like clocksource_of_init() did, please refer to the link below.
>>
>> http://marc.info/?l=linaro-acpi&m=138131929721943&w=2
>>
>> is this the idea you mentioned in your comments?
> Something along those lines is far better than hardcoding
> arch_timer_acpi_init here.

Thanks for the suggestion, will update it.

Hanjun

  reply	other threads:[~2013-12-05 13:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 16:41 [RFC part3 PATCH 0/2] Using ACPI GTDT table to initialize arch timer Hanjun Guo
2013-12-03 16:41 ` Hanjun Guo
2013-12-03 16:41 ` [RFC part3 PATCH 1/2] clocksource / arch_timer: Use " Hanjun Guo
2013-12-03 16:41   ` Hanjun Guo
2013-12-03 17:04   ` Mark Rutland
2013-12-03 17:04     ` Mark Rutland
2013-12-03 17:04     ` Mark Rutland
2013-12-04 14:25     ` Hanjun Guo
2013-12-04 14:25       ` Hanjun Guo
2013-12-04 14:25       ` Hanjun Guo
2013-12-05  3:43   ` Arnd Bergmann
2013-12-05  3:43     ` Arnd Bergmann
2013-12-05  3:43     ` Arnd Bergmann
2013-12-05 13:52     ` Hanjun Guo
2013-12-05 13:52       ` Hanjun Guo
2013-12-05 13:52       ` Hanjun Guo
2013-12-03 16:41 ` [RFC part3 PATCH 2/2] ARM64 / clocksource: Use arch_timer_acpi_init() Hanjun Guo
2013-12-03 16:41   ` Hanjun Guo
2013-12-03 17:08   ` Mark Rutland
2013-12-03 17:08     ` Mark Rutland
2013-12-03 17:08     ` Mark Rutland
2013-12-04 14:27     ` Hanjun Guo
2013-12-04 14:27       ` Hanjun Guo
2013-12-04 14:27       ` Hanjun Guo
2013-12-04 15:07       ` Mark Rutland
2013-12-04 15:07         ` Mark Rutland
2013-12-04 15:07         ` Mark Rutland
2013-12-05 13:09         ` Hanjun Guo [this message]
2013-12-05 13:09           ` Hanjun Guo
2013-12-05 13:09           ` Hanjun Guo
     [not found] <1386069328-22502-1-git-send-email-hanjun.guo@linaro.org>
     [not found] ` <1386069328-22502-3-git-send-email-hanjun.guo@linaro.org>
2013-12-03 12:27   ` Linus Walleij
2013-12-03 12:27     ` Linus Walleij
2013-12-03 13:52     ` Hanjun Guo
2013-12-03 13:52       ` Hanjun Guo
2013-12-03 13:52       ` Hanjun Guo
2013-12-03 14:13       ` Linus Walleij
2013-12-03 14:13         ` Linus Walleij
2013-12-03 14:43         ` Mark Rutland
2013-12-03 14:43           ` Mark Rutland
2013-12-03 16:30           ` Hanjun Guo
2013-12-03 16:30             ` Hanjun Guo
2013-12-09 18:37       ` Olof Johansson
2013-12-09 18:37         ` Olof Johansson
2013-12-09 18:37         ` Olof Johansson

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=52A07B09.9010007@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=Catalin.Marinas@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=bhelgaas@google.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=grant.likely@linaro.org \
    --cc=jonathan@jonmasters.org \
    --cc=linaro-acpi@lists.linaro \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=olof@lixom.net \
    --cc=patches@linaro.org \
    --cc=rjw@rjwysocki.net \
    --cc=rob.herring@calxeda.com \
    /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.