From 35b7416e7f458ad7aa61af2a840982db1d2dd451 Mon Sep 17 00:00:00 2001 From: Zbigniew Kempczyński Date: Fri, 2 Apr 2021 11:15:39 +0200 Subject: lib/intel_allocator: Add alloc function which allows passing strategy argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Jason Ekstrand Acked-by: Daniel Vetter Acked-by: Petri Latvala --- lib/intel_allocator_msgchannel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/intel_allocator_msgchannel.h') 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 { -- cgit v1.2.3