[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d41d8dc4-3fe7-dba3-1765-4e24652582b9@redhat.com>
Date: Mon, 19 Apr 2021 16:18:26 +0200
From: David Hildenbrand <david@...hat.com>
To: Alistair Popple <apopple@...dia.com>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
daniel.vetter@...ll.ch, dan.j.williams@...el.com,
gregkh@...uxfoundation.org, jhubbard@...dia.com,
jglisse@...hat.com, bsingharora@...il.com, smuchun@...il.com
Subject: Re: [PATCH v5 1/3] kernel/resource: Allow region_intersects users to
hold resource_lock
On 19.04.21 09:01, Alistair Popple wrote:
> Introduce a version of region_intersects() that can be called with the
> resource_lock already held. This is used in a future fix to
> __request_free_mem_region().
>
> Signed-off-by: Alistair Popple <apopple@...dia.com>
> ---
> kernel/resource.c | 52 ++++++++++++++++++++++++++++-------------------
> 1 file changed, 31 insertions(+), 21 deletions(-)
>
> diff --git a/kernel/resource.c b/kernel/resource.c
> index 627e61b0c124..736768587d2d 100644
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -523,6 +523,34 @@ int __weak page_is_ram(unsigned long pfn)
> }
> EXPORT_SYMBOL_GPL(page_is_ram);
>
> +int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
> + unsigned long desc)
> +{
> + struct resource res;
I'd do
struct resource res, *p;
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists