[Intel-gfx] [RFC PATCH v5 0/1] Splitting up platform-specific calls

Casey Bowman casey.g.bowman at intel.com
Thu Mar 31 00:09:07 UTC 2022


In this RFC I would like to ask the community their thoughts
on how we can best handle splitting architecture-specific
calls.

I would like to address the following:

1. How do we want to split architecture calls? Different object files
per platform? Separate function calls within the same object file?

2. How do we address dummy functions? If we have a function call that is
used for one or more platforms, but is not used in another, what should
we do for this case?

I've given an example of splitting an architecture call
in my patch with run_as_guest() being split into different
implementations for x86 and arm64 in separate object files, sharing
a single header.

Another suggestion from Michael (michael.cheng at intel.com) involved
using a single object file, a single header, and splitting various
functions calls via ifdefs in the header file.

I would appreciate any input on how we can avoid scaling issues when
including multiple architectures and multiple functions (as the number
of function calls will inevitably increase with more architectures).

v2: Revised to use kernel's platform-splitting scheme.
v3: Revised to use simple if-else structure.
v4: Modified into more arch-neutral split.
v5: Rebased on top of the run_as_guest -> i915_run_as_guest changes

Casey Bowman (1):
  Split i915_run_as_guest into x86 and non-x86

 drivers/gpu/drm/i915/i915_utils.h | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.25.1



More information about the Intel-gfx mailing list