* [RFC PATCH 0/7] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE
@ 2025-04-11 10:51 Chen Linxuan
[not found] ` <20250411105459.90782-1-chenlinxuan@uniontech.com>
0 siblings, 1 reply; 3+ messages in thread
From: Chen Linxuan @ 2025-04-11 10:51 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier, Peter Huewe,
Jarkko Sakkinen, Jason Gunthorpe, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, David Airlie, Simona Vetter,
Chengchang Tang, Junxian Huang, Leon Romanovsky, Keith Busch,
Jens Axboe, Christoph Hellwig, Sagi Grimberg, Yishai Hadas,
Shameer Kolothum, Kevin Tian, Alex Williamson, Andrew Morton,
Nick Desaulniers, Bill Wendling, Justin Stitt, Chen Linxuan
Cc: linux-kbuild, linux-kernel, linux-integrity, intel-gfx, dri-devel,
linux-rdma, linux-nvme, kvm, virtualization, linux-mm, llvm
This series introduces a new kernel configuration option NO_AUTO_INLINE,
which can be used to disable the automatic inlining of functions.
This will allow the function tracer to trace more functions
because it only traces functions that the compiler has not inlined.
Previous discussions can be found here:
Link: https://lore.kernel.org/all/20181028130945.23581-3-changbin.du@gmail.com/
Chen Linxuan (2):
drm/i915/pxp: fix undefined reference to
`intel_pxp_gsccs_is_ready_for_sessions'
RDMA/hns: initialize db in update_srq_db()
Winston Wen (5):
nvme: add __always_inline for nvme_pci_npages_prp
mm: add __always_inline for page_contains_unaccepted
vfio/virtio: add __always_inline for virtiovf_get_device_config_size
tpm: add __always_inline for tpm_is_hwrng_enabled
lib/Kconfig.debug: introduce CONFIG_NO_AUTO_INLINE
Makefile | 6 ++++++
drivers/char/tpm/tpm-chip.c | 2 +-
drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h | 8 ++++++--
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
drivers/nvme/host/pci.c | 2 +-
drivers/vfio/pci/virtio/legacy_io.c | 2 +-
lib/Kconfig.debug | 15 +++++++++++++++
mm/page_alloc.c | 2 +-
8 files changed, 32 insertions(+), 7 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db()
[not found] ` <20250411105459.90782-1-chenlinxuan@uniontech.com>
@ 2025-04-11 10:54 ` Chen Linxuan
2025-04-11 18:01 ` Leon Romanovsky
0 siblings, 1 reply; 3+ messages in thread
From: Chen Linxuan @ 2025-04-11 10:54 UTC (permalink / raw)
To: Chengchang Tang, Junxian Huang, Jason Gunthorpe, Leon Romanovsky
Cc: Chen Linxuan, Winston Wen, linux-rdma, linux-kernel
On x86_64 with gcc version 13.3.0, I compile
drivers/infiniband/hw/hns/hns_roce_hw_v2.c with:
make defconfig
./scripts/kconfig/merge_config.sh .config <(
echo CONFIG_COMPILE_TEST=y
echo CONFIG_HNS3=m
echo CONFIG_INFINIBAND=m
echo CONFIG_INFINIBAND_HNS_HIP08=m
)
make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once" \
drivers/infiniband/hw/hns/hns_roce_hw_v2.o
Then I get a compile error:
CALL scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
CC [M] drivers/infiniband/hw/hns/hns_roce_hw_v2.o
In file included from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:47:
drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'update_srq_db':
drivers/infiniband/hw/hns/hns_roce_common.h:74:17: error: 'db' is used uninitialized [-Werror=uninitialized]
74 | *((__le32 *)_ptr + (field_h) / 32) &= \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/infiniband/hw/hns/hns_roce_common.h:90:17: note: in expansion of macro '_hr_reg_clear'
90 | _hr_reg_clear(ptr, field_type, field_h, field_l); \
| ^~~~~~~~~~~~~
drivers/infiniband/hw/hns/hns_roce_common.h:95:39: note: in expansion of macro '_hr_reg_write'
95 | #define hr_reg_write(ptr, field, val) _hr_reg_write(ptr, field, val)
| ^~~~~~~~~~~~~
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:948:9: note: in expansion of macro 'hr_reg_write'
948 | hr_reg_write(&db, DB_TAG, srq->srqn);
| ^~~~~~~~~~~~
drivers/infiniband/hw/hns/hns_roce_hw_v2.c:946:31: note: 'db' declared here
946 | struct hns_roce_v2_db db;
| ^~
cc1: all warnings being treated as errors
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Co-Developed-by: Winston Wen <wentao@uniontech.com>
Signed-off-by: Winston Wen <wentao@uniontech.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 160e8927d364..7d6c0cfa1ded 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -943,7 +943,7 @@ static void fill_wqe_idx(struct hns_roce_srq *srq, unsigned int wqe_idx)
static void update_srq_db(struct hns_roce_srq *srq)
{
struct hns_roce_dev *hr_dev = to_hr_dev(srq->ibsrq.device);
- struct hns_roce_v2_db db;
+ struct hns_roce_v2_db db = { 0 };
hr_reg_write(&db, DB_TAG, srq->srqn);
hr_reg_write(&db, DB_CMD, HNS_ROCE_V2_SRQ_DB);
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db()
2025-04-11 10:54 ` [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db() Chen Linxuan
@ 2025-04-11 18:01 ` Leon Romanovsky
0 siblings, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2025-04-11 18:01 UTC (permalink / raw)
To: Chen Linxuan
Cc: Chengchang Tang, Junxian Huang, Jason Gunthorpe, Winston Wen,
linux-rdma, linux-kernel
On Fri, Apr 11, 2025 at 06:54:53PM +0800, Chen Linxuan wrote:
> On x86_64 with gcc version 13.3.0, I compile
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c with:
>
> make defconfig
> ./scripts/kconfig/merge_config.sh .config <(
> echo CONFIG_COMPILE_TEST=y
> echo CONFIG_HNS3=m
> echo CONFIG_INFINIBAND=m
> echo CONFIG_INFINIBAND_HNS_HIP08=m
> )
> make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once" \
> drivers/infiniband/hw/hns/hns_roce_hw_v2.o
>
> Then I get a compile error:
>
> CALL scripts/checksyscalls.sh
> DESCEND objtool
> INSTALL libsubcmd_headers
> CC [M] drivers/infiniband/hw/hns/hns_roce_hw_v2.o
> In file included from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:47:
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'update_srq_db':
> drivers/infiniband/hw/hns/hns_roce_common.h:74:17: error: 'db' is used uninitialized [-Werror=uninitialized]
> 74 | *((__le32 *)_ptr + (field_h) / 32) &= \
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_common.h:90:17: note: in expansion of macro '_hr_reg_clear'
> 90 | _hr_reg_clear(ptr, field_type, field_h, field_l); \
> | ^~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_common.h:95:39: note: in expansion of macro '_hr_reg_write'
> 95 | #define hr_reg_write(ptr, field, val) _hr_reg_write(ptr, field, val)
> | ^~~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:948:9: note: in expansion of macro 'hr_reg_write'
> 948 | hr_reg_write(&db, DB_TAG, srq->srqn);
> | ^~~~~~~~~~~~
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c:946:31: note: 'db' declared here
> 946 | struct hns_roce_v2_db db;
> | ^~
> cc1: all warnings being treated as errors
>
> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> Co-Developed-by: Winston Wen <wentao@uniontech.com>
> Signed-off-by: Winston Wen <wentao@uniontech.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to rdma-next.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-11 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11 10:51 [RFC PATCH 0/7] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE Chen Linxuan
[not found] ` <20250411105459.90782-1-chenlinxuan@uniontech.com>
2025-04-11 10:54 ` [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db() Chen Linxuan
2025-04-11 18:01 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).