From 5b985a9d45dcc955605fea41aaa82694cdab2270 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 4 Jan 2024 13:26:16 +0000 Subject: [PATCH 1/4] tty: kabi: KABI reservation for tty hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T231 -------------------------------- Reserve space for tty module in advance to prepare for merging new feature in the future. Signed-off-by: Yi Yang --- include/linux/tty.h | 7 +++++++ include/linux/tty_buffer.h | 4 ++++ include/linux/tty_driver.h | 3 +++ include/linux/tty_ldisc.h | 3 +++ include/linux/tty_port.h | 3 +++ 5 files changed, 20 insertions(+) diff --git a/include/linux/tty.h b/include/linux/tty.h index f002d0f25db7..811a04602971 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -15,6 +15,7 @@ #include #include #include +#include /* @@ -248,6 +249,12 @@ struct tty_struct { #define N_TTY_BUF_SIZE 4096 struct work_struct SAK_work; + KABI_RESERVE(0); + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + KABI_RESERVE(5); } __randomize_layout; /* Each of a tty's open files has private_data pointing to tty_file_private */ diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h index 31125e3be3c5..00655fa7c7bb 100644 --- a/include/linux/tty_buffer.h +++ b/include/linux/tty_buffer.h @@ -6,6 +6,7 @@ #include #include #include +#include struct tty_buffer { union { @@ -18,6 +19,7 @@ struct tty_buffer { unsigned int lookahead; /* Lazy update on recv, can become less than "read" */ unsigned int read; bool flags; + KABI_RESERVE(0); /* Data points here */ u8 data[] __aligned(sizeof(unsigned long)); }; @@ -42,6 +44,8 @@ struct tty_bufhead { atomic_t mem_used; /* In-use buffers excluding free list */ int mem_limit; struct tty_buffer *tail; /* Active buffer */ + KABI_RESERVE(0); + KABI_RESERVE(1); }; /* diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 18beff0cec1a..b1192a6decc1 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -10,6 +10,7 @@ #include #include #include +#include struct tty_struct; struct tty_driver; @@ -391,6 +392,8 @@ struct tty_operations { void (*poll_put_char)(struct tty_driver *driver, int line, char ch); #endif int (*proc_show)(struct seq_file *m, void *driver); + KABI_RESERVE(0); + KABI_RESERVE(1); } __randomize_layout; /** diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index af01e89074b2..d81fedc7c668 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -10,6 +10,7 @@ struct tty_struct; #include #include #include +#include /* * the semaphore definition @@ -264,6 +265,8 @@ struct tty_ldisc_ops { const u8 *fp, size_t count); struct module *owner; + KABI_RESERVE(0); + KABI_RESERVE(1); }; struct tty_ldisc { diff --git a/include/linux/tty_port.h b/include/linux/tty_port.h index 6b367eb17979..7b0777ef3e77 100644 --- a/include/linux/tty_port.h +++ b/include/linux/tty_port.h @@ -7,6 +7,7 @@ #include #include #include +#include struct attribute_group; struct tty_driver; @@ -121,6 +122,8 @@ struct tty_port { int drain_delay; struct kref kref; void *client_data; + KABI_RESERVE(0); + KABI_RESERVE(1); }; /* tty_port::iflags bits -- use atomic bit ops */ -- Gitee From 33a1edbefc677b6352cb8ea3aa9bc96d9b979fe6 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 4 Jan 2024 13:26:17 +0000 Subject: [PATCH 2/4] mtd: kabi: KABI reservation for mtd hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T231 -------------------------------- Reserve space for mtd module in advance to prepare for merging new feature in the future. Signed-off-by: Yi Yang --- include/linux/mtd/mtd.h | 8 ++++++++ include/linux/mtd/partitions.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 914a9f974baa..142cffb6a806 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -77,6 +78,7 @@ struct mtd_oob_ops { uint8_t *datbuf; uint8_t *oobbuf; struct mtd_req_stats *stats; + KABI_RESERVE(0); }; /** @@ -215,6 +217,7 @@ struct mtd_part { u64 offset; u64 size; u32 flags; + KABI_RESERVE(0); }; /** @@ -233,6 +236,7 @@ struct mtd_master { struct mutex partitions_lock; struct mutex chrdev_lock; unsigned int suspended : 1; + KABI_RESERVE(0); }; struct mtd_info { @@ -398,6 +402,10 @@ struct mtd_info { struct mtd_part part; struct mtd_master master; + KABI_RESERVE(0); + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd) diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index b74a539ec581..aed435110429 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -10,6 +10,7 @@ #define MTD_PARTITIONS_H #include +#include /* @@ -51,6 +52,7 @@ struct mtd_partition { uint32_t mask_flags; /* master MTD flags to mask out for this partition */ uint32_t add_flags; /* flags to add to the partition */ struct device_node *of_node; + KABI_RESERVE(0); }; #define MTDPART_OFS_RETAIN (-3) -- Gitee From 6ebb9700e68e4405efba8199f73f35bc3d33694f Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 4 Jan 2024 13:26:18 +0000 Subject: [PATCH 3/4] mmc: kabi: KABI reservation for mmc hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T231 -------------------------------- Reserve space for mmc module in advance to prepare for merging new feature in the future. Signed-off-by: Yi Yang --- include/linux/mmc/card.h | 6 ++++++ include/linux/mmc/host.h | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 7b12eebc5586..92aba75a82af 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -9,6 +9,7 @@ #include #include +#include struct mmc_cid { unsigned int manfid; @@ -126,6 +127,8 @@ struct mmc_ext_csd { u8 device_life_time_est_typ_b; /* 269 */ unsigned int feature_support; + KABI_RESERVE(0); + KABI_RESERVE(1); #define MMC_DISCARD_FEATURE BIT(0) /* CMD38 feature */ }; @@ -341,6 +344,9 @@ struct mmc_card { unsigned int nr_parts; struct workqueue_struct *complete_wq; /* Private workqueue */ + KABI_RESERVE(0); + KABI_RESERVE(1); + KABI_RESERVE(2); }; static inline bool mmc_large_sector(struct mmc_card *card) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 62a6847a3b6f..4d4c76109e86 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -16,6 +16,7 @@ #include #include #include +#include struct mmc_ios { unsigned int clock; /* clock rate */ @@ -78,6 +79,8 @@ struct mmc_ios { #define MMC_SET_DRIVER_TYPE_D 3 bool enhanced_strobe; /* hs400es selection */ + KABI_RESERVE(0); + KABI_RESERVE(1); }; struct mmc_clk_phase { @@ -218,6 +221,8 @@ struct mmc_host_ops { /* Initialize an SD express card, mandatory for MMC_CAP2_SD_EXP. */ int (*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios); + KABI_RESERVE(0); + KABI_RESERVE(1); }; struct mmc_cqe_ops { @@ -528,6 +533,9 @@ struct mmc_host { bool hsq_enabled; u32 err_stats[MMC_ERR_MAX]; + KABI_RESERVE(0); + KABI_RESERVE(1); + KABI_RESERVE(2); unsigned long private[] ____cacheline_aligned; }; -- Gitee From 7664f5d2a45c292c6a3a19110a5798037af21005 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Thu, 4 Jan 2024 13:26:19 +0000 Subject: [PATCH 4/4] ipmi: kabi: KABI reservation for ipmi hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8T231 -------------------------------- Reserve space for ipmi module in advance to prepare for merging new feature in the future. Signed-off-by: Yi Yang --- drivers/char/ipmi/ipmi_msghandler.c | 6 ++++++ include/linux/ipmi.h | 2 ++ include/linux/ipmi_smi.h | 3 +++ 3 files changed, 11 insertions(+) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 186f1fee7534..77d1c6e5e3f5 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -36,6 +36,7 @@ #include #include #include +#include #define IPMI_DRIVER_VERSION "39.2" @@ -203,6 +204,7 @@ struct ipmi_user { /* Free must run in process context for RCU cleanup. */ struct work_struct remove_work; + KABI_RESERVE(0); }; static struct workqueue_struct *remove_work_wq; @@ -603,6 +605,10 @@ struct ipmi_smi { * parameters passed by "low" level IPMI code. */ int run_to_completion; + KABI_RESERVE(0); + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #define to_si_intf_from_dev(device) container_of(device, struct ipmi_smi, dev) diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index a1c9c0d48ebf..183f0380b0bb 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h @@ -19,6 +19,7 @@ #include #include #include /* For acpi_handle */ +#include struct module; struct device; @@ -70,6 +71,7 @@ struct ipmi_recv_msg { * the size or existence of this, since it may change. */ unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; + KABI_RESERVE(0); }; #define INIT_IPMI_RECV_MSG(done_handler) \ diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 5d69820d8b02..e182564d21a6 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -19,6 +19,7 @@ #include #include #include +#include struct device; @@ -123,6 +124,7 @@ struct ipmi_smi_msg { * (presumably to free it). */ void (*done)(struct ipmi_smi_msg *msg); + KABI_RESERVE(0); }; #define INIT_IPMI_SMI_MSG(done_handler) \ @@ -218,6 +220,7 @@ struct ipmi_smi_handlers { * block. */ void (*set_maintenance_mode)(void *send_info, bool enable); + KABI_RESERVE(0); }; struct ipmi_device_id { -- Gitee