linux-next: manual merge of the rr tree with the cpufreq-currenttree

From: Stephen Rothwell
Date: Fri Jun 12 2009 - 00:22:09 EST


Hi Rusty,

Today's linux-next merge of the rr tree got a conflict in
arch/x86/kernel/cpu/cpufreq/powernow-k8.c between commits
ec50b17b706931fb5d2854893cfa4b3f96f19276 ("[CPUFREQ] reduce scope of
ACPI_PSS_BIOS_BUG_MSG[]") and 97f1bb65966b4276581988755238a1b326fce475
("[CPUFREQ] powernow-k8: get drv data for correct CPU") from the
cpufreq-current tree and commit fd9641cb9b0cd9296a83242164d53517351b6aaa
("cpumask: avoid playing with cpus_allowed in powernow-k8.c") from the rr
tree.

Just context changes. I fixed it up (see below) and can carry the fix as
necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 20c7b99,0e1f6c4..0000000
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@@ -1247,14 -1224,41 +1236,40 @@@ static int powernowk8_verify(struct cpu
return cpufreq_frequency_table_verify(pol, data->powernow_table);
}

+ struct init_on_cpu {
+ struct powernow_k8_data *data;
+ int rc;
+ };
+
+ static void __cpuinit powernowk8_cpu_init_on_cpu(void *_init_on_cpu)
+ {
+ struct init_on_cpu *init_on_cpu = _init_on_cpu;
+
+ if (pending_bit_stuck()) {
+ printk(KERN_ERR PFX "failing init, change pending bit set\n");
+ init_on_cpu->rc = -ENODEV;
+ return;
+ }
+
+ if (query_current_values_with_pending_wait(init_on_cpu->data)) {
+ init_on_cpu->rc = -ENODEV;
+ return;
+ }
+
+ if (cpu_family == CPU_OPTERON)
+ fidvid_msr_init();
+
+ init_on_cpu->rc = 0;
+ }
+
/* per CPU init entry point to the driver */
static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
{
+ static const char ACPI_PSS_BIOS_BUG_MSG[] =
+ KERN_ERR FW_BUG PFX "No compatible ACPI _PSS objects found.\n"
+ KERN_ERR FW_BUG PFX "Try again with latest BIOS.\n";
struct powernow_k8_data *data;
- cpumask_t oldmask;
+ struct init_on_cpu init_on_cpu;
int rc;

if (!cpu_online(pol->cpu))
@@@ -1383,11 -1372,23 +1383,21 @@@ static int __devexit powernowk8_cpu_exi
return 0;
}

+ static void query_values_on_cpu(void *_err)
+ {
+ int *err = _err;
+ struct powernow_k8_data *data = __get_cpu_var(powernow_data);
+
+ *err = query_current_values_with_pending_wait(data);
+ }
+
static unsigned int powernowk8_get(unsigned int cpu)
{
- struct powernow_k8_data *data;
+ struct powernow_k8_data *data = per_cpu(powernow_data, cpu);
- cpumask_t oldmask = current->cpus_allowed;
unsigned int khz = 0;
+ unsigned int first;
+ int err;
+
- first = cpumask_first(cpu_core_mask(cpu));
- data = per_cpu(powernow_data, first);

if (!data)
return -EINVAL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/