diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 18:13:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 18:13:42 -0400 |
commit | 63add2f2072e69c1eb7a5f6ca8f415122da889b9 (patch) | |
tree | 6948de01b65858ae484474d3cbf2c9d7f61b28ca /drivers | |
parent | 3684a601e4273692b6c80b86e55c728aef675660 (diff) | |
parent | 9e3ee1c39c0cc71222f9980ccbf87fe072897eef (diff) |
Merge branch 'cpus4096-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
cpu masks: optimize and clean up cpumask_of_cpu()
cpumask: export cpumask_of_cpu_map
cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu
cpumask: put cpumask_of_cpu_map in the initdata section
cpumask: make cpumask_of_cpu_map generic
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/processor_throttling.c | 11 | ||||
-rw-r--r-- | drivers/firmware/dcdbas.c | 3 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_main.c | 3 |
3 files changed, 5 insertions, 12 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index a2c3f9cfa549..a56fc6c4394b 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -827,7 +827,6 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | |||
827 | static int acpi_processor_get_throttling(struct acpi_processor *pr) | 827 | static int acpi_processor_get_throttling(struct acpi_processor *pr) |
828 | { | 828 | { |
829 | cpumask_t saved_mask; | 829 | cpumask_t saved_mask; |
830 | cpumask_of_cpu_ptr_declare(new_mask); | ||
831 | int ret; | 830 | int ret; |
832 | 831 | ||
833 | if (!pr) | 832 | if (!pr) |
@@ -839,8 +838,7 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) | |||
839 | * Migrate task to the cpu pointed by pr. | 838 | * Migrate task to the cpu pointed by pr. |
840 | */ | 839 | */ |
841 | saved_mask = current->cpus_allowed; | 840 | saved_mask = current->cpus_allowed; |
842 | cpumask_of_cpu_ptr_next(new_mask, pr->id); | 841 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id)); |
843 | set_cpus_allowed_ptr(current, new_mask); | ||
844 | ret = pr->throttling.acpi_processor_get_throttling(pr); | 842 | ret = pr->throttling.acpi_processor_get_throttling(pr); |
845 | /* restore the previous state */ | 843 | /* restore the previous state */ |
846 | set_cpus_allowed_ptr(current, &saved_mask); | 844 | set_cpus_allowed_ptr(current, &saved_mask); |
@@ -989,7 +987,6 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | |||
989 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | 987 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state) |
990 | { | 988 | { |
991 | cpumask_t saved_mask; | 989 | cpumask_t saved_mask; |
992 | cpumask_of_cpu_ptr_declare(new_mask); | ||
993 | int ret = 0; | 990 | int ret = 0; |
994 | unsigned int i; | 991 | unsigned int i; |
995 | struct acpi_processor *match_pr; | 992 | struct acpi_processor *match_pr; |
@@ -1028,8 +1025,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
1028 | * it can be called only for the cpu pointed by pr. | 1025 | * it can be called only for the cpu pointed by pr. |
1029 | */ | 1026 | */ |
1030 | if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) { | 1027 | if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) { |
1031 | cpumask_of_cpu_ptr_next(new_mask, pr->id); | 1028 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(pr->id)); |
1032 | set_cpus_allowed_ptr(current, new_mask); | ||
1033 | ret = p_throttling->acpi_processor_set_throttling(pr, | 1029 | ret = p_throttling->acpi_processor_set_throttling(pr, |
1034 | t_state.target_state); | 1030 | t_state.target_state); |
1035 | } else { | 1031 | } else { |
@@ -1060,8 +1056,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
1060 | continue; | 1056 | continue; |
1061 | } | 1057 | } |
1062 | t_state.cpu = i; | 1058 | t_state.cpu = i; |
1063 | cpumask_of_cpu_ptr_next(new_mask, i); | 1059 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(i)); |
1064 | set_cpus_allowed_ptr(current, new_mask); | ||
1065 | ret = match_pr->throttling. | 1060 | ret = match_pr->throttling. |
1066 | acpi_processor_set_throttling( | 1061 | acpi_processor_set_throttling( |
1067 | match_pr, t_state.target_state); | 1062 | match_pr, t_state.target_state); |
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index c66817e7717b..50a071f1c945 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
@@ -245,7 +245,6 @@ static ssize_t host_control_on_shutdown_store(struct device *dev, | |||
245 | static int smi_request(struct smi_cmd *smi_cmd) | 245 | static int smi_request(struct smi_cmd *smi_cmd) |
246 | { | 246 | { |
247 | cpumask_t old_mask; | 247 | cpumask_t old_mask; |
248 | cpumask_of_cpu_ptr(new_mask, 0); | ||
249 | int ret = 0; | 248 | int ret = 0; |
250 | 249 | ||
251 | if (smi_cmd->magic != SMI_CMD_MAGIC) { | 250 | if (smi_cmd->magic != SMI_CMD_MAGIC) { |
@@ -256,7 +255,7 @@ static int smi_request(struct smi_cmd *smi_cmd) | |||
256 | 255 | ||
257 | /* SMI requires CPU 0 */ | 256 | /* SMI requires CPU 0 */ |
258 | old_mask = current->cpus_allowed; | 257 | old_mask = current->cpus_allowed; |
259 | set_cpus_allowed_ptr(current, new_mask); | 258 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(0)); |
260 | if (smp_processor_id() != 0) { | 259 | if (smp_processor_id() != 0) { |
261 | dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n", | 260 | dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n", |
262 | __func__); | 261 | __func__); |
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c index 579b01ff82d4..c3b4227f48a5 100644 --- a/drivers/misc/sgi-xp/xpc_main.c +++ b/drivers/misc/sgi-xp/xpc_main.c | |||
@@ -229,11 +229,10 @@ xpc_hb_checker(void *ignore) | |||
229 | int last_IRQ_count = 0; | 229 | int last_IRQ_count = 0; |
230 | int new_IRQ_count; | 230 | int new_IRQ_count; |
231 | int force_IRQ = 0; | 231 | int force_IRQ = 0; |
232 | cpumask_of_cpu_ptr(cpumask, XPC_HB_CHECK_CPU); | ||
233 | 232 | ||
234 | /* this thread was marked active by xpc_hb_init() */ | 233 | /* this thread was marked active by xpc_hb_init() */ |
235 | 234 | ||
236 | set_cpus_allowed_ptr(current, cpumask); | 235 | set_cpus_allowed_ptr(current, &cpumask_of_cpu(XPC_HB_CHECK_CPU)); |
237 | 236 | ||
238 | /* set our heartbeating to other partitions into motion */ | 237 | /* set our heartbeating to other partitions into motion */ |
239 | xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); | 238 | xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); |