[BUG] Module name conflict: wave511 downstream driver and upstream wave5

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[BUG] Module name conflict: wave511 downstream driver and upstream wave5

172 Views
matheus_barbosa_tdx
Contributor II

Hello,

The NXP Wave511 VPU driver in the lf-6.18.20-2.0.0 kernel (6.18.y) builds a module with the same name as the mainline Chips&Media Wave5 driver. Any config that enables both, such as allmodconfig or allyesconfig, fails the build.

 

Details:

- Upstream driver (in mainline since v6.8):

drivers/media/platform/chips-media/wave5/
   obj-$(CONFIG_VIDEO_WAVE_VPU) += wave5.o


- NXP driver:

drivers/mxc/vpu/wave511/
   obj-$(CONFIG_MXC_VIDEO_WAVE511) += wave5.o
   obj-$(CONFIG_MXC_VIDEO_WAVE511_CTRL) += wave5-ctrl.o

 

The two Kconfig symbols are independent, so both modules can be enabled together. Kbuild then stops with:

error: the following would cause module name conflict:
drivers/media/platform/chips-media/wave5/wave5.ko
drivers/mxc/vpu/wave511/wave5.ko

Even where the check isn't hit, modules_install would overwrite one wave5.ko with the other.

The drivers bind different compatibles (ti,j721s2-wave521c and nxp,wave511-vpu), so only the module name collides.

Steps to reproduce:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- allmodconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) modules

 

Could that be fixed in an upcoming Linux IMX release?

 

Thank you in advance for your support,

Matheus Barbosa

Toradex

0 Kudos
Reply
3 Replies

138 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

This issue have not been reported before and there are no plans to implement a solution yet.

Which processor are you using?

Did you try to disabling one Kconfig option or locally renaming the module?

Best regards.

0 Kudos
Reply

128 Views
matheus_barbosa_tdx
Contributor II

Hello,

I'm adding the Wave511 driver to support i.MX952 at Toradex BSP, although the processor in use is not relevant for the bug reported in the downstream kernel.

We build the kernel with a shared config for all ARM64 SoCs that are supported by our BSP, its a super set that enables many modules. That includes CONFIG_VIDEO_WAVE_VPU.

This is the kernel driver present at mainline that installs "wave5.ko" to modules directory.

 

I've created a workaround 

Since it is not possible to enable WAVE511 driver in that common config, I've done that just for i.MX SoCs and disabled CONFIG_VIDEO_WAVE_VPU for them as well.

 

I've disabled CONFIG_VIDEO_WAVE_VPU at our OE layer for the i.MX processors to allow enabling CONFIG_MXC_VIDEO_WAVE511 as a module for now.

 

It is expected that allmodconfig build cleanly, and the current downstream driver breaks this. That is the reason I'm reporting it.

0 Kudos
Reply

109 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Thank you for the details, I reported this with internal team.

I will update you further actions in our side as soon as possible.

Best regards.

