anolis: kabi: Reserve some space for kABI stability
ANBZ: #3879 Based on upstream struct size to reserve specific fields for kABI related structs. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: Xu Yu <xuyu@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/2210
This commit is contained in:
parent
1cde86e4ba
commit
4dba5ccef7
|
@ -187,6 +187,11 @@ struct irq_data {
|
|||
struct irq_data *parent_data;
|
||||
#endif
|
||||
void *chip_data;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -25,6 +25,9 @@ struct irq_work {
|
|||
void (*func)(struct irq_work *);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
|
||||
static inline
|
||||
|
|
|
@ -105,6 +105,9 @@ struct irq_desc {
|
|||
const char *name;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
#ifdef CONFIG_SPARSE_IRQ
|
||||
|
|
|
@ -264,6 +264,8 @@ struct reclaim_coldpgs_stats {
|
|||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
#endif /* CONFIG_RECLAIM_COLDPGS */
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ struct mempolicy {
|
|||
} w;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef _LINUX_MEMPOOL_H
|
||||
#define _LINUX_MEMPOOL_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
|
@ -23,6 +24,10 @@ typedef struct mempool_s {
|
|||
mempool_alloc_t *alloc;
|
||||
mempool_free_t *free;
|
||||
wait_queue_head_t wait;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
} mempool_t;
|
||||
|
||||
static inline bool mempool_initialized(mempool_t *pool)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_MEMREMAP_H_
|
||||
#define _LINUX_MEMREMAP_H_
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/range.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/percpu-refcount.h>
|
||||
|
@ -23,6 +24,9 @@ struct vmem_altmap {
|
|||
unsigned long free;
|
||||
unsigned long align;
|
||||
unsigned long alloc;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -87,6 +91,9 @@ struct dev_pagemap_ops {
|
|||
* the page back to a CPU accessible page.
|
||||
*/
|
||||
vm_fault_t (*migrate_to_ram)(struct vm_fault *vmf);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
#define PGMAP_ALTMAP_VALID (1 << 0)
|
||||
|
@ -117,6 +124,13 @@ struct dev_pagemap {
|
|||
const struct dev_pagemap_ops *ops;
|
||||
void *owner;
|
||||
int nr_range;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
|
||||
union {
|
||||
struct range range;
|
||||
struct range ranges[0];
|
||||
|
|
|
@ -548,6 +548,9 @@ struct vm_fault {
|
|||
*/
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
|
||||
/* page entry size for vm->huge_fault() */
|
||||
|
|
|
@ -841,6 +841,9 @@ struct readahead_control {
|
|||
unsigned int _batch_count;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
|
||||
#define DEFINE_READAHEAD(ractl, f, r, m, i) \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _LINUX_SHRINKER_H
|
||||
#define _LINUX_SHRINKER_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
/*
|
||||
* This struct is used to pass information from page reclaim to the shrinkers.
|
||||
* We consolidate the values for easier extention later.
|
||||
|
@ -86,6 +86,12 @@ struct shrinker {
|
|||
#endif
|
||||
/* objs pending delete, per node */
|
||||
atomic_long_t *nr_deferred;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
};
|
||||
#define DEFAULT_SEEKS 2 /* A good number if you don't know better. */
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __NETNS_SMC_H__
|
||||
#define __NETNS_SMC_H__
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/percpu.h>
|
||||
|
||||
|
@ -27,5 +28,38 @@ struct netns_smc {
|
|||
int sysctl_wmem;
|
||||
int sysctl_rmem;
|
||||
int sysctl_tcp2smc;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
CK_KABI_RESERVE(6)
|
||||
CK_KABI_RESERVE(7)
|
||||
CK_KABI_RESERVE(8)
|
||||
CK_KABI_RESERVE(9)
|
||||
CK_KABI_RESERVE(10)
|
||||
CK_KABI_RESERVE(11)
|
||||
CK_KABI_RESERVE(12)
|
||||
CK_KABI_RESERVE(13)
|
||||
CK_KABI_RESERVE(14)
|
||||
CK_KABI_RESERVE(15)
|
||||
CK_KABI_RESERVE(16)
|
||||
CK_KABI_RESERVE(17)
|
||||
CK_KABI_RESERVE(18)
|
||||
CK_KABI_RESERVE(19)
|
||||
CK_KABI_RESERVE(20)
|
||||
CK_KABI_RESERVE(21)
|
||||
CK_KABI_RESERVE(22)
|
||||
CK_KABI_RESERVE(23)
|
||||
CK_KABI_RESERVE(24)
|
||||
CK_KABI_RESERVE(25)
|
||||
CK_KABI_RESERVE(26)
|
||||
CK_KABI_RESERVE(27)
|
||||
CK_KABI_RESERVE(28)
|
||||
CK_KABI_RESERVE(29)
|
||||
CK_KABI_RESERVE(30)
|
||||
CK_KABI_RESERVE(31)
|
||||
CK_KABI_RESERVE(32)
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef __MM_INTERNAL_H
|
||||
#define __MM_INTERNAL_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/pagemap.h>
|
||||
|
@ -251,6 +252,9 @@ struct compact_control {
|
|||
bool contended; /* Signal lock or sched contention */
|
||||
bool rescan; /* Rescanning the same pageblock */
|
||||
bool alloc_contig; /* alloc_contig_range allocation */
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue