integ/kernel/kernel-std/centos/patches/fix-CentOS-7.6-upgrade-compile-error.patch
Martin, Chen 794737dac2 rebase std kernel patch to CentOS7.6 3.10.0-957.1.3
fix compile error in drbd_req.c for improper usage of
request queue API; fix warning in kernel/bpf/core.c
for implicit declaration trace call for CFLAG
-Werror-implicit-function-declaration

remove patch change is_swiotlb_buffer in lib/swiotlb.c
As change already in new kernel code base

Story: 2004521
Task: 28260
Depends-On: https://review.openstack.org/625773/

Change-Id: I4a3af98b6efe6d31e66db39302f3af8c4ff19d2c
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
2019-01-22 20:17:50 +08:00

68 lines
2.5 KiB
Diff

From 84a6fef49cb58415d9790947e65c34b09d99d356 Mon Sep 17 00:00:00 2001
From: "Martin, Chen" <haochuan.z.chen@intel.com>
Date: Mon, 14 Jan 2019 19:58:07 +0000
Subject: [PATCH] fix CentOS 7.6 upgrade compile error
1, fix improper call of part_round_stats and part_inc_in_flight
in drbd_req.c, as CONFIG_BLK_DEV_DRBD=m defined in
kernel-3.10.0-x86_64.config.tis_extra
2, add explicit declaration for trace_bpf_int_jit_compile,
trace_bpf_jit_compile, trace_bpf_jit_free, if pmd_read_atomic not
defined
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
---
drivers/block/drbd/drbd_req.c | 8 ++++----
include/linux/filter.h | 4 ++++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index a6f13f7..cbd0a49 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -39,12 +39,12 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
const int rw = bio_data_dir(req->master_bio);
int cpu;
cpu = part_stat_lock();
- part_round_stats(cpu, &mdev->vdisk->part0);
+ part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0);
part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], req->i.size >> 9);
(void) cpu; /* The macro invocations above want the cpu argument, I do not like
the compiler warning about cpu only assigned but never used... */
- part_inc_in_flight(&mdev->vdisk->part0, rw);
+ part_inc_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw);
part_stat_unlock();
}
@@ -56,8 +56,8 @@ static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req)
int cpu;
cpu = part_stat_lock();
part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration);
- part_round_stats(cpu, &mdev->vdisk->part0);
- part_dec_in_flight(&mdev->vdisk->part0, rw);
+ part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0);
+ part_dec_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw);
part_stat_unlock();
}
diff --git a/include/linux/filter.h b/include/linux/filter.h
index cddbb31..15ce55f 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -665,6 +665,10 @@ static inline bool bpf_jit_blinding_enabled(struct bpf_prog *prog)
return true;
}
#else
+struct bpf_prog * __weak trace_bpf_int_jit_compile(struct bpf_prog *prog);
+void __weak trace_bpf_jit_compile(struct bpf_prog *prog);
+void __weak trace_bpf_jit_free(struct bpf_prog *fp);
+
static inline bool ebpf_jit_enabled(void)
{
return false;
--
1.8.3.1