All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] Get rid of FIQ_START/enable/disable_fiq() + some FIQ cleanups
@ 2012-08-05 23:02 ` Anton Vorontsov
  0 siblings, 0 replies; 54+ messages in thread
From: Anton Vorontsov @ 2012-08-05 23:02 UTC (permalink / raw)
  To: Russell King
  Cc: John Stultz, linux-kernel, linux-arm-kernel, linaro-kernel,
	patches, kernel-team, Ben Dooks, Kukjin Kim, Sascha Hauer,
	Tony Lindgren, Mark Brown, Liam Girdwood

Hello Russell,

During KDB FIQ patches review you mentioned that I should not introduce
another FIQ_START. It seems that in v3.6-rc the FIQ_START issue was
somewhat band-aided, i.e. machines don't necessary need to define this
stuff any longer, but I also read the background of the issue, and you
once said that you don't want the FIQ subsystem to mess with genirq.

It is surely makes sense as FIQs are arch-specific, plus FIQs are special
in that way that platform makers are free to connects device directly
to the FIQ line, avoiding IC routing, and then enable_fiq(<IRQ>) would
look awkward, at the best.

So, given that, it seems that the only entity that knows for sure how
the particular FIQ is routed is whoever claims the FIQ and fills-in the
fiq_handler struct. It might make sense to introduce disable/enable
callbacks in the fiq_handler struct, and then prototypes for disable/
enable FIQ calls would look like this:

	enable_fiq(struct fiq_handler *fh);
	disable_fiq(struct fiq_handler *fh);

I.e. completely abstracted from the genirq.

Although, to not duplicate IC code, I think it's pretty legitimate to
call genirq functions iff the caller knows for sure that FIQ comes from
IRQ line and it is is routed through the well-known platform IC.

In that case (which is a majority), the typical user would do this:

	static int irq_line;

	void foo_enable_fiq(struct fiq_handler *fh)
	{
		enable_irq(irq_line);
	}

	static struct fiq_handler foo_fiq = {
		.name = "foo",
		.enable_fiq = foo_enable_fiq,
	};

	claim_fiq(&foo_fiq);
	enable_fiq(&foo_fiq);

Obviously, it's needless indirection, so I don't do this. If we ever
pass 'foo_fiq' to some device, which does not know all the routing
details, then it would make sense to introduce it, but not now.

So, the patch set is pretty straightforward:

- Get rid of FIQ_START. Nobody but platform-specific code (and drivers)
  should know the details about which interrupt can be routed to FIQ
  and which cannot;

- Remove disable/enable_fiq() calls from the FIQ subsys (the calls can
  be reintroduced w/ new prototypes when/if needed).

Does the approach make sense?

Thanks!

--
 arch/arm/include/asm/fiq.h                |    2 --
 arch/arm/include/asm/mach/irq.h           |    9 +++++++--
 arch/arm/kernel/fiq.c                     |   22 +++-------------------
 arch/arm/kernel/irq.c                     |    2 --
 arch/arm/mach-rpc/dma.c                   |    4 ++--
 arch/arm/mach-rpc/include/mach/irqs.h     |    8 ++++----
 arch/arm/mach-rpc/irq.c                   |   21 +++++----------------
 arch/arm/mach-s3c24xx/include/mach/irqs.h |    3 ---
 arch/arm/plat-mxc/avic.c                  |    4 +---
 arch/arm/plat-mxc/include/mach/irqs.h     |    2 --
 arch/arm/plat-mxc/tzic.c                  |    4 +---
 arch/arm/plat-omap/include/plat/irqs.h    |    4 ----
 arch/arm/plat-s3c24xx/irq.c               |    6 ++----
 drivers/media/video/mx1_camera.c          |    6 +++---
 sound/soc/fsl/imx-pcm-fiq.c               |    4 ++--
 15 files changed, 30 insertions(+), 71 deletions(-)

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

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

end of thread, other threads:[~2012-08-26  4:27 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-05 23:02 [PATCH 0/9] Get rid of FIQ_START/enable/disable_fiq() + some FIQ cleanups Anton Vorontsov
2012-08-05 23:02 ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 1/9] ARM: mach-rpc: Don't register FIQs with genirq Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 2/9] ARM: plat-s3c24xx: Don't use FIQ_START Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-08 10:47   ` Kukjin Kim
2012-08-08 10:47     ` Kukjin Kim
2012-08-08 11:00     ` Anton Vorontsov
2012-08-08 11:00       ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 3/9] [media] mx1_camera: Don't use {en,dis}able_fiq() calls Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-08  6:57   ` Sascha Hauer
2012-08-08  6:57     ` Sascha Hauer
2012-08-05 23:03 ` [PATCH 4/9] ASoC: imx: " Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-06 15:19   ` Matt Sealey
2012-08-06 15:19     ` Matt Sealey
2012-08-06 15:49     ` Mark Brown
2012-08-06 15:49       ` Mark Brown
2012-08-06 18:09       ` Matt Sealey
2012-08-06 18:09         ` Matt Sealey
2012-08-06 19:37         ` Mark Brown
2012-08-06 19:37           ` Mark Brown
2012-08-06 20:16           ` Robert Schwebel
2012-08-06 20:16             ` Robert Schwebel
2012-08-06 20:39             ` Matt Sealey
2012-08-06 20:39               ` Matt Sealey
2012-08-06 21:41               ` Mark Brown
2012-08-06 21:41                 ` Mark Brown
2012-08-06 23:26                 ` Matt Sealey
2012-08-06 23:26                   ` Matt Sealey
2012-08-07  6:35                 ` Sascha Hauer
2012-08-07  6:35                   ` Sascha Hauer
2012-08-07 16:50                   ` Mark Brown
2012-08-07 16:50                     ` Mark Brown
2012-08-07  2:09               ` Shawn Guo
2012-08-07  2:09                 ` Shawn Guo
2012-08-07 16:48     ` Dave Martin
2012-08-07 16:48       ` Dave Martin
2012-08-08  6:57   ` Sascha Hauer
2012-08-08  6:57     ` Sascha Hauer
2012-08-05 23:03 ` [PATCH 5/9] ARM: FIQ: Remove enable_fiq() and disable_fiq() calls Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 6/9] ARM: FIQ: Remove FIQ_START Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 7/9] ARM: FIQ: Should include asm/mach/irq.h Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 8/9] ARM: FIQ: Implement !CONFIG_FIQ stubs Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-05 23:03 ` [PATCH 9/9] ARM: FIQ: Make show_fiq_list() return void Anton Vorontsov
2012-08-05 23:03   ` Anton Vorontsov
2012-08-26  4:24 ` [PATCH 0/9] Get rid of FIQ_START/enable/disable_fiq() + some FIQ cleanups Anton Vorontsov
2012-08-26  4:24   ` Anton Vorontsov

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.