Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1671501 > unrolled thread

Re: [PATCH v3 2/2] acpi, gicv3-its, numa: Adding numa node mapping for gic-its units

Started byMarc Zyngier <marc.zyngier@arm.com>
First post2017-06-21 10:50 +0200
Last post2017-06-21 10:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 2/2] acpi, gicv3-its, numa: Adding numa node mapping  for gic-its units Marc Zyngier <marc.zyngier@arm.com> - 2017-06-21 10:50 +0200

#1671501 — Re: [PATCH v3 2/2] acpi, gicv3-its, numa: Adding numa node mapping for gic-its units

FromMarc Zyngier <marc.zyngier@arm.com>
Date2017-06-21 10:50 +0200
SubjectRe: [PATCH v3 2/2] acpi, gicv3-its, numa: Adding numa node mapping for gic-its units
Message-ID<tUJuN-3Nw-3@gated-at.bofh.it>
On 21/06/17 08:09, Jayachandran C wrote:
> On Wed, Jun 21, 2017 at 11:45:43AM +0530, Ganapatrao Kulkarni wrote:
>> Add code to parse SRAT ITS Affinity sub table as defined in ACPI 6.2
>> Later in per device probe, ITS devices are mapped to
>> numa node using ITS id to proximity domain mapping.
>>
>> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
>> ---
>>  drivers/irqchip/irq-gic-v3-its.c | 80 +++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 79 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
>> index 45ea1933..88cfb32 100644
>> --- a/drivers/irqchip/irq-gic-v3-its.c
>> +++ b/drivers/irqchip/irq-gic-v3-its.c
>> @@ -1833,6 +1833,82 @@ static int __init its_of_probe(struct device_node *node)
>>  
>>  #define ACPI_GICV3_ITS_MEM_SIZE (SZ_128K)
>>  
>> +#ifdef CONFIG_ACPI_NUMA
>> +struct its_srat_map {
>> +	u32	numa_node;  /* numa node id */
>> +	u32	its_id;  /* GIC ITS ID */
>> +};
>> +
>> +static struct its_srat_map its_srat_maps[MAX_NUMNODES] __initdata = {
>> +	[0 ... MAX_NUMNODES - 1] = {NUMA_NO_NODE, UINT_MAX} };
>> +
>> +static int its_in_srat __initdata;
>> +
>> +static int __init
>> +acpi_get_its_numa_node(u32 its_id)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < its_in_srat; i++) {
>> +		if (its_id == its_srat_maps[i].its_id)
>> +			return its_srat_maps[i].numa_node;
>> +	}
>> +	return NUMA_NO_NODE;
>> +}
>> +
>> +static int __init
>> +gic_acpi_parse_srat_its(struct acpi_subtable_header *header,
>> +			 const unsigned long end)
>> +{
>> +	int pxm, node;
>> +	struct acpi_srat_its_affinity *its_affinity;
>> +
>> +	its_affinity = (struct acpi_srat_its_affinity *)header;
>> +	if (!its_affinity)
>> +		return -EINVAL;
>> +
>> +	if (its_affinity->header.length <
>> +			sizeof(struct acpi_srat_its_affinity)) {
>> +		pr_err("SRAT:ITS: Invalid SRAT header length: %d\n",
>> +			its_affinity->header.length);
> 
> The original driver does not use pr_fmt properly, it may be worth
> fixing that up rather than having prefixes, here...

Irrespective of what the "proper" usage is, this kind of cleanup doesn't
belong in this series. Feel free to submit a separate patch.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web