Thread (60 messages) 60 messages, 13 authors, 2023-02-10

Re: [PATCH 17/18] net: octeontx2: fix mixed module-builtin object

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2022-11-23 20:55:13
Also in: linux-kbuild, lkml

On Sun, Nov 20, 2022 at 8:10 AM Alexander Lobakin [off-list ref] wrote:
With CONFIG_OCTEONTX2_PF=y and CONFIG_OCTEONTX2_VF=m, several object
files  are linked to a module and also to vmlinux even though the
expected CFLAGS are different between builtins and modules.
This is the same situation as fixed by
commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects").
There's also no need to duplicate relatively big piece of object
code into two modules.

Introduce the new module, rvu_niccommon, to provide the common
functions to both rvu_nicpf and rvu_nicvf. Also, otx2_ptp.o was not
shared, but built as a standalone module (it was fixed already a year
ago the same way this commit does due to link issues). As it's used
by both PF and VF modules in the same way, just link it into that new
common one.

Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
Fixes: 8e67558177f8 ("octeontx2-pf: PFC config support with DCBx")
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Alexander Lobakin <redacted>
---

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>

Minor:
otx2_ptp.c uses EXPORT_SYMBOL_GPL().
It is better to use either EXPORT_SYMBOL_GPL or
EXPORT_SYMBOL_NS_GPL instead of mixing them.



--
Best Regards
Masahiro Yamada
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help