mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86: Remove x86 prefixed names from x86/cpu/ files
struct cpuinfo_x86 .x86 => .family .x86_vendor => .vendor .x86_model => .model .x86_mask => .stepping No functional change. This work is part of making Xen safe for Intel family 18/19. Signed-off-by: Kevin Lampis <kevin.lampis@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
7f696351ce
commit
39a9a49449
8 files changed
+18
-18
No files matched your search
@@ -41,7 +41,7 @@ static void init_c3(struct cpuinfo_x86 *c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->x86 == 0x6 && c->x86_model >= 0xf) {
|
if (c->family == 0x6 && c->model >= 0xf) {
|
||||||
c->x86_cache_alignment = c->x86_clflush_size * 2;
|
c->x86_cache_alignment = c->x86_clflush_size * 2;
|
||||||
__set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
|
__set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ static void init_c3(struct cpuinfo_x86 *c)
|
|||||||
|
|
||||||
static void cf_check init_centaur(struct cpuinfo_x86 *c)
|
static void cf_check init_centaur(struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
if (c->x86 == 6)
|
if (c->family == 6)
|
||||||
init_c3(c);
|
init_c3(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,12 +41,12 @@ static void cf_check init_hygon(struct cpuinfo_x86 *c)
|
|||||||
|
|
||||||
/* Probe for NSCB on Zen2 CPUs when not virtualised */
|
/* Probe for NSCB on Zen2 CPUs when not virtualised */
|
||||||
if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
|
if (!cpu_has_hypervisor && !cpu_has_nscb && c == &boot_cpu_data &&
|
||||||
c->x86 == 0x18)
|
c->family == 0x18)
|
||||||
detect_zen2_null_seg_behaviour();
|
detect_zen2_null_seg_behaviour();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO: Check heuristic safety with Hygon first
|
* TODO: Check heuristic safety with Hygon first
|
||||||
if (c->x86 == 0x18)
|
if (c->family == 0x18)
|
||||||
amd_init_spectral_chicken();
|
amd_init_spectral_chicken();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -168,15 +168,15 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
|
|||||||
* Don't use cpuid2 if cpuid4 is supported. For P4, we use cpuid2 for
|
* Don't use cpuid2 if cpuid4 is supported. For P4, we use cpuid2 for
|
||||||
* trace cache
|
* trace cache
|
||||||
*/
|
*/
|
||||||
if ((num_cache_leaves == 0 || c->x86 == 15) && c->cpuid_level > 1 &&
|
if ((num_cache_leaves == 0 || c->family == 15) && c->cpuid_level > 1 &&
|
||||||
c->x86_vendor != X86_VENDOR_SHANGHAI)
|
c->vendor != X86_VENDOR_SHANGHAI)
|
||||||
{
|
{
|
||||||
/* supports eax=2 call */
|
/* supports eax=2 call */
|
||||||
unsigned int i, j, n, regs[4];
|
unsigned int i, j, n, regs[4];
|
||||||
unsigned char *dp = (unsigned char *)regs;
|
unsigned char *dp = (unsigned char *)regs;
|
||||||
int only_trace = 0;
|
int only_trace = 0;
|
||||||
|
|
||||||
if (num_cache_leaves != 0 && c->x86 == 15)
|
if (num_cache_leaves != 0 && c->family == 15)
|
||||||
only_trace = 1;
|
only_trace = 1;
|
||||||
|
|
||||||
/* Number of times to iterate */
|
/* Number of times to iterate */
|
||||||
|
|||||||
@@ -218,8 +218,8 @@ static void __init print_mtrr_state(const char *level)
|
|||||||
printk("%s %u disabled\n", level, i);
|
printk("%s %u disabled\n", level, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
|
if (boot_cpu_data.vendor == X86_VENDOR_AMD ||
|
||||||
boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
|
boot_cpu_data.vendor == X86_VENDOR_HYGON) {
|
||||||
uint64_t syscfg, tom2;
|
uint64_t syscfg, tom2;
|
||||||
|
|
||||||
rdmsrl(MSR_K8_SYSCFG, syscfg);
|
rdmsrl(MSR_K8_SYSCFG, syscfg);
|
||||||
|
|||||||
@@ -1637,7 +1637,7 @@ static int __init mwait_idle_probe(void)
|
|||||||
lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
|
lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE;
|
||||||
|
|
||||||
pr_debug(PREFIX "v" MWAIT_IDLE_VERSION " model %#x\n",
|
pr_debug(PREFIX "v" MWAIT_IDLE_VERSION " model %#x\n",
|
||||||
boot_cpu_data.x86_model);
|
boot_cpu_data.model);
|
||||||
|
|
||||||
pr_debug(PREFIX "lapic_timer_reliable_states %#x\n",
|
pr_debug(PREFIX "lapic_timer_reliable_states %#x\n",
|
||||||
lapic_timer_reliable_states);
|
lapic_timer_reliable_states);
|
||||||
@@ -1816,7 +1816,7 @@ bool __init mwait_pc10_supported(void)
|
|||||||
{
|
{
|
||||||
unsigned int ecx, edx, dummy;
|
unsigned int ecx, edx, dummy;
|
||||||
|
|
||||||
if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ||
|
if (boot_cpu_data.vendor != X86_VENDOR_INTEL ||
|
||||||
!cpu_has_monitor ||
|
!cpu_has_monitor ||
|
||||||
boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
|
boot_cpu_data.cpuid_level < CPUID_MWAIT_LEAF)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ int vpmu_load(struct vcpu *v, bool from_guest)
|
|||||||
static int vpmu_arch_initialise(struct vcpu *v)
|
static int vpmu_arch_initialise(struct vcpu *v)
|
||||||
{
|
{
|
||||||
struct vpmu_struct *vpmu = vcpu_vpmu(v);
|
struct vpmu_struct *vpmu = vcpu_vpmu(v);
|
||||||
uint8_t vendor = current_cpu_data.x86_vendor;
|
unsigned int vendor = current_cpu_data.vendor;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
BUILD_BUG_ON(sizeof(struct xen_pmu_intel_ctxt) > XENPMU_CTXT_PAD_SZ);
|
BUILD_BUG_ON(sizeof(struct xen_pmu_intel_ctxt) > XENPMU_CTXT_PAD_SZ);
|
||||||
@@ -815,7 +815,7 @@ static struct notifier_block cpu_nfb = {
|
|||||||
|
|
||||||
static int __init cf_check vpmu_init(void)
|
static int __init cf_check vpmu_init(void)
|
||||||
{
|
{
|
||||||
int vendor = current_cpu_data.x86_vendor;
|
unsigned int vendor = current_cpu_data.vendor;
|
||||||
const struct arch_vpmu_ops *ops = NULL;
|
const struct arch_vpmu_ops *ops = NULL;
|
||||||
|
|
||||||
if ( !opt_vpmu_enabled )
|
if ( !opt_vpmu_enabled )
|
||||||
|
|||||||
@@ -532,7 +532,7 @@ static const struct arch_vpmu_ops *__init common_init(void)
|
|||||||
if ( !num_counters )
|
if ( !num_counters )
|
||||||
{
|
{
|
||||||
printk(XENLOG_WARNING "VPMU: Unsupported CPU family %#x\n",
|
printk(XENLOG_WARNING "VPMU: Unsupported CPU family %#x\n",
|
||||||
current_cpu_data.x86);
|
current_cpu_data.family);
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ static const struct arch_vpmu_ops *__init common_init(void)
|
|||||||
|
|
||||||
const struct arch_vpmu_ops *__init amd_vpmu_init(void)
|
const struct arch_vpmu_ops *__init amd_vpmu_init(void)
|
||||||
{
|
{
|
||||||
switch ( current_cpu_data.x86 )
|
switch ( current_cpu_data.family )
|
||||||
{
|
{
|
||||||
case 0x15:
|
case 0x15:
|
||||||
case 0x17:
|
case 0x17:
|
||||||
@@ -585,7 +585,7 @@ const struct arch_vpmu_ops *__init amd_vpmu_init(void)
|
|||||||
|
|
||||||
const struct arch_vpmu_ops *__init hygon_vpmu_init(void)
|
const struct arch_vpmu_ops *__init hygon_vpmu_init(void)
|
||||||
{
|
{
|
||||||
switch ( current_cpu_data.x86 )
|
switch ( current_cpu_data.family )
|
||||||
{
|
{
|
||||||
case 0x18:
|
case 0x18:
|
||||||
num_counters = F15H_NUM_COUNTERS;
|
num_counters = F15H_NUM_COUNTERS;
|
||||||
|
|||||||
@@ -917,7 +917,7 @@ const struct arch_vpmu_ops *__init core2_vpmu_init(void)
|
|||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( current_cpu_data.x86 != 6 )
|
if ( current_cpu_data.family != 6 )
|
||||||
{
|
{
|
||||||
printk(XENLOG_WARNING "VPMU: only family 6 is supported\n");
|
printk(XENLOG_WARNING "VPMU: only family 6 is supported\n");
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
@@ -958,7 +958,7 @@ const struct arch_vpmu_ops *__init core2_vpmu_init(void)
|
|||||||
sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt;
|
sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt;
|
||||||
|
|
||||||
/* TODO: It's clearly incorrect for this to quirk all Intel Fam6 CPUs. */
|
/* TODO: It's clearly incorrect for this to quirk all Intel Fam6 CPUs. */
|
||||||
pmc_quirk = current_cpu_data.x86 == 6;
|
pmc_quirk = current_cpu_data.family == 6;
|
||||||
|
|
||||||
if ( sizeof(struct xen_pmu_data) + sizeof(uint64_t) * fixed_pmc_cnt +
|
if ( sizeof(struct xen_pmu_data) + sizeof(uint64_t) * fixed_pmc_cnt +
|
||||||
sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt > PAGE_SIZE )
|
sizeof(struct xen_pmu_cntr_pair) * arch_pmc_cnt > PAGE_SIZE )
|
||||||
|
|||||||