From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <kumar.gala@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 11/16] powerpc/mm: Add SMP support to no-hash TLB handling v3
Date: Tue, 16 Dec 2008 07:46:18 +1100 [thread overview]
Message-ID: <1229373978.26324.120.camel@pasglop> (raw)
In-Reply-To: <B3FDD472-0720-4454-9329-5A1C8A9BF84A@freescale.com>
> > +void local_flush_tlb_mm(struct mm_struct *mm)
> > +{
> > + unsigned int pid;
> > +
> > + preempt_disable();
> > + pid = mm->context.id;
> > + if (pid != MMU_NO_CONTEXT)
> > + _tlbil_pid(pid);
> > + preempt_enable();
> > +}
> > +EXPORT_SYMBOL(local_flush_tlb_mm);
>
> Do these really get called w/MMU_NO_CONTEXT? What is the calling code
> trying to flush under those situations?
A bit of paranoia but yes, I think they can. flush_* can be called on a
non-current mm, thus an mm without a context (because it's been stolen
mostly) due to calls to unmap_mapping_range() or something like that,
which can be called by some filesystems (especially network filesystems
trying to reflect remote changes on mmap'ed regions I think). Under some
circumstances, ptrace can also cause flushes of non-current mm's.
>
> > Index: linux-work/arch/powerpc/include/asm/mmu.h
> > ===================================================================
> > --- linux-work.orig/arch/powerpc/include/asm/mmu.h 2008-12-15
> > 14:36:20.000000000 +1100
> > +++ linux-work/arch/powerpc/include/asm/mmu.h 2008-12-15
> > 14:36:20.000000000 +1100
> > @@ -15,6 +15,9 @@
> > #define MMU_FTR_TYPE_FSL_E ASM_CONST(0x00000010)
> > #define MMU_FTR_HAS_HIGH_BATS ASM_CONST(0x00010000)
> > #define MMU_FTR_BIG_PHYS ASM_CONST(0x00020000)
> > +#define MMU_FTR_HAS_TLBIVAX_BCAST ASM_CONST(0x00040000)
> > +#define MMU_FTR_HAS_TLBILX_PID ASM_CONST(0x00080000)
>
> Can we make these FTR_USE_ instead of FTR_HAS_. On e500 we have
> TLBIVAX_BCAST but dont plan to use it. I'd prefer not to have to
> answer questions about that.
Hehehe :-) I can change that easily yes.
> > +#define MMU_FTR_TLBIVAX_NEED_LOCK ASM_CONST(0x00100000)
>
> Is this really ivax lock or sync lock?
The whole thing. Not totally clear, you have a better name ? Some CPUs
want a lock on sync and some on ivax, I plan to lock the whole sequence.
Cheers,
Ben.
next prev parent reply other threads:[~2008-12-15 20:48 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 5:43 [PATCH 0/16] powerpc: Preliminary work to enable SMP BookE (v2) Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 1/16] powerpc: Fix bogus cache flushing on all 40x and BookE processors v2 Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 2/16] powerpc: Fix asm EMIT_BUG_ENTRY with !CONFIG_BUG Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 3/16] powerpc/4xx: Extended DCR support v2 Benjamin Herrenschmidt
2008-12-17 17:33 ` Josh Boyer
2008-12-15 5:44 ` [PATCH 4/16] powerpc/fsl-booke: Fix problem with _tlbil_va Benjamin Herrenschmidt
2008-12-15 6:59 ` Stephen Rothwell
2008-12-15 7:04 ` Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 5/16] powerpc/mm: Add local_flush_tlb_mm() to SW loaded TLB implementations Benjamin Herrenschmidt
2008-12-15 20:30 ` Kumar Gala
2008-12-15 5:44 ` [PATCH 6/16] powerpc/mm: Split mmu_context handling v3 Benjamin Herrenschmidt
2008-12-15 15:43 ` Arnd Bergmann
2008-12-15 20:20 ` Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 7/16] powerpc/mm: Rework context management for CPUs with no hash table v2 Benjamin Herrenschmidt
2008-12-17 21:30 ` Kumar Gala
2008-12-15 5:44 ` [PATCH 8/16] powerpc/mm: Rename tlb_32.c and tlb_64.c to tlb_hash32.c and tlb_hash64.c Benjamin Herrenschmidt
2008-12-15 20:36 ` Kumar Gala
2008-12-15 20:46 ` Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 9/16] powerpc/mm: Introduce MMU features v2 Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 10/16] powerpc/mm: Remove flush_HPTE() Benjamin Herrenschmidt
2008-12-15 5:44 ` [PATCH 11/16] powerpc/mm: Add SMP support to no-hash TLB handling v3 Benjamin Herrenschmidt
2008-12-15 20:19 ` Kumar Gala
2008-12-15 20:46 ` Benjamin Herrenschmidt [this message]
2008-12-15 20:57 ` Kumar Gala
2008-12-15 21:03 ` Benjamin Herrenschmidt
2008-12-15 21:10 ` Kumar Gala
2008-12-15 21:18 ` Benjamin Herrenschmidt
2008-12-15 22:19 ` Kumar Gala
2008-12-15 23:31 ` Benjamin Herrenschmidt
2008-12-15 5:45 ` [PATCH 12/16] powerpc/mm: Split low level tlb invalidate for nohash processors Benjamin Herrenschmidt
2008-12-15 5:45 ` [PATCH 13/16] powerpc/44x: No need to mask MSR:CE, ME or DE in _tlbil_va on 440 Benjamin Herrenschmidt
2008-12-15 12:25 ` [PATCH 13/16] powerpc/44x: No need to mask MSR:CE,ME " Josh Boyer
2008-12-15 5:45 ` [PATCH 14/16] powerpc/mm: Runtime allocation of mmu context maps for nohash CPUs v2 Benjamin Herrenschmidt
2008-12-17 21:21 ` Kumar Gala
2008-12-15 5:45 ` [PATCH 15/16] powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED Benjamin Herrenschmidt
2008-12-15 20:54 ` Kumar Gala
2008-12-15 21:01 ` Benjamin Herrenschmidt
2008-12-15 21:08 ` Kumar Gala
2008-12-15 21:03 ` Michael Ellerman
2008-12-15 21:05 ` Benjamin Herrenschmidt
2008-12-15 5:45 ` [PATCH 16/16] powerpc/44x: 44x TLB doesn't need "Guarded" set for all pages Benjamin Herrenschmidt
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=1229373978.26324.120.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@ozlabs.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).