All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARC: Remove ISS_SMP_EXTN entirely
@ 2014-04-08  8:56 Paul Bolle
  2014-04-08  9:18 ` Vineet Gupta
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Bolle @ 2014-04-08  8:56 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-kernel

The Kconfig symbol ARC_HAS_COH_RTSC was removed in v3.13. The Kconfig
entry for ISS_SMP_EXTN still had a select for that symbol. That select
was just removed in commit d345ea2892ae ("ARC: Remove
ARC_HAS_COH_RTSC").

But selecting ARC_HAS_COH_RTSC was the only thing ISS_SMP_EXTN ever
did. That means that since v3.13 setting ISS_SMP_EXTN was effectively a
nop anyhow. So ISS_SMP_EXTN can as well be removed entirely.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Tested wit "git grep" only.

 arch/arc/plat-arcfpga/Kconfig | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/arch/arc/plat-arcfpga/Kconfig b/arch/arc/plat-arcfpga/Kconfig
index 33058aa40e77..fde2a3fb604d 100644
--- a/arch/arc/plat-arcfpga/Kconfig
+++ b/arch/arc/plat-arcfpga/Kconfig
@@ -8,7 +8,6 @@
 
 menuconfig ARC_PLAT_FPGA_LEGACY
 	bool "\"Legacy\" ARC FPGA dev Boards"
-	select ISS_SMP_EXTN if SMP
 	help
 	  Support for ARC development boards, provided by Synopsys.
 	  These are based on FPGA or ISS. e.g.
@@ -29,18 +28,6 @@ config ARC_BOARD_ML509
 	help
 	  ARC ML509 FPGA Ref Platform (Xilinx Virtex-5 Based)
 
-config ISS_SMP_EXTN
-	bool "ARC SMP Extensions (ISS Models only)"
-	default n
-	depends on SMP
-	help
-	  SMP Extensions to ARC700, in a "simulation only" Model, supported in
-	  ARC ISS (Instruction Set Simulator).
-	  The SMP extensions include:
-	  -IDU (Interrupt Distribution Unit)
-	  -XTL (To enable CPU start/stop/set-PC for another CPU)
-	  It doesn't provide coherent Caches and/or Atomic Ops (LLOCK/SCOND)
-
 config ARC_SERIAL_BAUD
 	int "UART Baud rate"
 	default "115200"
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08  8:56 [PATCH] ARC: Remove ISS_SMP_EXTN entirely Paul Bolle
@ 2014-04-08  9:18 ` Vineet Gupta
  2014-04-08  9:36   ` Paul Bolle
  2014-04-08 10:42   ` Paul Bolle
  0 siblings, 2 replies; 7+ messages in thread
From: Vineet Gupta @ 2014-04-08  9:18 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kernel@vger.kernel.org

Hi Paul,