%3CLINGO-SUB%20id%3D%22lingo-sub-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EThe%20NXP%20Wave511%20VPU%20driver%20in%20the%20lf-6.18.20-2.0.0%20kernel%20(6.18.y)%20builds%20a%20module%20with%20the%20same%20name%20as%20the%20mainline%20Chips%26amp%3BMedia%20Wave5%20driver.%20Any%20config%20that%20enables%20both%2C%20such%20as%20%3CEM%3Eallmodconfig%3C%2FEM%3E%20or%20%3CEM%3Eallyesconfig%3C%2FEM%3E%2C%20fails%20the%20build.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EDetails%3A%3C%2FP%3E%3CP%3E-%20Upstream%20driver%20(in%20mainline%20since%20v6.8)%3A%3C%2FP%3E%3CPRE%3Edrivers%2Fmedia%2Fplatform%2Fchips-media%2Fwave5%2F%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_VIDEO_WAVE_VPU)%20%2B%3D%20wave5.o%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3E-%20NXP%20driver%3A%3C%2FP%3E%3CPRE%3Edrivers%2Fmxc%2Fvpu%2Fwave511%2F%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_MXC_VIDEO_WAVE511)%20%2B%3D%20wave5.o%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3Bobj-%24(CONFIG_MXC_VIDEO_WAVE511_CTRL)%20%2B%3D%20wave5-ctrl.o%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThe%20two%20Kconfig%20symbols%20are%20independent%2C%20so%20both%20modules%20can%20be%20enabled%20together.%20Kbuild%20then%20stops%20with%3A%3C%2FP%3E%3CPRE%3Eerror%3A%20the%20following%20would%20cause%20module%20name%20conflict%3A%3CBR%20%2F%3E%20%20%20drivers%2Fmedia%2Fplatform%2Fchips-media%2Fwave5%2Fwave5.ko%3CBR%20%2F%3E%20%20%20drivers%2Fmxc%2Fvpu%2Fwave511%2Fwave5.ko%3C%2FPRE%3E%3CP%3EEven%20where%20the%20check%20isn't%20hit%2C%20%3CEM%3Emodules_install%3C%2FEM%3E%20would%20overwrite%20one%20%3CEM%3Ewave5.ko%3C%2FEM%3E%20with%20the%20other.%3C%2FP%3E%3CP%3EThe%20drivers%20bind%20different%20compatibles%20(%3CEM%3Eti%2Cj721s2-wave521c%3C%2FEM%3E%20and%20%3CEM%3Enxp%2Cwave511-vpu%3C%2FEM%3E)%2C%20so%20only%20the%20module%20name%20collides.%3C%2FP%3E%3CP%3ESteps%20to%20reproduce%3A%3C%2FP%3E%3CPRE%3Emake%20ARCH%3Darm64%20CROSS_COMPILE%3Daarch64-linux-gnu-%20allmodconfig%3CBR%20%2F%3Emake%20ARCH%3Darm64%20CROSS_COMPILE%3Daarch64-linux-gnu-%20-j%24(nproc)%20modules%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3ECould%20that%20be%20fixed%20in%20an%20upcoming%20Linux%20IMX%20release%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThank%20you%20in%20advance%20for%20your%20support%2C%3C%2FP%3E%3CP%3EMatheus%20Barbosa%3C%2FP%3E%3CP%3EToradex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2421070%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208%20Family%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6%20All%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421246%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI'm%20adding%20the%20Wave511%20driver%20to%20support%20i.MX952%20at%20Toradex%20BSP%2C%20although%20the%20processor%20in%20use%20is%20not%20relevant%20for%20the%20bug%20reported%20in%20the%20downstream%20kernel.%3C%2FP%3E%3CP%3EWe%20build%20the%20kernel%20with%20a%20shared%20config%20for%20all%20ARM64%20SoCs%20that%20are%20supported%20by%20our%20BSP%2C%20its%20a%20super%20set%20that%20enables%20many%20modules.%20That%20includes%26nbsp%3BCONFIG_VIDEO_WAVE_VPU.%3C%2FP%3E%3CP%3EThis%20is%20the%20kernel%20driver%20present%20at%20mainline%20that%20installs%20%22wave5.ko%22%20to%20modules%20directory.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20created%20a%20workaround%26nbsp%3B%3C%2FP%3E%3CP%3ESince%20it%20is%20not%20possible%20to%20enable%20WAVE511%20driver%20in%20that%20common%20config%2C%20I've%20done%20that%20just%20for%20i.MX%20SoCs%20and%20disabled%26nbsp%3BCONFIG_VIDEO_WAVE_VPU%20for%20them%20as%20well.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI've%20disabled%26nbsp%3BCONFIG_VIDEO_WAVE_VPU%20at%20our%20OE%20layer%20for%20the%20i.MX%20processors%20to%20allow%20enabling%26nbsp%3BCONFIG_MXC_VIDEO_WAVE511%20as%20a%20module%20for%20now.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIt%20is%20expected%20that%26nbsp%3B%3CEM%3Eallmodconfig%3C%2FEM%3E%26nbsp%3Bbuild%20cleanly%2C%20and%20the%20current%20downstream%20driver%20breaks%20this.%20That%20is%20the%20reason%20I'm%20reporting%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421189%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThis%20issue%20have%20not%20been%20reported%20before%20and%20there%20are%20no%20plans%20to%20implement%20a%20solution%20yet.%3C%2FP%3E%0A%3CP%3EWhich%20processor%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3EDid%20you%20try%20to%26nbsp%3Bdisabling%20one%20Kconfig%20option%20or%20locally%20renaming%20the%20module%3F%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2421476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20%5BBUG%5D%20Module%20name%20conflict%3A%20wave511%20downstream%20driver%20and%20upstream%20wave5%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2421476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20the%20details%2C%20I%20reported%20this%20with%20internal%20team.%3C%2FP%3E%0A%3CP%3EI%20will%20update%20you%20further%20actions%20in%20our%20side%20as%20soon%20as%20possible.%3C%2FP%3E%0A%3CP%3EBest%20regards.%3C%2FP%3E%3C%2FLINGO-BODY%3E