On Wed, Jan 07, 2015 at 02:51:16PM +0000, G Gregory wrote:
Hi Ashok,
I am very interested in getting qemu running as a development machine for ACPI, could you give details of what you used and how it was configured?
Graeme
Hi Graeme,
I did it in a hacky way. Based on the "-M virt" platform's config, I wrote the ACPI tables statically in UEFI and passed it to the linux. Please find attached the edk2 diffs and the bootup logs for reference.
There is also a mail thread[1] which discusses whether the ACPI tables to be created in qemu or in uefi using the dt.
[1] http://lists.gnu.org/archive/html/qemu-devel/2014-11/msg02529.html
Thanks, Ashok
On 7 January 2015 at 13:32, Ashok Kumar ashoks@broadcom.com wrote:
Also provided pcibus_to_node and cpumask_of_pcibus based on x86.
Signed-off-by: Ashok Kumar ashoks@broadcom.com
Hanjun, This patch is based on your acpi numa patchset and leg-kernel. Tested it on qemu using generic pci host controller. could you add this to your set of patches if it is fine? Thanks!
arch/arm64/include/asm/numa.h | 4 +--- arch/arm64/include/asm/pci.h | 20 ++++++++++++++++++++ arch/arm64/pci/pci.c | 5 ++++- 3 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h index 3ed6edb..18716ec 100644 --- a/arch/arm64/include/asm/numa.h +++ b/arch/arm64/include/asm/numa.h @@ -12,9 +12,7 @@ /* currently, arm64 implements flat NUMA topology */ #define parent_node(node) (node)
-/* dummy definitions for pci functions */ -#define pcibus_to_node(node) 0 -#define cpumask_of_pcibus(bus) 0 +#define pcibus_to_node(bus) __pcibus_to_node(bus)
struct node_cpu_hwid { u32 node_id; /* logical node containing this CPU */ diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h index faad64c..522ba7c 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h @@ -88,6 +88,26 @@ struct acpi_mcfg_fixup { acpi_mcfg_fixup_t hook; };
+#ifdef CONFIG_NUMA +/* Returns the node based on pci bus */ +static inline int __pcibus_to_node(const struct pci_bus *bus) +{
const struct pci_sysdata *sd = bus->sysdata;
return sd->node;
+}
+static inline const struct cpumask * +cpumask_of_pcibus(const struct pci_bus *bus) +{
int node;
node = __pcibus_to_node(bus);
return (node == -1) ? cpu_online_mask :
cpumask_of_node(node);
+} +#endif
/* Designate a routine to fix up buggy MCFG */ #define DECLARE_ACPI_MCFG_FIXUP(oem_id, table_id, hook) \ static const struct acpi_mcfg_fixup __acpi_fixup_##hook __used \ diff --git a/arch/arm64/pci/pci.c b/arch/arm64/pci/pci.c index a1f8b08..a38753e 100644 --- a/arch/arm64/pci/pci.c +++ b/arch/arm64/pci/pci.c @@ -324,7 +324,10 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) return NULL; }
node = NUMA_NO_NODE;
node = acpi_get_node(device->handle);
if (node != NUMA_NO_NODE && !node_online(node))
node = NUMA_NO_NODE; info = kzalloc_node(sizeof(*info), GFP_KERNEL, node); if (!info) {
-- 1.9.1
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi