Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1191174 > unrolled thread
| Started by | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| First post | 2015-07-23 19:40 +0200 |
| Last post | 2015-08-03 19:30 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI Sudeep Holla <sudeep.holla@arm.com> - 2015-07-23 19:40 +0200
Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-08-03 18:50 +0200
Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI Sudeep Holla <sudeep.holla@arm.com> - 2015-08-03 19:00 +0200
Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-08-03 19:30 +0200
| From | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-07-23 19:40 +0200 |
| Subject | [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI |
| Message-ID | <pPsDp-578-15@gated-at.bofh.it> |
Since both CONFIG_ACPI and CONFIG_CLKSRC_OF can be enabled on ARM64,
we get this device tree warnings even when booting using ACPI which is
not valid. We can use of_have_populated_dt to check if the device tree
is populated or not and avoid spurious warning.
This patch uses of_have_populated_dt to remove this non legitimate device
tree warning when booting using ACPI tables.
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/clocksource/clksrc-of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index 0093a8e49e14..47823a2d7220 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -38,6 +38,6 @@ void __init clocksource_of_init(void)
init_func(np);
clocksources++;
}
- if (!clocksources)
+ if (of_have_populated_dt() && !clocksources)
pr_crit("%s: no matching clocksources found\n", __func__);
}
--
1.9.1
--
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 | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-08-03 18:50 +0200 |
| Subject | Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI |
| Message-ID | <pTr61-j4-9@gated-at.bofh.it> |
| In reply to | #1191174 |
On 07/23/2015 07:31 PM, Sudeep Holla wrote:
> Since both CONFIG_ACPI and CONFIG_CLKSRC_OF can be enabled on ARM64,
> we get this device tree warnings even when booting using ACPI which is
> not valid. We can use of_have_populated_dt to check if the device tree
> is populated or not and avoid spurious warning.
>
> This patch uses of_have_populated_dt to remove this non legitimate device
> tree warning when booting using ACPI tables.
>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
> drivers/clocksource/clksrc-of.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
> index 0093a8e49e14..47823a2d7220 100644
> --- a/drivers/clocksource/clksrc-of.c
> +++ b/drivers/clocksource/clksrc-of.c
> @@ -38,6 +38,6 @@ void __init clocksource_of_init(void)
> init_func(np);
> clocksources++;
> }
> - if (!clocksources)
> + if (of_have_populated_dt() && !clocksources)
> pr_crit("%s: no matching clocksources found\n", __func__);
> }
Hmm, even if the fix looks correct, it doesn't make sense to put it there.
Why not:
diff --git a/arch/arm64/kernel/time.c b/arch/arm64/kernel/time.c
index 42f9195..0b8933f 100644
--- a/arch/arm64/kernel/time.c
+++ b/arch/arm64/kernel/time.c
@@ -69,7 +69,9 @@ void __init time_init(void)
u32 arch_timer_rate;
of_clk_init(NULL);
- clocksource_of_init();
+
+ if (of_have_populated_dt())
+ clocksource_of_init();
tick_setup_hrtimer_broadcast();
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
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 | Sudeep Holla <sudeep.holla@arm.com> |
|---|---|
| Date | 2015-08-03 19:00 +0200 |
| Subject | Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI |
| Message-ID | <pTrfI-uN-3@gated-at.bofh.it> |
| In reply to | #1199033 |
On 03/08/15 17:45, Daniel Lezcano wrote:
> On 07/23/2015 07:31 PM, Sudeep Holla wrote:
>> Since both CONFIG_ACPI and CONFIG_CLKSRC_OF can be enabled on ARM64,
>> we get this device tree warnings even when booting using ACPI which is
>> not valid. We can use of_have_populated_dt to check if the device tree
>> is populated or not and avoid spurious warning.
>>
>> This patch uses of_have_populated_dt to remove this non legitimate device
>> tree warning when booting using ACPI tables.
>>
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> Cc: Rob Herring <robh@kernel.org>
>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> ---
>> drivers/clocksource/clksrc-of.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
>> index 0093a8e49e14..47823a2d7220 100644
>> --- a/drivers/clocksource/clksrc-of.c
>> +++ b/drivers/clocksource/clksrc-of.c
>> @@ -38,6 +38,6 @@ void __init clocksource_of_init(void)
>> init_func(np);
>> clocksources++;
>> }
>> - if (!clocksources)
>> + if (of_have_populated_dt() && !clocksources)
>> pr_crit("%s: no matching clocksources found\n", __func__);
>> }
>
> Hmm, even if the fix looks correct, it doesn't make sense to put it there.
>
I thought of exactly the same at first. IMO, we are not fixing it at the
source but at the call site instead which is fine and I don't have
strong opinion on that. However I also came to know recently that
CONFIG_OF can be now enabled on x86, so I preferred that.
Regards,
Sudeep
--
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 | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-08-03 19:30 +0200 |
| Subject | Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI |
| Message-ID | <pTrIK-1iX-25@gated-at.bofh.it> |
| In reply to | #1199039 |
On 08/03/2015 06:56 PM, Sudeep Holla wrote:
>
>
> On 03/08/15 17:45, Daniel Lezcano wrote:
>> On 07/23/2015 07:31 PM, Sudeep Holla wrote:
>>> Since both CONFIG_ACPI and CONFIG_CLKSRC_OF can be enabled on ARM64,
>>> we get this device tree warnings even when booting using ACPI which is
>>> not valid. We can use of_have_populated_dt to check if the device tree
>>> is populated or not and avoid spurious warning.
>>>
>>> This patch uses of_have_populated_dt to remove this non legitimate
>>> device
>>> tree warning when booting using ACPI tables.
>>>
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>> Cc: Rob Herring <robh@kernel.org>
>>> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>> ---
>>> drivers/clocksource/clksrc-of.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/clocksource/clksrc-of.c
>>> b/drivers/clocksource/clksrc-of.c
>>> index 0093a8e49e14..47823a2d7220 100644
>>> --- a/drivers/clocksource/clksrc-of.c
>>> +++ b/drivers/clocksource/clksrc-of.c
>>> @@ -38,6 +38,6 @@ void __init clocksource_of_init(void)
>>> init_func(np);
>>> clocksources++;
>>> }
>>> - if (!clocksources)
>>> + if (of_have_populated_dt() && !clocksources)
>>> pr_crit("%s: no matching clocksources found\n", __func__);
>>> }
>>
>> Hmm, even if the fix looks correct, it doesn't make sense to put it
>> there.
>>
>
> I thought of exactly the same at first. IMO, we are not fixing it at the
> source but at the call site instead which is fine and I don't have
> strong opinion on that. However I also came to know recently that
> CONFIG_OF can be now enabled on x86, so I preferred that.
I prefer to not call clocksource_of_init if the DT is not populated.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
--
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