From: "Jan Beulich" Subject: [PATCH] linux/x86-64: (re-)add warning to set_pte_phys_ma() Date: Wed, 23 Jul 2008 14:17:50 +0100 Message-ID: <48874B9E.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline 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 .. as a similar one exists in set_pte_phys() (and also in native). As usual, written and tested on 2.6.26 and made apply to the 2.6.18 tree without further testing. Signed-off-by: Jan Beulich Index: head-2008-07-21/arch/x86_64/mm/init-xen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head-2008-07-21.orig/arch/x86_64/mm/init-xen.c 2008-07-22 = 18:12:09.000000000 +0200 +++ head-2008-07-21/arch/x86_64/mm/init-xen.c 2008-07-22 18:12:57.0000000= 00 +0200 @@ -325,6 +325,14 @@ set_pte_phys_ma(unsigned long vaddr, uns new_pte =3D pfn_pte_ma(phys >> PAGE_SHIFT, prot); =20 pte =3D pte_offset_kernel(pmd, vaddr); + if (!pte_none(*pte) && +#ifdef CONFIG_ACPI + /* __acpi_map_table() fails to properly call clear_fixmap() */ + (vaddr < __fix_to_virt(FIX_ACPI_END) || + vaddr > __fix_to_virt(FIX_ACPI_BEGIN)) && +#endif + __pte_val(*pte) !=3D (__pte_val(new_pte) & __supported_pte_mask= )) + pte_ERROR(*pte); set_pte(pte, new_pte); =20 /*