Commit f83c3e8c authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[PATCH] ppc64: remove LARGE_PAGE_SHIFT constant

For historical reasons, ppc64 has ended up with two #defines for the size
of a large (16M) page: LARGE_PAGE_SHIFT and HPAGE_SHIFT.  This patch
removes LARGE_PAGE_SHIFT in favour of the more widely used HPAGE_SHIFT.
Signed-off-by: default avatarDavid Gibson <dwg@au1.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cea63d80
......@@ -329,7 +329,7 @@ static void pSeries_flush_hash_range(unsigned long context,
va = (vsid << 28) | (batch->addr[i] & 0x0fffffff);
batch->vaddr[j] = va;
if (large)
vpn = va >> LARGE_PAGE_SHIFT;
vpn = va >> HPAGE_SHIFT;
else
vpn = va >> PAGE_SHIFT;
hash = hpt_hash(vpn, large);
......
......@@ -100,7 +100,7 @@ static inline void create_pte_mapping(unsigned long start, unsigned long end,
int ret;
if (large)
vpn = va >> LARGE_PAGE_SHIFT;
vpn = va >> HPAGE_SHIFT;
else
vpn = va >> PAGE_SHIFT;
......@@ -332,7 +332,7 @@ void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
va = (vsid << 28) | (ea & 0x0fffffff);
if (large)
vpn = va >> LARGE_PAGE_SHIFT;
vpn = va >> HPAGE_SHIFT;
else
vpn = va >> PAGE_SHIFT;
hash = hpt_hash(vpn, large);
......
......@@ -853,7 +853,7 @@ static void flush_hash_hugepage(mm_context_t context, unsigned long ea,
vsid = get_vsid(context.id, ea);
va = (vsid << 28) | (ea & 0x0fffffff);
vpn = va >> LARGE_PAGE_SHIFT;
vpn = va >> HPAGE_SHIFT;
hash = hpt_hash(vpn, 1);
if (hugepte_val(pte) & _HUGEPAGE_SECONDARY)
hash = ~hash;
......
......@@ -107,8 +107,6 @@ typedef struct {
extern HTAB htab_data;
#define LARGE_PAGE_SHIFT 24
static inline unsigned long hpt_hash(unsigned long vpn, int large)
{
unsigned long vsid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment