Hey Jeremy,
Quick comment below.
On 10/12/2017 1:48 PM, Jeremy Linton wrote:
+static int topology_setup_acpi_cpu(struct acpi_table_header *table,
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ unsigned int cpu, int level)
+{
+ÂÂÂ struct acpi_pptt_processor *cpu_node;
+ÂÂÂ u32 acpi_cpu_id = acpi_cpu_get_madt_gicc(cpu)->uid;
This lookup for the acpi id is architecture dependent. Can you use a function that would work for any user of PPTT and MADT? It may require writing and exporting the inverse lookup of the function acpi_get_cpuid() which is exported from processor_core.c
+
+ÂÂÂ cpu_node = acpi_find_processor_node(table, acpi_cpu_id);
+ÂÂÂ if (cpu_node) {
+ÂÂÂÂÂÂÂ cpu_node = acpi_find_processor_package_id(table, cpu_node, level);
+ÂÂÂÂÂÂÂ /* Only the first level has a guaranteed id */
+ÂÂÂÂÂÂÂ if (level == 0)
+ÂÂÂÂÂÂÂÂÂÂÂ return cpu_node->acpi_processor_id;
+ÂÂÂÂÂÂÂ return (int)((u8 *)cpu_node - (u8 *)table);
+ÂÂÂ }
+ÂÂÂ pr_err_once("PPTT table found, but unable to locate core for %d\n",
+ÂÂÂÂÂÂÂÂÂÂÂ cpu);
+ÂÂÂ return -ENOENT;
+}