]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arch/tile: Allow tilegx to build with either 16K or 64K page size
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 29 Mar 2012 17:58:43 +0000 (13:58 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 25 May 2012 16:48:24 +0000 (12:48 -0400)
commitd5d14ed6f2db7287a5088e1350cf422bf72140b3
tree19f0bc20bb6f1995a1e4f75dc58e388c047f7d23
parent47d632f9f8f3ed62b21f725e98b726d65769b6d7
arch/tile: Allow tilegx to build with either 16K or 64K page size

This change introduces new flags for the hv_install_context()
API that passes a page table pointer to the hypervisor.  Clients
can explicitly request 4K, 16K, or 64K small pages when they
install a new context.  In practice, the page size is fixed at
kernel compile time and the same size is always requested every
time a new page table is installed.

The <hv/hypervisor.h> header changes so that it provides more abstract
macros for managing "page" things like PFNs and page tables.  For
example there is now a HV_DEFAULT_PAGE_SIZE_SMALL instead of the old
HV_PAGE_SIZE_SMALL.  The various PFN routines have been eliminated and
only PA- or PTFN-based ones remain (since PTFNs are always expressed
in fixed 2KB "page" size).  The page-table management macros are
renamed with a leading underscore and take page-size arguments with
the presumption that clients will use those macros in some single
place to provide the "real" macros they will use themselves.

I happened to notice the old hv_set_caching() API was totally broken
(it assumed 4KB pages) so I changed it so it would nominally work
correctly with other page sizes.

Tag modules with the page size so you can't load a module built with
a conflicting page size.  (And add a test for SMP while we're at it.)

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
20 files changed:
arch/tile/Kconfig
arch/tile/include/asm/Kbuild
arch/tile/include/asm/mmu.h
arch/tile/include/asm/mmu_context.h
arch/tile/include/asm/module.h [new file with mode: 0644]
arch/tile/include/asm/page.h
arch/tile/include/asm/pgalloc.h
arch/tile/include/asm/pgtable.h
arch/tile/include/asm/pgtable_32.h
arch/tile/include/asm/pgtable_64.h
arch/tile/include/hv/drv_xgbe_intf.h
arch/tile/include/hv/hypervisor.h
arch/tile/kernel/head_32.S
arch/tile/kernel/head_64.S
arch/tile/kernel/machine_kexec.c
arch/tile/kernel/setup.c
arch/tile/kernel/smp.c
arch/tile/lib/memcpy_tile64.c
arch/tile/mm/init.c
arch/tile/mm/pgtable.c