From: "Suzuki K. Poulose" <suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Lorenzo Pieralisi
<lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Punit Agrawal <punit.agrawal-5wv7dgnIgG8@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 1/7] drivers: CCI: fix used_mask init in validate_group()
Date: Tue, 5 May 2015 12:49:02 +0100 [thread overview]
Message-ID: <1430826548-29960-2-git-send-email-suzuki.poulose@arm.com> (raw)
In-Reply-To: <1430826548-29960-1-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
From: Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Currently in validate_group(), there is a static initializer
for fake_pmu.used_mask which is based on CPU_BITS_NONE but
the used_mask array size is based on CCI_PMU_MAX_HW_EVENTS.
CCI_PMU_MAX_HW_EVENTS is not based on NR_CPUS, so CPU_BITS_NONE
is not correct and will cause a build failure if NR_CPUS
is set high enough to make CPU_BITS_NONE larger than used_mask.
This patch changes the used_mask initialization to be runtime
based on the actual size of the array.
Signed-off-by: Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/bus/arm-cci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index b854125..941b831 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -660,7 +660,7 @@ validate_group(struct perf_event *event)
* Initialise the fake PMU. We only need to populate the
* used_mask for the purposes of validation.
*/
- .used_mask = CPU_BITS_NONE,
+ .used_mask = { 0 },
};
if (!validate_event(event->pmu, &fake_pmu, leader))
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-05 11:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 11:49 [PATCH 0/7] ARM CCI-500 PMU driver support Suzuki K. Poulose
2015-05-05 11:49 ` [PATCH 4/7] arm-cci: Abstract handling for CCI events Suzuki K. Poulose
2015-05-18 13:08 ` Punit Agrawal
[not found] ` <1430826548-29960-1-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
2015-05-05 11:49 ` Suzuki K. Poulose [this message]
2015-05-05 11:49 ` [PATCH 2/7] arm-cci: Cleanup PMU driver code Suzuki K. Poulose
[not found] ` <1430826548-29960-3-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
2015-05-18 10:18 ` Punit Agrawal
2015-05-05 11:49 ` [PATCH 3/7] arm-cci: Abstract out the PMU counter details Suzuki K. Poulose
[not found] ` <1430826548-29960-4-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
2015-05-18 11:54 ` Punit Agrawal
2015-05-05 11:49 ` [PATCH 5/7] arm-cci: Sanitise CCI400 PMU driver specific code Suzuki K. Poulose
[not found] ` <1430826548-29960-6-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
2015-05-18 13:22 ` Punit Agrawal
2015-05-05 11:49 ` [PATCH 6/7] arm-cci: Add CCI-500 PMU support Suzuki K. Poulose
[not found] ` <1430826548-29960-7-git-send-email-suzuki.poulose-5wv7dgnIgG8@public.gmane.org>
2015-05-18 13:22 ` Punit Agrawal
2015-05-05 11:49 ` [PATCH 7/7] arm-cci: Add aliases for PMU events Suzuki K. Poulose
2015-05-18 13:33 ` Punit Agrawal
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=1430826548-29960-2-git-send-email-suzuki.poulose@arm.com \
--to=suzuki.poulose-5wv7dgnigg8@public.gmane.org \
--cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \
--cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=punit.agrawal-5wv7dgnIgG8@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.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).