From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Parish Subject: [patch] nr_pfns miscalculated Date: Thu, 12 May 2005 11:22:25 +0000 Message-ID: <20050512112225.GA27910@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="u3/rZRmxL6MmkK24" 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 --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline If i'm not mistaken, this was what was intended. sRp -- Scott Parish Signed-off-by: srparish@us.ibm.com --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nr_pfns.diff" --- old-xen-unstable/xen/arch/x86/mm.c 2005-05-11 17:42:05.000000000 +0000 +++ new-xen-unstable/xen/arch/x86/mm.c 2005-05-12 11:05:15.000000000 +0000 @@ -209,9 +209,7 @@ if ( e820.map[i].type == E820_RAM ) continue; pfn = e820.map[i].addr >> PAGE_SHIFT; - nr_pfns = (e820.map[i].size + - (e820.map[i].addr & ~PAGE_MASK) + - ~PAGE_MASK) >> PAGE_SHIFT; + nr_pfns = (e820.map[i].size + ~PAGE_MASK) >> PAGE_SHIFT; for ( j = 0; j < nr_pfns; j++ ) { if ( !pfn_valid(pfn+j) ) --u3/rZRmxL6MmkK24 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 --u3/rZRmxL6MmkK24--