From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mats Petersson Subject: Re: why we need to convert "mfn_to_page(smfn)" in page_alloc.c? Date: Mon, 10 Dec 2012 15:15:44 +0000 Message-ID: <50C5FCA0.9020403@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 10/12/12 14:02, asad raza wrote: > void init_domheap_pages(paddr_t ps, paddr_t pe) > { > unsigned long smfn, emfn; > > ASSERT(!in_irq()); > > smfn = round_pgup(ps) >> PAGE_SHIFT; > emfn = round_pgdown(pe) >> PAGE_SHIFT; > > init_heap_pages(mfn_to_page(smfn), emfn - smfn); > } Becasue "init_heap_pages" takes struct page_info, rather than a page number? The init_heap_pages does convert the start page to a mfn, but not all callers of init_heap_pages has a mfn in the first place, so I gues it's just "we have to do this anyways. -- Mats > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > >