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

Commit 11f1add2 authored by Maria Yu's avatar Maria Yu
Browse files

arm64: setup: introduce arch_read_machine_name API



Introduce arch_read_machine_name API to have arch
specific machine_name implementation.

Change-Id: I595d0f8ca701ab4d9592acc120ab35a8fabb8d09
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent af4ea937
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ extern void (*arm_pm_idle)(void);

extern unsigned int user_debug;
extern char* (*arch_read_hardware_id)(void);
const char * __init arch_read_machine_name(void);

#endif /* !__ASSEMBLY__ */

+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@ extern void __show_regs(struct pt_regs *);
extern void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
extern char* (*arch_read_hardware_id)(void);

const char * __init arch_read_machine_name(void);

#define show_unhandled_signals_ratelimited()				\
({									\
	static DEFINE_RATELIMIT_STATE(_rs,				\
+7 −1
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
#include <asm/efi.h>
#include <asm/xen/hypervisor.h>
#include <asm/mmu_context.h>
#include <asm/system_misc.h>

phys_addr_t __fdt_pointer __initdata;

@@ -186,6 +187,11 @@ static void __init smp_build_mpidr_hash(void)
		pr_warn("Large number of MPIDR hash buckets detected\n");
}

const char * __init __weak arch_read_machine_name(void)
{
	return of_flat_dt_get_machine_name();
}

static void __init setup_machine_fdt(phys_addr_t dt_phys)
{
	void *dt_virt = fixmap_remap_fdt(dt_phys);
@@ -201,7 +207,7 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
			cpu_relax();
	}

	machine_name = of_flat_dt_get_machine_name();
	machine_name = arch_read_machine_name();
	if (machine_name) {
		dump_stack_set_arch_desc("%s (DT)", machine_name);
		pr_info("Machine: %s\n", machine_name);