Re: [PATCH 2/6] CRIS: remove SMP code
On Sat, 2015-02-21 at 01:40 +0100, Rabin Vincent wrote: > On Fri, Feb 20, 2015 at 01:06:03AM +0100, Paul Bolle wrote: > > On Thu, 2015-02-19 at 20:29 +0100, Rabin Vincent wrote: > > > The CRIS SMP code cannot be built since there is no (and appears to > > > never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. > > > > Yes, it appears there never was a Kconfig symbol SMP for cris so this > > probably was dead code ever since it was added in, I think, v2.6.13. (I > > should mention I didn't review this patch, or cris' apparently > > non-functional SMP code, in detail.) > > > > Mind if I ask how you spotted this? > > If you're asking if I used some kind of script, no, I didn't. I just > noticed it while working on other CRIS patches. Yes. See, I run a script locally. It is rather simple and only catches the more obvious kconfig related mistakes. I'm pretty sure I won't bother teaching it to spot mistakes like this one. But other people are working on a sophisticated bot that might be able to catch those. But, anyhow, just paying attention when fiddling with a piece of code and spotting possible oddities is of course greatly appreciated! Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/6] CRIS: remove SMP code
On Fri, Feb 20, 2015 at 01:06:03AM +0100, Paul Bolle wrote: > On Thu, 2015-02-19 at 20:29 +0100, Rabin Vincent wrote: > > The CRIS SMP code cannot be built since there is no (and appears to > > never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. > > Yes, it appears there never was a Kconfig symbol SMP for cris so this > probably was dead code ever since it was added in, I think, v2.6.13. (I > should mention I didn't review this patch, or cris' apparently > non-functional SMP code, in detail.) > > Mind if I ask how you spotted this? If you're asking if I used some kind of script, no, I didn't. I just noticed it while working on other CRIS patches. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/6] CRIS: remove SMP code
There was a discussions about making a SMP CRIS once and the code actually ran on emulator. But I guess something went wrong during uppstreamimg. Anyway there is no real silicone so removing it is correct. > 20 feb 2015 kl. 01:06 skrev "Paul Bolle" : > >> On Thu, 2015-02-19 at 20:29 +0100, Rabin Vincent wrote: >> The CRIS SMP code cannot be built since there is no (and appears to >> never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. > > Yes, it appears there never was a Kconfig symbol SMP for cris so this > probably was dead code ever since it was added in, I think, v2.6.13. (I > should mention I didn't review this patch, or cris' apparently > non-functional SMP code, in detail.) > > Mind if I ask how you spotted this? > > > Paul Bolle > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/6] CRIS: remove SMP code
On Thu, Feb 19, 2015 at 08:29:52PM +0100, Rabin Vincent wrote: > The CRIS SMP code cannot be built since there is no (and appears to > never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. > > Signed-off-by: Rabin Vincent Nice, added to the queue for the CRIS-tree. /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nils...@axis.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/6] CRIS: remove SMP code
On Thu, 2015-02-19 at 20:29 +0100, Rabin Vincent wrote: > The CRIS SMP code cannot be built since there is no (and appears to > never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. Yes, it appears there never was a Kconfig symbol SMP for cris so this probably was dead code ever since it was added in, I think, v2.6.13. (I should mention I didn't review this patch, or cris' apparently non-functional SMP code, in detail.) Mind if I ask how you spotted this? Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/6] CRIS: remove SMP code
The CRIS SMP code cannot be built since there is no (and appears to never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. Signed-off-by: Rabin Vincent --- arch/cris/Kconfig | 1 - arch/cris/arch-v32/kernel/Makefile | 1 - arch/cris/arch-v32/kernel/head.S | 32 --- arch/cris/arch-v32/kernel/irq.c| 3 - arch/cris/arch-v32/kernel/setup.c | 5 - arch/cris/arch-v32/kernel/smp.c| 358 - arch/cris/arch-v32/kernel/time.c | 3 - arch/cris/arch-v32/lib/Makefile| 2 +- arch/cris/arch-v32/lib/spinlock.S | 40 arch/cris/arch-v32/mm/init.c | 11 - arch/cris/arch-v32/mm/mmu.S| 4 - arch/cris/include/arch-v32/arch/atomic.h | 28 --- arch/cris/include/arch-v32/arch/spinlock.h | 131 --- arch/cris/include/asm/cmpxchg.h| 2 - arch/cris/include/asm/smp.h| 10 - arch/cris/include/asm/spinlock.h | 1 - arch/cris/include/asm/tlbflush.h | 7 - 17 files changed, 1 insertion(+), 638 deletions(-) delete mode 100644 arch/cris/arch-v32/kernel/smp.c delete mode 100644 arch/cris/arch-v32/lib/spinlock.S delete mode 100644 arch/cris/include/arch-v32/arch/spinlock.h delete mode 100644 arch/cris/include/asm/smp.h delete mode 100644 arch/cris/include/asm/spinlock.h diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 6910dd6..ec96c4c 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -46,7 +46,6 @@ config CRIS select ARCH_WANT_IPC_PARSE_VERSION select GENERIC_IRQ_SHOW select GENERIC_IOMAP - select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 select GENERIC_CMOS_UPDATE select MODULES_USE_ELF_RELA select CLONE_BACKWARDS2 diff --git a/arch/cris/arch-v32/kernel/Makefile b/arch/cris/arch-v32/kernel/Makefile index 4035835..d9fc617 100644 --- a/arch/cris/arch-v32/kernel/Makefile +++ b/arch/cris/arch-v32/kernel/Makefile @@ -9,7 +9,6 @@ obj-y := entry.o traps.o irq.o debugport.o \ process.o ptrace.o setup.o signal.o traps.o time.o \ cache.o cacheflush.o -obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_ETRAX_KGDB) += kgdb.o kgdb_asm.o obj-$(CONFIG_ETRAX_FAST_TIMER) += fasttimer.o obj-$(CONFIG_MODULES)+= crisksyms.o diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S index 51e3416..74a66e0 100644 --- a/arch/cris/arch-v32/kernel/head.S +++ b/arch/cris/arch-v32/kernel/head.S @@ -52,11 +52,6 @@ tstart: GIO_INIT -#ifdef CONFIG_SMP -secondary_cpu_entry: /* Entry point for secondary CPUs */ - di -#endif - ;; Setup and enable the MMU. Use same configuration for both the data ;; and the instruction MMU. ;; @@ -164,33 +159,6 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */ nop nop -#ifdef CONFIG_SMP - ;; Read CPU ID - move0, $srs - nop - nop - nop - move$s12, $r0 - cmpq0, $r0 - beq master_cpu - nop -slave_cpu: - ; Time to boot-up. Get stack location provided by master CPU. - move.d smp_init_current_idle_thread, $r1 - move.d [$r1], $sp - add.d 8192, $sp - move.d ebp_start, $r0 ; Defined in linker-script. - move$r0, $ebp - jsr smp_callin - nop -master_cpu: - /* Set up entry point for secondary CPUs. The boot ROM has set up -* EBP at start of internal memory. The CPU will get there -* later when we issue an IPI to them... */ - move.d MEM_INTMEM_START + IPI_INTR_VECT * 4, $r0 - move.d secondary_cpu_entry, $r1 - move.d $r1, [$r0] -#endif ; Check if starting from DRAM (network->RAM boot or unpacked ; compressed kernel), or directly from flash. lapcq ., $r0 diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index bc871d2..6a881e0 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c @@ -58,9 +58,6 @@ struct cris_irq_allocation irq_allocations[NR_REAL_IRQS] = static unsigned long irq_regs[NR_CPUS] = { regi_irq, -#ifdef CONFIG_SMP - regi_irq2, -#endif }; #if NR_REAL_IRQS > 32 diff --git a/arch/cris/arch-v32/kernel/setup.c b/arch/cris/arch-v32/kernel/setup.c index 61e10ae..231927b 100644 --- a/arch/cris/arch-v32/kernel/setup.c +++ b/arch/cris/arch-v32/kernel/setup.c @@ -63,11 +63,6 @@ int show_cpuinfo(struct seq_file *m, void *v) info = &cpinfo[ARRAY_SIZE(cpinfo) - 1]; -#ifdef CONFIG_SMP - if (!cpu_online(cpu)) - return 0; -#endif - revision = rdvr(); for (i = 0; i < ARRAY_SIZE(cpinfo); i++) { diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c deleted file mode 100644 index 0698582..000 --- a/arch/cris/arch-v32/kernel/smp.c +++ /dev/null @@ -1,358 +0,0 @@ -#include -#i