Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754019AbYBARiR (ORCPT ); Fri, 1 Feb 2008 12:38:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751156AbYBARiE (ORCPT ); Fri, 1 Feb 2008 12:38:04 -0500 Received: from gw.goop.org ([64.81.55.164]:48368 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbYBARiD (ORCPT ); Fri, 1 Feb 2008 12:38:03 -0500 Message-ID: <47A358DB.4010602@goop.org> Date: Fri, 01 Feb 2008 09:37:31 -0800 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Andi Kleen CC: tglx@linutronix.de, mingo@elte.hu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [12/12] GBPAGES: Switch direct mapping setup over to set_pte References: <200802011053.107168490@suse.de> <20080201095325.6419E1B416F@basil.firstfloor.org> In-Reply-To: <20080201095325.6419E1B416F@basil.firstfloor.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 44 Andi Kleen wrote: > [Actually not needed for gbpages, but an indepedent, but related cleanup] > > Use set_pte() for setting up the 2MB pages in the direct mapping similar > to what the earlier GBPAGES patches did for the 1GB PUDs. > > Signed-off-by: Andi Kleen > > --- > arch/x86/mm/init_64.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > Index: linux/arch/x86/mm/init_64.c > =================================================================== > --- linux.orig/arch/x86/mm/init_64.c > +++ linux/arch/x86/mm/init_64.c > @@ -289,7 +289,6 @@ phys_pmd_init(pmd_t *pmd_page, unsigned > int i = pmd_index(address); > > for (; i < PTRS_PER_PMD; i++, address += PMD_SIZE) { > - unsigned long entry; > pmd_t *pmd = pmd_page + pmd_index(address); > > if (address >= end) { > @@ -303,9 +302,8 @@ phys_pmd_init(pmd_t *pmd_page, unsigned > if (pmd_val(*pmd)) > continue; > > - entry = __PAGE_KERNEL_LARGE|_PAGE_GLOBAL|address; > - entry &= __supported_pte_mask; > - set_pmd(pmd, __pmd(entry)); > + set_pte((pte_t *)pmd, > + pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL_LARGE)); > Why? 64-bit Xen will need this to be set_pmd if its an update to L2 of the table. J -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/