All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
To: Ganapatrao Kulkarni
	<ganapatrao.kulkarni-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org,
	Will.Deacon-5wv7dgnIgG8@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jnair-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	sudeep.holla-5wv7dgnIgG8@public.gmane.org,
	gpkulkarni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices
Date: Thu, 1 Jun 2017 17:21:42 +0100	[thread overview]
Message-ID: <20170601162142.GC19003@red-moon> (raw)
In-Reply-To: <1496325937-21113-1-git-send-email-ganapatrao.kulkarni-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote:
> ARM IORT specification has provision to define Proximity domain
> in SMMUv3 IORT table. Adding required code to parse Proximity domain of
> SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node
> of SMMUv3 platform devices.
> 
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/iommu/arm-smmu-v3.c | 6 ++++++
>  include/acpi/actbl2.h       | 4 ++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 69d8506..98c2319 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2667,6 +2667,12 @@ static int arm_smmu_device_acpi_probe(struct platform_device *pdev,
>  	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE)
>  		smmu->features |= ARM_SMMU_FEAT_COHERENCY;
>  
> +	/* set numa proximity domain for smmv3 device */
> +	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_PXM) {
> +		set_dev_node(dev, acpi_map_pxm_to_node(iort_smmu->pxm));
> +		dev_info(dev, "on NUMA node %d\n", dev_to_node(dev));

It should be done in acpi/arm64/iort.c at device creation time.

Thanks,
Lorenzo

> +	}
> +
>  	return 0;
>  }
>  #else
> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
> index 4b306a6..c16ced8 100644
> --- a/include/acpi/actbl2.h
> +++ b/include/acpi/actbl2.h
> @@ -805,6 +805,9 @@ struct acpi_iort_smmu_v3 {
>  	u32 pri_gsiv;
>  	u32 gerr_gsiv;
>  	u32 sync_gsiv;
> +	u8 pxm;
> +	u8 reserved1;
> +	u16 reserved2;
>  };
>  
>  /* Values for Model field above */
> @@ -817,6 +820,7 @@ struct acpi_iort_smmu_v3 {
>  
>  #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
>  #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
> +#define ACPI_IORT_SMMU_V3_PXM               (1<<3)
>  
>  /*******************************************************************************
>   *
> -- 
> 1.8.1.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices
Date: Thu, 1 Jun 2017 17:21:42 +0100	[thread overview]
Message-ID: <20170601162142.GC19003@red-moon> (raw)
In-Reply-To: <1496325937-21113-1-git-send-email-ganapatrao.kulkarni@cavium.com>

On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote:
> ARM IORT specification has provision to define Proximity domain
> in SMMUv3 IORT table. Adding required code to parse Proximity domain of
> SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node
> of SMMUv3 platform devices.
> 
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
> ---
>  drivers/iommu/arm-smmu-v3.c | 6 ++++++
>  include/acpi/actbl2.h       | 4 ++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 69d8506..98c2319 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2667,6 +2667,12 @@ static int arm_smmu_device_acpi_probe(struct platform_device *pdev,
>  	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE)
>  		smmu->features |= ARM_SMMU_FEAT_COHERENCY;
>  
> +	/* set numa proximity domain for smmv3 device */
> +	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_PXM) {
> +		set_dev_node(dev, acpi_map_pxm_to_node(iort_smmu->pxm));
> +		dev_info(dev, "on NUMA node %d\n", dev_to_node(dev));

It should be done in acpi/arm64/iort.c at device creation time.

Thanks,
Lorenzo

> +	}
> +
>  	return 0;
>  }
>  #else
> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
> index 4b306a6..c16ced8 100644
> --- a/include/acpi/actbl2.h
> +++ b/include/acpi/actbl2.h
> @@ -805,6 +805,9 @@ struct acpi_iort_smmu_v3 {
>  	u32 pri_gsiv;
>  	u32 gerr_gsiv;
>  	u32 sync_gsiv;
> +	u8 pxm;
> +	u8 reserved1;
> +	u16 reserved2;
>  };
>  
>  /* Values for Model field above */
> @@ -817,6 +820,7 @@ struct acpi_iort_smmu_v3 {
>  
>  #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
>  #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
> +#define ACPI_IORT_SMMU_V3_PXM               (1<<3)
>  
>  /*******************************************************************************
>   *
> -- 
> 1.8.1.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org,
	iommu@lists.linux-foundation.org, Will.Deacon@arm.com,
	hanjun.guo@linaro.org, sudeep.holla@arm.com,
	robin.murphy@arm.com, joro@8bytes.org, rjw@rjwysocki.net,
	lenb@kernel.org, jnair@caviumnetworks.com, gpkulkarni@gmail.com
Subject: Re: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices
Date: Thu, 1 Jun 2017 17:21:42 +0100	[thread overview]
Message-ID: <20170601162142.GC19003@red-moon> (raw)
In-Reply-To: <1496325937-21113-1-git-send-email-ganapatrao.kulkarni@cavium.com>

On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote:
> ARM IORT specification has provision to define Proximity domain
> in SMMUv3 IORT table. Adding required code to parse Proximity domain of
> SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node
> of SMMUv3 platform devices.
> 
> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
> ---
>  drivers/iommu/arm-smmu-v3.c | 6 ++++++
>  include/acpi/actbl2.h       | 4 ++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
> index 69d8506..98c2319 100644
> --- a/drivers/iommu/arm-smmu-v3.c
> +++ b/drivers/iommu/arm-smmu-v3.c
> @@ -2667,6 +2667,12 @@ static int arm_smmu_device_acpi_probe(struct platform_device *pdev,
>  	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE)
>  		smmu->features |= ARM_SMMU_FEAT_COHERENCY;
>  
> +	/* set numa proximity domain for smmv3 device */
> +	if (iort_smmu->flags & ACPI_IORT_SMMU_V3_PXM) {
> +		set_dev_node(dev, acpi_map_pxm_to_node(iort_smmu->pxm));
> +		dev_info(dev, "on NUMA node %d\n", dev_to_node(dev));

It should be done in acpi/arm64/iort.c at device creation time.

Thanks,
Lorenzo

> +	}
> +
>  	return 0;
>  }
>  #else
> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
> index 4b306a6..c16ced8 100644
> --- a/include/acpi/actbl2.h
> +++ b/include/acpi/actbl2.h
> @@ -805,6 +805,9 @@ struct acpi_iort_smmu_v3 {
>  	u32 pri_gsiv;
>  	u32 gerr_gsiv;
>  	u32 sync_gsiv;
> +	u8 pxm;
> +	u8 reserved1;
> +	u16 reserved2;
>  };
>  
>  /* Values for Model field above */
> @@ -817,6 +820,7 @@ struct acpi_iort_smmu_v3 {
>  
>  #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE   (1)
>  #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE     (1<<1)
> +#define ACPI_IORT_SMMU_V3_PXM               (1<<3)
>  
>  /*******************************************************************************
>   *
> -- 
> 1.8.1.4
> 

  parent reply	other threads:[~2017-06-01 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 14:05 [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices Ganapatrao Kulkarni
2017-06-01 14:05 ` Ganapatrao Kulkarni
     [not found] ` <1496325937-21113-1-git-send-email-ganapatrao.kulkarni-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2017-06-01 16:21   ` Lorenzo Pieralisi [this message]
2017-06-01 16:21     ` Lorenzo Pieralisi
2017-06-01 16:21     ` Lorenzo Pieralisi
2017-06-02  3:50     ` Hanjun Guo
2017-06-02  3:50       ` Hanjun Guo
2017-06-02  3:50       ` Hanjun Guo
     [not found]       ` <5930E085.8000404-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-06-04  4:04         ` Ganapatrao Kulkarni
2017-06-04  4:04           ` Ganapatrao Kulkarni
2017-06-04  4:04           ` Ganapatrao Kulkarni

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=20170601162142.GC19003@red-moon \
    --to=lorenzo.pieralisi-5wv7dgnigg8@public.gmane.org \
    --cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=ganapatrao.kulkarni-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
    --cc=gpkulkarni-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jnair-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=sudeep.holla-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 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.