mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 12:32:31 -04:00
Depmod reports a cyclic dependency between modules sparx5-switch.ko and
lan969x-switch.ko:
depmod: ERROR: Cycle detected: lan969x_switch -> sparx5_switch -> lan969x_switch
depmod: ERROR: Found 2 modules in dependency cycles!
make[2]: *** [scripts/Makefile.modinst:132: depmod] Error 1
make: *** [Makefile:224: __sub-make] Error 2
This makes sense, as they both require symbols from each other.
Fix this by compiling lan969x support into the sparx5-switch.ko module.
In order to do this, in a sensible way, we move the lan969x/ dir into
the sparx5/ dir and do some code cleanup of code that is no longer
required.
After this patch, depmod will no longer complain, as lan969x support is
compiled into the sparx5-swicth.ko module, and can no longer be compiled
as a standalone module.
Fixes: 98a0111960 ("net: sparx5: add compatible string for lan969x")
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
86 lines
2.0 KiB
C
86 lines
2.0 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#include "vcap_api.h"
|
|
#include "lan969x.h"
|
|
|
|
const struct sparx5_vcap_inst lan969x_vcap_inst_cfg[] = {
|
|
{
|
|
.vtype = VCAP_TYPE_IS0, /* CLM-0 */
|
|
.vinst = 0,
|
|
.map_id = 1,
|
|
.lookups = SPARX5_IS0_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_IS0_LOOKUPS / 3,
|
|
.first_cid = SPARX5_VCAP_CID_IS0_L0,
|
|
.last_cid = SPARX5_VCAP_CID_IS0_L2 - 1,
|
|
.blockno = 2,
|
|
.blocks = 1,
|
|
.ingress = true,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_IS0, /* CLM-1 */
|
|
.vinst = 1,
|
|
.map_id = 2,
|
|
.lookups = SPARX5_IS0_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_IS0_LOOKUPS / 3,
|
|
.first_cid = SPARX5_VCAP_CID_IS0_L2,
|
|
.last_cid = SPARX5_VCAP_CID_IS0_L4 - 1,
|
|
.blockno = 3,
|
|
.blocks = 1,
|
|
.ingress = true,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_IS0, /* CLM-2 */
|
|
.vinst = 2,
|
|
.map_id = 3,
|
|
.lookups = SPARX5_IS0_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_IS0_LOOKUPS / 3,
|
|
.first_cid = SPARX5_VCAP_CID_IS0_L4,
|
|
.last_cid = SPARX5_VCAP_CID_IS0_MAX,
|
|
.blockno = 4,
|
|
.blocks = 1,
|
|
.ingress = true,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_IS2, /* IS2-0 */
|
|
.vinst = 0,
|
|
.map_id = 4,
|
|
.lookups = SPARX5_IS2_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_IS2_LOOKUPS / 2,
|
|
.first_cid = SPARX5_VCAP_CID_IS2_L0,
|
|
.last_cid = SPARX5_VCAP_CID_IS2_L2 - 1,
|
|
.blockno = 0,
|
|
.blocks = 1,
|
|
.ingress = true,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_IS2, /* IS2-1 */
|
|
.vinst = 1,
|
|
.map_id = 5,
|
|
.lookups = SPARX5_IS2_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_IS2_LOOKUPS / 2,
|
|
.first_cid = SPARX5_VCAP_CID_IS2_L2,
|
|
.last_cid = SPARX5_VCAP_CID_IS2_MAX,
|
|
.blockno = 1,
|
|
.blocks = 1,
|
|
.ingress = true,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_ES0,
|
|
.lookups = SPARX5_ES0_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_ES0_LOOKUPS,
|
|
.first_cid = SPARX5_VCAP_CID_ES0_L0,
|
|
.last_cid = SPARX5_VCAP_CID_ES0_MAX,
|
|
.count = 1536,
|
|
.ingress = false,
|
|
},
|
|
{
|
|
.vtype = VCAP_TYPE_ES2,
|
|
.lookups = SPARX5_ES2_LOOKUPS,
|
|
.lookups_per_instance = SPARX5_ES2_LOOKUPS,
|
|
.first_cid = SPARX5_VCAP_CID_ES2_L0,
|
|
.last_cid = SPARX5_VCAP_CID_ES2_MAX,
|
|
.count = 1024,
|
|
.ingress = false,
|
|
},
|
|
};
|