From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/9] arm64: Add new routine local_disable
Date: Tue, 26 Aug 2014 17:23:24 +0100 [thread overview]
Message-ID: <20140826162324.GF4078@leverpostej> (raw)
In-Reply-To: <20140826160443.GI16482@arm.com>
On Tue, Aug 26, 2014 at 05:04:43PM +0100, Catalin Marinas wrote:
> On Fri, Aug 22, 2014 at 08:49:16PM +0100, Geoff Levand wrote:
> > Add the new arm64 routine local_disable() to allow the masking of several DAIF
> > flags in one operation. Currently, we only have routines to mask individual
> > flags, and to mask several flags multiple calls to daifset are required.
> >
> > Signed-off-by: Geoff Levand <geoff@infradead.org>
> > ---
> > arch/arm64/include/asm/irqflags.h | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h
> > index 11cc941..28521d4 100644
> > --- a/arch/arm64/include/asm/irqflags.h
> > +++ b/arch/arm64/include/asm/irqflags.h
> > @@ -113,5 +113,18 @@ static inline int arch_irqs_disabled_flags(unsigned long flags)
> > #define local_dbg_enable() asm("msr daifclr, #8" : : : "memory")
> > #define local_dbg_disable() asm("msr daifset, #8" : : : "memory")
> >
> > +enum daif_flag {
> > + DAIF_FIQ = (1UL << 6),
> > + DAIF_IRQ = (1UL << 7),
> > + DAIF_ASYNC = (1UL << 8),
> > + DAIF_DBG = (1UL << 9),
> > + DAIF_ALL = (0xffUL << 6),
> > +};
> > +
> > +static inline void local_disable(unsigned long daif_flags)
> > +{
> > + arch_local_irq_restore(daif_flags | arch_local_save_flags());
> > +}
>
> Who's using this function? I don't see any patch in this series calling
> it.
This was for implementing the spin-table cpu-return-addr idea. Before
returning to the spin-table we need to mask everything, and not doing
that as four back-to-back context-synchronizing writes would be nice.
It should probably be introduced by the cpu-return-addr series unless
this is useful elsewhere. If we don't actually have another use, we
could just have a msr daifset, #0xf (arch_local_disable_all?).
Thanks,
Mark.
next prev parent reply other threads:[~2014-08-26 16:23 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 19:49 [PATCH 0/9] arm64: minor fixups and enhancements Geoff Levand
2014-08-22 19:49 ` [PATCH 1/9] arm64: Fix efi kernel entry Geoff Levand
2014-08-26 15:55 ` Catalin Marinas
2014-08-26 16:19 ` Ard Biesheuvel
2014-08-26 18:42 ` Geoff Levand
2014-08-22 19:49 ` [PATCH 4/9] arm64: Remove unused variable in head.S Geoff Levand
2014-08-27 8:40 ` Will Deacon
2014-08-22 19:49 ` [PATCH 6/9] arm64: Add new routine local_disable Geoff Levand
2014-08-26 16:04 ` Catalin Marinas
2014-08-26 16:23 ` Mark Rutland [this message]
2014-08-22 19:49 ` [PATCH 5/9] arm64: Fix include header order in vmlinux.lds.S Geoff Levand
2014-08-26 16:27 ` Mark Rutland
2014-08-26 19:27 ` Geoff Levand
2014-08-27 8:24 ` Catalin Marinas
2014-08-29 21:53 ` Geoff Levand
2014-08-22 19:49 ` [PATCH 2/9] arm64: Fix INVALID_HWID definition Geoff Levand
2014-08-26 15:57 ` Catalin Marinas
2014-08-26 18:18 ` Geoff Levand
2014-08-27 8:21 ` Catalin Marinas
2014-08-26 16:31 ` Mark Rutland
2014-08-26 17:38 ` Geoff Levand
2014-08-22 19:49 ` [PATCH 7/9] arm64: Add atomic macros to assembler.h Geoff Levand
2014-08-26 16:05 ` Catalin Marinas
2014-08-26 19:40 ` Geoff Levand
2014-08-27 8:25 ` Catalin Marinas
2014-08-22 19:49 ` [PATCH 3/9] arm64: Remove unneeded extern keyword Geoff Levand
2014-08-26 16:11 ` Mark Rutland
2014-08-22 19:49 ` [PATCH 9/9] arm64: Add new cpu-return-addr device tree binding Geoff Levand
2014-08-27 8:30 ` Catalin Marinas
2014-08-29 21:45 ` Geoff Levand
2014-08-22 19:49 ` [PATCH 8/9] arm64: Add missing AT() macros to vmlinux.lds.S Geoff Levand
2014-08-26 16:08 ` Catalin Marinas
2014-08-26 19:33 ` Geoff Levand
2014-08-27 6:53 ` AKASHI Takahiro
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=20140826162324.GF4078@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).