summaryrefslogtreecommitdiffstats
path: root/fs/befs/btree.c
diff options
context:
space:
mode:
authorPaul Mackerras2016-09-02 09:20:43 +0200
committerPaul Mackerras2016-09-09 08:14:48 +0200
commit0eeede0c63305a33de31bd90b53b023c1d452c17 (patch)
tree32ae6883786e58c5e9b6fc9886cf8cea9590da79 /fs/befs/btree.c
parentLinux 4.8-rc2 (diff)
downloadkernel-qcow2-linux-0eeede0c63305a33de31bd90b53b023c1d452c17.tar.gz
kernel-qcow2-linux-0eeede0c63305a33de31bd90b53b023c1d452c17.tar.xz
kernel-qcow2-linux-0eeede0c63305a33de31bd90b53b023c1d452c17.zip
powerpc/mm: Speed up computation of base and actual page size for a HPTE
This replaces a 2-D search through an array with a simple 8-bit table lookup for determining the actual and/or base page size for a HPT entry. The encoding in the second doubleword of the HPTE is designed to encode the actual and base page sizes without using any more bits than would be needed for a 4k page number, by using between 1 and 8 low-order bits of the RPN (real page number) field to encode the page sizes. A single "large page" bit in the first doubleword indicates that these low-order bits are to be interpreted like this. We can determine the page sizes by using the low-order 8 bits of the RPN to look up a 256-entry table. For actual page sizes less than 1MB, some of the upper bits of these 8 bits are going to be real address bits, but we can cope with that by replicating the entries for those smaller page sizes. While we're at it, let's move the hpte_page_size() and hpte_base_page_size() functions from a KVM-specific header to a header for 64-bit HPT systems, since this computation doesn't have anything specifically to do with KVM. Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'fs/befs/btree.c')
0 files changed, 0 insertions, 0 deletions