Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e77c232c authored by Franck Bui-Huu's avatar Franck Bui-Huu Committed by Ralf Baechle
Browse files

[MIPS] Compile __do_IRQ() when really needed



__do_IRQ() is needed only by irq handlers that can't use
default handlers defined in kernel/irq/chip.c.

For others platforms there's no need to compile this function
since it won't be used. For those platforms this patch defines
GENERIC_HARDIRQS_NO__DO_IRQ symbol which is used exactly for
this purpose.

Futhermore for platforms which do not use __do_IRQ(), end()
method which is part of the 'irq_chip' structure is not used.
This patch simply removes this method in this case.

Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1ccd1c1c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ config LASAT
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
	select SYS_SUPPORTS_LITTLE_ENDIAN
	select GENERIC_HARDIRQS_NO__DO_IRQ

config MIPS_ATLAS
	bool "MIPS Atlas board"
@@ -265,6 +266,7 @@ config MIPS_ATLAS
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_LITTLE_ENDIAN
	select SYS_SUPPORTS_MULTITHREADING if EXPERIMENTAL
	select GENERIC_HARDIRQS_NO__DO_IRQ
	help
	  This enables support for the MIPS Technologies Atlas evaluation
	  board.
@@ -419,6 +421,7 @@ config MOMENCO_OCELOT_C
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_64BIT_KERNEL
	select SYS_SUPPORTS_BIG_ENDIAN
	select GENERIC_HARDIRQS_NO__DO_IRQ
	help
	  The Ocelot is a MIPS-based Single Board Computer (SBC) made by
	  Momentum Computer <http://www.momenco.com/>.
@@ -569,6 +572,7 @@ config SGI_IP27
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_NUMA
	select SYS_SUPPORTS_SMP
	select GENERIC_HARDIRQS_NO__DO_IRQ
	help
	  This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
	  workstations.  To compile a Linux kernel that runs on these, say Y
@@ -835,6 +839,10 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
	bool
	default y

config GENERIC_HARDIRQS_NO__DO_IRQ
	bool
	default n

#
# Select some configuration options automatically based on user selections.
#
@@ -996,6 +1004,7 @@ config SOC_PNX8550
	select HW_HAS_PCI
	select SYS_HAS_CPU_MIPS32_R1
	select SYS_SUPPORTS_32BIT_KERNEL
	select GENERIC_HARDIRQS_NO__DO_IRQ

config SWAP_IO_SPACE
	bool
+0 −1
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@ static struct irq_chip ioasic_irq_type = {
	.mask = mask_ioasic_irq,
	.mask_ack = ack_ioasic_irq,
	.unmask = unmask_ioasic_irq,
	.end = end_ioasic_irq,
};


+0 −7
Original line number Diff line number Diff line
@@ -57,19 +57,12 @@ static void ack_kn02_irq(unsigned int irq)
	iob();
}

static void end_kn02_irq(unsigned int irq)
{
	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
		unmask_kn02_irq(irq);
}

static struct irq_chip kn02_irq_type = {
	.typename = "KN02-CSR",
	.ack = ack_kn02_irq,
	.mask = mask_kn02_irq,
	.mask_ack = ack_kn02_irq,
	.unmask = unmask_kn02_irq,
	.end = end_kn02_irq,
};


+0 −7
Original line number Diff line number Diff line
@@ -56,19 +56,12 @@ static void emma2rh_irq_disable(unsigned int irq)
	ll_emma2rh_irq_disable(irq - emma2rh_irq_base);
}

static void emma2rh_irq_end(unsigned int irq)
{
	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
		ll_emma2rh_irq_enable(irq - emma2rh_irq_base);
}

struct irq_chip emma2rh_irq_controller = {
	.typename = "emma2rh_irq",
	.ack = emma2rh_irq_disable,
	.mask = emma2rh_irq_disable,
	.mask_ack = emma2rh_irq_disable,
	.unmask = emma2rh_irq_enable,
	.end = emma2rh_irq_end,
};

void emma2rh_irq_init(u32 irq_base)
+0 −7
Original line number Diff line number Diff line
@@ -48,19 +48,12 @@ static void emma2rh_sw_irq_disable(unsigned int irq)
	ll_emma2rh_sw_irq_disable(irq - emma2rh_sw_irq_base);
}

static void emma2rh_sw_irq_end(unsigned int irq)
{
	if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
		ll_emma2rh_sw_irq_enable(irq - emma2rh_sw_irq_base);
}

struct irq_chip emma2rh_sw_irq_controller = {
	.typename = "emma2rh_sw_irq",
	.ack = emma2rh_sw_irq_disable,
	.mask = emma2rh_sw_irq_disable,
	.mask_ack = emma2rh_sw_irq_disable,
	.unmask = emma2rh_sw_irq_enable,
	.end = emma2rh_sw_irq_end,
};

void emma2rh_sw_irq_init(u32 irq_base)
Loading