lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed,  2 Mar 2016 14:56:00 -0800
From:	David Daney <ddaney.cavm@...il.com>
To:	Will Deacon <will.deacon@....com>,
	linux-arm-kernel@...ts.infradead.org,
	Rob Herring <robh+dt@...nel.org>,
	Frank Rowand <frowand.list@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>,
	Robert Richter <rrichter@...ium.com>,
	Ard Biesheuvel <ard.biesheuvel@...aro.org>,
	Matt Fleming <matt@...eblueprint.co.uk>,
	Mark Rutland <mark.rutland@....com>,
	Catalin Marinas <catalin.marinas@....com>
Cc:	linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, David Daney <david.daney@...ium.com>
Subject: [PATCH v13 4/6] arm64: Move unflatten_device_tree() call earlier.

From: David Daney <david.daney@...ium.com>

In order to extract NUMA information from the device tree, we need to
have the tree in its unflattened form.

Move the call to unflatten_device_tree() into paging_init().  This
puts it before the call to bootmem_init(), which is where the NUMA
information is extracted.

Signed-off-by: David Daney <david.daney@...ium.com>
---
 arch/arm64/kernel/setup.c | 7 +++----
 arch/arm64/mm/mmu.c       | 5 +++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 8119479..feae073 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -328,12 +328,11 @@ void __init setup_arch(char **cmdline_p)
 
 	early_ioremap_reset();
 
-	if (acpi_disabled) {
-		unflatten_device_tree();
+	if (acpi_disabled)
 		psci_dt_init();
-	} else {
+	else
 		psci_acpi_init();
-	}
+
 	xen_early_init();
 
 	cpu_read_bootcpu_ops();
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 58faeaa..ee6e6b0 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -29,6 +29,8 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/stop_machine.h>
+#include <linux/acpi.h>
+#include <linux/of_fdt.h>
 
 #include <asm/cputype.h>
 #include <asm/fixmap.h>
@@ -459,6 +461,9 @@ void __init paging_init(void)
 	map_mem();
 	fixup_executable();
 
+	if (acpi_disabled)
+		unflatten_device_tree();
+
 	/* allocate the zero page. */
 	zero_page = early_alloc(PAGE_SIZE);
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