Merge branch 'android11-5.4' into 'android11-5.4-lts'

Sync up with android11-5.4 for the following commits:

a2114d2456 ANDROID: Update KMI_GENERATION after KMI change
9bb683349b ANDROID: GKI: update the .xml file with the October 15 ABI breakages
b7d30a3293 ANDROID: GKI: fs.h: add Android ABI padding to struct file
3b300ff4c5 ANDROID: vendor_hooks: Add a vendor data to file struct
e89b05984d ANDROID: vendor_hooks: Extend the vendor data array in task_struct
7ee8b58cc1 ANDROID: GKI: add fields required to enable CONFIG_TRANSPARENT_HUGEPAGE
0ce2100bcf ANDROID: Drop abi_gki_aarch64_workarounds
f0c4a768cf UPSTREAM: ehci-hcd: Move include to keep CRC stable
5427f8b72f ANDROID: GKI: update xiaomi symbol list
ecb88922f5 ANDROID: GKI: update Vivo symbol list
32b2423372 ANDROID: sysrq: add vendor hook for sysrq crash information

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia8ac3109c49a4866904c4419a17e2379156a8f77
This commit is contained in:
Greg Kroah-Hartman 2020-10-16 08:08:04 +02:00
commit cb547a4e01
24 changed files with 4351 additions and 5008 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,7 @@
adjust_managed_page_count
alarm_cancel
alarm_init
alarm_start
alarm_start_relative
alloc_chrdev_region
__alloc_disk_node
@ -858,7 +859,9 @@
i2c_put_dma_safe_msg_buf
i2c_register_driver
i2c_smbus_read_byte_data
i2c_smbus_read_word_data
i2c_smbus_write_byte_data
i2c_smbus_write_word_data
i2c_transfer
i2c_transfer_buffer_flags
i2c_unregister_device

View file

@ -1,3 +0,0 @@
[abi_symbol_list]
# b/167230325
ehci_handshake

View file

@ -11,6 +11,11 @@
snd_soc_info_volsw_range
snd_soc_put_volsw_range
# required by cs35l45_dlkm.ko
devm_snd_soc_register_component
regcache_drop_region
snd_soc_dapm_del_routes
# required by q6_dlkm.ko
down_interruptible
__kfifo_alloc

View file

@ -94,6 +94,7 @@ CONFIG_MODVERSIONS=y
CONFIG_BLK_INLINE_ENCRYPTION=y
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
CONFIG_GKI_HACKS_TO_FIX=y
CONFIG_GKI_OPT_FEATURES=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=y
CONFIG_MEMORY_HOTPLUG=y

View file

@ -70,6 +70,7 @@ CONFIG_MODVERSIONS=y
CONFIG_BLK_INLINE_ENCRYPTION=y
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
CONFIG_GKI_HACKS_TO_FIX=y
CONFIG_GKI_OPT_FEATURES=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=y
CONFIG_CLEANCACHE=y

View file

@ -1,5 +1,5 @@
BRANCH=android11-5.4
KMI_GENERATION=0
KMI_GENERATION=1
CC=clang
LD=ld.lld

View file

@ -17,7 +17,6 @@ android/abi_gki_aarch64_qcom
android/abi_gki_aarch64_sunxi
android/abi_gki_aarch64_unisoc
android/abi_gki_aarch64_vivo
android/abi_gki_aarch64_workarounds
android/abi_gki_aarch64_xiaomi
"
TRIM_NONLISTED_KMI=1

View file

@ -19,6 +19,7 @@
#include <trace/hooks/debug.h>
#include <trace/hooks/minidump.h>
#include <trace/hooks/wqlockup.h>
#include <trace/hooks/sysrqcrash.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
@ -60,3 +61,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_printk_store);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_regs);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash);

View file

