From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@muc.de>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Chris Wright <chrisw@sous-sol.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Zachary Amsden <zach@vmware.com>
Subject: [PATCH 5/10] Paravirt kmap_atomic_pte tidy.patch
Date: Mon, 9 Apr 2007 17:06:14 -0700 [thread overview]
Message-ID: <200704100006.l3A06Enx020620@zach-dev.vmware.com> (raw)
Don't implement native_kmap_atomic_pte for !HIGHPTE case; it is never needed,
never called, and leaving it in is just plain confusing. Making it isolated
to the config where it is used may help find bugs.
Signed-off-by: Zachary Amsden <zach@vmware.com>
diff -r 5c03805411a6 arch/i386/kernel/paravirt.c
--- a/arch/i386/kernel/paravirt.c Fri Apr 06 14:43:30 2007 -0700
+++ b/arch/i386/kernel/paravirt.c Fri Apr 06 14:43:37 2007 -0700
@@ -217,13 +217,6 @@ static void native_flush_tlb_single(unsi
{
__native_flush_tlb_single(addr);
}
-
-#ifndef CONFIG_HIGHPTE
-static void *native_kmap_atomic_pte(struct page *page, enum km_type type)
-{
- return kmap_atomic(page, type);
-}
-#endif
/* These are in entry.S */
extern void native_iret(void);
@@ -324,7 +317,9 @@ struct paravirt_ops paravirt_ops = {
.ptep_get_and_clear = native_ptep_get_and_clear,
- .kmap_atomic_pte = native_kmap_atomic_pte,
+#ifdef CONFIG_HIGHPTE
+ .kmap_atomic_pte = kmap_atomic,
+#endif
#ifdef CONFIG_X86_PAE
.set_pte_atomic = native_set_pte_atomic,
diff -r 5c03805411a6 include/asm-i386/highmem.h
--- a/include/asm-i386/highmem.h Fri Apr 06 14:43:30 2007 -0700
+++ b/include/asm-i386/highmem.h Fri Apr 06 14:43:37 2007 -0700
@@ -74,11 +74,6 @@ void *kmap_atomic_pfn(unsigned long pfn,
void *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
struct page *kmap_atomic_to_page(void *ptr);
-static inline void *native_kmap_atomic_pte(struct page *page, enum km_type type)
-{
- return kmap_atomic(page, type);
-}
-
#ifndef CONFIG_PARAVIRT
#define kmap_atomic_pte(page, type) kmap_atomic(page, type)
#endif
diff -r 5c03805411a6 include/asm-i386/paravirt.h
--- a/include/asm-i386/paravirt.h Fri Apr 06 14:43:30 2007 -0700
+++ b/include/asm-i386/paravirt.h Fri Apr 06 14:43:37 2007 -0700
@@ -190,7 +190,9 @@ struct paravirt_ops
pte_t (*ptep_get_and_clear)(pte_t *ptep);
+#ifdef CONFIG_HIGHPTE
void *(*kmap_atomic_pte)(struct page *page, enum km_type type);
+#endif
#ifdef CONFIG_X86_PAE
void (*set_pte_atomic)(pte_t *ptep, pte_t pteval);
@@ -892,12 +894,14 @@ static inline void paravirt_release_pd(u
PVOP_VCALL1(release_pd, pfn);
}
+#ifdef CONFIG_HIGHPTE
static inline void *kmap_atomic_pte(struct page *page, enum km_type type)
{
unsigned long ret;
ret = PVOP_CALL2(unsigned long, kmap_atomic_pte, page, type);
return (void *)ret;
}
+#endif
static inline void pte_update(struct mm_struct *mm, unsigned long addr,
pte_t *ptep)
reply other threads:[~2007-04-10 0:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200704100006.l3A06Enx020620@zach-dev.vmware.com \
--to=zach@vmware.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.osdl.org \
/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
all inboxes | Powered by JetHome®