Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129957
b: refs/heads/master
c: 7285908
h: refs/heads/master
i:
  129955: 5b02744
v: v3
  • Loading branch information
Mike Travis authored and Ingo Molnar committed Jan 19, 2009
1 parent fd25616 commit 77ba263
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ccad40df8d314f786fdb06bdbedd4f43f3257cd
refs/heads/master: 72859081851af2bda04117ca3d64206ffa199e5e
22 changes: 9 additions & 13 deletions trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ struct drv_cmd {
u32 val;
};

static void do_drv_read(struct drv_cmd *cmd)
static long do_drv_read(void *_cmd)
{
struct drv_cmd *cmd = _cmd;
u32 h;

switch (cmd->type) {
Expand All @@ -166,10 +167,12 @@ static void do_drv_read(struct drv_cmd *cmd)
default:
break;
}
return 0;
}

static void do_drv_write(struct drv_cmd *cmd)
static long do_drv_write(void *_cmd)
{
struct drv_cmd *cmd = _cmd;
u32 lo, hi;

switch (cmd->type) {
Expand All @@ -186,30 +189,23 @@ static void do_drv_write(struct drv_cmd *cmd)
default:
break;
}
return 0;
}

static void drv_read(struct drv_cmd *cmd)
{
cpumask_t saved_mask = current->cpus_allowed;
cmd->val = 0;

set_cpus_allowed_ptr(current, cmd->mask);
do_drv_read(cmd);
set_cpus_allowed_ptr(current, &saved_mask);
work_on_cpu(cpumask_any(cmd->mask), do_drv_read, cmd);
}

static void drv_write(struct drv_cmd *cmd)
{
cpumask_t saved_mask = current->cpus_allowed;
unsigned int i;

for_each_cpu(i, cmd->mask) {
set_cpus_allowed_ptr(current, cpumask_of(i));
do_drv_write(cmd);
work_on_cpu(i, do_drv_write, cmd);
}

set_cpus_allowed_ptr(current, &saved_mask);
return;
}

static u32 get_cur_val(const struct cpumask *mask)
Expand Down Expand Up @@ -366,7 +362,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
return freq;
}

static unsigned int check_freqs(const cpumask_t *mask, unsigned int freq,
static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq,
struct acpi_cpufreq_data *data)
{
unsigned int cur_freq;
Expand Down

0 comments on commit 77ba263

Please sign in to comment.