@ -54,6 +54,8 @@
#include <asm/ptrace.h>
#include <asm/irq_regs.h>
#include <trace/hooks/sysrqcrash.h>
/* Whether we react on sysrq keys or just ignore them */
static int __read_mostly sysrq_enabled = CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE;
static bool __read_mostly sysrq_always_enabled;
@ -137,6 +139,8 @@ static void sysrq_handle_crash(int key)
/* release the RCU read lock before crashing */
rcu_read_unlock();
trace_android_vh_sysrq_crash(current);
panic("sysrq triggered crash\n");
}
static struct sysrq_key_op sysrq_crash_op = {

View file

@ -22,6 +22,7 @@
#include <linux/interrupt.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <linux/usb/otg.h>
#include <linux/moduleparam.h>
#include <linux/dma-mapping.h>
#include <linux/debugfs.h>

View file

@ -14,7 +14,6 @@
*/
/*-------------------------------------------------------------------------*/
#include <linux/usb/otg.h>
#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)

View file

@ -44,6 +44,7 @@
#include <asm/byteorder.h>
#include <uapi/linux/fs.h>
#include <linux/android_vendor.h>
struct backing_dev_info;
struct bdi_writeback;
@ -990,6 +991,9 @@ struct file {
#endif /* #ifdef CONFIG_EPOLL */
struct address_space *f_mapping;
errseq_t f_wb_err;
ANDROID_KABI_RESERVE(1);
ANDROID_VENDOR_DATA(1);
} __randomize_layout
__attribute__((aligned(4))); /* lest something weird decides that 2 is OK */

View file

@ -309,6 +309,7 @@ static inline bool transhuge_vma_suitable(struct vm_area_struct *vma,
}
static inline void prep_transhuge_page(struct page *page) {}
static inline void free_transhuge_page(struct page *page) {}
#define transparent_hugepage_flags 0UL

View file

@ -330,7 +330,7 @@ struct mem_cgroup {
struct list_head event_list;
spinlock_t event_list_lock;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
struct deferred_split deferred_split_queue;
#endif

View file

@ -799,7 +799,7 @@ enum compound_dtor_id {
#ifdef CONFIG_HUGETLB_PAGE
HUGETLB_PAGE_DTOR,
#endif
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
TRANSHUGE_PAGE_DTOR,
#endif
NR_COMPOUND_DTORS,

View file

@ -507,7 +507,8 @@ struct mm_struct {
#ifdef CONFIG_MMU_NOTIFIER
struct mmu_notifier_mm *mmu_notifier_mm;
#endif
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
#if (defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)) && \
!USE_SPLIT_PMD_PTLOCKS
pgtable_t pmd_huge_pte; /* protected by page_table_lock */
#endif
#ifdef CONFIG_NUMA_BALANCING

View file

@ -693,7 +693,7 @@ struct zonelist {
extern struct page *mem_map;
#endif
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
struct deferred_split {
spinlock_t split_queue_lock;
struct list_head split_queue;
@ -781,7 +781,7 @@ typedef struct pglist_data {
unsigned long first_deferred_pfn;
#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
struct deferred_split deferred_split_queue;
#endif

View file

@ -1292,7 +1292,7 @@ struct task_struct {
unsigned long prev_lowest_stack;
#endif
ANDROID_VENDOR_DATA_ARRAY(1, 2);
ANDROID_VENDOR_DATA_ARRAY(1, 3);
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);

View file

@ -70,7 +70,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
UNEVICTABLE_PGMUNLOCKED,
UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
THP_FAULT_ALLOC,
THP_FAULT_FALLBACK,
THP_COLLAPSE_ALLOC,

View file

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM sysrqcrash
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_SYSRQCRASH_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_SYSRQCRASH_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
/*
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
DECLARE_HOOK(android_vh_sysrq_crash,
TP_PROTO(void *data),
TP_ARGS(data));
#else
#define trace_android_vh_sysrq_crash(data)
#endif
#endif /* _TRACE_HOOK_SYSRQCRASH_H */
/* This part must be outside protection */
#include <trace/define_trace.h>

View file

@ -208,3 +208,11 @@ config GKI_HACKS_TO_FIX
Unless you are building a GKI kernel to be used with modules
built from a different config, say N here.
config GKI_OPT_FEATURES
bool "Optional GKI features"
help
Config option that should be enabled in GKI kernels to allow optional
GKI features be enabled or disabled without ABI breakage.
If you are not building a GKI kernel, say N here.

View file

@ -309,7 +309,7 @@ compound_page_dtor * const compound_page_dtors[] = {
#ifdef CONFIG_HUGETLB_PAGE
free_huge_page,
#endif
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
free_transhuge_page,
#endif
};

View file

@ -1253,7 +1253,7 @@ const char * const vmstat_text[] = {
"unevictable_pgs_cleared",
"unevictable_pgs_stranded",
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_GKI_OPT_FEATURES)
"thp_fault_alloc",
"thp_fault_fallback",
"thp_collapse_alloc",