linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au,
	Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/3] powerpc: Add __hard_irqs_disabled()
Date: Wed, 17 May 2017 21:04:47 +1000	[thread overview]
Message-ID: <1495019087.30802.12.camel@gmail.com> (raw)
In-Reply-To: <1494926782-25700-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Tue, 2017-05-16 at 14:56 +0530, Aneesh Kumar K.V wrote:
> Add __hard_irqs_disabled() similar to arch_irqs_disabled to check whether irqs
> are hard disabled.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>  arch/powerpc/include/asm/hw_irq.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h
> index eba60416536e..541bd42f902f 100644
> --- a/arch/powerpc/include/asm/hw_irq.h
> +++ b/arch/powerpc/include/asm/hw_irq.h
> @@ -88,6 +88,12 @@ static inline bool arch_irqs_disabled(void)
>  	return arch_irqs_disabled_flags(arch_local_save_flags());
>  }
>  
> +static inline bool __hard_irqs_disabled(void)
> +{
> +	unsigned long flags = mfmsr();
> +	return (flags & MSR_EE) == 0;

I have some patches that ensure MSR_EE is never 0, what are we protecting
against - external interrupts, IPI's or something else? I suspect its IPI's

Balbir SIngh.

      parent reply	other threads:[~2017-05-17 11:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16  9:26 [PATCH 1/3] powerpc: Add __hard_irqs_disabled() Aneesh Kumar K.V
2017-05-16  9:26 ` [PATCH 2/3] powerpc/mm: Rename find_linux_pte_or_hugepte Aneesh Kumar K.V
2017-05-16 11:22   ` Benjamin Herrenschmidt
2017-05-17  3:27     ` Aneesh Kumar K.V
2017-05-17  4:57       ` Benjamin Herrenschmidt
2017-05-17  5:30         ` Madhavan Srinivasan
2017-05-29 14:32         ` Aneesh Kumar K.V
2017-05-30  3:21           ` Benjamin Herrenschmidt
2017-05-16  9:26 ` [PATCH 3/3] powerpc/mm: Don't send IPI to all cpus on THP updates Aneesh Kumar K.V
2017-05-16 11:22 ` [PATCH 1/3] powerpc: Add __hard_irqs_disabled() Benjamin Herrenschmidt
2017-05-17 11:04 ` Balbir Singh [this message]

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=1495019087.30802.12.camel@gmail.com \
    --to=bsingharora@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).