On Tuesday 08 April 2014 02:26 PM, Paul Bolle wrote:
> The Kconfig symbol ARC_HAS_COH_RTSC was removed in v3.13. The Kconfig
> entry for ISS_SMP_EXTN still had a select for that symbol. That select
> was just removed in commit d345ea2892ae ("ARC: Remove
> ARC_HAS_COH_RTSC").
>
> But selecting ARC_HAS_COH_RTSC was the only thing ISS_SMP_EXTN ever
> did. That means that since v3.13 setting ISS_SMP_EXTN was effectively a
> nop anyhow. So ISS_SMP_EXTN can as well be removed entirely.

There's obvious bitrot here - however this code is not dead yet !
I have a unpushed fix which uses this Kconfig item.

diff --git a/arch/arc/plat-arcfpga/Makefile b/arch/arc/plat-arcfpga/Makefile
index a44e22ebc1b7..4d1bddc34b5b 100644
--- a/arch/arc/plat-arcfpga/Makefile
+++ b/arch/arc/plat-arcfpga/Makefile
@@ -9,4 +9,4 @@
 KBUILD_CFLAGS  += -Iarch/arc/plat-arcfpga/include
 
 obj-y := platform.o irq.o
-obj-$(CONFIG_SMP)              += smp.o
+obj-$(CONFIG_ISS_SMP_EXTN)             += smp.o

-Vineet

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08  9:18 ` Vineet Gupta
@ 2014-04-08  9:36   ` Paul Bolle
  2014-04-08 10:42   ` Paul Bolle
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Bolle @ 2014-04-08  9:36 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-kernel@vger.kernel.org

Vineet,

On Tue, 2014-04-08 at 09:18 +0000, Vineet Gupta wrote:
> There's obvious bitrot here - however this code is not dead yet !
> I have a unpushed fix which uses this Kconfig item.

I see. Would it bother you if I send you a reminder if that fix (or
something equivalent) hasn't been added in some future release?

Thanks,


Paul Bolle


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08  9:18 ` Vineet Gupta
  2014-04-08  9:36   ` Paul Bolle
@ 2014-04-08 10:42   ` Paul Bolle
  2014-04-08 10:49     ` Vineet Gupta
  2014-04-08 10:51     ` Paul Bolle
  1 sibling, 2 replies; 7+ messages in thread
From: Paul Bolle @ 2014-04-08 10:42 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-kernel

Vineet,

On Tue, 2014-04-08 at 09:18 +0000, Vineet Gupta wrote:
> There's obvious bitrot here - however this code is not dead yet !
> I have a unpushed fix which uses this Kconfig item.
> 
> diff --git a/arch/arc/plat-arcfpga/Makefile b/arch/arc/plat-arcfpga/Makefile
> index a44e22ebc1b7..4d1bddc34b5b 100644
> --- a/arch/arc/plat-arcfpga/Makefile
> +++ b/arch/arc/plat-arcfpga/Makefile
> @@ -9,4 +9,4 @@
>  KBUILD_CFLAGS  += -Iarch/arc/plat-arcfpga/include
>  
>  obj-y := platform.o irq.o
> -obj-$(CONFIG_SMP)              += smp.o
> +obj-$(CONFIG_ISS_SMP_EXTN)             += smp.o

I just realized that this means you're only using ISS_SMP_EXTN as an
alias for SMP, aren't you? Ie, smp.o will now be built if both
ARC_PLAT_FPGA_LEGACY and SMP are set. That will not change by this
patch.

So unless you're planning to do something else too if ISS_SMP_EXTN is
set there seems to be little value in using this symbol like that.


Paul Bolle


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08 10:42   ` Paul Bolle
@ 2014-04-08 10:49     ` Vineet Gupta
  2014-04-08 11:19       ` Vineet Gupta
  2014-04-08 10:51     ` Paul Bolle
  1 sibling, 1 reply; 7+ messages in thread
From: Vineet Gupta @ 2014-04-08 10:49 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kernel@vger.kernel.org

On Tuesday 08 April 2014 04:12 PM, Paul Bolle wrote:
> Vineet,
>
> On Tue, 2014-04-08 at 09:18 +0000, Vineet Gupta wrote:
>> There's obvious bitrot here - however this code is not dead yet !
>> I have a unpushed fix which uses this Kconfig item.
>>
>> diff --git a/arch/arc/plat-arcfpga/Makefile b/arch/arc/plat-arcfpga/Makefile
>> index a44e22ebc1b7..4d1bddc34b5b 100644
>> --- a/arch/arc/plat-arcfpga/Makefile
>> +++ b/arch/arc/plat-arcfpga/Makefile
>> @@ -9,4 +9,4 @@
>>  KBUILD_CFLAGS  += -Iarch/arc/plat-arcfpga/include
>>  
>>  obj-y := platform.o irq.o
>> -obj-$(CONFIG_SMP)              += smp.o
>> +obj-$(CONFIG_ISS_SMP_EXTN)             += smp.o
> I just realized that this means you're only using ISS_SMP_EXTN as an
> alias for SMP, aren't you? Ie, smp.o will now be built if both
> ARC_PLAT_FPGA_LEGACY and SMP are set. That will not change by this
> patch.
>
> So unless you're planning to do something else too if ISS_SMP_EXTN is
> set there seems to be little value in using this symbol like that.

Indeed so - I just sent u one hunk to give an idea. There's other code too where
CONFIG_SMP will be replaced by CONFIG_ISS_SMP_EXTN as I'm decoupling SMP support
from this SMP extension.

I'll push a patch later today - which will hopefully hit mainline within this
merge window - if not in one of the rcs.

-Vineet

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08 10:42   ` Paul Bolle
  2014-04-08 10:49     ` Vineet Gupta
@ 2014-04-08 10:51     ` Paul Bolle
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Bolle @ 2014-04-08 10:51 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: linux-kernel

On Tue, 2014-04-08 at 12:42 +0200, Paul Bolle wrote:
> I just realized that this means you're only using ISS_SMP_EXTN as an
> alias for SMP, aren't you? Ie, smp.o will now be built if both
> ARC_PLAT_FPGA_LEGACY and SMP are set. That will not change by this
> patch.

Of course, the patch does add the ability to set both
ARC_PLAT_FPGA_LEGACY and SMP but still disable building smp.o. Would
that be a useful ability?

> So unless you're planning to do something else too if ISS_SMP_EXTN is
> set there seems to be little value in using this symbol like that.


Paul Bolle


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ARC: Remove ISS_SMP_EXTN entirely
  2014-04-08 10:49     ` Vineet Gupta
@ 2014-04-08 11:19       ` Vineet Gupta
  0 siblings, 0 replies; 7+ messages in thread
From: Vineet Gupta @ 2014-04-08 11:19 UTC (permalink / raw)
  To: Paul Bolle; +Cc: linux-kernel@vger.kernel.org

On Tuesday 08 April 2014 04:19 PM, Vineet Gupta wrote:
> 
> I'll push a patch later today - which will hopefully hit mainline within this
> merge window - if not in one of the rcs.


Here's the patch I want to push - care to take a look.

Note that it might still seem that ISS_SMP_EXTN symbol is uselss (and alias for
SMP) because the code for SMP_EXTN_2 is still in works and will take some more
time to hit upstream. So you see the motivation of this change now ?

--------------------->
>From c7f4c1084d2563def0f5bc5dc2b1b857bc4b50f0 Mon Sep 17 00:00:00 2001
From: Vineet Gupta <vgupta@synopsys.com>
Date: Fri, 28 Feb 2014 16:13:44 +0800
Subject: [PATCH] ARC: [SMP] ISS SMP extension bitrot

* Move extension specific code out of common SMP code
* Don't enable it by default for SMP

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/include/asm/irq.h       |  2 --
 arch/arc/kernel/irq.c            | 18 ------------------
 arch/arc/plat-arcfpga/Makefile   |  2 +-
 arch/arc/plat-arcfpga/platform.c |  4 ++--
 arch/arc/plat-arcfpga/smp.c      | 18 ++++++++++++++++++
 5 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h
index 291a70db68b8..781f57f25bd8 100644
--- a/arch/arc/include/asm/irq.h
+++ b/arch/arc/include/asm/irq.h
@@ -19,8 +19,6 @@
 #include <asm-generic/irq.h>

 extern void arc_init_IRQ(void);
-extern int get_hw_config_num_irq(void);
-
 void arc_local_timer_setup(unsigned int cpu);

 #endif
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c
index a4b141ee9a6a..7d653c0d0773 100644
--- a/arch/arc/kernel/irq.c
+++ b/arch/arc/kernel/irq.c
@@ -150,24 +150,6 @@ void arch_do_IRQ(unsigned int irq, struct pt_regs *regs)
 	set_irq_regs(old_regs);
 }

-int get_hw_config_num_irq(void)
-{
-	uint32_t val = read_aux_reg(ARC_REG_VECBASE_BCR);
-
-	switch (val & 0x03) {
-	case 0:
-		return 16;
-	case 1:
-		return 32;
-	case 2:
-		return 8;
-	default:
-		return 0;
-	}
-
-	return 0;
-}
-
 /*
  * arch_local_irq_enable - Enable interrupts.
  *
diff --git a/arch/arc/plat-arcfpga/Makefile b/arch/arc/plat-arcfpga/Makefile
index a44e22ebc1b7..4d1bddc34b5b 100644
--- a/arch/arc/plat-arcfpga/Makefile
+++ b/arch/arc/plat-arcfpga/Makefile
@@ -9,4 +9,4 @@
 KBUILD_CFLAGS	+= -Iarch/arc/plat-arcfpga/include

 obj-y := platform.o irq.o
-obj-$(CONFIG_SMP)		+= smp.o
+obj-$(CONFIG_ISS_SMP_EXTN)		+= smp.o
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c
index 19b76b61f44b..213394a15cd2 100644
--- a/arch/arc/plat-arcfpga/platform.c
+++ b/arch/arc/plat-arcfpga/platform.c
@@ -169,7 +169,7 @@ static void __init plat_fpga_early_init(void)

 	arc_fpga_serial_init();

-#ifdef CONFIG_SMP
+#ifdef CONFIG_ISS_SMP_EXTN
 	iss_model_init_early_smp();
 #endif
 }
@@ -211,7 +211,7 @@ MACHINE_START(ANGEL4, "angel4")
 	.init_early	= plat_fpga_early_init,
 	.init_machine	= plat_fpga_populate_dev,
 	.init_irq	= plat_fpga_init_IRQ,
-#ifdef CONFIG_SMP
+#ifdef CONFIG_ISS_SMP_EXTN
 	.init_smp	= iss_model_init_smp,
 #endif
 MACHINE_END
diff --git a/arch/arc/plat-arcfpga/smp.c b/arch/arc/plat-arcfpga/smp.c
index 8a12741f5f7a..92bad9122077 100644
--- a/arch/arc/plat-arcfpga/smp.c
+++ b/arch/arc/plat-arcfpga/smp.c
@@ -42,6 +42,24 @@ static void iss_model_smp_wakeup_cpu(int cpu, unsigned long pc)

 }

+static inline int get_hw_config_num_irq(void)
+{
+	uint32_t val = read_aux_reg(ARC_REG_VECBASE_BCR);
+
+	switch (val & 0x03) {
+	case 0:
+		return 16;
+	case 1:
+		return 32;
+	case 2:
+		return 8;
+	default:
+		return 0;
+	}
+
+	return 0;
+}
+
 /*
  * Any SMP specific init any CPU does when it comes up.
  * Here we setup the CPU to enable Inter-Processor-Interrupts
-- 
1.8.3.2




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-08 11:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08  8:56 [PATCH] ARC: Remove ISS_SMP_EXTN entirely Paul Bolle
2014-04-08  9:18 ` Vineet Gupta
2014-04-08  9:36   ` Paul Bolle
2014-04-08 10:42   ` Paul Bolle
2014-04-08 10:49     ` Vineet Gupta
2014-04-08 11:19       ` Vineet Gupta
2014-04-08 10:51     ` Paul Bolle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.