cpus4096 updates
Subsystems (4)
Linus,
Please pull the latest cpus4096-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git cpus4096-for-linus
Some more cpumask conversion bits: the PCI portion has been seen (and acked) by Jesse, the cpufreq bits have been seen (and acked) by DaveJ.
Thanks,
Ingo
------------------>
Ingo Molnar (1):
[IA64] fix typo in cpumask_of_pcibus()
Mike Travis (9):
ia64: cpumask fix for is_affinity_mask_valid()
cpumask: update local_cpus_show to use new cpumask API
cpumask: update pci_bus_show_cpuaffinity to use new cpumask API
x86: cleanup remaining cpumask_t ops in smpboot code
cpumask: use work_on_cpu in acpi/cstate.c
cpumask: use cpumask_var_t in acpi-cpufreq.c
cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write
cpumask: use work_on_cpu in acpi-cpufreq.c for read_measured_perf_ctrs
x86: fix x86_32 builds for summit and es7000 arch's
Rusty Russell (2):
cpumask: replace CPUMASK_ALLOC etc with cpumask_var_t
cpumask: convert struct cpufreq_policy to cpumask_var_t
arch/ia64/include/asm/irq.h | 2 +- arch/ia64/include/asm/topology.h | 2 +- arch/ia64/kernel/irq.c | 15 +- arch/x86/include/asm/es7000/apic.h | 2 + arch/x86/include/asm/smp.h | 32 ++++- arch/x86/include/asm/summit/apic.h | 1 + arch/x86/kernel/acpi/cstate.c | 70 +++++---- arch/x86/kernel/cpu/common.c | 26 +++- arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 170 +++++++++++----------- arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 8 +- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 6 +- arch/x86/kernel/cpu/cpufreq/powernow-k8.h | 2 +- arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 35 ++--- arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | 18 +- arch/x86/kernel/setup_percpu.c | 25 +++- arch/x86/kernel/smp.c | 17 ++- arch/x86/kernel/smpboot.c | 128 ++++++++-------- drivers/cpufreq/cpufreq.c | 42 ++++-- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 4 +- drivers/pci/pci-sysfs.c | 12 +- drivers/pci/probe.c | 8 +- include/linux/cpufreq.h | 4 +- 23 files changed, 363 insertions(+), 268 deletions(-)
arch/ia64/include/asm/irq.h +1 -1
@@ -27,7 +27,7 @@ irq_canonicalize (int irq) }extern void set_irq_affinity_info (unsigned int irq,int dest,int redir); -bool is_affinity_mask_valid (cpumask_var_t cpumask); +bool is_affinity_mask_valid (const struct cpumask *cpumask);#define is_affinity_mask_valid is_affinity_mask_valid
arch/ia64/include/asm/topology.h +1 -1
@@ -124,7 +124,7 @@ extern void arch_fix_phys_package_id(int num, u32 slot);#define cpumask_of_pcibus (bus) (pcibus_to_node(bus) == -1 ? \ cpu_all_mask : \ - cpumask_from_node(pcibus_to_node(bus))) + cpumask_of_node(pcibus_to_node(bus)))#include <asm-generic/topology.h>
arch/ia64/kernel/irq.c +6 -9
@@ -102,17 +102,14 @@ static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 };void set_irq_affinity_info (unsigned int irq,int hwid,int redir) { -cpumask_t mask =CPU_MASK_NONE ; - -cpu_set (cpu_logical_id (hwid), mask); -if (irq <NR_IRQS ) { - irq_desc[irq].affinity = mask; +cpumask_copy (&irq_desc[irq].affinity, +cpumask_of (cpu_logical_id (hwid))); irq_redir[irq] = (char ) (redir &0xff ); } } -bool is_affinity_mask_valid (cpumask_var_t cpumask) +bool is_affinity_mask_valid (const struct cpumask *cpumask) {if (ia64_platform_is ("sn2" )) {/* Only allow one CPU to be specified in the smp_affinity mask */
@@ -128,7 +125,7 @@ bool is_affinity_mask_valid(cpumask_var_t cpumask)unsigned int vectors_in_migration[NR_IRQS ];/* -* Since cpu_online_map is already updated, we just need to check for +* Since cpu_online_mask is already updated, we just need to check for * affinity that has zeros */ static void migrate_irqs (void )
@@ -158,7 +155,7 @@ static void migrate_irqs(void)*/ vectors_in_migration[irq] = irq; - new_cpu =any_online_cpu (cpu_online_map); + new_cpu =cpumask_any (cpu_online_mask);/* * Al three are essential, currently WARN_ON.. maybe panic?
@@ -191,7 +188,7 @@ void fixup_irqs(void)* Find a new timesync master */ if (smp_processor_id () == time_keeper_id) { - time_keeper_id =first_cpu (cpu_online_map); + time_keeper_id =cpumask_first (cpu_online_mask);printk ("CPU %d is now promoted to time-keeper master\n" , time_keeper_id); }
arch/x86/include/asm/es7000/apic.h +2 -0
@@ -1,6 +1,8 @@#ifndef __ASM_ES7000_APIC_H#define __ASM_ES7000_APIC_H +#include <linux/gfp.h> +#define xapic_phys_to_log_apicid (cpu) per_cpu(x86_bios_cpu_apicid, cpu)#define esr_disable (1)
arch/x86/include/asm/smp.h +29 -3
@@ -18,9 +18,26 @@#include <asm/pda.h> #include <asm/thread_info.h> +#ifdef CONFIG_X86_64 + +extern cpumask_var_t cpu_callin_mask; +extern cpumask_var_t cpu_callout_mask; +extern cpumask_var_t cpu_initialized_mask; +extern cpumask_var_t cpu_sibling_setup_mask; + +#else /* CONFIG_X86_32 */ + +extern cpumask_t cpu_callin_map;extern cpumask_t cpu_callout_map;extern cpumask_t cpu_initialized; -extern cpumask_t cpu_callin_map; +extern cpumask_t cpu_sibling_setup_map; + +#define cpu_callin_mask ((struct cpumask *)&cpu_callin_map) +#define cpu_callout_mask ((struct cpumask *)&cpu_callout_map) +#define cpu_initialized_mask ((struct cpumask *)&cpu_initialized) +#define cpu_sibling_setup_mask ((struct cpumask *)&cpu_sibling_setup_map) + +#endif /* CONFIG_X86_32 */ extern void (*mtrr_hook)(void );extern void zap_low_mappings (void );
@@ -29,7 +46,6 @@ extern int __cpuinit get_local_pda(int cpu);extern int smp_num_siblings;extern unsigned int num_processors; -extern cpumask_t cpu_initialized;DECLARE_PER_CPU (cpumask_t, cpu_sibling_map);DECLARE_PER_CPU (cpumask_t, cpu_core_map);
@@ -38,6 +54,16 @@ DECLARE_PER_CPU(u16, cpu_llc_id);DECLARE_PER_CPU (int, cpu_number);#endif +static inline struct cpumask *cpu_sibling_mask (int cpu) +{ +return &per_cpu (cpu_sibling_map, cpu); +} + +static inline struct cpumask *cpu_core_mask (int cpu) +{ +return &per_cpu (cpu_core_map, cpu); +} +DECLARE_EARLY_PER_CPU (u16, x86_cpu_to_apicid);DECLARE_EARLY_PER_CPU (u16, x86_bios_cpu_apicid);
@@ -149,7 +175,7 @@ void smp_store_cpu_info(int id);/* We don't mark CPUs online until __cpu_up(), so we need another measure */ static inline int num_booting_cpus (void ) { -return cpus_weight (cpu_callout_map); +return cpumask_weight (cpu_callout_mask); }#else static inline void prefill_possible_map (void )
arch/x86/include/asm/summit/apic.h +1 -0
@@ -2,6 +2,7 @@#define __ASM_SUMMIT_APIC_H#include <asm/smp.h> +#include <linux/gfp.h> #define esr_disable (1)#define NO_BALANCE_IRQ (0)
arch/x86/kernel/acpi/cstate.c +37 -33
93 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +22 -4
@@ -40,6 +40,26 @@#include "cpu.h" +#ifdef CONFIG_X86_64 + +/* all of these masks are initialized in setup_cpu_local_masks() */ +cpumask_var_t cpu_callin_mask; +cpumask_var_t cpu_callout_mask; +cpumask_var_t cpu_initialized_mask; + +/* representing cpus for which sibling maps can be computed */ +cpumask_var_t cpu_sibling_setup_mask; + +#else /* CONFIG_X86_32 */ + +cpumask_t cpu_callin_map; +cpumask_t cpu_callout_map; +cpumask_t cpu_initialized; +cpumask_t cpu_sibling_setup_map; + +#endif /* CONFIG_X86_32 */ + +static struct cpu_dev *this_cpu__cpuinitdata ;#ifdef CONFIG_X86_64
@@ -856,8 +876,6 @@ static __init int setup_disablecpuid(char *arg) }__setup ("clearcpuid=" , setup_disablecpuid); -cpumask_t cpu_initialized__cpuinitdata =CPU_MASK_NONE ; -#ifdef CONFIG_X86_64 struct x8664_pda **_cpu_pda__read_mostly ;EXPORT_SYMBOL (_cpu_pda);
@@ -976,7 +994,7 @@ void __cpuinit cpu_init(void) me = current; -if (cpu_test_and_set (cpu, cpu_initialized)) +if (cpumask_test_and_set_cpu (cpu, cpu_initialized_mask))panic ("CPU#%d already initialized!\n" , cpu);printk (KERN_INFO "Initializing CPU#%d\n" , cpu);
@@ -1085,7 +1103,7 @@ void __cpuinit cpu_init(void)struct tss_struct *t = &per_cpu (init_tss, cpu);struct thread_struct *thread = &curr->thread; -if (cpu_test_and_set (cpu, cpu_initialized)) { +if (cpumask_test_and_set_cpu (cpu, cpu_initialized_mask)) {printk (KERN_WARNING "CPU#%d already initialized!\n" , cpu);for (;;)local_irq_enable (); }
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +87 -83
345 lines not on this page · raw message
arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +4 -4
@@ -122,7 +122,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,return 0 ;/* notifiers */ -for_each_cpu_mask_nr (i, policy->cpus) { +for_each_cpu (i, policy->cpus) { freqs.cpu = i;cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE ); }
@@ -130,11 +130,11 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,/* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software * Developer's Manual, Volume 3 */ -for_each_cpu_mask_nr (i, policy->cpus) +for_each_cpu (i, policy->cpus)cpufreq_p4_setdc (i, p4clockmod_table[newstate].index);/* notifiers */ -for_each_cpu_mask_nr (i, policy->cpus) { +for_each_cpu (i, policy->cpus) { freqs.cpu = i;cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); }
@@ -203,7 +203,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)unsigned int i;#ifdef CONFIG_SMP - policy->cpus =per_cpu (cpu_sibling_map, policy->cpu); +cpumask_copy (policy->cpus, &per_cpu (cpu_sibling_map, policy->cpu));#endif /* Errata workaround */
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +3 -3
@@ -1199,10 +1199,10 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)set_cpus_allowed_ptr (current, &oldmask);if (cpu_family ==CPU_HW_PSTATE ) - pol->cpus =cpumask_of_cpu (pol->cpu); +cpumask_copy (pol->cpus,cpumask_of (pol->cpu));else - pol->cpus =per_cpu (cpu_core_map, pol->cpu); - data->available_cores = &(pol->cpus); +cpumask_copy (pol->cpus, &per_cpu (cpu_core_map, pol->cpu)); + data->available_cores = pol->cpus;/* Take a crude guess here. * That guess was in microseconds, so multiply with 1000 */
arch/x86/kernel/cpu/cpufreq/powernow-k8.h +1 -1
@@ -53,7 +53,7 @@ struct powernow_k8_data {/* we need to keep track of associated cores, but let cpufreq * handle hotplug events - so just point at cpufreq pol->cpus * structure */ -cpumask_t *available_cores; +struct cpumask *available_cores; };
arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +16 -19
@@ -458,11 +458,6 @@ static int centrino_verify (struct cpufreq_policy *policy)* * Sets a new CPUFreq policy. */ -struct allmasks { -cpumask_t saved_mask; -cpumask_t covered_cpus; -}; -static int centrino_target (struct cpufreq_policy *policy,unsigned int target_freq,unsigned int relation)
@@ -472,12 +467,15 @@ static int centrino_target (struct cpufreq_policy *policy,struct cpufreq_freqs freqs;int retval =0 ;unsigned int j, k, first_cpu, tmp; -CPUMASK_ALLOC (allmasks); -CPUMASK_PTR (saved_mask, allmasks); -CPUMASK_PTR (covered_cpus, allmasks); +cpumask_var_t saved_mask, covered_cpus; -if (unlikely (allmasks ==NULL )) +if (unlikely (!alloc_cpumask_var (&saved_mask,GFP_KERNEL )))return -ENOMEM ; +if (unlikely (!alloc_cpumask_var (&covered_cpus,GFP_KERNEL ))) { +free_cpumask_var (saved_mask); +return -ENOMEM ; + } +cpumask_copy (saved_mask, ¤t->cpus_allowed);if (unlikely (per_cpu (centrino_model, cpu) ==NULL )) { retval = -ENODEV ;
@@ -493,11 +491,9 @@ static int centrino_target (struct cpufreq_policy *policy, goto out; } - *saved_mask = current->cpus_allowed; first_cpu =1 ; -cpus_clear (*covered_cpus); -for_each_cpu_mask_nr (j, policy->cpus) { -const cpumask_t *mask; +for_each_cpu (j, policy->cpus) { +const struct cpumask *mask;/* cpufreq holds the hotplug lock, so we are safe here */ if (!cpu_online (j))
@@ -508,9 +504,9 @@ static int centrino_target (struct cpufreq_policy *policy,* Make sure we are running on CPU that wants to change freq */ if (policy->shared_type ==CPUFREQ_SHARED_TYPE_ANY ) - mask = &policy->cpus; + mask = policy->cpus;else - mask = &cpumask_of_cpu (j); + mask =cpumask_of (j);set_cpus_allowed_ptr (current, mask);preempt_disable ();
@@ -542,7 +538,7 @@ static int centrino_target (struct cpufreq_policy *policy,dprintk ("target=%dkHz old=%d new=%d msr=%04x\n" , target_freq, freqs.old, freqs.new, msr); -for_each_cpu_mask_nr (k, policy->cpus) { +for_each_cpu (k, policy->cpus) {if (!cpu_online (k))continue ; freqs.cpu = k;
@@ -567,7 +563,7 @@ static int centrino_target (struct cpufreq_policy *policy,preempt_enable (); } -for_each_cpu_mask_nr (k, policy->cpus) { +for_each_cpu (k, policy->cpus) {if (!cpu_online (k))continue ; freqs.cpu = k;
@@ -590,7 +586,7 @@ static int centrino_target (struct cpufreq_policy *policy, tmp = freqs.new; freqs.new = freqs.old; freqs.old = tmp; -for_each_cpu_mask_nr (j, policy->cpus) { +for_each_cpu (j, policy->cpus) {if (!cpu_online (j))continue ;cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE );
@@ -605,7 +601,8 @@ migrate_end:preempt_enable ();set_cpus_allowed_ptr (current, saved_mask); out: -CPUMASK_FREE (allmasks); +free_cpumask_var (saved_mask); +free_cpumask_var (covered_cpus);return retval; }
arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +9 -9
@@ -229,7 +229,7 @@ static unsigned int speedstep_detect_chipset (void)return 0 ; } -static unsigned int _speedstep_get (const cpumask_t *cpus) +static unsigned int _speedstep_get (const struct cpumask *cpus) {unsigned int speed;cpumask_t cpus_allowed;
@@ -244,7 +244,7 @@ static unsigned int _speedstep_get(const cpumask_t *cpus)static unsigned int speedstep_get (unsigned int cpu) { -return _speedstep_get (&cpumask_of_cpu (cpu)); +return _speedstep_get (cpumask_of (cpu)); }/**
@@ -267,7 +267,7 @@ static int speedstep_target (struct cpufreq_policy *policy,if (cpufreq_frequency_table_target (policy, &speedstep_freqs[0 ], target_freq, relation, &newstate))return -EINVAL ; - freqs.old =_speedstep_get (&policy->cpus); + freqs.old =_speedstep_get (policy->cpus); freqs.new = speedstep_freqs[newstate].frequency; freqs.cpu = policy->cpu;
@@ -279,20 +279,20 @@ static int speedstep_target (struct cpufreq_policy *policy, cpus_allowed = current->cpus_allowed; -for_each_cpu_mask_nr (i, policy->cpus) { +for_each_cpu (i, policy->cpus) { freqs.cpu = i;cpufreq_notify_transition (&freqs,CPUFREQ_PRECHANGE ); }/* switch to physical CPU where state is to be changed */ -set_cpus_allowed_ptr (current, &policy->cpus); +set_cpus_allowed_ptr (current, policy->cpus);speedstep_set_state (newstate);/* allow to be run on all CPUs */ set_cpus_allowed_ptr (current, &cpus_allowed); -for_each_cpu_mask_nr (i, policy->cpus) { +for_each_cpu (i, policy->cpus) { freqs.cpu = i;cpufreq_notify_transition (&freqs,CPUFREQ_POSTCHANGE ); }
@@ -322,11 +322,11 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)/* only run on CPU to be set, or on its sibling */ #ifdef CONFIG_SMP - policy->cpus =per_cpu (cpu_sibling_map, policy->cpu); +cpumask_copy (policy->cpus, &per_cpu (cpu_sibling_map, policy->cpu));#endif cpus_allowed = current->cpus_allowed; -set_cpus_allowed_ptr (current, &policy->cpus); +set_cpus_allowed_ptr (current, policy->cpus);/* detect low and high frequency and transition latency */ result = speedstep_get_freqs(speedstep_processor,
@@ -339,7 +339,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)return result;/* get current speed setting */ - speed =_speedstep_get (&policy->cpus); + speed =_speedstep_get (policy->cpus);if (!speed)return -EIO ;
arch/x86/kernel/setup_percpu.c +24 -1
@@ -131,7 +131,27 @@ static void __init setup_cpu_pda_map(void)/* point to new pointer table */ _cpu_pda = new_cpu_pda; } -#endif + +#endif /* CONFIG_SMP && CONFIG_X86_64 */ + +#ifdef CONFIG_X86_64 + +/* correctly size the local cpu masks */ +static void setup_cpu_local_masks (void ) +{ +alloc_bootmem_cpumask_var (&cpu_initialized_mask); +alloc_bootmem_cpumask_var (&cpu_callin_mask); +alloc_bootmem_cpumask_var (&cpu_callout_mask); +alloc_bootmem_cpumask_var (&cpu_sibling_setup_mask); +} + +#else /* CONFIG_X86_32 */ + +static inline void setup_cpu_local_masks (void ) +{ +} + +#endif /* CONFIG_X86_32 */ /* * Great future plan:
@@ -187,6 +207,9 @@ void __init setup_per_cpu_areas(void)/* Setup node to cpumask map */ setup_node_to_cpumask_map (); + +/* Setup cpu initialized, callin, callout masks */ + setup_cpu_local_masks(); }#endif
arch/x86/kernel/smp.c +12 -5
@@ -128,16 +128,23 @@ void native_send_call_func_single_ipi(int cpu)void native_send_call_func_ipi (const struct cpumask *mask) { -cpumask_t allbutself; +cpumask_var_t allbutself; - allbutself = cpu_online_map; -cpu_clear (smp_processor_id (), allbutself); +if (!alloc_cpumask_var (&allbutself,GFP_ATOMIC )) { +send_IPI_mask (mask,CALL_FUNCTION_VECTOR ); +return ; + } -if (cpus_equal (*mask, allbutself) && -cpus_equal (cpu_online_map, cpu_callout_map)) +cpumask_copy (allbutself, cpu_online_mask); +cpumask_clear_cpu (smp_processor_id (), allbutself); + +if (cpumask_equal (mask, allbutself) && +cpumask_equal (cpu_online_mask, cpu_callout_mask))send_IPI_allbutself (CALL_FUNCTION_VECTOR );else send_IPI_mask (mask,CALL_FUNCTION_VECTOR ); + +free_cpumask_var (allbutself); }/*
arch/x86/kernel/smpboot.c +65 -63
307 lines not on this page · raw message
drivers/cpufreq/cpufreq.c +28 -14
121 lines not on this page · raw message
drivers/cpufreq/cpufreq_conservative.c +1 -1
@@ -498,7 +498,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,return rc; } -for_each_cpu_mask_nr (j, policy->cpus) { +for_each_cpu (j, policy->cpus) {struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu (cpu_dbs_info, j); j_dbs_info->cur_policy = policy;
drivers/cpufreq/cpufreq_ondemand.c +2 -2
@@ -400,7 +400,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)/* Get Absolute Load - in terms of freq */ max_load_freq =0 ; -for_each_cpu_mask_nr (j, policy->cpus) { +for_each_cpu (j, policy->cpus) {struct cpu_dbs_info_s *j_dbs_info;cputime64_t cur_wall_time, cur_idle_time;unsigned int idle_time, wall_time;
@@ -568,7 +568,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,return rc; } -for_each_cpu_mask_nr (j, policy->cpus) { +for_each_cpu (j, policy->cpus) {struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu (cpu_dbs_info, j); j_dbs_info->cur_policy = policy;
drivers/pci/pci-sysfs.c +6 -6
@@ -70,11 +70,11 @@ static ssize_t broken_parity_status_store(struct device *dev,static ssize_t local_cpus_show (struct device *dev,struct device_attribute *attr,char *buf) { -cpumask_t mask; +const struct cpumask *mask;int len; - mask =pcibus_to_cpumask (to_pci_dev (dev)->bus); - len =cpumask_scnprintf (buf,PAGE_SIZE -2 , &mask); + mask =cpumask_of_pcibus (to_pci_dev (dev)->bus); + len =cpumask_scnprintf (buf,PAGE_SIZE -2 , mask); buf[len++] ='\n' ; buf[len] ='\0' ;return len;
@@ -84,11 +84,11 @@ static ssize_t local_cpus_show(struct device *dev,static ssize_t local_cpulist_show (struct device *dev,struct device_attribute *attr,char *buf) { -cpumask_t mask; +const struct cpumask *mask;int len; - mask =pcibus_to_cpumask (to_pci_dev (dev)->bus); - len =cpulist_scnprintf (buf,PAGE_SIZE -2 , &mask); + mask =cpumask_of_pcibus (to_pci_dev (dev)->bus); + len =cpulist_scnprintf (buf,PAGE_SIZE -2 , mask); buf[len++] ='\n' ; buf[len] ='\0' ;return len;
drivers/pci/probe.c +4 -4
@@ -51,12 +51,12 @@ static ssize_t pci_bus_show_cpuaffinity(struct device *dev, char *buf) {int ret; -cpumask_t cpumask; +const struct cpumask *cpumask; - cpumask =pcibus_to_cpumask (to_pci_bus (dev)); + cpumask =cpumask_of_pcibus (to_pci_bus (dev)); ret = type? -cpulist_scnprintf (buf,PAGE_SIZE -2 , &cpumask) : -cpumask_scnprintf (buf,PAGE_SIZE -2 , &cpumask); +cpulist_scnprintf (buf,PAGE_SIZE -2 , cpumask) : +cpumask_scnprintf (buf,PAGE_SIZE -2 , cpumask); buf[ret++] ='\n' ; buf[ret] ='\0' ;return ret;
include/linux/cpufreq.h +2 -2
@@ -80,8 +80,8 @@ struct cpufreq_real_policy { };struct cpufreq_policy { -cpumask_t cpus;/* CPUs requiring sw coordination */ -cpumask_t related_cpus;/* CPUs with any coordination */ +cpumask_var_t cpus;/* CPUs requiring sw coordination */ +cpumask_var_t related_cpus;/* CPUs with any coordination */ unsigned int shared_type;/* ANY or ALL affected CPUs should set cpufreq */ unsigned int cpu;/* cpu nr of registered CPU */