From: zach@vmware.com
To: akpm@osdl.org, chrisl@vmware.com, chrisw@osdl.org,
linux-kernel@vger.kernel.org, mbligh@mbligh.org,
pratap@vmware.com, virtualization@lists.osdl.org,
zach@vmware.com
Subject: [PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro
Date: Mon, 15 Aug 2005 16:00:39 -0700 [thread overview]
Message-ID: <200508152300.j7FN0dD7005336@zach-dev.vmware.com> (raw)
Make the generic version of ptep_set_wrprotect a macro. This is good for
code uniformity, and fixes the build for architectures which include pgtable.h
through headers into assembly code, but do not define a ptep_set_wrprotect
function.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.13/include/asm-generic/pgtable.h
===================================================================
--- linux-2.6.13.orig/include/asm-generic/pgtable.h 2005-08-12 12:12:55.000000000 -0700
+++ linux-2.6.13/include/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700
@@ -313,11 +313,12 @@
#endif
#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
-static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep)
-{
- pte_t old_pte = *ptep;
- set_pte_at(mm, address, ptep, pte_wrprotect(old_pte));
-}
+#define ptep_set_wrprotect(__mm, __address, __ptep) \
+({ \
+ pte_t __old_pte = *(__ptep); \
+ set_pte_at((__mm), (__address), (__ptep), \
+ pte_wrprotect(__old_pte)); \
+})
#endif
#ifndef __HAVE_ARCH_PTE_SAME
next reply other threads:[~2005-08-15 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 23:00 zach [this message]
2005-08-15 23:25 ` [PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro Adrian Bunk
2005-08-16 0:05 ` Zachary Amsden
2005-08-16 5:51 ` Chris Wright
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=200508152300.j7FN0dD7005336@zach-dev.vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.org \
--cc=chrisl@vmware.com \
--cc=chrisw@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.org \
--cc=pratap@vmware.com \
--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