From: "Jan Beulich" Subject: [PATCH] x86-64 linux pud_offset_k Date: Mon, 23 Jan 2006 15:57:38 +0100 Message-ID: <43D4FCF2.76F0.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartE3C179F2.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartE3C179F2.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline The present pud_offset_k implementation runs the value read through the m2p translation process twice. With that removed, it can then also be simplified. Jan --=__PartE3C179F2.0__= Content-Type: text/plain; name="xenlinux-x86_64-pud_offset_k.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="xenlinux-x86_64-pud_offset_k.patch" Index: head-2006-01-23/include/asm-xen/asm-x86_64/pgtable.h =================================================================== --- head-2006-01-23.orig/include/asm-xen/asm-x86_64/pgtable.h 2006-01-19 09:25:48.000000000 +0100 +++ head-2006-01-23/include/asm-xen/asm-x86_64/pgtable.h 2006-01-23 14:19:27.000000000 +0100 @@ -417,12 +417,7 @@ static inline pud_t *__pud_offset_k(pud_ Other CPUs get synced lazily via the page fault handler. */ static inline pud_t *pud_offset_k(unsigned long address) { - unsigned long addr; - - addr = pgd_val(init_level4_pgt[pud_index(address)]); - addr &= PHYSICAL_PAGE_MASK; /* machine physical */ - addr = machine_to_phys(addr); - return __pud_offset_k((pud_t *)__va(addr), address); + return pud_offset(pgd_offset_k(address), address); } /* PMD - Level 2 access */ --=__PartE3C179F2.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartE3C179F2.0__=--