[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v1 15/21] ARM: NUMA: Extract MPIDR from MADT table





On 02/03/17 16:41, Vijay Kilari wrote:
On Thu, Mar 2, 2017 at 9:58 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
Hello Vijay,

On 09/02/17 15:57, vijay.kilari@xxxxxxxxx wrote:

From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxx>

Parse MADT table and extract MPIDR for all
CPU IDs in MADT ACPI_MADT_TYPE_GENERIC_INTERRUPT entries
and store in cpu_uid_to_hwid[].

This mapping is used by SRAT table parsing to
extract MPIDR of the CPU ID.

Signed-off-by: Vijaya Kumar <Vijaya.Kumar@xxxxxxxxxx>
---
 xen/arch/arm/Makefile      |   1 +
 xen/arch/arm/acpi_numa.c   | 122
+++++++++++++++++++++++++++++++++++++++++++++
 xen/arch/arm/numa.c        |   1 +


This new file should go in xen/arch/arm/acpi/

shouldn't be in xen/arch/arm/numa/?

If you introduce a numa directory then move in it. Otherwise acpi/.


+static int __init acpi_parse_madt_handler(struct acpi_subtable_header
*header,
+                                          const unsigned long end)
+{
+    struct acpi_madt_generic_interrupt *p =
+               container_of(header, struct acpi_madt_generic_interrupt,
header);
+
+    if ( BAD_MADT_ENTRY(p, end) )
+    {
+        /* Though MADT is invalid, we disable NUMA by calling bad_srat()
*/
+        bad_srat();
+        return -EINVAL;
+    }
+
+    acpi_table_print_madt_entry(header);
+    acpi_map_cpu_to_mpidr(p);
+
+    return 0;
+}


Why do you need to parse the MADT again? Can't this be done in the parsing
made in acpi/boot.c?
I will check. But I see that this is done quite late in smp_init().

Then rework the code.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.