* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 5:24 ` Kenji Kaneshige
0 siblings, 0 replies; 25+ messages in thread
From: Kenji Kaneshige @ 2005-12-15 5:24 UTC (permalink / raw)
To: Benjamin LaHaise
Cc: Andrew Morton, Yasunori Goto, linux-kernel, linux-ia64, linux-mm,
tony.luck
Benjamin LaHaise wrote:
> On Wed, Dec 14, 2005 at 06:56:58PM -0800, Andrew Morton wrote:
>
>>Thanks. I'll drop it.
>
>
> Please don't. Fix ia64's brain damage instead. Function pointers
> should not be cast, period.
>
> -ben
How about this?
Thanks,
Kenji Kaneshige
We need this patch on ia64 to convert on_each_cpu to a macro.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
arch/ia64/kernel/smp.c | 4 ++--
arch/ia64/kernel/smpboot.c | 2 +-
arch/ia64/mm/tlb.c | 6 +++---
include/asm-ia64/mmu_context.h | 4 ++--
include/asm-ia64/tlbflush.h | 5 +++--
5 files changed, 11 insertions(+), 10 deletions(-)
Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smpboot.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
@@ -652,7 +652,7 @@ int __cpu_disable(void)
remove_siblinginfo(cpu);
cpu_clear(cpu, cpu_online_map);
fixup_irqs();
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
cpu_clear(cpu, cpu_callin_map);
return 0;
}
Index: linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/mm/tlb.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
@@ -81,7 +81,7 @@ wrap_mmu_context (struct mm_struct *mm)
if (i != cpu)
per_cpu(ia64_need_tlb_flush, i) = 1;
put_cpu();
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
}
void
@@ -111,7 +111,7 @@ ia64_global_tlb_purge (struct mm_struct
}
void
-local_flush_tlb_all (void)
+local_flush_tlb_all (void *dummy)
{
unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
@@ -192,5 +192,5 @@ ia64_tlb_init (void)
local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
- local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
+ local_flush_tlb_all(NULL);/* nuke left overs from bootstrapping... */
}
Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smp.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
@@ -225,7 +225,7 @@ smp_send_reschedule (int cpu)
void
smp_flush_tlb_all (void)
{
- on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
+ on_each_cpu(local_flush_tlb_all, NULL, 1, 1);
}
void
@@ -248,7 +248,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
* anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
* rather trivial.
*/
- on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
+ on_each_cpu(local_finish_flush_tlb_mm, mm, 1, 1);
}
/*
Index: linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/tlbflush.h
+++ linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
@@ -23,7 +23,7 @@
* Flush everything (kernel mapping may also have changed due to
* vmalloc/vfree).
*/
-extern void local_flush_tlb_all (void);
+extern void local_flush_tlb_all (void *dummy);
#ifdef CONFIG_SMP
extern void smp_flush_tlb_all (void);
@@ -34,8 +34,9 @@ extern void local_flush_tlb_all (void);
#endif
static inline void
-local_finish_flush_tlb_mm (struct mm_struct *mm)
+local_finish_flush_tlb_mm (void *info)
{
+ struct mm_struct *mm = (struct mm_struct *)info;
if (mm == current->active_mm)
activate_context(mm);
}
Index: linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/mmu_context.h
+++ linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
@@ -60,13 +60,13 @@ enter_lazy_tlb (struct mm_struct *mm, st
static inline void
delayed_tlb_flush (void)
{
- extern void local_flush_tlb_all (void);
+ extern void local_flush_tlb_all (void *);
unsigned long flags;
if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
spin_lock_irqsave(&ia64_ctx.lock, flags);
if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
__ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
}
spin_unlock_irqrestore(&ia64_ctx.lock, flags);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 5:24 ` Kenji Kaneshige
0 siblings, 0 replies; 25+ messages in thread
From: Kenji Kaneshige @ 2005-12-15 5:24 UTC (permalink / raw)
To: Benjamin LaHaise
Cc: Andrew Morton, Yasunori Goto, linux-kernel, linux-ia64, linux-mm,
tony.luck
Benjamin LaHaise wrote:
> On Wed, Dec 14, 2005 at 06:56:58PM -0800, Andrew Morton wrote:
>
>>Thanks. I'll drop it.
>
>
> Please don't. Fix ia64's brain damage instead. Function pointers
> should not be cast, period.
>
> -ben
How about this?
Thanks,
Kenji Kaneshige
We need this patch on ia64 to convert on_each_cpu to a macro.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
arch/ia64/kernel/smp.c | 4 ++--
arch/ia64/kernel/smpboot.c | 2 +-
arch/ia64/mm/tlb.c | 6 +++---
include/asm-ia64/mmu_context.h | 4 ++--
include/asm-ia64/tlbflush.h | 5 +++--
5 files changed, 11 insertions(+), 10 deletions(-)
Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smpboot.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
@@ -652,7 +652,7 @@ int __cpu_disable(void)
remove_siblinginfo(cpu);
cpu_clear(cpu, cpu_online_map);
fixup_irqs();
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
cpu_clear(cpu, cpu_callin_map);
return 0;
}
Index: linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/mm/tlb.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
@@ -81,7 +81,7 @@ wrap_mmu_context (struct mm_struct *mm)
if (i != cpu)
per_cpu(ia64_need_tlb_flush, i) = 1;
put_cpu();
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
}
void
@@ -111,7 +111,7 @@ ia64_global_tlb_purge (struct mm_struct
}
void
-local_flush_tlb_all (void)
+local_flush_tlb_all (void *dummy)
{
unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
@@ -192,5 +192,5 @@ ia64_tlb_init (void)
local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
- local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
+ local_flush_tlb_all(NULL);/* nuke left overs from bootstrapping... */
}
Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
===================================================================
--- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smp.c
+++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
@@ -225,7 +225,7 @@ smp_send_reschedule (int cpu)
void
smp_flush_tlb_all (void)
{
- on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
+ on_each_cpu(local_flush_tlb_all, NULL, 1, 1);
}
void
@@ -248,7 +248,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
* anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
* rather trivial.
*/
- on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
+ on_each_cpu(local_finish_flush_tlb_mm, mm, 1, 1);
}
/*
Index: linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/tlbflush.h
+++ linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
@@ -23,7 +23,7 @@
* Flush everything (kernel mapping may also have changed due to
* vmalloc/vfree).
*/
-extern void local_flush_tlb_all (void);
+extern void local_flush_tlb_all (void *dummy);
#ifdef CONFIG_SMP
extern void smp_flush_tlb_all (void);
@@ -34,8 +34,9 @@ extern void local_flush_tlb_all (void);
#endif
static inline void
-local_finish_flush_tlb_mm (struct mm_struct *mm)
+local_finish_flush_tlb_mm (void *info)
{
+ struct mm_struct *mm = (struct mm_struct *)info;
if (mm == current->active_mm)
activate_context(mm);
}
Index: linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/mmu_context.h
+++ linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
@@ -60,13 +60,13 @@ enter_lazy_tlb (struct mm_struct *mm, st
static inline void
delayed_tlb_flush (void)
{
- extern void local_flush_tlb_all (void);
+ extern void local_flush_tlb_all (void *);
unsigned long flags;
if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
spin_lock_irqsave(&ia64_ctx.lock, flags);
if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
- local_flush_tlb_all();
+ local_flush_tlb_all(NULL);
__ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
}
spin_unlock_irqrestore(&ia64_ctx.lock, flags);
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
2005-12-15 5:24 ` Kenji Kaneshige
(?)
@ 2005-12-15 6:34 ` Yasunori Goto
-1 siblings, 0 replies; 25+ messages in thread
From: Yasunori Goto @ 2005-12-15 6:34 UTC (permalink / raw)
To: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton
Cc: linux-kernel, linux-ia64, linux-mm, tony.luck
Thanks! It works!
BTW, I found same casted function at on_each_cpu() in parisc code.
(arch/parisc/kernel/cache.c
arch/parisc/kernel/smp.c
arch/parisc/mm/init.c)
Are they also should fixed?
I don't have parisc box. So, I don't know there is same trouble on
parisc box or not, and I can't test it.
Bye.
> Benjamin LaHaise wrote:
> > On Wed, Dec 14, 2005 at 06:56:58PM -0800, Andrew Morton wrote:
> >
> >>Thanks. I'll drop it.
> >
> >
> > Please don't. Fix ia64's brain damage instead. Function pointers
> > should not be cast, period.
> >
> > -ben
>
> How about this?
>
> Thanks,
> Kenji Kaneshige
>
>
> We need this patch on ia64 to convert on_each_cpu to a macro.
>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
>
> arch/ia64/kernel/smp.c | 4 ++--
> arch/ia64/kernel/smpboot.c | 2 +-
> arch/ia64/mm/tlb.c | 6 +++---
> include/asm-ia64/mmu_context.h | 4 ++--
> include/asm-ia64/tlbflush.h | 5 +++--
> 5 files changed, 11 insertions(+), 10 deletions(-)
>
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> =================================> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smpboot.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> @@ -652,7 +652,7 @@ int __cpu_disable(void)
> remove_siblinginfo(cpu);
> cpu_clear(cpu, cpu_online_map);
> fixup_irqs();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> cpu_clear(cpu, cpu_callin_map);
> return 0;
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> =================================> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/mm/tlb.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> @@ -81,7 +81,7 @@ wrap_mmu_context (struct mm_struct *mm)
> if (i != cpu)
> per_cpu(ia64_need_tlb_flush, i) = 1;
> put_cpu();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> }
>
> void
> @@ -111,7 +111,7 @@ ia64_global_tlb_purge (struct mm_struct
> }
>
> void
> -local_flush_tlb_all (void)
> +local_flush_tlb_all (void *dummy)
> {
> unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
>
> @@ -192,5 +192,5 @@ ia64_tlb_init (void)
> local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
> local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
>
> - local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
> + local_flush_tlb_all(NULL);/* nuke left overs from bootstrapping... */
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> =================================> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smp.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> @@ -225,7 +225,7 @@ smp_send_reschedule (int cpu)
> void
> smp_flush_tlb_all (void)
> {
> - on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
> + on_each_cpu(local_flush_tlb_all, NULL, 1, 1);
> }
>
> void
> @@ -248,7 +248,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
> * anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
> * rather trivial.
> */
> - on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
> + on_each_cpu(local_finish_flush_tlb_mm, mm, 1, 1);
> }
>
> /*
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> =================================> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/tlbflush.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> @@ -23,7 +23,7 @@
> * Flush everything (kernel mapping may also have changed due to
> * vmalloc/vfree).
> */
> -extern void local_flush_tlb_all (void);
> +extern void local_flush_tlb_all (void *dummy);
>
> #ifdef CONFIG_SMP
> extern void smp_flush_tlb_all (void);
> @@ -34,8 +34,9 @@ extern void local_flush_tlb_all (void);
> #endif
>
> static inline void
> -local_finish_flush_tlb_mm (struct mm_struct *mm)
> +local_finish_flush_tlb_mm (void *info)
> {
> + struct mm_struct *mm = (struct mm_struct *)info;
> if (mm = current->active_mm)
> activate_context(mm);
> }
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> =================================> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/mmu_context.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> @@ -60,13 +60,13 @@ enter_lazy_tlb (struct mm_struct *mm, st
> static inline void
> delayed_tlb_flush (void)
> {
> - extern void local_flush_tlb_all (void);
> + extern void local_flush_tlb_all (void *);
> unsigned long flags;
>
> if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
> spin_lock_irqsave(&ia64_ctx.lock, flags);
> if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> __ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
> }
> spin_unlock_irqrestore(&ia64_ctx.lock, flags);
>
>
--
Yasunori Goto
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 6:34 ` Yasunori Goto
0 siblings, 0 replies; 25+ messages in thread
From: Yasunori Goto @ 2005-12-15 6:34 UTC (permalink / raw)
To: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton
Cc: linux-kernel, linux-ia64, linux-mm, tony.luck
Thanks! It works!
BTW, I found same casted function at on_each_cpu() in parisc code.
(arch/parisc/kernel/cache.c
arch/parisc/kernel/smp.c
arch/parisc/mm/init.c)
Are they also should fixed?
I don't have parisc box. So, I don't know there is same trouble on
parisc box or not, and I can't test it.
Bye.
> Benjamin LaHaise wrote:
> > On Wed, Dec 14, 2005 at 06:56:58PM -0800, Andrew Morton wrote:
> >
> >>Thanks. I'll drop it.
> >
> >
> > Please don't. Fix ia64's brain damage instead. Function pointers
> > should not be cast, period.
> >
> > -ben
>
> How about this?
>
> Thanks,
> Kenji Kaneshige
>
>
> We need this patch on ia64 to convert on_each_cpu to a macro.
>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
>
> arch/ia64/kernel/smp.c | 4 ++--
> arch/ia64/kernel/smpboot.c | 2 +-
> arch/ia64/mm/tlb.c | 6 +++---
> include/asm-ia64/mmu_context.h | 4 ++--
> include/asm-ia64/tlbflush.h | 5 +++--
> 5 files changed, 11 insertions(+), 10 deletions(-)
>
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smpboot.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> @@ -652,7 +652,7 @@ int __cpu_disable(void)
> remove_siblinginfo(cpu);
> cpu_clear(cpu, cpu_online_map);
> fixup_irqs();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> cpu_clear(cpu, cpu_callin_map);
> return 0;
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/mm/tlb.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> @@ -81,7 +81,7 @@ wrap_mmu_context (struct mm_struct *mm)
> if (i != cpu)
> per_cpu(ia64_need_tlb_flush, i) = 1;
> put_cpu();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> }
>
> void
> @@ -111,7 +111,7 @@ ia64_global_tlb_purge (struct mm_struct
> }
>
> void
> -local_flush_tlb_all (void)
> +local_flush_tlb_all (void *dummy)
> {
> unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
>
> @@ -192,5 +192,5 @@ ia64_tlb_init (void)
> local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
> local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
>
> - local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
> + local_flush_tlb_all(NULL);/* nuke left overs from bootstrapping... */
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smp.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> @@ -225,7 +225,7 @@ smp_send_reschedule (int cpu)
> void
> smp_flush_tlb_all (void)
> {
> - on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
> + on_each_cpu(local_flush_tlb_all, NULL, 1, 1);
> }
>
> void
> @@ -248,7 +248,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
> * anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
> * rather trivial.
> */
> - on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
> + on_each_cpu(local_finish_flush_tlb_mm, mm, 1, 1);
> }
>
> /*
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/tlbflush.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> @@ -23,7 +23,7 @@
> * Flush everything (kernel mapping may also have changed due to
> * vmalloc/vfree).
> */
> -extern void local_flush_tlb_all (void);
> +extern void local_flush_tlb_all (void *dummy);
>
> #ifdef CONFIG_SMP
> extern void smp_flush_tlb_all (void);
> @@ -34,8 +34,9 @@ extern void local_flush_tlb_all (void);
> #endif
>
> static inline void
> -local_finish_flush_tlb_mm (struct mm_struct *mm)
> +local_finish_flush_tlb_mm (void *info)
> {
> + struct mm_struct *mm = (struct mm_struct *)info;
> if (mm == current->active_mm)
> activate_context(mm);
> }
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/mmu_context.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> @@ -60,13 +60,13 @@ enter_lazy_tlb (struct mm_struct *mm, st
> static inline void
> delayed_tlb_flush (void)
> {
> - extern void local_flush_tlb_all (void);
> + extern void local_flush_tlb_all (void *);
> unsigned long flags;
>
> if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
> spin_lock_irqsave(&ia64_ctx.lock, flags);
> if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> __ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
> }
> spin_unlock_irqrestore(&ia64_ctx.lock, flags);
>
>
--
Yasunori Goto
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 6:34 ` Yasunori Goto
0 siblings, 0 replies; 25+ messages in thread
From: Yasunori Goto @ 2005-12-15 6:34 UTC (permalink / raw)
To: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton
Cc: linux-kernel, linux-ia64, linux-mm, tony.luck
Thanks! It works!
BTW, I found same casted function at on_each_cpu() in parisc code.
(arch/parisc/kernel/cache.c
arch/parisc/kernel/smp.c
arch/parisc/mm/init.c)
Are they also should fixed?
I don't have parisc box. So, I don't know there is same trouble on
parisc box or not, and I can't test it.
Bye.
> Benjamin LaHaise wrote:
> > On Wed, Dec 14, 2005 at 06:56:58PM -0800, Andrew Morton wrote:
> >
> >>Thanks. I'll drop it.
> >
> >
> > Please don't. Fix ia64's brain damage instead. Function pointers
> > should not be cast, period.
> >
> > -ben
>
> How about this?
>
> Thanks,
> Kenji Kaneshige
>
>
> We need this patch on ia64 to convert on_each_cpu to a macro.
>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
>
> arch/ia64/kernel/smp.c | 4 ++--
> arch/ia64/kernel/smpboot.c | 2 +-
> arch/ia64/mm/tlb.c | 6 +++---
> include/asm-ia64/mmu_context.h | 4 ++--
> include/asm-ia64/tlbflush.h | 5 +++--
> 5 files changed, 11 insertions(+), 10 deletions(-)
>
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smpboot.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smpboot.c
> @@ -652,7 +652,7 @@ int __cpu_disable(void)
> remove_siblinginfo(cpu);
> cpu_clear(cpu, cpu_online_map);
> fixup_irqs();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> cpu_clear(cpu, cpu_callin_map);
> return 0;
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/mm/tlb.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/mm/tlb.c
> @@ -81,7 +81,7 @@ wrap_mmu_context (struct mm_struct *mm)
> if (i != cpu)
> per_cpu(ia64_need_tlb_flush, i) = 1;
> put_cpu();
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> }
>
> void
> @@ -111,7 +111,7 @@ ia64_global_tlb_purge (struct mm_struct
> }
>
> void
> -local_flush_tlb_all (void)
> +local_flush_tlb_all (void *dummy)
> {
> unsigned long i, j, flags, count0, count1, stride0, stride1, addr;
>
> @@ -192,5 +192,5 @@ ia64_tlb_init (void)
> local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
> local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
>
> - local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
> + local_flush_tlb_all(NULL);/* nuke left overs from bootstrapping... */
> }
> Index: linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/arch/ia64/kernel/smp.c
> +++ linux-2.6.15-rc5-mm2/arch/ia64/kernel/smp.c
> @@ -225,7 +225,7 @@ smp_send_reschedule (int cpu)
> void
> smp_flush_tlb_all (void)
> {
> - on_each_cpu((void (*)(void *))local_flush_tlb_all, NULL, 1, 1);
> + on_each_cpu(local_flush_tlb_all, NULL, 1, 1);
> }
>
> void
> @@ -248,7 +248,7 @@ smp_flush_tlb_mm (struct mm_struct *mm)
> * anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is
> * rather trivial.
> */
> - on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1, 1);
> + on_each_cpu(local_finish_flush_tlb_mm, mm, 1, 1);
> }
>
> /*
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/tlbflush.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/tlbflush.h
> @@ -23,7 +23,7 @@
> * Flush everything (kernel mapping may also have changed due to
> * vmalloc/vfree).
> */
> -extern void local_flush_tlb_all (void);
> +extern void local_flush_tlb_all (void *dummy);
>
> #ifdef CONFIG_SMP
> extern void smp_flush_tlb_all (void);
> @@ -34,8 +34,9 @@ extern void local_flush_tlb_all (void);
> #endif
>
> static inline void
> -local_finish_flush_tlb_mm (struct mm_struct *mm)
> +local_finish_flush_tlb_mm (void *info)
> {
> + struct mm_struct *mm = (struct mm_struct *)info;
> if (mm == current->active_mm)
> activate_context(mm);
> }
> Index: linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> ===================================================================
> --- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/mmu_context.h
> +++ linux-2.6.15-rc5-mm2/include/asm-ia64/mmu_context.h
> @@ -60,13 +60,13 @@ enter_lazy_tlb (struct mm_struct *mm, st
> static inline void
> delayed_tlb_flush (void)
> {
> - extern void local_flush_tlb_all (void);
> + extern void local_flush_tlb_all (void *);
> unsigned long flags;
>
> if (unlikely(__ia64_per_cpu_var(ia64_need_tlb_flush))) {
> spin_lock_irqsave(&ia64_ctx.lock, flags);
> if (__ia64_per_cpu_var(ia64_need_tlb_flush)) {
> - local_flush_tlb_all();
> + local_flush_tlb_all(NULL);
> __ia64_per_cpu_var(ia64_need_tlb_flush) = 0;
> }
> spin_unlock_irqrestore(&ia64_ctx.lock, flags);
>
>
--
Yasunori Goto
^ permalink raw reply [flat|nested] 25+ messages in thread* [parisc-linux] Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
2005-12-15 6:34 ` Yasunori Goto
(?)
(?)
@ 2005-12-15 15:41 ` Matthew Wilcox
-1 siblings, 0 replies; 25+ messages in thread
From: Matthew Wilcox @ 2005-12-15 15:41 UTC (permalink / raw)
To: Yasunori Goto
Cc: Andrew Morton, tony.luck, linux-ia64, linux-kernel, linux-mm,
Benjamin LaHaise, Kenji Kaneshige, parisc-linux
On Thu, Dec 15, 2005 at 03:34:27PM +0900, Yasunori Goto wrote:
> Thanks! It works!
>
> BTW, I found same casted function at on_each_cpu() in parisc code.
> (arch/parisc/kernel/cache.c
> arch/parisc/kernel/smp.c
> arch/parisc/mm/init.c)
>
> Are they also should fixed?
> I don't have parisc box. So, I don't know there is same trouble on
> parisc box or not, and I can't test it.
Yes, these will also need to be changed. Thanks.
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
2005-12-15 6:34 ` Yasunori Goto
(?)
@ 2005-12-15 15:41 ` Matthew Wilcox
-1 siblings, 0 replies; 25+ messages in thread
From: Matthew Wilcox @ 2005-12-15 15:41 UTC (permalink / raw)
To: Yasunori Goto
Cc: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton, linux-kernel,
linux-ia64, linux-mm, tony.luck, parisc-linux
On Thu, Dec 15, 2005 at 03:34:27PM +0900, Yasunori Goto wrote:
> Thanks! It works!
>
> BTW, I found same casted function at on_each_cpu() in parisc code.
> (arch/parisc/kernel/cache.c
> arch/parisc/kernel/smp.c
> arch/parisc/mm/init.c)
>
> Are they also should fixed?
> I don't have parisc box. So, I don't know there is same trouble on
> parisc box or not, and I can't test it.
Yes, these will also need to be changed. Thanks.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 15:41 ` Matthew Wilcox
0 siblings, 0 replies; 25+ messages in thread
From: Matthew Wilcox @ 2005-12-15 15:41 UTC (permalink / raw)
To: Yasunori Goto
Cc: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton, linux-kernel,
linux-ia64, linux-mm, tony.luck, parisc-linux
On Thu, Dec 15, 2005 at 03:34:27PM +0900, Yasunori Goto wrote:
> Thanks! It works!
>
> BTW, I found same casted function at on_each_cpu() in parisc code.
> (arch/parisc/kernel/cache.c
> arch/parisc/kernel/smp.c
> arch/parisc/mm/init.c)
>
> Are they also should fixed?
> I don't have parisc box. So, I don't know there is same trouble on
> parisc box or not, and I can't test it.
Yes, these will also need to be changed. Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 15:41 ` Matthew Wilcox
0 siblings, 0 replies; 25+ messages in thread
From: Matthew Wilcox @ 2005-12-15 15:41 UTC (permalink / raw)
To: Yasunori Goto
Cc: Kenji Kaneshige, Benjamin LaHaise, Andrew Morton, linux-kernel,
linux-ia64, linux-mm, tony.luck, parisc-linux
On Thu, Dec 15, 2005 at 03:34:27PM +0900, Yasunori Goto wrote:
> Thanks! It works!
>
> BTW, I found same casted function at on_each_cpu() in parisc code.
> (arch/parisc/kernel/cache.c
> arch/parisc/kernel/smp.c
> arch/parisc/mm/init.c)
>
> Are they also should fixed?
> I don't have parisc box. So, I don't know there is same trouble on
> parisc box or not, and I can't test it.
Yes, these will also need to be changed. Thanks.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
2005-12-15 5:24 ` Kenji Kaneshige
(?)
@ 2005-12-15 14:28 ` Benjamin LaHaise
-1 siblings, 0 replies; 25+ messages in thread
From: Benjamin LaHaise @ 2005-12-15 14:28 UTC (permalink / raw)
To: Kenji Kaneshige
Cc: Andrew Morton, Yasunori Goto, linux-kernel, linux-ia64, linux-mm,
tony.luck
On Thu, Dec 15, 2005 at 02:24:29PM +0900, Kenji Kaneshige wrote:
> How about this?
Excellent! Thanks Kenji. Tony, are you okay with this patch going in?
-ben
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 14:28 ` Benjamin LaHaise
0 siblings, 0 replies; 25+ messages in thread
From: Benjamin LaHaise @ 2005-12-15 14:28 UTC (permalink / raw)
To: Kenji Kaneshige
Cc: Andrew Morton, Yasunori Goto, linux-kernel, linux-ia64, linux-mm,
tony.luck
On Thu, Dec 15, 2005 at 02:24:29PM +0900, Kenji Kaneshige wrote:
> How about this?
Excellent! Thanks Kenji. Tony, are you okay with this patch going in?
-ben
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: 2.6.15-rc5-mm2 can't boot on ia64 due to changing on_each_cpu().
@ 2005-12-15 14:28 ` Benjamin LaHaise
0 siblings, 0 replies; 25+ messages in thread
From: Benjamin LaHaise @ 2005-12-15 14:28 UTC (permalink / raw)
To: Kenji Kaneshige
Cc: Andrew Morton, Yasunori Goto, linux-kernel, linux-ia64, linux-mm,
tony.luck
On Thu, Dec 15, 2005 at 02:24:29PM +0900, Kenji Kaneshige wrote:
> How about this?
Excellent! Thanks Kenji. Tony, are you okay with this patch going in?
-ben
^ permalink raw reply [flat|nested] 25+ messages in thread