diff options
| author | Dan Williams <[email protected]> | 2025-02-04 04:24:24 +0000 |
|---|---|---|
| committer | Dave Jiang <[email protected]> | 2025-02-04 20:48:19 +0000 |
| commit | 991d98f17d31644826977e49477544987000a08a (patch) | |
| tree | 7f3a80e16cf13203f3ca6f8bac36e3534c76ac55 /net/unix/af_unix.c | |
| parent | cxl: Introduce 'struct cxl_dpa_partition' and 'struct cxl_range_info' (diff) | |
| download | kernel-991d98f17d31644826977e49477544987000a08a.tar.gz kernel-991d98f17d31644826977e49477544987000a08a.zip | |
cxl: Make cxl_dpa_alloc() DPA partition number agnostic
cxl_dpa_alloc() is a hard coded nest of assumptions around PMEM
allocations being distinct from RAM allocations in specific ways when in
practice the allocation rules are only relative to DPA partition index.
The rules for cxl_dpa_alloc() are:
- allocations can only come from 1 partition
- if allocating at partition-index-N, all free space in partitions less
than partition-index-N must be skipped over
Use the new 'struct cxl_dpa_partition' array to support allocation with
an arbitrary number of DPA partitions on the device.
A follow-on patch can go further to cleanup 'enum cxl_decoder_mode'
concept and supersede it with looking up the memory properties from
partition metadata. Until then cxl_part_mode() temporarily bridges code
that looks up partitions by @cxled->mode.
Reviewed-by: Ira Weiny <[email protected]>
Reviewed-by: Alejandro Lucero <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Tested-by: Alejandro Lucero <[email protected]>
Link: https://patch.msgid.link/173864306400.668823.12143134425285426523.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dave Jiang <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
