linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
@ 2020-09-12 14:23 Necip Fazil Yildiran
  2020-09-18 13:50 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 6+ messages in thread
From: Necip Fazil Yildiran @ 2020-09-12 14:23 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, paul, jeho, Necip Fazil Yildiran

IRQ_CPU_RM7K has been a non-visible config selected nowhere since
PMC-Sierra Yosemite support has been removed with commit bdf20507da11
("MIPS: PMC-Sierra Yosemite: Remove support."). By the same token, the
handler for RM7000 extended interrupts has been obsolete.

Remove the obsolete code.

Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
---
 arch/mips/Kconfig                        |  3 --
 arch/mips/include/asm/irq_cpu.h          |  2 --
 arch/mips/include/asm/mach-generic/irq.h |  6 ----
 arch/mips/kernel/Makefile                |  1 -
 arch/mips/kernel/irq-rm7000.c            | 45 ------------------------
 5 files changed, 57 deletions(-)
 delete mode 100644 arch/mips/kernel/irq-rm7000.c

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index c95fa3a2484c..93ad690e1dd0 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1242,9 +1242,6 @@ config SYS_SUPPORTS_HUGETLBFS
 config MIPS_HUGE_TLB_SUPPORT
 	def_bool HUGETLB_PAGE || TRANSPARENT_HUGEPAGE
 
-config IRQ_CPU_RM7K
-	bool
-
 config IRQ_MSP_SLP
 	bool
 
diff --git a/arch/mips/include/asm/irq_cpu.h b/arch/mips/include/asm/irq_cpu.h
index 8d321180b5c2..83d7331ab215 100644
--- a/arch/mips/include/asm/irq_cpu.h
+++ b/arch/mips/include/asm/irq_cpu.h
@@ -10,8 +10,6 @@
 #define _ASM_IRQ_CPU_H
 
 extern void mips_cpu_irq_init(void);
-extern void rm7k_cpu_irq_init(void);
-extern void rm9k_cpu_irq_init(void);
 
 #ifdef CONFIG_IRQ_DOMAIN
 struct device_node;
diff --git a/arch/mips/include/asm/mach-generic/irq.h b/arch/mips/include/asm/mach-generic/irq.h
index 72ac2c202c55..ac711b0d6225 100644
--- a/arch/mips/include/asm/mach-generic/irq.h
+++ b/arch/mips/include/asm/mach-generic/irq.h
@@ -28,12 +28,6 @@
 #endif /* CONFIG_I8259 */
 #endif
 
-#ifdef CONFIG_IRQ_CPU_RM7K
-#ifndef RM7K_CPU_IRQ_BASE
-#define RM7K_CPU_IRQ_BASE (MIPS_CPU_IRQ_BASE+8)
-#endif
-#endif
-
 #endif /* CONFIG_IRQ_MIPS_CPU */
 
 #endif /* __ASM_MACH_GENERIC_IRQ_H */
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index 13a26d254829..31b827273ed3 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -64,7 +64,6 @@ obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o
 obj-$(CONFIG_MIPS_VPE_APSP_API_CMP) += rtlx-cmp.o
 obj-$(CONFIG_MIPS_VPE_APSP_API_MT) += rtlx-mt.o
 
-obj-$(CONFIG_IRQ_CPU_RM7K)	+= irq-rm7000.o
 obj-$(CONFIG_MIPS_MSC)		+= irq-msc01.o
 obj-$(CONFIG_IRQ_TXX9)		+= irq_txx9.o
 obj-$(CONFIG_IRQ_GT641XX)	+= irq-gt641xx.o
diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c
deleted file mode 100644
index e1a497f639d7..000000000000
--- a/arch/mips/kernel/irq-rm7000.c
+++ /dev/null
@@ -1,45 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (C) 2003 Ralf Baechle
- *
- * Handler for RM7000 extended interrupts.  These are a non-standard
- * feature so we handle them separately from standard interrupts.
- */
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/kernel.h>
-
-#include <asm/irq_cpu.h>
-#include <asm/mipsregs.h>
-
-static inline void unmask_rm7k_irq(struct irq_data *d)
-{
-	set_c0_intcontrol(0x100 << (d->irq - RM7K_CPU_IRQ_BASE));
-}
-
-static inline void mask_rm7k_irq(struct irq_data *d)
-{
-	clear_c0_intcontrol(0x100 << (d->irq - RM7K_CPU_IRQ_BASE));
-}
-
-static struct irq_chip rm7k_irq_controller = {
-	.name = "RM7000",
-	.irq_ack = mask_rm7k_irq,
-	.irq_mask = mask_rm7k_irq,
-	.irq_mask_ack = mask_rm7k_irq,
-	.irq_unmask = unmask_rm7k_irq,
-	.irq_eoi = unmask_rm7k_irq
-};
-
-void __init rm7k_cpu_irq_init(void)
-{
-	int base = RM7K_CPU_IRQ_BASE;
-	int i;
-
-	clear_c0_intcontrol(0x00000f00);		/* Mask all */
-
-	for (i = base; i < base + 4; i++)
-		irq_set_chip_and_handler(i, &rm7k_irq_controller,
-					 handle_percpu_irq);
-}
-- 
2.25.1


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

