linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, patches@linaro.org,
	linaro-kernel@lists.linaro.org,
	John Stultz <john.stultz@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Tobias Klauser <tklauser@distanz.ch>
Subject: Re: [PATCH v1 1/6] arm: fiq: Replace default FIQ handler
Date: Mon, 08 Sep 2014 14:22:57 +0100	[thread overview]
Message-ID: <540DADB1.4060105@linaro.org> (raw)
In-Reply-To: <alpine.LFD.2.11.1409051348200.16533@knanqh.ubzr>

On 05/09/14 19:04, Nicolas Pitre wrote:
> On Fri, 5 Sep 2014, Daniel Thompson wrote:
> 
>> On 04/09/14 19:57, Nicolas Pitre wrote:
>>> On Thu, 4 Sep 2014, Daniel Thompson wrote:
>>>
>>>> +@ svc_exit_via_fiq - similar to svc_exit but switches to FIQ mode before exit
>>>> +@
>>>> +@ This macro acts in a similar manner to svc_exit but switches to FIQ
>>>> +@ mode to restore the final part of the register state.
>>>> +@
>>>> +@ We cannot use the normal svc_exit procedure because that would
>>>> +@ clobber spsr_svc (FIQ could be delivered during the first few instructions
>>>> +@ of vector_swi meaning its contents have not been saved anywhere).
>>>> +@
>>>
>>> Wouldn't it be better for this macro to live in entry-header.S alongside 
>>> the others?
>>
>> I'm not sure either way.
>>
>> svc_exit_from_fiq isn't needed by entry-common.S and cannot be used by
>> entry-v7m.S because v7m has no FIQ. For that reason I decided to place
>> it alongside svc_entry in entry-armv.S rather than alongside svc_exit in
>> entry-header.S .
> 
> Here's a list of macros from entry-headers.S that I don't see being used 
> in entry-v7m.S: zero_fp, alignment_trap, store_user_sp_lr, 
> load_user_sp_lr, svc_exit, ct_user_exit, ct_user_enter.

All except one of of these are consumed either by entry-common.S or by
entry-header.S itself.

svc_exit is the only exception, it is exclusively consumed by entry-armv.S.


> Yet, entry-header.S contains macros such as v7m_exception_entry and 
> v7m_exception_slow_exit which are unlikely to ever be used in 
> entry-armv.S.

Although these macros are v7m specific they are used in
conditionally compiled code within entry-common.S in order to implement
system call handlers.


>> I am happy to move it if you have a strong preference here. Please let
>> me know.
> 
> I don't have a strong preference, but a preference nevertheless.
> 
> It just looks odd that a file is already dedicated to gather all those 
> macros for similar purposes and this one is not there.  That makes 
> future code review/maintenance a bit annoying if similar things are not 
> kept in one place.

I will move the macro to entry-common.S in order to keep it alongside
its workalike function svc_exit.

That said, I do retain a (pretty weakly held) view that both these
macros might be better off moved to entry-armv.S .



  reply	other threads:[~2014-09-08 13:23 UTC|newest]

Thread overview: 194+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1403174303-25456-1-git-send-email-daniel.thompson@linaro.org>
2014-06-24 15:18 ` [PATCH v6 0/4] arm: KGDB NMI/FIQ support Daniel Thompson
2014-06-24 15:18   ` [PATCH v6 1/4] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-06-24 15:44     ` Nicolas Pitre
2014-06-24 15:58       ` Daniel Thompson
2014-06-24 15:18   ` [PATCH v6 2/4] arm: fiq: Allow EOI to be communicated to the intc Daniel Thompson
2014-06-24 15:46     ` Nicolas Pitre
2014-06-24 15:18   ` [PATCH v6 3/4] ARM: Move some macros from entry-armv to entry-header Daniel Thompson
2014-06-24 15:53     ` Nicolas Pitre
2014-06-24 15:18   ` [PATCH v6 4/4] ARM: Add KGDB/KDB FIQ debugger generic code Daniel Thompson
2014-06-24 16:08     ` Russell King - ARM Linux
2014-06-26  9:54       ` Daniel Thompson
2014-06-30 13:54         ` Daniel Thompson
2014-06-24 16:22     ` Nicolas Pitre
2014-06-26 12:48       ` Daniel Thompson
2014-06-30  8:53   ` [PATCH v7 0/4] arm: KGDB NMI/FIQ support Daniel Thompson
2014-06-30  8:53     ` [PATCH v7 1/4] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-06-30  8:53     ` [PATCH v7 2/4] arm: fiq: Allow EOI to be communicated to the intc Daniel Thompson
2014-06-30  8:53     ` [PATCH v7 3/4] ARM: Move some macros from entry-armv to entry-header Daniel Thompson
2014-06-30  8:53     ` [PATCH v7 4/4] ARM: Add KGDB/KDB FIQ debugger generic code Daniel Thompson
2014-07-10  8:03     ` [PATCH v8 0/4] arm: KGDB NMI/FIQ support Daniel Thompson
2014-07-10  8:03       ` [PATCH v8 1/4] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-07-10  8:03       ` [PATCH v8 2/4] arm: fiq: Allow ACK and EOI to be passed to the intc Daniel Thompson
2014-07-10  8:03       ` [PATCH v8 3/4] ARM: Move some macros from entry-armv to entry-header Daniel Thompson
2014-07-10  8:03       ` [PATCH v8 4/4] ARM: Add KGDB/KDB FIQ debugger generic code Daniel Thompson
2014-08-13 21:45         ` Russell King - ARM Linux
2014-08-14 10:48           ` Daniel Thompson
2014-08-14 11:15             ` [RFC PATCH 0/3] arm: FIQ IPI support Daniel Thompson
2014-08-14 11:15               ` [RFC PATCH 1/3] arm: smp: Introduce a special IPI signalled using FIQ Daniel Thompson
2014-08-14 11:15               ` [RFC PATCH 2/3] arm: kgdb: Add support for IPI FIQ roundup Daniel Thompson
2014-08-14 11:15               ` [RFC PATCH 3/3] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-08-14 12:36             ` [PATCH v8 4/4] ARM: Add KGDB/KDB FIQ debugger generic code Russell King - ARM Linux
2014-08-14 15:02               ` Daniel Thompson
2014-07-14 13:51       ` [PATCH v8 0/4] arm: KGDB NMI/FIQ support Harro Haan
2014-07-15  9:41         ` Daniel Thompson
2014-07-15 13:04           ` Harro Haan
2014-07-15 14:52             ` Daniel Thompson
2014-07-15 15:59               ` Harro Haan
2014-07-15 17:08                 ` Daniel Thompson
2014-07-16 17:15                   ` Harro Haan
2014-07-17  9:01                     ` Daniel Thompson
2014-07-15 18:45           ` Marek Vasut
2014-07-16 12:54             ` Daniel Thompson
2014-07-16 17:21               ` Harro Haan
2014-07-17  9:20                 ` Daniel Thompson
2014-08-18 13:40       ` [PATCH v9 00/16] " Daniel Thompson
2014-08-18 13:40         ` [PATCH v9 01/16] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-08-18 13:40         ` [PATCH v9 02/16] arm: fiq: Allow ACK and EOI to be passed to the intc Daniel Thompson
2014-08-18 13:40         ` [PATCH v9 03/16] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-08-18 13:40         ` [PATCH v9 04/16] arm: smp: Introduce a special IPI signalled using FIQ Daniel Thompson
2014-08-18 13:40         ` [PATCH v9 05/16] arm: KGDB/KDB FIQ support Daniel Thompson
2014-08-19 16:45         ` [PATCH v10 00/19] arm: KGDB NMI/FIQ support Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 01/19] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 02/19] arm: fiq: Allow ACK and EOI to be passed to the intc Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 03/19] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-08-19 17:37             ` Russell King - ARM Linux
2014-08-19 18:12               ` Daniel Thompson
2014-08-28 15:01                 ` Russell King - ARM Linux
2014-08-28 15:43                   ` Paul E. McKenney
2014-08-28 15:54                   ` Daniel Thompson
2014-08-28 16:15                     ` Paul E. McKenney
2014-09-02 11:03                       ` Daniel Thompson
2014-09-02 11:36                         ` Russell King - ARM Linux
2014-09-02 11:49                   ` Daniel Thompson
2014-09-02 14:23                     ` Paul E. McKenney
2014-09-02 16:42                     ` Russell King - ARM Linux
2014-09-03 10:21                       ` Daniel Thompson
2014-09-03 19:34                         ` Russell King - ARM Linux
2014-09-04  9:09                           ` Daniel Thompson
2014-09-04  9:45                             ` Russell King - ARM Linux
2014-09-04 10:04                               ` Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 04/19] arm: smp: Introduce a special IPI signalled using FIQ Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 05/19] arm: KGDB/KDB FIQ support Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 06/19] irqchip: gic: Provide support for interrupt grouping Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 07/19] irqchip: gic: Add support for FIQ management Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 08/19] irqchip: gic: Remove spin locks from eoi_irq Daniel Thompson
2014-08-19 16:45           ` [PATCH v10 09/19] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 10/19] irqchip: gic: Group 0 workaround Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 11/19] irqchip: vic: Add support for FIQ management Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 12/19] serial: kgdb_nmi: No CON_ENABLED by default Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 13/19] serial: amba-pl011: Use container_of() to get uart_amba_port Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 14/19] serial: amba-pl011: Move pl011_hwinit() Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 15/19] serial: amba-pl011: Pass FIQ information to KGDB Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 16/19] serial: asc: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 17/19] serial: asc: Adopt readl_/writel_relaxed() Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 18/19] serial: imx: clean up imx_poll_get_char() Daniel Thompson
2014-08-19 16:46           ` [PATCH v10 19/19] serial: imx: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-09-02 13:00           ` [PATCH v11 00/19] arm: KGDB NMI/FIQ support Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 01/19] arm: fiq: Add callbacks to manage FIQ routings Daniel Thompson
2014-09-02 18:51               ` Russell King - ARM Linux
2014-09-03  0:03               ` Thomas Gleixner
2014-09-03  8:27                 ` Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 02/19] arm: fiq: Allow ACK and EOI to be passed to the intc Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 03/19] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 04/19] arm: smp: Introduce a special IPI signalled using FIQ Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 05/19] arm: KGDB/KDB FIQ support Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 06/19] irqchip: gic: Provide support for interrupt grouping Daniel Thompson
2014-09-02 19:33               ` Russell King - ARM Linux
2014-09-02 21:36                 ` Catalin Marinas
2014-09-03  9:44                   ` Daniel Thompson
2014-09-03  9:28                 ` Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 07/19] irqchip: gic: Add support for FIQ management Daniel Thompson
2014-09-02 19:36               ` Russell King - ARM Linux
2014-09-02 13:00             ` [PATCH v11 08/19] irqchip: gic: Remove spin locks from eoi_irq Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 09/19] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 10/19] irqchip: gic: Group 0 workaround Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 11/19] irqchip: vic: Add support for FIQ management Daniel Thompson
2014-09-02 19:40               ` Russell King - ARM Linux
2014-09-02 13:00             ` [PATCH v11 12/19] serial: kgdb_nmi: No CON_ENABLED by default Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 13/19] serial: amba-pl011: Use container_of() to get uart_amba_port Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 14/19] serial: amba-pl011: Move pl011_hwinit() Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 15/19] serial: amba-pl011: Pass FIQ information to KGDB Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 16/19] serial: asc: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 17/19] serial: asc: Adopt readl_/writel_relaxed() Daniel Thompson
2014-09-02 13:42               ` [STLinux Kernel] " Peter Griffin
2014-09-02 13:55               ` Maxime Coquelin
2014-09-02 13:00             ` [PATCH v11 18/19] serial: imx: clean up imx_poll_get_char() Daniel Thompson
2014-09-02 13:00             ` [PATCH v11 19/19] serial: imx: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-09-02 23:02             ` [PATCH v11 00/19] arm: KGDB NMI/FIQ support Thomas Gleixner
2014-09-03  9:02               ` Daniel Thompson
2014-09-03 10:06                 ` Thomas Gleixner
2014-09-03 10:30                   ` Daniel Thompson
2014-09-04 16:03             ` [PATCH v1 0/6] arm: Implement arch_trigger_all_cpu_backtrace Daniel Thompson
2014-09-04 16:03               ` [PATCH v1 1/6] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-04 18:57                 ` Nicolas Pitre
2014-09-05  9:03                   ` Daniel Thompson
2014-09-05 18:04                     ` Nicolas Pitre
2014-09-08 13:22                       ` Daniel Thompson [this message]
2014-09-04 16:03               ` [PATCH v1 2/6] arm: smp: Introduce a non-maskable IPI Daniel Thompson
2014-09-04 16:03               ` [PATCH v1 3/6] arm64: Introduce dummy version of asm/fiq.h Daniel Thompson
2014-09-04 16:03               ` [PATCH v1 4/6] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-04 16:03               ` [PATCH v1 5/6] irqchip: gic: Group 0 workaround Daniel Thompson
2014-09-04 16:03               ` [PATCH v1 6/6] arm: Implement arch_trigger_all_cpu_backtrace Daniel Thompson
2014-09-05 15:33               ` [PATCH v2 0/5] " Daniel Thompson
2014-09-05 15:33                 ` [PATCH v2 1/5] ARM: remove unused do_unexp_fiq() function Daniel Thompson
2014-09-05 15:33                 ` [PATCH v2 2/5] ARM: add basic support for on-demand backtrace of other CPUs Daniel Thompson
2014-09-05 15:33                 ` [PATCH v2 3/5] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-05 15:33                 ` [PATCH v2 4/5] arm64: Introduce dummy version of asm/fiq.h Daniel Thompson
2014-09-05 16:50                   ` Catalin Marinas
2014-09-08 11:03                     ` Daniel Thompson
2014-09-05 15:33                 ` [PATCH v2 5/5] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-08 15:28                 ` [PATCH v3 0/5] arm: Implement arch_trigger_all_cpu_backtrace Daniel Thompson
2014-09-08 15:28                   ` [PATCH v3 1/5] ARM: remove unused do_unexp_fiq() function Daniel Thompson
2014-09-08 15:28                   ` [PATCH v3 2/5] ARM: add basic support for on-demand backtrace of other CPUs Daniel Thompson
2014-09-08 15:28                   ` [PATCH v3 3/5] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-08 15:49                     ` Nicolas Pitre
2014-09-08 15:57                       ` Daniel Thompson
2014-09-08 15:28                   ` [PATCH v3 4/5] arm64: Introduce dummy version of asm/fiq.h Daniel Thompson
2014-09-08 15:28                   ` [PATCH v3 5/5] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-08 16:23                     ` Russell King - ARM Linux
2014-09-09  8:24                       ` Daniel Thompson
2014-09-14 11:53                         ` Daniel Thompson
2014-09-08 16:24                   ` [PATCH v3 0/5] arm: Implement arch_trigger_all_cpu_backtrace Russell King - ARM Linux
2014-09-09  8:26                     ` Daniel Thompson
2014-09-09 14:15                   ` [PATCH v4 0/6] " Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 1/6] ARM: remove unused do_unexp_fiq() function Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 2/6] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 3/6] arm64: Introduce dummy version of asm/fiq.h Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 4/6] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 5/6] ARM: add basic support for on-demand backtrace of other CPUs Daniel Thompson
2014-09-09 14:15                     ` [PATCH v4 6/6] arm: smp: Handle ipi_cpu_backtrace() using FIQ (if available) Daniel Thompson
2014-09-11 11:31                     ` [PATCH 3.17-rc4 v5 0/6] arm: Implement arch_trigger_all_cpu_backtrace Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 1/6] ARM: remove unused do_unexp_fiq() function Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 2/6] arm: fiq: Replace default FIQ handler Daniel Thompson
2014-09-12 17:03                         ` Russell King - ARM Linux
2014-09-12 17:07                           ` Russell King - ARM Linux
2014-09-13 12:01                           ` Daniel Thompson
2014-09-12 17:08                         ` Russell King - ARM Linux
2014-09-12 17:14                         ` Russell King - ARM Linux
2014-09-12 17:19                           ` Russell King - ARM Linux
2014-09-12 17:23                             ` Russell King - ARM Linux
2014-09-14  6:36                               ` Daniel Thompson
2014-09-14  8:45                                 ` Russell King - ARM Linux
2014-09-14 11:27                               ` Daniel Thompson
2014-09-13 12:03                           ` Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 3/6] arm64: Introduce dummy version of asm/fiq.h Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 4/6] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 5/6] ARM: add basic support for on-demand backtrace of other CPUs Daniel Thompson
2014-09-11 11:31                       ` [PATCH 3.17-rc4 v5 6/6] arm: smp: Handle ipi_cpu_backtrace() using FIQ (if available) Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 06/16] irqchip: gic: Provide support for interrupt grouping Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 07/16] irqchip: gic: Add support for FIQ management Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 08/16] irqchip: gic: Remove spin locks from eoi_irq Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 09/16] irqchip: gic: Add support for IPI FIQ Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 10/16] irqchip: gic: Group 0 workaround Daniel Thompson
2014-08-18 14:12       ` [PATCH v9 11/16] irqchip: vic: Add support for FIQ management Daniel Thompson
2014-08-18 14:28       ` [PATCH v9 12/16] serial: amba-pl011: Pass FIQ information to KGDB Daniel Thompson
2014-08-18 18:30         ` Peter Hurley
2014-08-19  9:08           ` Daniel Thompson
2014-08-19 11:58             ` Peter Hurley
2014-08-19 12:51               ` Daniel Thompson
2014-08-18 14:28       ` [PATCH v9 13/16] serial: asc: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-08-18 14:28       ` [PATCH v9 14/16] serial: asc: Adopt readl_/writel_relaxed() Daniel Thompson
2014-08-18 14:28       ` [PATCH v9 15/16] serial: imx: clean up imx_poll_get_char() Daniel Thompson
2014-08-18 14:28       ` [PATCH v9 16/16] serial: imx: Add support for KGDB's FIQ/NMI mode Daniel Thompson
2014-08-18 17:32         ` Dirk Behme

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540DADB1.4060105@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    --cc=patches@linaro.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=tklauser@distanz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).