From: kernel test robot <lkp@intel.com>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
WANG Xuerui <git@xen0n.name>, Jianmin Lv <lvjianmin@loongson.cn>
Subject: arch/loongarch/pci/acpi.c:103:29: error: 'loongson_pci_ecam_ops' undeclared
Date: Sat, 20 Aug 2022 00:44:36 +0800 [thread overview]
Message-ID: <202208200012.mePOXcVS-lkp@intel.com> (raw)
arch/loongarch/Makefile
arch/loongarch/include/asm/dma.h
arch/loongarch/include/asm/irq.h
arch/loongarch/include/asm/page.h
arch/loongarch/include/asm/pci.h
arch/loongarch/pci/acpi.c
arch/loongarch/pci/pci.c
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c2d0b039c5cc0112206a5b22431b577cb1c57ad
commit: 57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb LoongArch: Add PCI controller support
date: 8 days ago
config: loongarch-randconfig-r021-20220819 (https://download.01.org/0day-ci/archive/20220820/202208200012.mePOXcVS-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 57fc7323a8e7c2e7c1d5795ab63cb3ffea3cfdfb
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/loongarch/pci/acpi.c: In function 'pci_acpi_setup_ecam_mapping':
>> arch/loongarch/pci/acpi.c:103:29: error: 'loongson_pci_ecam_ops' undeclared (first use in this function)
103 | ecam_ops = &loongson_pci_ecam_ops;
| ^~~~~~~~~~~~~~~~~~~~~
arch/loongarch/pci/acpi.c:103:29: note: each undeclared identifier is reported only once for each function it appears in
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PCI_LOONGSON
Depends on [n]: PCI [=y] && (MACH_LOONGSON64 [=y] || COMPILE_TEST [=y]) && (OF [=y] || ACPI [=y]) && PCI_QUIRKS [=n]
Selected by [y]:
- LOONGARCH [=y]
vim +/loongson_pci_ecam_ops +103 arch/loongarch/pci/acpi.c
84
85 /*
86 * Lookup the bus range for the domain in MCFG, and set up config space
87 * mapping.
88 */
89 static struct pci_config_window *
90 pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
91 {
92 int ret, bus_shift;
93 u16 seg = root->segment;
94 struct device *dev = &root->device->dev;
95 struct resource cfgres;
96 struct resource *bus_res = &root->secondary;
97 struct pci_config_window *cfg;
98 const struct pci_ecam_ops *ecam_ops;
99
100 ret = pci_mcfg_lookup(root, &cfgres, &ecam_ops);
101 if (ret < 0) {
102 dev_err(dev, "%04x:%pR ECAM region not found, use default value\n", seg, bus_res);
> 103 ecam_ops = &loongson_pci_ecam_ops;
104 root->mcfg_addr = mcfg_addr_init(0);
105 }
106
107 bus_shift = ecam_ops->bus_shift ? : 20;
108
109 cfgres.start = root->mcfg_addr + (bus_res->start << bus_shift);
110 cfgres.end = cfgres.start + (resource_size(bus_res) << bus_shift) - 1;
111 cfgres.flags = IORESOURCE_MEM;
112
113 cfg = pci_ecam_create(dev, &cfgres, bus_res, ecam_ops);
114 if (IS_ERR(cfg)) {
115 dev_err(dev, "%04x:%pR error %ld mapping ECAM\n", seg, bus_res, PTR_ERR(cfg));
116 return NULL;
117 }
118
119 return cfg;
120 }
121
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-08-19 17:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208200012.mePOXcVS-lkp@intel.com \
--to=lkp@intel.com \
--cc=chenhuacai@loongson.cn \
--cc=git@xen0n.name \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvjianmin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®