powerpc/8xx: Handle PAGE_USER via APG bits
authorLEROY Christophe <christophe.leroy@c-s.fr>
Wed, 22 Apr 2015 10:06:43 +0000 (12:06 +0200)
committerScott Wood <scottwood@freescale.com>
Wed, 3 Jun 2015 02:37:27 +0000 (21:37 -0500)
commite0a8e0d90a9f0be66ba49f4f2380a63c22d4aaae
tree37325c92ff16f33b2d38792cb03d4f106a0a2e0c
parent83b086c5697169f1e34d2430dad062cc714c5c57
powerpc/8xx: Handle PAGE_USER via APG bits

Use of APG for handling PAGE_USER.

All pages PP exec bits are set to either 000 or 011, which means
respectively RW for Supervisor and no access for User, or RO for
Supervisor and no access for user.

Then we use the APG to say whether accesses are according to
Page rules or "all Supervisor" rules (Access to all)

Therefore, we define 2 APG groups corresponding to _PAGE_USER.
Mx_AP are initialised as follows:
GP0 => No user => 01 (all accesses performed according
to page definition)
GP1 => User => 00 (all accesses performed as supervisor
                                according to page definition)

This removes the special 8xx handling in pte_update()

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/include/asm/pgtable-ppc32.h
arch/powerpc/include/asm/pte-8xx.h
arch/powerpc/kernel/head_8xx.S