diff options
Diffstat (limited to 'arch/x86/kernel/cpu')
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 7 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | 11 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longhaul.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longhaul.h | 26 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longrun.c | 6 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 7 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 8 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/hypervisor.c | 3 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 1 | 
10 files changed, 39 insertions, 44 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 1d3cddaa40e..246cd3afbb5 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -34,7 +34,6 @@  #include <linux/compiler.h>  #include <linux/dmi.h>  #include <linux/slab.h> -#include <trace/events/power.h>  #include <linux/acpi.h>  #include <linux/io.h> @@ -324,8 +323,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,  		}  	} -	trace_power_frequency(POWER_PSTATE, data->freq_table[next_state].frequency); -  	switch (data->cpu_feature) {  	case SYSTEM_INTEL_MSR_CAPABLE:  		cmd.type = SYSTEM_INTEL_MSR_CAPABLE; @@ -351,7 +348,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,  	freqs.old = perf->states[perf->state].core_frequency * 1000;  	freqs.new = data->freq_table[next_state].frequency; -	for_each_cpu(i, cmd.mask) { +	for_each_cpu(i, policy->cpus) {  		freqs.cpu = i;  		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);  	} @@ -367,7 +364,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,  		}  	} -	for_each_cpu(i, cmd.mask) { +	for_each_cpu(i, policy->cpus) {  		freqs.cpu = i;  		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);  	} diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index 16e3483be9e..32974cf8423 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c @@ -169,12 +169,9 @@ static int gx_freq_mult[16] = {   *	Low Level chipset interface				*   ****************************************************************/  static struct pci_device_id gx_chipset_tbl[] __initdata = { -	{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, -		PCI_ANY_ID, PCI_ANY_ID }, -	{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, -		PCI_ANY_ID, PCI_ANY_ID }, -	{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510, -		PCI_ANY_ID, PCI_ANY_ID }, +	{ PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY), }, +	{ PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5520), }, +	{ PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5510), },  	{ 0, },  }; @@ -199,7 +196,7 @@ static __init struct pci_dev *gx_detect_chipset(void)  	}  	/* detect which companion chip is used */ -	while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { +	for_each_pci_dev(gx_pci) {  		if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL)  			return gx_pci;  	} diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index 7e7eea4f826..03162dac627 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c @@ -426,7 +426,7 @@ static int guess_fsb(int mult)  } -static int __init longhaul_get_ranges(void) +static int __cpuinit longhaul_get_ranges(void)  {  	unsigned int i, j, k = 0;  	unsigned int ratio; @@ -530,7 +530,7 @@ static int __init longhaul_get_ranges(void)  } -static void __init longhaul_setup_voltagescaling(void) +static void __cpuinit longhaul_setup_voltagescaling(void)  {  	union msr_longhaul longhaul;  	struct mV_pos minvid, maxvid, vid; @@ -784,7 +784,7 @@ static int longhaul_setup_southbridge(void)  	return 0;  } -static int __init longhaul_cpu_init(struct cpufreq_policy *policy) +static int __cpuinit longhaul_cpu_init(struct cpufreq_policy *policy)  {  	struct cpuinfo_x86 *c = &cpu_data(0);  	char *cpuname = NULL; diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.h b/arch/x86/kernel/cpu/cpufreq/longhaul.h index e2360a469f7..cbf48fbca88 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.h +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.h @@ -56,7 +56,7 @@ union msr_longhaul {  /*   * VIA C3 Samuel 1  & Samuel 2 (stepping 0)   */ -static const int __initdata samuel1_mults[16] = { +static const int __cpuinitdata samuel1_mults[16] = {  	-1, /* 0000 -> RESERVED */  	30, /* 0001 ->  3.0x */  	40, /* 0010 ->  4.0x */ @@ -75,7 +75,7 @@ static const int __initdata samuel1_mults[16] = {  	-1, /* 1111 -> RESERVED */  }; -static const int __initdata samuel1_eblcr[16] = { +static const int __cpuinitdata samuel1_eblcr[16] = {  	50, /* 0000 -> RESERVED */  	30, /* 0001 ->  3.0x */  	40, /* 0010 ->  4.0x */ @@ -97,7 +97,7 @@ static const int __initdata samuel1_eblcr[16] = {  /*   * VIA C3 Samuel2 Stepping 1->15   */ -static const int __initdata samuel2_eblcr[16] = { +static const int __cpuinitdata samuel2_eblcr[16] = {  	50,  /* 0000 ->  5.0x */  	30,  /* 0001 ->  3.0x */  	40,  /* 0010 ->  4.0x */ @@ -119,7 +119,7 @@ static const int __initdata samuel2_eblcr[16] = {  /*   * VIA C3 Ezra   */ -static const int __initdata ezra_mults[16] = { +static const int __cpuinitdata ezra_mults[16] = {  	100, /* 0000 -> 10.0x */  	30,  /* 0001 ->  3.0x */  	40,  /* 0010 ->  4.0x */ @@ -138,7 +138,7 @@ static const int __initdata ezra_mults[16] = {  	120, /* 1111 -> 12.0x */  }; -static const int __initdata ezra_eblcr[16] = { +static const int __cpuinitdata ezra_eblcr[16] = {  	50,  /* 0000 ->  5.0x */  	30,  /* 0001 ->  3.0x */  	40,  /* 0010 ->  4.0x */ @@ -160,7 +160,7 @@ static const int __initdata ezra_eblcr[16] = {  /*   * VIA C3 (Ezra-T) [C5M].   */ -static const int __initdata ezrat_mults[32] = { +static const int __cpuinitdata ezrat_mults[32] = {  	100, /* 0000 -> 10.0x */  	30,  /* 0001 ->  3.0x */  	40,  /* 0010 ->  4.0x */ @@ -196,7 +196,7 @@ static const int __initdata ezrat_mults[32] = {  	-1,  /* 1111 -> RESERVED (12.0x) */  }; -static const int __initdata ezrat_eblcr[32] = { +static const int __cpuinitdata ezrat_eblcr[32] = {  	50,  /* 0000 ->  5.0x */  	30,  /* 0001 ->  3.0x */  	40,  /* 0010 ->  4.0x */ @@ -235,7 +235,7 @@ static const int __initdata ezrat_eblcr[32] = {  /*   * VIA C3 Nehemiah */ -static const int __initdata  nehemiah_mults[32] = { +static const int __cpuinitdata nehemiah_mults[32] = {  	100, /* 0000 -> 10.0x */  	-1, /* 0001 -> 16.0x */  	40,  /* 0010 ->  4.0x */ @@ -270,7 +270,7 @@ static const int __initdata  nehemiah_mults[32] = {  	-1, /* 1111 -> 12.0x */  }; -static const int __initdata nehemiah_eblcr[32] = { +static const int __cpuinitdata nehemiah_eblcr[32] = {  	50,  /* 0000 ->  5.0x */  	160, /* 0001 -> 16.0x */  	40,  /* 0010 ->  4.0x */ @@ -315,7 +315,7 @@ struct mV_pos {  	unsigned short pos;  }; -static const struct mV_pos __initdata vrm85_mV[32] = { +static const struct mV_pos __cpuinitdata vrm85_mV[32] = {  	{1250, 8},	{1200, 6},	{1150, 4},	{1100, 2},  	{1050, 0},	{1800, 30},	{1750, 28},	{1700, 26},  	{1650, 24},	{1600, 22},	{1550, 20},	{1500, 18}, @@ -326,14 +326,14 @@ static const struct mV_pos __initdata vrm85_mV[32] = {  	{1475, 17},	{1425, 15},	{1375, 13},	{1325, 11}  }; -static const unsigned char __initdata mV_vrm85[32] = { +static const unsigned char __cpuinitdata mV_vrm85[32] = {  	0x04,	0x14,	0x03,	0x13,	0x02,	0x12,	0x01,	0x11,  	0x00,	0x10,	0x0f,	0x1f,	0x0e,	0x1e,	0x0d,	0x1d,  	0x0c,	0x1c,	0x0b,	0x1b,	0x0a,	0x1a,	0x09,	0x19,  	0x08,	0x18,	0x07,	0x17,	0x06,	0x16,	0x05,	0x15  }; -static const struct mV_pos __initdata mobilevrm_mV[32] = { +static const struct mV_pos __cpuinitdata mobilevrm_mV[32] = {  	{1750, 31},	{1700, 30},	{1650, 29},	{1600, 28},  	{1550, 27},	{1500, 26},	{1450, 25},	{1400, 24},  	{1350, 23},	{1300, 22},	{1250, 21},	{1200, 20}, @@ -344,7 +344,7 @@ static const struct mV_pos __initdata mobilevrm_mV[32] = {  	{675, 3},	{650, 2},	{625, 1},	{600, 0}  }; -static const unsigned char __initdata mV_mobilevrm[32] = { +static const unsigned char __cpuinitdata mV_mobilevrm[32] = {  	0x1f,	0x1e,	0x1d,	0x1c,	0x1b,	0x1a,	0x19,	0x18,  	0x17,	0x16,	0x15,	0x14,	0x13,	0x12,	0x11,	0x10,  	0x0f,	0x0e,	0x0d,	0x0c,	0x0b,	0x0a,	0x09,	0x08, diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index e7b559d74c5..fc09f142d94 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c @@ -165,8 +165,8 @@ static unsigned int longrun_get(unsigned int cpu)   * TMTA rules:   * performance_pctg = (target_freq - low_freq)/(high_freq - low_freq)   */ -static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, -						   unsigned int *high_freq) +static unsigned int __cpuinit longrun_determine_freqs(unsigned int *low_freq, +						      unsigned int *high_freq)  {  	u32 msr_lo, msr_hi;  	u32 save_lo, save_hi; @@ -258,7 +258,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,  } -static int __init longrun_cpu_init(struct cpufreq_policy *policy) +static int __cpuinit longrun_cpu_init(struct cpufreq_policy *policy)  {  	int result = 0; diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 7b8a8ba67b0..bd1cac747f6 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c @@ -178,13 +178,8 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c)  		}  	} -	if (c->x86 != 0xF) { -		if (!cpu_has(c, X86_FEATURE_EST)) -			printk(KERN_WARNING PFX "Unknown CPU. " -				"Please send an e-mail to " -				"<cpufreq@vger.kernel.org>\n"); +	if (c->x86 != 0xF)  		return 0; -	}  	/* on P-4s, the TSC runs with constant frequency independent whether  	 * throttling is active or not. */ diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index 9a97116f89e..4a45fd6e41b 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c @@ -569,7 +569,7 @@ static int powernow_verify(struct cpufreq_policy *policy)   * We will then get the same kind of behaviour already tested under   * the "well-known" other OS.   */ -static int __init fixup_sgtc(void) +static int __cpuinit fixup_sgtc(void)  {  	unsigned int sgtc;  	unsigned int m; @@ -603,7 +603,7 @@ static unsigned int powernow_get(unsigned int cpu)  } -static int __init acer_cpufreq_pst(const struct dmi_system_id *d) +static int __cpuinit acer_cpufreq_pst(const struct dmi_system_id *d)  {  	printk(KERN_WARNING PFX  		"%s laptop with broken PST tables in BIOS detected.\n", @@ -621,7 +621,7 @@ static int __init acer_cpufreq_pst(const struct dmi_system_id *d)   * A BIOS update is all that can save them.   * Mention this, and disable cpufreq.   */ -static struct dmi_system_id __initdata powernow_dmi_table[] = { +static struct dmi_system_id __cpuinitdata powernow_dmi_table[] = {  	{  		.callback = acer_cpufreq_pst,  		.ident = "Acer Aspire", @@ -633,7 +633,7 @@ static struct dmi_system_id __initdata powernow_dmi_table[] = {  	{ }  }; -static int __init powernow_cpu_init(struct cpufreq_policy *policy) +static int __cpuinit powernow_cpu_init(struct cpufreq_policy *policy)  {  	union msr_fidvidstatus fidvidstatus;  	int result; diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 3e90cce3dc8..491977baf6c 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c @@ -9,7 +9,7 @@   *  Based on the powernow-k7.c module written by Dave Jones.   *  (C) 2003 Dave Jones on behalf of SuSE Labs   *  (C) 2004 Dominik Brodowski <linux@brodo.de> - *  (C) 2004 Pavel Machek <pavel@suse.cz> + *  (C) 2004 Pavel Machek <pavel@ucw.cz>   *  Licensed under the terms of the GNU GPL License version 2.   *  Based upon datasheets & sample CPUs kindly provided by AMD.   * @@ -806,6 +806,8 @@ static int find_psb_table(struct powernow_k8_data *data)  	 * www.amd.com  	 */  	printk(KERN_ERR FW_BUG PFX "No PSB or ACPI _PSS objects\n"); +	printk(KERN_ERR PFX "Make sure that your BIOS is up to date" +		" and Cool'N'Quiet support is enabled in BIOS setup\n");  	return -ENODEV;  } @@ -910,8 +912,8 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data,  {  	int i;  	u32 hi = 0, lo = 0; -	rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo); -	data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT; +	rdmsr(MSR_PSTATE_CUR_LIMIT, lo, hi); +	data->max_hw_pstate = (lo & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;  	for (i = 0; i < data->acpi_data.state_count; i++) {  		u32 index; diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c index dd531cc56a8..8095f8611f8 100644 --- a/arch/x86/kernel/cpu/hypervisor.c +++ b/arch/x86/kernel/cpu/hypervisor.c @@ -34,6 +34,9 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] =  {  	&x86_hyper_vmware,  	&x86_hyper_ms_hyperv, +#ifdef CONFIG_XEN_PVHVM +	&x86_hyper_xen_hvm, +#endif  };  const struct hypervisor_x86 *x86_hyper; diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 18cc4256225..1970ef911c9 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -600,6 +600,7 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)  		 */  		if (!(flags & MCP_DONTLOG) && !mce_dont_log_ce) {  			mce_log(&m); +			atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, &m);  			add_taint(TAINT_MACHINE_CHECK);  		}  |