From: Michael Ellerman <michael@ellerman.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 4/9] powerpc/mm: Tweak PTE bit combination definitions (v2)
Date: Fri, 13 Mar 2009 14:44:27 +1100 [thread overview]
Message-ID: <1236915867.10992.6.camel@localhost> (raw)
In-Reply-To: <20090311035335.5899BDE1A6@ozlabs.org>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
On Wed, 2009-03-11 at 14:53 +1100, Benjamin Herrenschmidt wrote:
> This patch tweaks the way some PTE bit combinations are defined, in such a
> way that the 32 and 64-bit variant become almost identical and that will
> make it easier to bring in a new common pte-* file for the new variant
> of the Book3-E support.
>
<snip>
> +/* Permission masks used to generate the __P and __S table,
> + *
> + * Note:__pgprot is defined in arch/powerpc/include/asm/page.h
> + */
> +#define PAGE_NONE __pgprot(_PAGE_BASE)
> +#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
> +#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
> #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
> #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
> #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
> #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
> -#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_WRENABLE)
> -#define PAGE_KERNEL_CI __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED | \
> - _PAGE_WRENABLE | _PAGE_NO_CACHE | _PAGE_GUARDED)
> -#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_WRENABLE | _PAGE_EXEC)
Generic code needs PAGE_KERNEL_EXEC:
mm/vmalloc.c:
#ifndef PAGE_KERNEL_EXEC
# define PAGE_KERNEL_EXEC PAGE_KERNEL
#endif
Not having it breaks modules because we don't map the text executable.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-03-13 3:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 3:53 [PATCH 0/9] powerpc: MMU cleanup and propare for new Book3-E Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 1/9] powerpc/kconfig: Kill PPC_MULTIPLATFORM Benjamin Herrenschmidt
2009-03-11 12:04 ` Kumar Gala
2009-03-11 21:38 ` Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 2/9] powerpc/mm: Split the various pgtable-* headers based on MMU type (v3) Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 3/9] powerpc/mm: Unify PTE_RPN_SHIFT and _PAGE_CHG_MASK definitions Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 4/9] powerpc/mm: Tweak PTE bit combination definitions (v2) Benjamin Herrenschmidt
2009-03-13 3:44 ` Michael Ellerman [this message]
2009-03-11 3:53 ` [PATCH 5/9] powerpc/mm: Merge various PTE bits and accessors " Benjamin Herrenschmidt
2009-03-19 16:16 ` Kumar Gala
2009-03-11 3:53 ` [PATCH 6/9] powerpc/mm: Rename arch/powerpc/kernel/mmap.c to mmap_64.c Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 7/9] powerpc/mm: Fix printk type warning in mmu_context_nohash Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 8/9] powerpc/mm: Add option for non-atomic PTE updates to ppc64 Benjamin Herrenschmidt
2009-03-11 3:53 ` [PATCH 9/9] powerpc/mm: Introduce early_init_mmu() on 64-bit 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=1236915867.10992.6.camel@localhost \
--to=michael@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--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).