powerpc/pseries/cmm: Drop page array
authorDavid Hildenbrand <david@redhat.com>
Thu, 31 Oct 2019 14:29:25 +0000 (15:29 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Nov 2019 05:58:00 +0000 (16:58 +1100)
commit4a1745c5bf92232f115e28296475dc42254b1c7d
treeb98154a8e4b3b81c7cb949cae1a2272c33e5353e
parent68f7a04932bbcd72973fd58b16a817f4bf99171a
powerpc/pseries/cmm: Drop page array

We can simply store the pages in a list (page->lru), no need for a
separate data structure (+ complicated handling). This is how most
other balloon drivers store allocated pages without additional
tracking data.

For the notifiers, use page_to_pfn() to check if a page is in the
applicable range. Use page_to_phys() in plpar_page_set_loaned() and
plpar_page_set_active() (I assume due to the __pa() that's the right
thing to do).

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191031142933.10779-5-david@redhat.com
arch/powerpc/platforms/pseries/cmm.c