Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > On Wed, 2017-05-17 at 08:57 +0530, Aneesh Kumar K.V wrote: >> Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: >> >> > 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, >> > > + bool *is_thp, unsigned *hshift) >> > > +{ >> > > + VM_WARN((!arch_irqs_disabled() && !__hard_irqs_disabled()) , >> > > + "%s called with irq enabled\n", __func__); >> > > + return __find_linux_pte(pgdir, ea, is_thp, hshift); >> > > +} >> > > + >> > >> > When is arch_irqs_disabled() not sufficient ? >> >> We can do lockless page table walk in interrupt handlers where we find >> MSR_EE = 0. > > 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 = 0. -aneesh