diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-04-02 11:15:39 +0200 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-04-13 15:44:38 +0200 |
commit | 35b7416e7f458ad7aa61af2a840982db1d2dd451 (patch) | |
tree | ea2ee1fc13067340cd7a25104796a4636f8ed0e0 /lib/intel_allocator_msgchannel.h | |
parent | 572dfb13332ac607b8cd8eba73a3a58db3fe948b (diff) |
lib/intel_allocator: Add alloc function which allows passing strategy argument
To use spinners with no-reloc we need to alloc offsets for them
from already opened allocator. As we don't know what strategy
is chosen for open (likely HIGH_TO_LOW for SIMPLE allocator) we
want to overwrite it for spinners (there's expectation they
will reside on low addresses).
Extend allocator API adding intel_allocator_alloc_with_strategy()
to support spinners rewriting.
v2: add change in api_intel_allocator test to compile properly
whole series.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/intel_allocator_msgchannel.h')
-rw-r--r-- | lib/intel_allocator_msgchannel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/intel_allocator_msgchannel.h b/lib/intel_allocator_msgchannel.h index ac6edfb9..c7a738a0 100644 --- a/lib/intel_allocator_msgchannel.h +++ b/lib/intel_allocator_msgchannel.h @@ -65,6 +65,7 @@ struct alloc_req { uint32_t handle; uint64_t size; uint64_t alignment; + uint8_t strategy; } alloc; struct { |