2005-04-17 06:20:36 +08:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
#include "cpu.h"
|
|
|
|
|
2008-02-21 07:18:34 +08:00
|
|
|
/*
|
|
|
|
* UMC chips appear to be only either 386 or 486,
|
|
|
|
* so no special init takes place.
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
|
x86: delete __cpuinit usage from all x86 files
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.
After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.
Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.
This removes all the arch/x86 uses of the __cpuinit macros from
all C files. x86 only had the one __CPUINIT used in assembly files,
and it wasn't paired off with a .previous or a __FINIT, so we can
delete it directly w/o any corresponding additional change there.
[1] https://lkml.org/lkml/2013/5/20/589
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-06-19 06:23:59 +08:00
|
|
|
static const struct cpu_dev umc_cpu_dev = {
|
2005-04-17 06:20:36 +08:00
|
|
|
.c_vendor = "UMC",
|
2008-02-21 07:18:34 +08:00
|
|
|
.c_ident = { "UMC UMC UMC" },
|
2013-10-21 16:35:20 +08:00
|
|
|
.legacy_models = {
|
|
|
|
{ .family = 4, .model_names =
|
2008-02-21 07:18:34 +08:00
|
|
|
{
|
|
|
|
[1] = "U5D",
|
|
|
|
[2] = "U5S",
|
2005-04-17 06:20:36 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2008-09-05 03:09:45 +08:00
|
|
|
.c_x86_vendor = X86_VENDOR_UMC,
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2008-09-05 03:09:45 +08:00
|
|
|
cpu_dev_register(umc_cpu_dev);
|
x86: use ELF section to list CPU vendor specific code
Replace the hardcoded list of initialization functions for each CPU
vendor by a list in an ELF section, which is read at initialization in
arch/x86/kernel/cpu/cpu.c to fill the cpu_devs[] array. The ELF
section, named .x86cpuvendor.init, is reclaimed after boot, and
contains entries of type "struct cpu_vendor_dev" which associates a
vendor number with a pointer to a "struct cpu_dev" structure.
This first modification allows to remove all the VENDOR_init_cpu()
functions.
This patch also removes the hardcoded calls to early_init_amd() and
early_init_intel(). Instead, we add a "c_early_init" member to the
cpu_dev structure, which is then called if not NULL by the generic CPU
initialization code. Unfortunately, in early_cpu_detect(), this_cpu is
not yet set, so we have to use the cpu_devs[] array directly.
This patch is part of the Linux Tiny project, and is needed for
further patch that will allow to disable compilation of unused CPU
support code.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-02-15 19:00:23 +08:00
|
|
|
|