mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Tai Nguyen <ttnguyen@apm.com>,
	mark.rutland@arm.com, will.deacon@arm.com,
	catalin.marinas@arm.com, paul.gortmaker@windriver.com
Cc: dhdang@apm.com, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	patches@apm.com
Subject: Re: [PATCH v9 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver
Date: Thu, 14 Jul 2016 10:47:08 -0700	[thread overview]
Message-ID: <1468518428.8745.43.camel@perches.com> (raw)
In-Reply-To: <1468517266-1642-4-git-send-email-ttnguyen@apm.com>

On Thu, 2016-07-14 at 10:27 -0700, Tai Nguyen wrote:
> This patch adds a driver for the SoC-wide (AKA uncore) PMU hardware
> found in APM X-Gene SoCs.

trivia:

> diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c
[]
> +struct xgene_pmu_dev_ctx {
> +	char *name;
> +	struct list_head next;
> +	struct xgene_pmu_dev *pmu_dev;
> +	struct hw_pmu_info inf;
> +};

Probably better to use something like
	char	name[20];
as the kasprintf can fail and this doesn't
seem to be freed anywhere.
> +static char *xgene_pmu_dev_name(u32 type, int id)
> +{
> +	switch (type) {
> +	case PMU_TYPE_L3C:
> +		return kasprintf(GFP_KERNEL, "l3c%d", id);
> +	case PMU_TYPE_IOB:
> +		return kasprintf(GFP_KERNEL, "iob%d", id);
> +	case PMU_TYPE_MCB:
> +		return kasprintf(GFP_KERNEL, "mcb%d", id);
> +	case PMU_TYPE_MC:
> +		return kasprintf(GFP_KERNEL, "mc%d", id);
> +	default:
> +		return kasprintf(GFP_KERNEL, "unknown");
> +	}
> +}

[]
	
> +static struct
> +xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu,
> +				       struct acpi_device *adev, u32 type)
> +{
[]
> +	ctx->name = xgene_pmu_dev_name(type, enable_bit);
> 

  reply	other threads:[~2016-07-14 17:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14 17:27 [PATCH v9 0/4] perf: " Tai Nguyen
2016-07-14 17:27 ` [PATCH v9 1/4] MAINTAINERS: Add entry for APM X-Gene SoC PMU driver Tai Nguyen
2016-07-14 17:27 ` [PATCH v9 2/4] Documentation: Add documentation for APM X-Gene SoC PMU DTS binding Tai Nguyen
2016-07-14 17:27 ` [PATCH v9 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Tai Nguyen
2016-07-14 17:47   ` Joe Perches [this message]
2016-07-14 17:54     ` Tai Tri Nguyen
2016-07-14 18:05       ` Tai Tri Nguyen
2016-07-15  9:45         ` Mark Rutland
2016-07-15 17:31           ` Tai Tri Nguyen
2016-07-14 17:27 ` [PATCH v9 4/4] arm64: dts: apm: Add APM X-Gene SoC PMU DTS entries Tai Nguyen

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=1468518428.8745.43.camel@perches.com \
    --to=joe@perches.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dhdang@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=patches@apm.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=ttnguyen@apm.com \
    --cc=will.deacon@arm.com \
    /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®