* [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh
@ 2009-06-12 13:01 ` Rusty Russell
2009-06-15 2:45 ` Paul Mundt
0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-06-12 13:01 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel
cpumask_of_pcibus() is the new version.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
arch/sh/include/asm/topology.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/sh/include/asm/topology.h b/arch/sh/include/asm/topology.h
--- a/arch/sh/include/asm/topology.h
+++ b/arch/sh/include/asm/topology.h
@@ -35,9 +35,6 @@
#define cpumask_of_node(node) ((void)node, cpu_online_mask)
#define pcibus_to_node(bus) ((void)(bus), -1)
-#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
- CPU_MASK_ALL : \
- node_to_cpumask(pcibus_to_node(bus)))
#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
CPU_MASK_ALL_PTR : \
cpumask_of_node(pcibus_to_node(bus)))
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/7] cpumask: arch_send_call_function_ipi_mask: sh
@ 2009-06-12 13:02 ` Rusty Russell
2009-06-12 13:01 ` [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh Rusty Russell
0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-06-12 13:02 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel
We're weaning the core code off handing cpumask's around on-stack.
This introduces arch_send_call_function_ipi_mask(), and by defining
it, the old arch_send_call_function_ipi is defined by the core code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
arch/sh/include/asm/smp.h | 3 ++-
arch/sh/kernel/smp.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -43,7 +43,8 @@ void plat_send_ipi(unsigned int cpu, uns
void plat_send_ipi(unsigned int cpu, unsigned int message);
void arch_send_call_function_single_ipi(int cpu);
-void arch_send_call_function_ipi(cpumask_t mask);
+extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
+#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
#else
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -171,11 +171,11 @@ void smp_send_stop(void)
smp_call_function(stop_this_cpu, 0, 0);
}
-void arch_send_call_function_ipi(cpumask_t mask)
+void arch_send_call_function_ipi_mask(const struct cpumask *mask)
{
int cpu;
- for_each_cpu_mask(cpu, mask)
+ for_each_cpu(cpu, mask)
plat_send_ipi(cpu, SMP_MSG_FUNCTION);
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 11/13] cpumask: use mm_cpumask() wrapper: sh
@ 2009-06-12 13:03 ` Rusty Russell
2009-06-12 13:02 ` [PATCH 5/7] cpumask: arch_send_call_function_ipi_mask: sh Rusty Russell
0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-06-12 13:03 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel
Makes code futureproof against the impending change to mm->cpu_vm_mask.
It's also a chance to use the new cpumask_ ops which take a pointer
(the older ones are deprecated, but there's no hurry for arch code).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
arch/sh/include/asm/mmu_context.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/include/asm/mmu_context.h b/arch/sh/include/asm/mmu_context.h
--- a/arch/sh/include/asm/mmu_context.h
+++ b/arch/sh/include/asm/mmu_context.h
@@ -117,11 +117,11 @@ static inline void switch_mm(struct mm_s
unsigned int cpu = smp_processor_id();
if (likely(prev != next)) {
- cpu_set(cpu, next->cpu_vm_mask);
+ cpumask_set_cpu(cpu, mm_cpumask(next));
set_TTB(next->pgd);
activate_context(next, cpu);
} else
- if (!cpu_test_and_set(cpu, next->cpu_vm_mask))
+ if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
activate_context(next, cpu);
}
#else
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/13] cpumask: Use accessors for cpu_*_mask: sh
@ 2009-06-12 13:03 Rusty Russell
2009-06-12 13:03 ` [PATCH 11/13] cpumask: use mm_cpumask() wrapper: sh Rusty Russell
0 siblings, 1 reply; 6+ messages in thread
From: Rusty Russell @ 2009-06-12 13:03 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel, Mike Travis
Use the accessors rather than frobbing bits directly (the new versions
are const).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
---
arch/sh/kernel/cpu/sh4a/smp-shx3.c | 5 ++---
arch/sh/kernel/smp.c | 6 +++---
2 files changed, 5 insertions(+), 6 deletions(-)
--- linux-2.6.28.orig/arch/sh/kernel/cpu/sh4a/smp-shx3.c
+++ linux-2.6.28/arch/sh/kernel/cpu/sh4a/smp-shx3.c
@@ -19,8 +19,7 @@ void __init plat_smp_setup(void)
unsigned int cpu = 0;
int i, num;
- cpus_clear(cpu_possible_map);
- cpu_set(cpu, cpu_possible_map);
+ init_cpu_possible(cpumask_of(cpu));
__cpu_number_map[0] = 0;
__cpu_logical_map[0] = 0;
@@ -30,7 +29,7 @@ void __init plat_smp_setup(void)
* for the total number of cores.
*/
for (i = 1, num = 0; i < NR_CPUS; i++) {
- cpu_set(i, cpu_possible_map);
+ set_cpu_possible(i, true);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
--- linux-2.6.28.orig/arch/sh/kernel/smp.c
+++ linux-2.6.28/arch/sh/kernel/smp.c
@@ -52,7 +52,7 @@ void __init smp_prepare_cpus(unsigned in
plat_prepare_cpus(max_cpus);
#ifndef CONFIG_HOTPLUG_CPU
- cpu_present_map = cpu_possible_map;
+ init_cpu_present(&cpu_possible_map);
#endif
}
@@ -63,8 +63,8 @@ void __devinit smp_prepare_boot_cpu(void
__cpu_number_map[0] = cpu;
__cpu_logical_map[0] = cpu;
- cpu_set(cpu, cpu_online_map);
- cpu_set(cpu, cpu_possible_map);
+ set_cpu_online(cpu, true);
+ set_cpu_possible(cpu, true);
}
asmlinkage void __cpuinit start_secondary(void)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh
2009-06-12 13:01 ` [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh Rusty Russell
@ 2009-06-15 2:45 ` Paul Mundt
2009-06-15 5:43 ` Rusty Russell
0 siblings, 1 reply; 6+ messages in thread
From: Paul Mundt @ 2009-06-15 2:45 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel, Mike Travis
On Fri, Jun 12, 2009 at 10:31:04PM +0930, Rusty Russell wrote:
> cpumask_of_pcibus() is the new version.
On Fri, Jun 12, 2009 at 10:32:35PM +0930, Rusty Russell wrote:
> We're weaning the core code off handing cpumask's around on-stack.
> This introduces arch_send_call_function_ipi_mask(), and by defining
> it, the old arch_send_call_function_ipi is defined by the core code.
On Fri, Jun 12, 2009 at 10:33:14PM +0930, Rusty Russell wrote:
> Makes code futureproof against the impending change to mm->cpu_vm_mask.
>
> It's also a chance to use the new cpumask_ ops which take a pointer
> (the older ones are deprecated, but there's no hurry for arch code).
On Fri, Jun 12, 2009 at 10:33:14PM +0930, Rusty Russell wrote:
> Use the accessors rather than frobbing bits directly (the new versions
> are const).
I've taken these in to the sh tree, thanks. They'll be included in the
next round of updates for -rc1.
I'm not sure how you want to handle the remaining patches. The
outstanding ones obviously touch code all over the place and should
probably go in in one go after the merge window has settled down a bit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh
2009-06-15 2:45 ` Paul Mundt
@ 2009-06-15 5:43 ` Rusty Russell
0 siblings, 0 replies; 6+ messages in thread
From: Rusty Russell @ 2009-06-15 5:43 UTC (permalink / raw)
To: Paul Mundt; +Cc: linux-kernel, Mike Travis
On Mon, 15 Jun 2009 12:15:20 pm Paul Mundt wrote:
> I've taken these in to the sh tree, thanks. They'll be included in the
> next round of updates for -rc1.
>
> I'm not sure how you want to handle the remaining patches. The
> outstanding ones obviously touch code all over the place and should
> probably go in in one go after the merge window has settled down a bit.
Thanks, that's the basic plan. They'll sit in linux-next until then.
(The other option was for you to just ack them and they'll go with the rest to
Linus; in fact, that's going to happen to maintainers who don't respond anyway
:)
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-15 5:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-12 13:03 [PATCH 5/13] cpumask: Use accessors for cpu_*_mask: sh Rusty Russell
2009-06-12 13:03 ` [PATCH 11/13] cpumask: use mm_cpumask() wrapper: sh Rusty Russell
2009-06-12 13:02 ` [PATCH 5/7] cpumask: arch_send_call_function_ipi_mask: sh Rusty Russell
2009-06-12 13:01 ` [PATCH 4/17] cpumask: remove the now-obsoleted pcibus_to_cpumask(): sh Rusty Russell
2009-06-15 2:45 ` Paul Mundt
2009-06-15 5:43 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).