Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on clk/clk-next]
[cannot apply to robh/for-next tegra-drm/drm/tegra/for-next linus/master v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/Introduce-memory...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm64-randconfig-r012-20200607 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
e429cffd4f228f70c1d9df0e5d77c08590dd9766)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
aarch64-linux-gnu-ld: drivers/memory/tegra/mc.o: in function
`tegra_mc_interconnect_setup':
> drivers/memory/tegra/mc.c:657: undefined reference to
`of_icc_xlate_onecell'
aarch64-linux-gnu-ld: drivers/memory/tegra/mc.o:
relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `of_icc_xlate_onecell' which may
bind externally can not be used when making a shared object; recompile with -fPIC
drivers/memory/tegra/mc.c:657:(.text+0x6c8): dangerous relocation: unsupported relocation
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:657: undefined
reference to `of_icc_xlate_onecell'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:660: undefined reference to
`icc_provider_add'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:665: undefined reference to
`icc_node_create'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:671: undefined reference to
`icc_node_add'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:674: undefined reference to
`icc_link_create'
aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:680: undefined
reference to `icc_node_create'
aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:686: undefined reference to
`icc_node_add'
aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:689: undefined reference to
`icc_link_create'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:700: undefined
reference to `icc_nodes_remove'
> aarch64-linux-gnu-ld: drivers/memory/tegra/mc.c:703: undefined reference to
`icc_provider_del'
vim +657 drivers/memory/tegra/mc.c
611
612 /*
613 * Memory Controller (MC) has few Memory Clients that are issuing memory
614 * bandwidth allocation requests to the MC interconnect provider. The MC
615 * provider aggregates the requests and then sends the aggregated request
616 * up to the External Memory Controller (EMC) interconnect provider which
617 * re-configures hardware interface to External Memory (EMEM) in accordance
618 * to the required bandwidth. Each MC interconnect node represents an
619 * individual Memory Client.
620 *
621 * Memory interconnect topology:
622 *
623 * +----+
624 * +--------+ | |
625 * | TEXSRD +--->+ |
626 * +--------+ | |
627 * | | +-----+ +------+
628 * ... | MC +--->+ EMC +--->+ EMEM |
629 * | | +-----+ +------+
630 * +--------+ | |
631 * | DISP.. +--->+ |
632 * +--------+ | |
633 * +----+
634 */
635 static int tegra_mc_interconnect_setup(struct tegra_mc *mc)
636 {
637 struct icc_onecell_data *data;
638 struct icc_node *node;
639 unsigned int num_nodes;
640 unsigned int i;
641 int err;
642
643 /* older device-trees don't have interconnect properties */
644 if (!of_find_property(mc->dev->of_node, "#interconnect-cells",
NULL))
645 return 0;
646
647 num_nodes = mc->soc->num_clients;
648
649 data = devm_kzalloc(mc->dev, struct_size(data, nodes, num_nodes),
650 GFP_KERNEL);
651 if (!data)
652 return -ENOMEM;
653
654 mc->provider.dev = mc->dev;
655 mc->provider.set = tegra_mc_icc_set;
656 mc->provider.data = data;
657 mc->provider.xlate = of_icc_xlate_onecell;
658 mc->provider.aggregate = tegra_mc_icc_aggregate;
659
660 err = icc_provider_add(&mc->provider);
661 if
(err)
662 return err;
663
664 /* create Memory Controller node */
665 node = icc_node_create(TEGRA_ICC_MC);
666 err =
PTR_ERR_OR_ZERO(node);
667 if (err)
668 goto del_provider;
669
670 node->name = "Memory Controller";
671 icc_node_add(node, &mc->provider);
672
673 /* link Memory Controller to External Memory Controller */
674 err = icc_link_create(node, TEGRA_ICC_EMC);
675 if
(err)
676 goto remove_nodes;
677
678 for (i = 0; i < num_nodes; i++) {
679 /* create MC client node */
680 node = icc_node_create(mc->soc->clients[i].id);
681 err = PTR_ERR_OR_ZERO(node);
682 if (err)
683 goto remove_nodes;
684
685 node->name = mc->soc->clients[i].name;
686 icc_node_add(node, &mc->provider);
687
688 /* link Memory Client to Memory Controller */
689 err = icc_link_create(node, TEGRA_ICC_MC);
690 if (err)
691 goto remove_nodes;
692
693 data->nodes[i] = node;
694 }
695 data->num_nodes = num_nodes;
696
697 return 0;
698
699 remove_nodes:
700 icc_nodes_remove(&mc->provider);
701
702 del_provider:
703 icc_provider_del(&mc->provider);
704
705 return err;
706 }
707
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org