Commit 5d454917 authored by Todd Kjos's avatar Todd Kjos Committed by Treehugger Robot
Browse files

ANDROID: Fix 32-bit kernelci build break



The fix for the ABI build-break was broken for 32-bit builds because the
struct sizes changed which tripped a static assertion checking size and
alignment of the KMI stable type. Since the KMI is not stable for
32-bit, resolve by suppressing this check for 32-bit builds.

./include/linux/android_kabi.h:43:17: error: static assertion failed: "include/linux/cgroup-defs.h:588: struct callback_head rcu is larger than u8 __attribute__((__aligned__(8))) android_backport_reserved1[CGROUP_SUBSYS_COUNT * sizeof(atomic_t)]"
   43 |                 _Static_assert(sizeof(struct{_new;}) <= sizeof(struct{_orig;}), \
      |                 ^~~~~~~~~~~~~~
./include/linux/android_kabi.h:67:17: note: in expansion of macro ‘__ANDROID_KABI_CHECK_SIZE_ALIGN’
   67 |                 __ANDROID_KABI_CHECK_SIZE_ALIGN(_orig, _new);   \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/android_kabi.h:157:9: note: in expansion of macro ‘_ANDROID_KABI_REPLACE’
  157 |         _ANDROID_KABI_REPLACE(_ANDROID_BACKPORT_RESERVE_ARRAY(number, bytes), _new)
      |         ^~~~~~~~~~~~~~~~~~~~~
./include/linux/cgroup-defs.h:588:9: note: in expansion of macro ‘ANDROID_BACKPORT_USE_ARRAY’
  588 |         ANDROID_BACKPORT_USE_ARRAY(1, CGROUP_SUBSYS_COUNT * sizeof(atomic_t),
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: d66e9166 ("ANDROID: fix ABI-break in struct cgroup_root")

on android14-6.1:
./include/linux/android_kabi.h:49:17: error: static assertion failed: "include/linux/dma-buf.h:540: u64 android_kabi_reserved1 is not aligned the same as atomic64_t nr_task_refs"
   49 |                 _Static_assert(__alignof__(struct{_new;}) <= __alignof__(struct{_orig;}),       \
      |                 ^~~~~~~~~~~~~~
./include/linux/android_kabi.h:68:17: note: in expansion of macro ‘__ANDROID_KABI_CHECK_SIZE_ALIGN’
   68 |                 __ANDROID_KABI_CHECK_SIZE_ALIGN(_orig, _new);   \
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/android_kabi.h:113:9: note: in expansion of macro ‘_ANDROID_KABI_REPLACE’
  113 |         _ANDROID_KABI_REPLACE(_ANDROID_KABI_RESERVE(number), _new)
      |         ^~~~~~~~~~~~~~~~~~~~~
./include/linux/dma-buf.h:540:9: note: in expansion of macro ‘ANDROID_KABI_USE’
  540 |         ANDROID_KABI_USE(1, atomic64_t nr_task_refs);
      |         ^~~~~~~~~~~~~~~~
Fixes: 4b2d8222 ("ANDROID: Use ABI reservations for dmabuf RSS / PSS accounting")
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
Change-Id: Ied0ca3e4d892014582c921d311fdab652a76adf6
(cherry picked from commit fa2752f4)
Signed-off-by: default avatarTiffany Yang <ynaffit@google.com>
parent 77edc8b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment