|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 11/16] xen/mm: Switch page_alloc.c to typesafe MFN
>>> On 21.02.18 at 15:02, <julien.grall@xxxxxxx> wrote:
> @@ -1735,14 +1743,14 @@ static void init_heap_pages(
>
> if ( unlikely(!avail[nid]) )
> {
> - unsigned long s = page_to_mfn(pg + i);
> - unsigned long e = page_to_mfn(pg + nr_pages - 1) + 1;
> + unsigned long s = mfn_x(page_to_mfn(pg + i));
> + unsigned long e = mfn_x(mfn_add(page_to_mfn(pg + nr_pages - 1),
> 1));
> bool_t use_tail = (nid == phys_to_nid(pfn_to_paddr(e - 1))) &&
> !(s & ((1UL << MAX_ORDER) - 1)) &&
> (find_first_set_bit(e) <=
> find_first_set_bit(s));
> unsigned long n;
>
> - n = init_node_heap(nid, page_to_mfn(pg+i), nr_pages - i,
> + n = init_node_heap(nid, mfn_x(page_to_mfn(pg+i)), nr_pages - i,
You've got Wei's R-b, so I won't insist, but it would have been nice
if you added the missing blanks around the + here.
Also I think the patch doesn't go quite far enough to make the title
actually true. Care to make it say "... some of page_alloc.c ..."?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |