public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Yet another ppc64 hugepage cleanup
@ 2004-04-16  4:56 David Gibson
  0 siblings, 0 replies; only message in thread
From: David Gibson @ 2004-04-16  4:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linuxppc64-dev

Andrew, please apply.

Trivial cleanup to flush_hash_hugepage() in the ppc64 hugepage code.

Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/hugetlbpage.c	2004-04-16 13:59:29.979920272 +1000
+++ working-2.6/arch/ppc64/mm/hugetlbpage.c	2004-04-16 13:59:43.664834064 +1000
@@ -736,7 +736,7 @@
 static void flush_hash_hugepage(mm_context_t context, unsigned long ea,
 				hugepte_t pte, int local)
 {
-	unsigned long vsid, vpn, va, hash, secondary, slot;
+	unsigned long vsid, vpn, va, hash, slot;
 
 	BUG_ON(hugepte_bad(pte));
 	BUG_ON(!in_hugepage_area(context, ea));
@@ -746,8 +746,7 @@
 	va = (vsid << 28) | (ea & 0x0fffffff);
 	vpn = va >> LARGE_PAGE_SHIFT;
 	hash = hpt_hash(vpn, 1);
-	secondary = !!(hugepte_val(pte) & _HUGEPAGE_SECONDARY);
-	if (secondary)
+	if (hugepte_val(pte) & _HUGEPAGE_SECONDARY)
 		hash = ~hash;
 	slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
 	slot += (hugepte_val(pte) & _HUGEPAGE_GROUP_IX) >> 5;


-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-04-16  4:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16  4:56 Yet another ppc64 hugepage cleanup David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox