Commit Graph

5 Commits

Author SHA1 Message Date
Jaskaran Singh
3c06a5ce5e ANDROID: Split ANDROID_STRUCT_PADDING into separate configs
Not all non-GKI platforms support disabling ANDROID_STRUCT_PADDING,
as some modules may require Android vendor data. However, it would be
beneficial to have the option to disable some of the struct paddings,
such as ANDROID_KABI_RESERVE, for memory savings given a situation
where the ANDROID_STRUCT_PADDING config cannot be disabled.

Split the ANDROID_STRUCT_PADDING config into two configs, one to control
ANDROID_VENDOR_DATA and ANDROID_OEM_DATA, and another to control
ANDROID_KABI_RESERVE.

Bug: 206561931
Change-Id: Iea4b962dff386a17c9bef20ae048be4e17bf43ab
Signed-off-by: Jaskaran Singh <quic_jasksing@quicinc.com>
2022-04-07 05:44:50 +00:00
Qingqing Zhou
b7a6c15a6f ANDROID: Configure out the macros in android_kabi and android_vendor
Add one CONFIG to control removing the macros or not. On some platform,
configureing out the macros removes the associated members from the
structs, this reduces the object size of the slabs related with the
structs, therefore reduces the total slab memory consumption of system.

Besides, this also reduces vmlinux size a bit, therefore the total
kernel memory size increses a bit.

The macros are ANDROID_KABI_RESERVE, ANDROID_VENDOR_DATA,
ANDROID_VENDOR_DATA_ARRAY, ANDROID_OEM_DATA, ANDROID_OEM_DATA_ARRAY.

Bug: 206561931
Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com>
Change-Id: I0868d299ccce3c4b39f42af17916828500be6cc4
2022-01-12 16:49:39 +08:00
Todd Kjos
c417bec8b3 ANDROID: add macros to create OEM data fields
Adds ANDROID_OEM_DATA and ANDROID_OEM_DATA_ARRAY macros
to add OEM-specific fields to kernel data structures
to enable value-added features implemented in vendor modules.
Fields defined with these macros must not be used by
SoC vendors who must use the ANDROID_VENDOR_DATA* macros
to add vendor fields.

Bug: 156285741
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I93a8a182a17854cc4f0a86835e833bf9b00ea0b8
2021-01-27 09:43:35 +00:00
Todd Kjos
dc419bab74 ANDROID: fix copyright notice
New vendor hook files cite Google, Inc instead of Google LLC

Fixes: 7f62740112 ("ANDROID: add support for vendor hooks")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: If42762c4bbe6d0a7ff1cc75b64a3b224902e121c
2020-05-18 20:58:23 +00:00
Todd Kjos
626b817511 ANDROID: GKI: add android_vendor.h
This header file is to be used for various macros to help add
vendor specific fields to kernel data structures to enable
value-added features implemented in vendor modules.

They are to be used before the freeze (to anticipate places where
vendor-specific data is required).

Bug: 156285741
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ic23b2760ece93facdc51cc35718a4154aba810f9
2020-05-12 19:47:33 +00:00