Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58046827 authored by Trilok Soni's avatar Trilok Soni Committed by Gerrit - the friendly Code Review server
Browse files

arm64: cpuinfo: make machine_name as extern



of_flat_dt_get_machine_name() API is marked as __init so
machine_name should be made as an extern in-order to get
it accessed by the cpuinfo.c. In the earlier kernel revisions
the usage was restricted to the one file setup.c only and
due to which we didn't faced any issue.

Change-Id: I70da7dcd45f7d94866e77a93c5a8ceb8866f3240
Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
Signed-off-by: default avatarChannagoud Kadabi <ckadabi@codeaurora.org>
parent dabc1685
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@

#include <linux/kernel.h>

extern const char *machine_name;

/* CPU feature register tracking */
enum ftr_type {
	FTR_EXACT,	/* Use a predefined safe value */
+0 −3
Original line number Diff line number Diff line
@@ -38,8 +38,6 @@
char* (*arch_read_hardware_id)(void);
EXPORT_SYMBOL(arch_read_hardware_id);

static const char *machine_name;

/*
 * In case the boot CPU is hotpluggable, we record its initial state and
 * current state separately. Certain system registers may contain different
@@ -164,7 +162,6 @@ static int c_show(struct seq_file *m, void *v)
		seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
	}

	machine_name = of_flat_dt_get_machine_name();
	if (!arch_read_hardware_id)
		seq_printf(m, "Hardware\t: %s\n", machine_name);
	else
+4 −1
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@

phys_addr_t __fdt_pointer __initdata;

const char *machine_name;
/*
 * Standard memory resources
 */
@@ -193,7 +194,9 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
			cpu_relax();
	}

	dump_stack_set_arch_desc("%s (DT)", of_flat_dt_get_machine_name());
	machine_name = of_flat_dt_get_machine_name();

	dump_stack_set_arch_desc("%s (DT)", machine_name);
}

static void __init request_standard_resources(void)