* Re: [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
  2020-09-12 14:23 [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler Necip Fazil Yildiran
@ 2020-09-18 13:50 ` Thomas Bogendoerfer
  2020-09-30 14:34   ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Bogendoerfer @ 2020-09-18 13:50 UTC (permalink / raw)
  To: Necip Fazil Yildiran; +Cc: linux-mips, linux-kernel, paul, jeho

On Sat, Sep 12, 2020 at 05:23:07PM +0300, Necip Fazil Yildiran wrote:
> IRQ_CPU_RM7K has been a non-visible config selected nowhere since
> PMC-Sierra Yosemite support has been removed with commit bdf20507da11
> ("MIPS: PMC-Sierra Yosemite: Remove support."). By the same token, the
> handler for RM7000 extended interrupts has been obsolete.
> 
> Remove the obsolete code.

not yet;-) I have an RM7000 based system in my basement... I'm also
not sure, if R7k O2s need that.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
  2020-09-18 13:50 ` Thomas Bogendoerfer
@ 2020-09-30 14:34   ` Maciej W. Rozycki
  2020-09-30 21:21     ` Thomas Bogendoerfer
  0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2020-09-30 14:34 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Necip Fazil Yildiran, linux-mips, linux-kernel, paul, jeho

On Fri, 18 Sep 2020, Thomas Bogendoerfer wrote:

> > IRQ_CPU_RM7K has been a non-visible config selected nowhere since
> > PMC-Sierra Yosemite support has been removed with commit bdf20507da11
> > ("MIPS: PMC-Sierra Yosemite: Remove support."). By the same token, the
> > handler for RM7000 extended interrupts has been obsolete.
> > 
> > Remove the obsolete code.
> 
> not yet;-) I have an RM7000 based system in my basement... I'm also
> not sure, if R7k O2s need that.

 One of the more exotic Malta daughtercards used that too I believe.  I'd 
have to check the docs.  Of course getting hands on such a daughtercard is 
another matter, but we continue having RM7000 enabled for the Malta.

  Maciej

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

* Re: [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
  2020-09-30 14:34   ` Maciej W. Rozycki
@ 2020-09-30 21:21     ` Thomas Bogendoerfer
  2020-09-30 23:10       ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Bogendoerfer @ 2020-09-30 21:21 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: Necip Fazil Yildiran, linux-mips, linux-kernel, paul, jeho

On Wed, Sep 30, 2020 at 03:34:25PM +0100, Maciej W. Rozycki wrote:
> On Fri, 18 Sep 2020, Thomas Bogendoerfer wrote:
> 
> > > IRQ_CPU_RM7K has been a non-visible config selected nowhere since
> > > PMC-Sierra Yosemite support has been removed with commit bdf20507da11
> > > ("MIPS: PMC-Sierra Yosemite: Remove support."). By the same token, the
> > > handler for RM7000 extended interrupts has been obsolete.
> > > 
> > > Remove the obsolete code.
> > 
> > not yet;-) I have an RM7000 based system in my basement... I'm also
> > not sure, if R7k O2s need that.
> 
>  One of the more exotic Malta daughtercards used that too I believe.  I'd 
> have to check the docs.  Of course getting hands on such a daughtercard is 
> another matter, but we continue having RM7000 enabled for the Malta.

I've checked interrupts on P6064 and doesn't use the "extented" interrupts.
And since O2 uses the same CPU connector for all CPU boards I doubt it
it either. What about Malta ? 

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
  2020-09-30 21:21     ` Thomas Bogendoerfer
@ 2020-09-30 23:10       ` Maciej W. Rozycki
  2020-10-02  9:52         ` Thomas Bogendoerfer
  0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2020-09-30 23:10 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Necip Fazil Yildiran, linux-mips, linux-kernel, paul, jeho

On Wed, 30 Sep 2020, Thomas Bogendoerfer wrote:

> > > not yet;-) I have an RM7000 based system in my basement... I'm also
> > > not sure, if R7k O2s need that.
> > 
> >  One of the more exotic Malta daughtercards used that too I believe.  I'd 
> > have to check the docs.  Of course getting hands on such a daughtercard is 
> > another matter, but we continue having RM7000 enabled for the Malta.
> 
> I've checked interrupts on P6064 and doesn't use the "extented" interrupts.
> And since O2 uses the same CPU connector for all CPU boards I doubt it
> it either.

 Mind that interrupts can be asserted in the RM7k via an external write 
request too, and I'm fairly sure SGI hardware would use that rather than 
interrupt inputs given that R4000/R4400 SC/MC CPUs only have Int*(0) wired 
and all the remaining interrupts are only available via a processor write.  
Have you checked that?

> What about Malta ? 

 So this is the CoreBonito64 daughtercard, which can have either an RM5261 
or an RM7061 processor installed.  The Int*(9:6) inputs are not mentioned, 
which I take it means unconnected, and ExtRqst* has a pull-up and is 
otherwise wired to a debug connector only.  Which makes me conclude this 
feature cannot be used in a standard application with this card.

 NB there is another interrupt controller embedded in the Bonito64 system 
controller, which on the CoreBonito64, conversely, can actually be enabled 
with a jumper and used, but it's not usually either.

  Maciej

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

* Re: [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler
  2020-09-30 23:10       ` Maciej W. Rozycki
@ 2020-10-02  9:52         ` Thomas Bogendoerfer
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Bogendoerfer @ 2020-10-02  9:52 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: Necip Fazil Yildiran, linux-mips, linux-kernel, paul, jeho

On Thu, Oct 01, 2020 at 12:10:57AM +0100, Maciej W. Rozycki wrote:
> On Wed, 30 Sep 2020, Thomas Bogendoerfer wrote:
> 
> > > > not yet;-) I have an RM7000 based system in my basement... I'm also
> > > > not sure, if R7k O2s need that.
> > > 
> > >  One of the more exotic Malta daughtercards used that too I believe.  I'd 
> > > have to check the docs.  Of course getting hands on such a daughtercard is 
> > > another matter, but we continue having RM7000 enabled for the Malta.
> > 
> > I've checked interrupts on P6064 and doesn't use the "extented" interrupts.
> > And since O2 uses the same CPU connector for all CPU boards I doubt it
> > it either.
> 
>  Mind that interrupts can be asserted in the RM7k via an external write 
> request too, and I'm fairly sure SGI hardware would use that rather than 
> interrupt inputs given that R4000/R4400 SC/MC CPUs only have Int*(0) wired 
> and all the remaining interrupts are only available via a processor write.  
> Have you checked that?

checked now, IP32 uses a single interrupt pin coming from CRIME ASIC,
so nothing "fanncy" there and no use for the extended RM7k interrupts.

> > What about Malta ? 
> 
>  So this is the CoreBonito64 daughtercard, which can have either an RM5261 
> or an RM7061 processor installed.  The Int*(9:6) inputs are not mentioned, 
> which I take it means unconnected, and ExtRqst* has a pull-up and is 
> otherwise wired to a debug connector only.  Which makes me conclude this 
> feature cannot be used in a standard application with this card.
> 
>  NB there is another interrupt controller embedded in the Bonito64 system 
> controller, which on the CoreBonito64, conversely, can actually be enabled 
> with a jumper and used, but it's not usually either.

ok, thanks for the info.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2020-10-02  9:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 14:23 [PATCH] MIPS: remove the obsolete RM7000 extended interrupts handler Necip Fazil Yildiran
2020-09-18 13:50 ` Thomas Bogendoerfer
2020-09-30 14:34   ` Maciej W. Rozycki
2020-09-30 21:21     ` Thomas Bogendoerfer
2020-09-30 23:10       ` Maciej W. Rozycki
2020-10-02  9:52         ` Thomas Bogendoerfer

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).