diff options
author | Mike Travis <travis@sgi.com> | 2008-12-16 20:33:59 -0500 |
---|---|---|
committer | Mike Travis <travis@sgi.com> | 2008-12-16 20:40:57 -0500 |
commit | bcda016eddd7a8b374bb371473c821a91ff1d8cc (patch) | |
tree | 9335614036937765c385479d707ef7327fca7d67 /arch/x86/kernel/genx2apic_phys.c | |
parent | d7b381bb7b1ad69ff008ea063d26e988b686c8de (diff) |
x86: cosmetic changes apic-related files.
This patch simply changes cpumask_t to struct cpumask and similar
trivial modernizations.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'arch/x86/kernel/genx2apic_phys.c')
-rw-r--r-- | arch/x86/kernel/genx2apic_phys.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c index 9d0386c7e798..b255507884f2 100644 --- a/arch/x86/kernel/genx2apic_phys.c +++ b/arch/x86/kernel/genx2apic_phys.c | |||
@@ -29,15 +29,15 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
29 | 29 | ||
30 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ | 30 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ |
31 | 31 | ||
32 | static const cpumask_t *x2apic_target_cpus(void) | 32 | static const struct cpumask *x2apic_target_cpus(void) |
33 | { | 33 | { |
34 | return &cpumask_of_cpu(0); | 34 | return cpumask_of(0); |
35 | } | 35 | } |
36 | 36 | ||
37 | static void x2apic_vector_allocation_domain(int cpu, cpumask_t *retmask) | 37 | static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask) |
38 | { | 38 | { |
39 | cpus_clear(*retmask); | 39 | cpumask_clear(retmask); |
40 | cpu_set(cpu, *retmask); | 40 | cpumask_set_cpu(cpu, retmask); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | 43 | static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, |
@@ -53,27 +53,28 @@ static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | |||
53 | x2apic_icr_write(cfg, apicid); | 53 | x2apic_icr_write(cfg, apicid); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void x2apic_send_IPI_mask(const cpumask_t *mask, int vector) | 56 | static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) |
57 | { | 57 | { |
58 | unsigned long flags; | 58 | unsigned long flags; |
59 | unsigned long query_cpu; | 59 | unsigned long query_cpu; |
60 | 60 | ||
61 | local_irq_save(flags); | 61 | local_irq_save(flags); |
62 | for_each_cpu_mask_nr(query_cpu, *mask) { | 62 | for_each_cpu(query_cpu, mask) { |
63 | __x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu), | 63 | __x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu), |
64 | vector, APIC_DEST_PHYSICAL); | 64 | vector, APIC_DEST_PHYSICAL); |
65 | } | 65 | } |
66 | local_irq_restore(flags); | 66 | local_irq_restore(flags); |
67 | } | 67 | } |
68 | 68 | ||
69 | static void x2apic_send_IPI_mask_allbutself(const cpumask_t *mask, int vector) | 69 | static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, |
70 | int vector) | ||
70 | { | 71 | { |
71 | unsigned long flags; | 72 | unsigned long flags; |
72 | unsigned long query_cpu; | 73 | unsigned long query_cpu; |
73 | unsigned long this_cpu = smp_processor_id(); | 74 | unsigned long this_cpu = smp_processor_id(); |
74 | 75 | ||
75 | local_irq_save(flags); | 76 | local_irq_save(flags); |
76 | for_each_cpu_mask_nr(query_cpu, *mask) { | 77 | for_each_cpu(query_cpu, mask) { |
77 | if (query_cpu != this_cpu) | 78 | if (query_cpu != this_cpu) |
78 | __x2apic_send_IPI_dest( | 79 | __x2apic_send_IPI_dest( |
79 | per_cpu(x86_cpu_to_apicid, query_cpu), | 80 | per_cpu(x86_cpu_to_apicid, query_cpu), |
@@ -99,7 +100,7 @@ static void x2apic_send_IPI_allbutself(int vector) | |||
99 | 100 | ||
100 | static void x2apic_send_IPI_all(int vector) | 101 | static void x2apic_send_IPI_all(int vector) |
101 | { | 102 | { |
102 | x2apic_send_IPI_mask(&cpu_online_map, vector); | 103 | x2apic_send_IPI_mask(cpu_online_mask, vector); |
103 | } | 104 | } |
104 | 105 | ||
105 | static int x2apic_apic_id_registered(void) | 106 | static int x2apic_apic_id_registered(void) |
@@ -107,7 +108,7 @@ static int x2apic_apic_id_registered(void) | |||
107 | return 1; | 108 | return 1; |
108 | } | 109 | } |
109 | 110 | ||
110 | static unsigned int x2apic_cpu_mask_to_apicid(const cpumask_t *cpumask) | 111 | static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) |
111 | { | 112 | { |
112 | int cpu; | 113 | int cpu; |
113 | 114 | ||
@@ -115,7 +116,7 @@ static unsigned int x2apic_cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
115 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 116 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
116 | * May as well be the first. | 117 | * May as well be the first. |
117 | */ | 118 | */ |
118 | cpu = first_cpu(*cpumask); | 119 | cpu = cpumask_first(cpumask); |
119 | if ((unsigned)cpu < nr_cpu_ids) | 120 | if ((unsigned)cpu < nr_cpu_ids) |
120 | return per_cpu(x86_cpu_to_apicid, cpu); | 121 | return per_cpu(x86_cpu_to_apicid, cpu); |
121 | else | 122 | else |