diff options
| author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-03-24 18:56:25 +0200 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-03-27 10:18:39 -0500 |
| commit | f699bcc8bcdf99565928a7b1fc7ee656f6c81815 (patch) | |
| tree | e1c50dbc2a6c82ed9c243b689e3593d4cb2dbec8 /include/linux/ioport.h | |
| parent | edfaa81d5da5fbfe3c73fece3ca0417a04cc4ba2 (diff) | |
resource: Pass full extent of empty space to resource_alignf callback
__find_resource_space() calculates the full extent of empty space but only
passes the aligned space to resource_alignf callback. In some situations,
the callback may choose take advantage of the free space before the
requested alignment.
Pass the full extent of the calculated empty space to resource_alignf
callback as an additional parameter.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xifer <xiferdev@gmail.com>
Link: https://patch.msgid.link/20260324165633.4583-3-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'include/linux/ioport.h')
| -rw-r--r-- | include/linux/ioport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 19d5e04564d9..3c73c9c0d4f7 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -202,6 +202,7 @@ enum { * typedef resource_alignf - Resource alignment callback * @data: Private data used by the callback * @res: Resource candidate range (an empty resource space) + * @empty_res: Empty resource range without alignment applied * @size: The minimum size of the empty space * @align: Alignment from the constraints * @@ -212,6 +213,7 @@ enum { */ typedef resource_size_t (*resource_alignf)(void *data, const struct resource *res, + const struct resource *empty_res, resource_size_t size, resource_size_t align); |
