All of lore.kernel.org
 help / color / mirror / Atom feed
* [meghadey-crypto:iommu_debugfs_improvements 2/2] drivers//iommu/intel-iommu.c:5137:2: note: in expansion of macro 'if'
@ 2020-02-28 18:28 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-02-28 18:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5379 bytes --]

tree:   https://github.com/meghadey/crypto iommu_debugfs_improvements
head:   54d8336f22d5d2c374d54ed5db5e38da5e350370
commit: 54d8336f22d5d2c374d54ed5db5e38da5e350370 [2/2] iommu/vt-d: Populate debugfs if either dma or interrupt remapping is enabled
config: i386-randconfig-c003-20200228 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        git checkout 54d8336f22d5d2c374d54ed5db5e38da5e350370
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/init.h:5:0,
                    from drivers//iommu/intel-iommu.c:16:
   drivers//iommu/intel-iommu.c: In function 'intel_iommu_init':
   drivers//iommu/intel-iommu.c:5137:21: error: 'disable_irq_remap' undeclared (first use in this function); did you mean 'disable_irq_wake'?
     if (!no_iommu && (!disable_irq_remap || !dmar_disabled))
                        ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> drivers//iommu/intel-iommu.c:5137:2: note: in expansion of macro 'if'
     if (!no_iommu && (!disable_irq_remap || !dmar_disabled))
     ^~
   drivers//iommu/intel-iommu.c:5137:21: note: each undeclared identifier is reported only once for each function it appears in
     if (!no_iommu && (!disable_irq_remap || !dmar_disabled))
                        ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> drivers//iommu/intel-iommu.c:5137:2: note: in expansion of macro 'if'
     if (!no_iommu && (!disable_irq_remap || !dmar_disabled))
     ^~

vim +/if +5137 drivers//iommu/intel-iommu.c

  5091	
  5092	int __init intel_iommu_init(void)
  5093	{
  5094		int ret = -ENODEV;
  5095		struct dmar_drhd_unit *drhd;
  5096		struct intel_iommu *iommu;
  5097	
  5098		/*
  5099		 * Intel IOMMU is required for a TXT/tboot launch or platform
  5100		 * opt in, so enforce that.
  5101		 */
  5102		force_on = tboot_force_iommu() || platform_optin_force_iommu();
  5103	
  5104		if (iommu_init_mempool()) {
  5105			if (force_on)
  5106				panic("tboot: Failed to initialize iommu memory\n");
  5107			return -ENOMEM;
  5108		}
  5109	
  5110		down_write(&dmar_global_lock);
  5111		if (dmar_table_init()) {
  5112			if (force_on)
  5113				panic("tboot: Failed to initialize DMAR table\n");
  5114			goto out_free_dmar;
  5115		}
  5116	
  5117		if (dmar_dev_scope_init() < 0) {
  5118			if (force_on)
  5119				panic("tboot: Failed to initialize DMAR device scope\n");
  5120			goto out_free_dmar;
  5121		}
  5122	
  5123		up_write(&dmar_global_lock);
  5124	
  5125		/*
  5126		 * The bus notifier takes the dmar_global_lock, so lockdep will
  5127		 * complain later when we register it under the lock.
  5128		 */
  5129		dmar_register_bus_notifier();
  5130	
  5131		down_write(&dmar_global_lock);
  5132	
  5133		/*
  5134		 * Create iommu debugfs directory if iommu is present and either DMA
  5135		 * or IRQ remapping is enabled.
  5136		 */
> 5137		if (!no_iommu && (!disable_irq_remap || !dmar_disabled))
  5138			intel_iommu_debugfs_init();
  5139	
  5140		if (no_iommu || dmar_disabled) {
  5141			/*
  5142			 * We exit the function here to ensure IOMMU's remapping and
  5143			 * mempool aren't setup, which means that the IOMMU's PMRs
  5144			 * won't be disabled via the call to init_dmars(). So disable
  5145			 * it explicitly here. The PMRs were setup by tboot prior to
  5146			 * calling SENTER, but the kernel is expected to reset/tear
  5147			 * down the PMRs.
  5148			 */
  5149			if (intel_iommu_tboot_noforce) {
  5150				for_each_iommu(iommu, drhd)
  5151					iommu_disable_protect_mem_regions(iommu);
  5152			}
  5153	
  5154			/*
  5155			 * Make sure the IOMMUs are switched off, even when we
  5156			 * boot into a kexec kernel and the previous kernel left
  5157			 * them enabled
  5158			 */
  5159			intel_disable_iommus();
  5160			goto out_free_dmar;
  5161		}
  5162	
  5163		if (list_empty(&dmar_rmrr_units))
  5164			pr_info("No RMRR found\n");
  5165	
  5166		if (list_empty(&dmar_atsr_units))
  5167			pr_info("No ATSR found\n");
  5168	
  5169		if (dmar_init_reserved_ranges()) {
  5170			if (force_on)
  5171				panic("tboot: Failed to reserve iommu ranges\n");
  5172			goto out_free_reserved_range;
  5173		}
  5174	
  5175		if (dmar_map_gfx)
  5176			intel_iommu_gfx_mapped = 1;
  5177	
  5178		init_no_remapping_devices();
  5179	
  5180		ret = init_dmars();
  5181		if (ret) {
  5182			if (force_on)
  5183				panic("tboot: Failed to initialize DMARs\n");
  5184			pr_err("Initialization failed\n");
  5185			goto out_free_reserved_range;
  5186		}
  5187		up_write(&dmar_global_lock);
  5188	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34065 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-28 18:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 18:28 [meghadey-crypto:iommu_debugfs_improvements 2/2] drivers//iommu/intel-iommu.c:5137:2: note: in expansion of macro 'if' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.