[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e23e72d7-e50b-4a16-b47d-5dcd7cf49641@suse.com>
Date: Wed, 16 Apr 2025 10:45:19 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Petr Tesarik <ptesarik@...e.com>, Oliver Neukum <oneukum@...e.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: core: warn if a GFP zone flag is passed to
hcd_buffer_alloc()
On 16.04.25 09:48, Petr Tesarik wrote:
> Oh, I do, and that's precisely why these GFP flags are no good. The
> address (and other) constraints imposed by different buses may not
> (and often do not) match any existing memory zone.
True. So we currently have a non-portable series of flags.
It would we better if we passed a hypothetical 'struct mem_constraint*'.
But we don't for now.
> However, zone address ranges are determined statically at compile time,
> or latest at boot time (e.g. arm64). It's too late to adjust the limits
> when you hotplug a more constrained bus at run-time. And I haven't even
> mentioned bus bridges which add a non-zero offset to the address...
Yes. Hence the only time somebody would pass a flag like that would be
on very arch specific code. That means that such a developer would be on
his or her own. Hence I'd say the simplest solution is just to do nothing.
Regards
Oliver
Powered by blists - more mailing lists