Hi all,

Today's linux-next merge of the tip tree got a conflict in:

  arch/arm64/kernel/acpi.c

between commit:

  f26527b1428f ("irqchip / GIC: Convert the GIC driver to ACPI probing")

from the pm tree and commit:

  89e44b51cc0d ("arm64, acpi/apei: Implement arch_apei_get_mem_attributes()")

from the tip tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    [email protected]

diff --cc arch/arm64/kernel/acpi.c
index d6463bba2360,137d537ddceb..000000000000
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@@ -205,3 -210,52 +210,27 @@@ void __init acpi_boot_table_init(void
                        disable_acpi();
        }
  }
+ 
 -void __init acpi_gic_init(void)
 -{
 -      struct acpi_table_header *table;
 -      acpi_status status;
 -      acpi_size tbl_size;
 -      int err;
 -
 -      if (acpi_disabled)
 -              return;
 -
 -      status = acpi_get_table_with_size(ACPI_SIG_MADT, 0, &table, &tbl_size);
 -      if (ACPI_FAILURE(status)) {
 -              const char *msg = acpi_format_exception(status);
 -
 -              pr_err("Failed to get MADT table, %s\n", msg);
 -              return;
 -      }
 -
 -      err = gic_v2_acpi_init(table);
 -      if (err)
 -              pr_err("Failed to initialize GIC IRQ controller");
 -
 -      early_acpi_os_unmap_memory((char *)table, tbl_size);
 -}
 -
+ #ifdef CONFIG_ACPI_APEI
+ pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
+ {
+       /*
+        * According to "Table 8 Map: EFI memory types to AArch64 memory
+        * types" of UEFI 2.5 section 2.3.6.1, each EFI memory type is
+        * mapped to a corresponding MAIR attribute encoding.
+        * The EFI memory attribute advises all possible capabilities
+        * of a memory region. We use the most efficient capability.
+        */
+ 
+       u64 attr;
+ 
+       attr = efi_mem_attributes(addr);
+       if (attr & EFI_MEMORY_WB)
+               return PAGE_KERNEL;
+       if (attr & EFI_MEMORY_WT)
+               return __pgprot(PROT_NORMAL_WT);
+       if (attr & EFI_MEMORY_WC)
+               return __pgprot(PROT_NORMAL_NC);
+       return __pgprot(PROT_DEVICE_nGnRnE);
+ }
+ #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to