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

Commit 42bbdb43 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86: Replace ARCH_SETUP by a proper x86_init_ops



ARCH_SETUP is a horrible leftover from the old arch/i386 mach support
code. It still has a lonely user in xen. Move it to x86_init_ops.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 428cf902
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ static inline void load_sp0(struct tss_struct *tss,
	PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
	PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread);
}
}


#define ARCH_SETUP			pv_init_ops.arch_setup();
static inline unsigned long get_wallclock(void)
static inline unsigned long get_wallclock(void)
{
{
	return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
	return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock);
+0 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,6 @@ struct pv_init_ops {
			  unsigned long addr, unsigned len);
			  unsigned long addr, unsigned len);


	/* Basic arch-specific setup */
	/* Basic arch-specific setup */
	void (*arch_setup)(void);
	void (*post_allocator_init)(void);
	void (*post_allocator_init)(void);


	/* Print a banner to identify the environment */
	/* Print a banner to identify the environment */
+9 −0
Original line number Original line Diff line number Diff line
@@ -56,6 +56,14 @@ struct x86_init_irqs {
	void (*trap_init)(void);
	void (*trap_init)(void);
};
};


/**
 * struct x86_init_oem - oem platform specific customizing functions
 * @arch_setup:			platform specific architecure setup
 */
struct x86_init_oem {
	void (*arch_setup)(void);
};

/**
/**
 * struct x86_init_ops - functions for platform specific setup
 * struct x86_init_ops - functions for platform specific setup
 *
 *
@@ -64,6 +72,7 @@ struct x86_init_ops {
	struct x86_init_resources	resources;
	struct x86_init_resources	resources;
	struct x86_init_mpparse		mpparse;
	struct x86_init_mpparse		mpparse;
	struct x86_init_irqs		irqs;
	struct x86_init_irqs		irqs;
	struct x86_init_oem		oem;
};
};


extern struct x86_init_ops x86_init;
extern struct x86_init_ops x86_init;
+0 −1
Original line number Original line Diff line number Diff line
@@ -311,7 +311,6 @@ struct pv_info pv_info = {
struct pv_init_ops pv_init_ops = {
struct pv_init_ops pv_init_ops = {
	.patch = native_patch,
	.patch = native_patch,
	.banner = default_banner,
	.banner = default_banner,
	.arch_setup = paravirt_nop,
};
};


struct pv_time_ops pv_time_ops = {
struct pv_time_ops pv_time_ops = {
+1 −5
Original line number Original line Diff line number Diff line
@@ -108,10 +108,6 @@
#include <asm/numa_64.h>
#include <asm/numa_64.h>
#endif
#endif


#ifndef ARCH_SETUP
#define ARCH_SETUP
#endif

/*
/*
 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
 * end_pfn only includes RAM, while max_pfn_mapped includes all e820 entries.
 * The direct mapping extends to max_pfn_mapped, so that we can directly access
 * The direct mapping extends to max_pfn_mapped, so that we can directly access
@@ -750,7 +746,7 @@ void __init setup_arch(char **cmdline_p)
	}
	}
#endif
#endif


	ARCH_SETUP
	x86_init.oem.arch_setup();


	setup_memory_map();
	setup_memory_map();
	parse_setup_data();
	parse_setup_data();
Loading