|
[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
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/ xen/include/asm-arm/acpi.h | 2 + 4 files changed, 126 insertions(+) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 7694485..8c5e67b 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -51,6 +51,7 @@ obj-y += vpsci.o obj-y += vuart.o obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_NUMA) += dt_numa.o +obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o #obj-bin-y += ....o diff --git a/xen/arch/arm/acpi_numa.c b/xen/arch/arm/acpi_numa.c new file mode 100644 index 0000000..3ee87f2 --- /dev/null +++ b/xen/arch/arm/acpi_numa.c @@ -0,0 +1,122 @@ +/* + * ACPI based NUMA setup + * + * Copyright (C) 2016 - Cavium Inc. + * Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxx> + * + * Reads the ACPI MADT and SRAT table to setup NUMA information. + * + * Contains Excerpts from x86 implementation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. Xen is GPLv2, please update the license accordingly. Please don't make a special case. This makes more complicate to read the code. We should just loop to find the entry matching the UID. + + for ( i = 0; i < NR_CPUS; i++ ) You can limit the loop by keeping an the number of element in the array. Why do you need to parse the MADT again? Can't this be done in the parsing made in acpi/boot.c? unsigned int. Missing emacs magic. diff --git a/xen/arch/arm/numa.c b/xen/arch/arm/numa.c index 31dc552..5c49347 100644 --- a/xen/arch/arm/numa.c +++ b/xen/arch/arm/numa.c @@ -20,6 +20,7 @@ #include <xen/mm.h> #include <xen/nodemask.h> #include <xen/pfn.h> +#include <xen/acpi.h> Why this include? This patch should compile without it. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |