You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background
----------
Commit [1] replaced the older representation of dma attributes
from struct dma_attr to an unsigned long of flags.
Commit [2] added dma_unmap_page_attr(), which receives dma attributes.
Both of these commits are needed for the code to compile
without any changes.
Issue 1
-------
Compilation failure in UEK4 due to redefinition of page_ref_count().
Searched the uek git ([3]) and found that page_ref_count() was added
in kernel version 4.1.12-124.43.1. Added the necessary ifdef
conditions to kcompat to define page_ref_count() in UEK only for
older kernels.
Issue 2
-------
Compilation failure due to undefined dma_unmap_page_attrs()
According to uek git [3]:
1. dma_unmap_page_attrs() was first introduced to UEK4 in
kernel 4.1.12-105.0.0, with struct dma_attrs as type of attributes.
2. Commit [1] was never backported to UEK4.
3. UEK5 has kernel 4.14 [4] , which includes commits [1] and [2]
and therefore doesn't need any kcpompat fixes for this issue.
From the above 3 it follows that:
1. For kernels < 4.1.12-105.0.0 dma_unmap_page_attrs() needs to be
defined in kcompat.
2. For 4.1.12-105.0.0 =< kernels in UEK4, kcompat needs to translate
unsigned long attributes to struct dma_attrs to be used by
dma_unmap_page_attrs(). For the upper kernel we use 4.1.13, since
it is larger than all UEK4 kernels that are of the form 4.1.12-X.Y.Z
3. All other kernels need no fixes for dma_unmap_page_attrs()
This commit implements the above conclusions.
These kcompat fixes also fix the compilation of UEK3.
[1]: torvalds/linux@00085f1
[2]: torvalds/linux@0495c3d
[3]: https://github.com/oracle/linux-uek
[4]: https://docs.oracle.com/en/operating-systems/uek/
Signed-off-by: Arthur Kiyanovski <[email protected]>
Change-Id: I58427404f18b746f4ab56989ad25fdcff62a7d64
0 commit comments