From: Hirokazu Takata Date: Fri, 11 May 2007 05:22:28 +0000 (-0700) Subject: m32r: fix pte_to_pgoff(), pgoff_to_pte() and __swp_type() macros X-Git-Tag: v2.6.22-rc1~90 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23c9bbbac57ae50dceadfda37b49785ec04dd42f;p=pandora-kernel.git m32r: fix pte_to_pgoff(), pgoff_to_pte() and __swp_type() macros This patch is required to handle file-mapped or swapped-out pages correctly. - Fix pte_to_pgoff() and pgoff_to_pte() macros not to include _PAGE_PROTNONE bit of PTE. Mask value for { ACCESSED, N, (R, W, X), L, G } is not 0xef but 0x7f. - Fix __swp_type() macro for MAX_SWAPFILES_SHIFT(=5), which is defined in include/linux/swap.h. * M32R TLB format [0] [1:19] [20:23] [24:31] +-----------------------+----+-------------+ | VPN |0000| ASID | +-----------------------+----+-------------+ +-+---------------------+----+-+---+-+-+-+-+ |0 PPN |0000|N|AC |L|G|V| | +-+---------------------+----+-+---+-+-+-+-+ || RWX | | * software bits in PTE || | +-- _PAGE_FILE | _PAGE_DIRTY || +---- _PAGE_PRESENT |+---------------- _PAGE_ACCESSED +----------------- _PAGE_PROTNONE Signed-off-by: Hitoshi Yamamoto Signed-off-by: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed