Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch
Free spinlock before call IPI handlers. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Header from folded patch 'blackfin_arch__fix_bug_-_kgdb_fails_to_continue_after_setting_breakpoint_on_bf561-ezkit_kernel_with_smp_patch-1': Blackfin arch: fix bug - kgdb fails to continue after setting breakpoint on bf561-ezkit kernel with smp patch Don't test l1 code in SMP kernel. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
parent
8bf6774d7f
commit
0bf3d93308
|
@ -20,6 +20,7 @@
|
||||||
static char cmdline[256];
|
static char cmdline[256];
|
||||||
static unsigned long len;
|
static unsigned long len;
|
||||||
|
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
static int num1 __attribute__((l1_data));
|
static int num1 __attribute__((l1_data));
|
||||||
|
|
||||||
void kgdb_l1_test(void) __attribute__((l1_text));
|
void kgdb_l1_test(void) __attribute__((l1_text));
|
||||||
|
@ -32,6 +33,8 @@ void kgdb_l1_test(void)
|
||||||
printk(KERN_ALERT "L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1);
|
printk(KERN_ALERT "L1(after change) : data variable addr = 0x%p, data value is %d\n", &num1, num1);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if L2_LENGTH
|
#if L2_LENGTH
|
||||||
|
|
||||||
static int num2 __attribute__((l2));
|
static int num2 __attribute__((l2));
|
||||||
|
@ -59,10 +62,12 @@ int kgdb_test(char *name, int len, int count, int z)
|
||||||
static int test_proc_output(char *buf)
|
static int test_proc_output(char *buf)
|
||||||
{
|
{
|
||||||
kgdb_test("hello world!", 12, 0x55, 0x10);
|
kgdb_test("hello world!", 12, 0x55, 0x10);
|
||||||
|
#ifndef CONFIG_SMP
|
||||||
kgdb_l1_test();
|
kgdb_l1_test();
|
||||||
#if L2_LENGTH
|
#endif
|
||||||
|
#if L2_LENGTH
|
||||||
kgdb_l2_test();
|
kgdb_l2_test();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,10 +158,14 @@ static irqreturn_t ipi_handler(int irq, void *dev_instance)
|
||||||
kfree(msg);
|
kfree(msg);
|
||||||
break;
|
break;
|
||||||
case BFIN_IPI_CALL_FUNC:
|
case BFIN_IPI_CALL_FUNC:
|
||||||
|
spin_unlock(&msg_queue->lock);
|
||||||
ipi_call_function(cpu, msg);
|
ipi_call_function(cpu, msg);
|
||||||
|
spin_lock(&msg_queue->lock);
|
||||||
break;
|
break;
|
||||||
case BFIN_IPI_CPU_STOP:
|
case BFIN_IPI_CPU_STOP:
|
||||||
|
spin_unlock(&msg_queue->lock);
|
||||||
ipi_cpu_stop(cpu);
|
ipi_cpu_stop(cpu);
|
||||||
|
spin_lock(&msg_queue->lock);
|
||||||
kfree(msg);
|
kfree(msg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -457,7 +461,7 @@ void smp_icache_flush_range_others(unsigned long start, unsigned long end)
|
||||||
smp_flush_data.start = start;
|
smp_flush_data.start = start;
|
||||||
smp_flush_data.end = end;
|
smp_flush_data.end = end;
|
||||||
|
|
||||||
if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 1))
|
if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 0))
|
||||||
printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
|
printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
|
EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
|
||||||
|
|
Loading…
Reference in New Issue