[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202208200732.aqYAOVe0-lkp@intel.com>
Date: Sat, 20 Aug 2022 07:42:43 +0800
From: kernel test robot <lkp@...el.com>
To: Andi Kleen <ak@...ux.intel.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Subject: [intel-tdx:guest-hardening-rebased 24/36]
drivers/pci/probe.c:2451:14: error: implicit declaration of function
'cc_platform_has'
drivers/pci/pci.c
drivers/pci/probe.c
tree: https://github.com/intel/tdx.git guest-hardening-rebased
head: d941f409a509c084250b50a3b5fc1c3c84a596a0
commit: 9fc8d23dbf6bd3cdb60761d86121008b2335cd74 [24/36] x86/tdx: Disable enhanced PCI parsing for TDX
config: microblaze-buildonly-randconfig-r001-20220820 (https://download.01.org/0day-ci/archive/20220820/202208200732.aqYAOVe0-lkp@intel.com/config)
compiler: microblaze-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://github.com/intel/tdx/commit/9fc8d23dbf6bd3cdb60761d86121008b2335cd74
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest-hardening-rebased
git checkout 9fc8d23dbf6bd3cdb60761d86121008b2335cd74
# 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=microblaze SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:20,
from drivers/pci/probe.c:6:
drivers/pci/probe.c: In function 'pci_init_capabilities':
>> drivers/pci/probe.c:2451:14: error: implicit declaration of function 'cc_platform_has' [-Werror=implicit-function-declaration]
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
drivers/pci/probe.c:2451:9: note: in expansion of macro 'if'
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~
>> drivers/pci/probe.c:2451:30: error: 'CC_ATTR_GUEST_HARDENED' undeclared (first use in this function)
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
drivers/pci/probe.c:2451:9: note: in expansion of macro 'if'
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~
drivers/pci/probe.c:2451:30: note: each undeclared identifier is reported only once for each function it appears in
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
drivers/pci/probe.c:2451:9: note: in expansion of macro 'if'
2451 | if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
| ^~
cc1: some warnings being treated as errors
vim +/cc_platform_has +2451 drivers/pci/probe.c
2448
2449 static void pci_init_capabilities(struct pci_dev *dev)
2450 {
> 2451 if (!cc_platform_has(CC_ATTR_GUEST_HARDENED))
2452 pci_ea_init(dev); /* Enhanced Allocation */
2453
2454 pci_msi_init(dev); /* Disable MSI */
2455 pci_msix_init(dev); /* Disable MSI-X */
2456
2457 if (cc_platform_has(CC_ATTR_GUEST_HARDENED))
2458 return;
2459
2460 /* Buffers for saving PCIe and PCI-X capabilities */
2461 pci_allocate_cap_save_buffers(dev);
2462
2463 pci_pm_init(dev); /* Power Management */
2464 pci_vpd_init(dev); /* Vital Product Data */
2465 pci_configure_ari(dev); /* Alternative Routing-ID Forwarding */
2466 pci_iov_init(dev); /* Single Root I/O Virtualization */
2467 pci_ats_init(dev); /* Address Translation Services */
2468 pci_pri_init(dev); /* Page Request Interface */
2469 pci_pasid_init(dev); /* Process Address Space ID */
2470 pci_acs_init(dev); /* Access Control Services */
2471 pci_ptm_init(dev); /* Precision Time Measurement */
2472 pci_aer_init(dev); /* Advanced Error Reporting */
2473 pci_dpc_init(dev); /* Downstream Port Containment */
2474 pci_rcec_init(dev); /* Root Complex Event Collector */
2475
2476 pcie_report_downtraining(dev);
2477 pci_init_reset_methods(dev);
2478 }
2479
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists