linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: juri.lelli@arm.com (Juri Lelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: skip register_cpufreq_notifier on ACPI-based systems
Date: Wed, 25 Jan 2017 16:48:06 +0000	[thread overview]
Message-ID: <20170125164806.GC25681@e106622-lin> (raw)
In-Reply-To: <bbc37634-f087-feef-dacd-77c5adb9ed04@codeaurora.org>

On 25/01/17 10:49, Christopher Covington wrote:
> On 01/25/2017 07:03 AM, Juri Lelli wrote:
> > Hi,
> > 
> > On 24/01/17 17:43, Prashanth Prakash wrote:
> >> On ACPI based systems where the topology is setup using the API
> >> store_cpu_topology, at the moment we do not have necessary code
> >> to handle a cpufreq notifier, thus resulting in a crash.
> >>
> >> Skip register_cpufreq_notifier if raw_capacity is not allocated
> >> as part of topology initialization.
> >>
> >> Stack:
> >>         init_cpu_capacity_callback+0xb4/0x1c8
> >>         notifier_call_chain+0x5c/0xa0
> >>         __blocking_notifier_call_chain+0x58/0xa0
> >>         blocking_notifier_call_chain+0x3c/0x50
> >>         cpufreq_set_policy+0xe4/0x328
> >>         cpufreq_init_policy+0x80/0x100
> >>         cpufreq_online+0x418/0x710
> >>         cpufreq_add_dev+0x118/0x180
> >>         subsys_interface_register+0xa4/0xf8
> >>         cpufreq_register_driver+0x1c0/0x298
> >>         cppc_cpufreq_init+0xdc/0x1000 [cppc_cpufreq]
> >>         do_one_initcall+0x5c/0x168
> >>         do_init_module+0x64/0x1e4
> >>         load_module+0x130c/0x14d0
> >>         SyS_finit_module+0x108/0x120
> >>         el0_svc_naked+0x24/0x28
> >>
> >> Patch that added support for popultaing cpu capacity for DT:
> >> https://patchwork.codeaurora.org/patch/98353/
> 
> In other words,
> 
> Fixes: 7202bde8b7ae ("arm64: parse cpu capacity-dmips-mhz from DT")
> 
> >> Signed-off-by: Prashanth Prakash <pprakash@codeaurora.org>
> >> ---
> >>  arch/arm64/kernel/topology.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
> >> index 23e9e13..3f175ce 100644
> >> --- a/arch/arm64/kernel/topology.c
> >> +++ b/arch/arm64/kernel/topology.c
> >> @@ -209,7 +209,7 @@ static void normalize_cpu_capacity(void)
> >>  
> >>  static int __init register_cpufreq_notifier(void)
> >>  {
> >> -	if (cap_parsing_failed)
> >> +	if (cap_parsing_failed || !raw_capacity)
> > 
> > Looks good. I couldn't really test it to check if it fixes your problem
> > (I assume it does), but it doesn't seem to introduce regressions on my
> > boxes.
> 
> Are you testing on QEMU or Fast Models?

Neither, Juno R2. Let me see if I can quickly test it in ACPI mode.

> I was under the impression that the
> former had ACPI support. For the latter, wouldn't it be nice to have ACPI
> support in the bootwrapper. Out of curiosity, is Mark's bootwrapper
> repository on kernel.org the best one to use these days?
> 
> http://git.kernel.org/cgit/linux/kernel/git/mark/boot-wrapper-aarch64.git/
> 

Not sure, Mark, others?

Thanks,

- Juri

  reply	other threads:[~2017-01-25 16:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  0:43 [PATCH] arm64: skip register_cpufreq_notifier on ACPI-based systems Prashanth Prakash
2017-01-25 12:03 ` Juri Lelli
2017-01-25 15:49   ` Christopher Covington
2017-01-25 16:48     ` Juri Lelli [this message]
2017-01-26 17:04     ` Mark Rutland
2017-01-26 12:18 ` Will Deacon
2017-01-26 15:52   ` Lorenzo Pieralisi
2017-01-26 15:57     ` Will Deacon
2017-01-26 17:31       ` Prakash, Prashanth

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=20170125164806.GC25681@e106622-lin \
    --to=juri.lelli@arm.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 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).