linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
@ 2017-11-15 17:29 Ganapatrao Kulkarni
  2017-11-15 18:46 ` Luck, Tony
  0 siblings, 1 reply; 6+ messages in thread
From: Ganapatrao Kulkarni @ 2017-11-15 17:29 UTC (permalink / raw)
  To: linux-ia64, linux-kernel, linux-acpi
  Cc: fenghua.yu, tony.luck, rjw, lenb, guohanjun, jnair, gpkulkarni,
	Robert.Richter

In current implementation, SRAT Memory Affinity Structure table
parsing is restricted to number of maximum memblocks allowed
(NR_NODE_MEMBLKS). However NR_NODE_MEMBLKS is defined individually as
per architecture requirements. Hence removing the restriction of
SRAT Memory Affinity Structure parsing in acpi driver code and
let architecture code check for allowed memblocks count.
This check is already added in x86 and extending same to ia64.

Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
---
 arch/ia64/kernel/acpi.c | 5 +++++
 drivers/acpi/numa.c     | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 1d29b2f..1dacbf5 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -504,6 +504,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
 	if (!(ma->flags & ACPI_SRAT_MEM_ENABLED))
 		return -1;
 
+	if (num_node_memblks >= NR_NODE_MEMBLKS) {
+		pr_err("NUMA: too many memblk ranges\n");
+		return -EINVAL;
+	}
+
 	/* record this node in proximity bitmap */
 	pxm_bit_set(pxm);
 
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 917f1cc..8ccaae3 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -460,8 +460,7 @@ int __init acpi_numa_init(void)
 					srat_proc, ARRAY_SIZE(srat_proc), 0);
 
 		cnt = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY,
-					    acpi_parse_memory_affinity,
-					    NR_NODE_MEMBLKS);
+					    acpi_parse_memory_affinity, 0);
 	}
 
 	/* SLIT: System Locality Information Table */
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
  2017-11-15 17:29 [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table Ganapatrao Kulkarni
@ 2017-11-15 18:46 ` Luck, Tony
  2017-11-21  4:16   ` Ganapatrao Kulkarni
  0 siblings, 1 reply; 6+ messages in thread
From: Luck, Tony @ 2017-11-15 18:46 UTC (permalink / raw)
  To: Ganapatrao Kulkarni, linux-ia64, linux-kernel, linux-acpi
  Cc: Yu, Fenghua, rjw, lenb, guohanjun, jnair, gpkulkarni, Robert.Richter

> This check is already added in x86 and extending same to ia64.

Looks OK.

Acked-by: Tony Luck <tony.luck@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
  2017-11-15 18:46 ` Luck, Tony
@ 2017-11-21  4:16   ` Ganapatrao Kulkarni
  2017-11-21 12:52     ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Ganapatrao Kulkarni @ 2017-11-21  4:16 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Ganapatrao Kulkarni, linux-ia64, linux-kernel, linux-acpi, Yu,
	Fenghua, rjw, lenb, guohanjun, jnair, gpkulkarni, Robert.Richter

On Thu, Nov 16, 2017 at 12:16 AM, Luck, Tony <tony.luck@intel.com> wrote:
>> This check is already added in x86 and extending same to ia64.
>
> Looks OK.
>
> Acked-by: Tony Luck <tony.luck@intel.com>

thanks Tony.

ACPI Maintainers,
any comments on this patch? i can send rebasing to 4.15-rc1?

thanks
Ganapat

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
  2017-11-21  4:16   ` Ganapatrao Kulkarni
@ 2017-11-21 12:52     ` Rafael J. Wysocki
  2017-11-21 17:10       ` Ganapatrao Kulkarni
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-11-21 12:52 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Luck, Tony, Ganapatrao Kulkarni, linux-ia64, linux-kernel,
	linux-acpi, Yu, Fenghua, rjw, lenb, guohanjun, jnair, gpkulkarni,
	Robert.Richter

On Tue, Nov 21, 2017 at 5:16 AM, Ganapatrao Kulkarni <gklkml16@gmail.com> wrote:
> On Thu, Nov 16, 2017 at 12:16 AM, Luck, Tony <tony.luck@intel.com> wrote:
>>> This check is already added in x86 and extending same to ia64.
>>
>> Looks OK.
>>
>> Acked-by: Tony Luck <tony.luck@intel.com>
>
> thanks Tony.
>
> ACPI Maintainers,
> any comments on this patch? i can send rebasing to 4.15-rc1?

I've queued it up already.

Is there any urgent need for that to go into 4.15?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
  2017-11-21 12:52     ` Rafael J. Wysocki
@ 2017-11-21 17:10       ` Ganapatrao Kulkarni
  2017-12-04 14:46         ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Ganapatrao Kulkarni @ 2017-11-21 17:10 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Luck, Tony, Ganapatrao Kulkarni, linux-ia64, linux-kernel,
	linux-acpi, Yu, Fenghua, rjw, lenb, guohanjun, jnair, gpkulkarni,
	Robert.Richter

On Tue, Nov 21, 2017 at 6:22 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Tue, Nov 21, 2017 at 5:16 AM, Ganapatrao Kulkarni <gklkml16@gmail.com> wrote:
>> On Thu, Nov 16, 2017 at 12:16 AM, Luck, Tony <tony.luck@intel.com> wrote:
>>>> This check is already added in x86 and extending same to ia64.
>>>
>>> Looks OK.
>>>
>>> Acked-by: Tony Luck <tony.luck@intel.com>
>>
>> thanks Tony.
>>
>> ACPI Maintainers,
>> any comments on this patch? i can send rebasing to 4.15-rc1?
>
> I've queued it up already.

thanks Rafael.
>
> Is there any urgent need for that to go into 4.15?

not really.
>
> Thanks,
> Rafael

thanks
Ganapt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table
  2017-11-21 17:10       ` Ganapatrao Kulkarni
@ 2017-12-04 14:46         ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-12-04 14:46 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Rafael J. Wysocki, Luck, Tony, Ganapatrao Kulkarni, linux-ia64,
	linux-kernel, linux-acpi, Yu, Fenghua, lenb, guohanjun, jnair,
	gpkulkarni, Robert.Richter

On Tuesday, November 21, 2017 6:10:53 PM CET Ganapatrao Kulkarni wrote:
> On Tue, Nov 21, 2017 at 6:22 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
> > On Tue, Nov 21, 2017 at 5:16 AM, Ganapatrao Kulkarni <gklkml16@gmail.com> wrote:
> >> On Thu, Nov 16, 2017 at 12:16 AM, Luck, Tony <tony.luck@intel.com> wrote:
> >>>> This check is already added in x86 and extending same to ia64.
> >>>
> >>> Looks OK.
> >>>
> >>> Acked-by: Tony Luck <tony.luck@intel.com>
> >>
> >> thanks Tony.
> >>
> >> ACPI Maintainers,
> >> any comments on this patch? i can send rebasing to 4.15-rc1?
> >
> > I've queued it up already.
> 
> thanks Rafael.
> >
> > Is there any urgent need for that to go into 4.15?
> 
> not really.

OK, applied and queued up for 4.16.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-04 14:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15 17:29 [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table Ganapatrao Kulkarni
2017-11-15 18:46 ` Luck, Tony
2017-11-21  4:16   ` Ganapatrao Kulkarni
2017-11-21 12:52     ` Rafael J. Wysocki
2017-11-21 17:10       ` Ganapatrao Kulkarni
2017-12-04 14:46         ` Rafael J. Wysocki

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).