public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
To: Benjamin Herrenschmidt <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 2/3] powerpc/mm: Rename find_linux_pte_or_hugepte
Date: Mon, 29 May 2017 20:02:26 +0530	[thread overview]
Message-ID: <87zidvpwcl.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <1494997069.3092.5.camel@kernel.crashing.org>

Benjamin Herrenschmidt <benh@kernel•crashing.org> writes:

> On Wed, 2017-05-17 at 08:57 +0530, Aneesh Kumar K.V wrote:
>> Benjamin Herrenschmidt <benh@kernel•crashing.org> writes:
>>=20
>> > On Tue, 2017-05-16 at 14:56 +0530, Aneesh Kumar K.V wrote:
>> > > +static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea,
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool *is_th=
p, unsigned *hshift)
>> > > +{
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0VM_WARN((!arch_irqs_disab=
led() && !__hard_irqs_disabled()) ,
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0"%s called with irq enabled\n", __func__);
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return __find_linux_pte(p=
gdir, ea, is_thp, hshift);
>> > > +}
>> > > +
>> >=20
>> > When is arch_irqs_disabled() not sufficient ?
>>=20
>> We can do lockless page table walk in interrupt handlers where we find
>> MSR_EE =3D 0.=20
>
> Such as ?
>

kvmppc_do_h_enter() when get called in real mode.

For now i have dropped hard_irq_disabled() and switched these usage to
__find_linux_pte with explict comment around them stating they are
called with MSR_EE =3D 0.

-aneesh

  parent reply	other threads:[~2017-05-29 14:33 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 [this message]
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

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=87zidvpwcl.fsf@skywalker.in.ibm.com \
    --to=aneesh.kumar@linux$(echo .)vnet.ibm.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=fbarrat@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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