From: Juri Lelli <juri.lelli@arm.com>
To: linux-kernel@vger.kernel.org
Cc: lorenzo.pieralisi@arm.com, Juri Lelli <juri.lelli@arm.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Russell King <rmk+kernel@arm.linux.org.uk>,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Juri Lelli <juri.lelli@gmail.com>
Subject: [PATCH] cpuidle/cpuidle-big_little: fix reading cpu id part number
Date: Fri, 8 Aug 2014 13:42:37 +0100 [thread overview]
Message-ID: <1407501757-15231-1-git-send-email-juri.lelli@arm.com> (raw)
Commit af040ffc9ba1 ("ARM: make it easier to check the CPU part number
correctly") changed ARM_CPU_PART_X masks, and the way they are returned and
checked against. Usage of read_cpuid_part_number() is now deprecated, and
calling places updated accordingly. This actually broke cpuidle-big_little
initialization, as bl_idle_driver_init() performs a check using and hardcoded
mask on cpu_id.
Update the check to reflect changes on ARM_CPU_PART_X masks. Also,
make the check easier to understand.
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-pm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: Juri Lelli <juri.lelli@gmail.com>
---
drivers/cpuidle/cpuidle-big_little.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
index b45fc62..a712896 100644
--- a/drivers/cpuidle/cpuidle-big_little.c
+++ b/drivers/cpuidle/cpuidle-big_little.c
@@ -138,7 +138,7 @@ static int bl_enter_powerdown(struct cpuidle_device *dev,
return idx;
}
-static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
+static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int match_id)
{
struct cpuinfo_arm *cpu_info;
struct cpumask *cpumask;
@@ -154,7 +154,7 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
cpuid = is_smp() ? cpu_info->cpuid : read_cpuid_id();
/* read cpu id part number */
- if ((cpuid & 0xFFF0) == cpu_id)
+ if (((cpuid ^ match_id) & 0xFF00FFF0) == 0)
cpumask_set_cpu(cpu, cpumask);
}
--
1.7.9.5
next reply other threads:[~2014-08-08 12:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 12:42 Juri Lelli [this message]
2014-08-08 13:21 ` Russell King - ARM Linux
2014-08-08 16:47 ` Lorenzo Pieralisi
2014-08-13 10:04 ` Juri Lelli
2014-08-13 10:44 ` Russell King - ARM Linux
2014-08-13 11:14 ` Juri Lelli
2014-08-13 22:25 ` Lorenzo Pieralisi
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=1407501757-15231-1-git-send-email-juri.lelli@arm.com \
--to=juri.lelli@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=juri.lelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=rjw@rjwysocki.net \
--cc=rmk+kernel@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®