From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/3] perf: xgene: Move PMU leaf functions into function pointer structure
Date: Thu, 22 Jun 2017 18:53:50 +0100 [thread overview]
Message-ID: <20170622175349.GE25967@leverpostej> (raw)
In-Reply-To: <1496772146-11084-3-git-send-email-hotran@apm.com>
On Tue, Jun 06, 2017 at 11:02:25AM -0700, Hoan Tran wrote:
> This patch moves PMU leaf functions into a function pointer structure.
> It helps code maintain and expasion easier.
>
> Signed-off-by: Hoan Tran <hotran@apm.com>
> ---
> drivers/perf/xgene_pmu.c | 85 +++++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 66 insertions(+), 19 deletions(-)
> -static inline u32 xgene_pmu_read_counter(struct xgene_pmu_dev *pmu_dev, int idx)
> +static inline u64 xgene_pmu_read_counter32(struct xgene_pmu_dev *pmu_dev,
> + int idx)
> {
> - return readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx));
> + return (u64)readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx));
> }
Nit: the cast is redundant, and can go.
Otherwise:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Hoan Tran <hotran@apm.com>
Cc: Will Deacon <will.deacon@arm.com>,
Jonathan Corbet <corbet@lwn.net>, Tai Nguyen <ttnguyen@apm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Loc Ho <lho@apm.com>
Subject: Re: [PATCH v3 2/3] perf: xgene: Move PMU leaf functions into function pointer structure
Date: Thu, 22 Jun 2017 18:53:50 +0100 [thread overview]
Message-ID: <20170622175349.GE25967@leverpostej> (raw)
In-Reply-To: <1496772146-11084-3-git-send-email-hotran@apm.com>
On Tue, Jun 06, 2017 at 11:02:25AM -0700, Hoan Tran wrote:
> This patch moves PMU leaf functions into a function pointer structure.
> It helps code maintain and expasion easier.
>
> Signed-off-by: Hoan Tran <hotran@apm.com>
> ---
> drivers/perf/xgene_pmu.c | 85 +++++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 66 insertions(+), 19 deletions(-)
> -static inline u32 xgene_pmu_read_counter(struct xgene_pmu_dev *pmu_dev, int idx)
> +static inline u64 xgene_pmu_read_counter32(struct xgene_pmu_dev *pmu_dev,
> + int idx)
> {
> - return readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx));
> + return (u64)readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx));
> }
Nit: the cast is redundant, and can go.
Otherwise:
Acked-by: Mark Rutland <mark.rutland@arm.com>
Thanks,
Mark.
next prev parent reply other threads:[~2017-06-22 17:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 18:02 [PATCH v3 0/3] perf: xgene: Add support for SoC PMU version 3 Hoan Tran
2017-06-06 18:02 ` Hoan Tran
2017-06-06 18:02 ` [PATCH v3 1/3] perf: xgene: Parse PMU subnode from the match table Hoan Tran
2017-06-06 18:02 ` Hoan Tran
2017-06-22 16:39 ` Mark Rutland
2017-06-22 16:39 ` Mark Rutland
2017-06-06 18:02 ` [PATCH v3 2/3] perf: xgene: Move PMU leaf functions into function pointer structure Hoan Tran
2017-06-06 18:02 ` Hoan Tran
2017-06-22 17:53 ` Mark Rutland [this message]
2017-06-22 17:53 ` Mark Rutland
2017-06-06 18:02 ` [PATCH v3 3/3] perf: xgene: Add support for SoC PMU version 3 Hoan Tran
2017-06-06 18:02 ` Hoan Tran
2017-06-22 17:52 ` Mark Rutland
2017-06-22 17:52 ` Mark Rutland
2017-06-22 18:13 ` Hoan Tran
2017-06-22 18:13 ` Hoan Tran
2017-06-22 18:17 ` Mark Rutland
2017-06-22 18:17 ` Mark Rutland
2017-06-22 18:29 ` Hoan Tran
2017-06-22 18:29 ` Hoan Tran
2017-06-22 18:18 ` Mark Rutland
2017-06-22 18:18 ` Mark Rutland
2017-06-22 18:28 ` Hoan Tran
2017-06-22 18:28 ` Hoan Tran
2017-06-20 18:45 ` [PATCH v3 0/3] " Hoan Tran
2017-06-20 18:45 ` Hoan Tran
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=20170622175349.GE25967@leverpostej \
--to=mark.rutland@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 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.