public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Zach Amsden <zach@vmware.com>,
	Glauber de Oliveira Costa <glommer@gmail.com>,
	Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Subject: [PATCH RFC 1/7] x86: kill mk_pte_huge
Date: Wed, 07 Nov 2007 17:50:09 -0800	[thread overview]
Message-ID: <20071108015309.956010847@goop.org> (raw)
In-Reply-To: 20071108015008.660012621@goop.org

[-- Attachment #1: x86-kill-mk_pte_huge.patch --]
[-- Type: text/plain, Size: 1408 bytes --]

It only has a single use, which can be trivially replaced.

Signed-off-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>

---
 arch/x86/mm/init_64.c        |    3 +--
 include/asm-x86/pgtable_64.h |    9 ---------
 2 files changed, 1 insertion(+), 11 deletions(-)

===================================================================
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -768,8 +768,7 @@ int __meminit vmemmap_populate(struct pa
 			if (!p)
 				return -ENOMEM;
 
-			entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL);
-			mk_pte_huge(entry);
+			entry = pfn_pte(__pa(p) >> PAGE_SHIFT, PAGE_KERNEL_LARGE);
 			set_pmd(pmd, __pmd(pte_val(entry)));
 
 			printk(KERN_DEBUG " [%lx-%lx] PMD ->%p on node %d\n",
===================================================================
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -378,15 +378,6 @@ static inline pte_t pte_clrhuge(pte_t pt
 /* page, protection -> pte */
 #define mk_pte(page, pgprot)	pfn_pte(page_to_pfn(page), (pgprot))
 
-static inline pte_t __mk_pte_huge(pte_t entry)
-{
-	unsigned long pte;
-	pte = pte_val(entry);
-	pte |= _PAGE_PRESENT | _PAGE_PSE;
-	return  __pte(pte);
-}
-#define mk_pte_huge(entry) ((entry) = __mk_pte_huge(entry))
-
 #include <linux/mm_types.h>
 static inline int ptep_test_and_clear_young(struct vm_area_struct *vma,
 					    unsigned long addr, pte_t *ptep)

-- 


  reply	other threads:[~2007-11-08  2:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08  1:50 [PATCH RFC 0/7] Unify asm-x86/pgtable.h and page.h Jeremy Fitzhardinge
2007-11-08  1:50 ` Jeremy Fitzhardinge [this message]
2007-11-08  1:50 ` [PATCH RFC 2/7] x86: clean up mm/init_32.c Jeremy Fitzhardinge
2007-11-08 16:20   ` Glauber de Oliveira Costa
2007-11-08 16:39     ` Jeremy Fitzhardinge
2007-11-08  1:50 ` [PATCH RFC 3/7] x86: clean up asm-x86/page*.h Jeremy Fitzhardinge
2007-11-08 16:42   ` Glauber de Oliveira Costa
2007-11-08 20:59     ` Jeremy Fitzhardinge
2007-11-08 22:38       ` Glauber de Oliveira Costa
2007-11-08 23:03         ` Jeremy Fitzhardinge
2007-11-08  1:50 ` [PATCH RFC 4/7] x86: unify pgtable*.h Jeremy Fitzhardinge
2007-11-08  1:50 ` [PATCH RFC 5/7] x86: simplify pagetable-related operationsin paravirt.h Jeremy Fitzhardinge
2007-11-08  1:50 ` [PATCH RFC 6/7] x86/xen: simplify Xen mmu operations Jeremy Fitzhardinge
2007-11-08  1:50 ` [PATCH RFC 7/7] x86: fix up formatting in pgtable*.h Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071108015309.956010847@goop.org \
    --to=jeremy@goop.org \
    --cc=Jeremy.Fitzhardinge@citrix.com \
    --cc=ak@suse.de \
    --cc=glommer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox