[Intel-gfx] [PATCH 4/6] drm/i915: Force compilation with intel-iommu for CI validation
kbuild test robot
lkp at intel.com
Mon Sep 9 19:55:36 UTC 2019
Hi Chris,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[cannot apply to v5.3-rc8 next-20190904]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-i915-selftests-Take-runtime-wakeref-for-igt_ggtt_lowlevel/20190909-201355
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a004-201936 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
drivers/iommu/intel-iommu.c: In function 'domain_update_iommu_coherency':
>> drivers/iommu/intel-iommu.c:622:2: error: implicit declaration of function 'for_each_active_iommu' [-Werror=implicit-function-declaration]
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:622:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'domain_update_iommu_snooping':
drivers/iommu/intel-iommu.c:638:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'domain_update_iommu_superpage':
drivers/iommu/intel-iommu.c:663:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'device_to_iommu':
drivers/iommu/intel-iommu.c:781:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:812:2: warning: label 'out' defined but not used [-Wunused-label]
out:
^
drivers/iommu/intel-iommu.c:756:6: warning: unused variable 'i' [-Wunused-variable]
int i;
^
drivers/iommu/intel-iommu.c:753:17: warning: unused variable 'tmp' [-Wunused-variable]
struct device *tmp;
^
drivers/iommu/intel-iommu.c: In function 'si_domain_init':
>> drivers/iommu/intel-iommu.c:2731:3: error: implicit declaration of function 'for_each_active_dev_scope' [-Werror=implicit-function-declaration]
for_each_active_dev_scope(rmrr->devices, rmrr->devices_cnt,
^
drivers/iommu/intel-iommu.c:2732:16: error: expected ';' before '{' token
i, dev) {
^
drivers/iommu/intel-iommu.c: In function 'device_has_rmrr':
drivers/iommu/intel-iommu.c:2794:4: error: expected ';' before 'if'
if (tmp == dev ||
^
drivers/iommu/intel-iommu.c: In function 'init_dmars':
>> drivers/iommu/intel-iommu.c:3157:2: error: implicit declaration of function 'for_each_drhd_unit' [-Werror=implicit-function-declaration]
for_each_drhd_unit(drhd) {
^
drivers/iommu/intel-iommu.c:3157:27: error: expected ';' before '{' token
for_each_drhd_unit(drhd) {
^
>> drivers/iommu/intel-iommu.c:3182:2: error: implicit declaration of function 'for_each_iommu' [-Werror=implicit-function-declaration]
for_each_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:3182:30: error: expected ';' before '{' token
for_each_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:3293:30: error: expected ';' before '{' token
for_each_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:3327:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'get_private_domain_for_dev':
drivers/iommu/intel-iommu.c:3391:18: error: expected ';' before '{' token
i, i_dev) {
^
drivers/iommu/intel-iommu.c:3376:9: warning: unused variable 'ret' [-Wunused-variable]
int i, ret;
^
In file included from arch/x86/include/asm/bug.h:83:0,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/debugfs.h:15,
from drivers/iommu/intel-iommu.c:18:
drivers/iommu/intel-iommu.c: In function 'quirk_ioat_snb_local_iommu':
drivers/iommu/intel-iommu.c:3827:35: error: dereferencing pointer to incomplete type 'struct dmar_drhd_unit'
if (WARN_TAINT_ONCE(!drhd || drhd->reg_base_addr - vtbar != 0xa000,
^
include/asm-generic/bug.h:173:27: note: in definition of macro 'WARN_TAINT_ONCE'
int __ret_warn_once = !!(condition); \
^
drivers/iommu/intel-iommu.c: In function 'init_no_remapping_devices':
drivers/iommu/intel-iommu.c:3840:27: error: expected ';' before '{' token
for_each_drhd_unit(drhd) {
^
drivers/iommu/intel-iommu.c:3838:6: warning: unused variable 'i' [-Wunused-variable]
int i;
^
drivers/iommu/intel-iommu.c:3837:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev;
^
drivers/iommu/intel-iommu.c: In function 'dmar_parse_one_rmrr':
>> drivers/iommu/intel-iommu.c:4023:19: error: implicit declaration of function 'dmar_alloc_dev_scope' [-Werror=implicit-function-declaration]
rmrru->devices = dmar_alloc_dev_scope((void *)(rmrr + 1),
^
drivers/iommu/intel-iommu.c:4023:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rmrru->devices = dmar_alloc_dev_scope((void *)(rmrr + 1),
^
drivers/iommu/intel-iommu.c: In function 'dmar_parse_one_atsr':
drivers/iommu/intel-iommu.c:4082:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
atsru->devices = dmar_alloc_dev_scope((void *)(atsr + 1),
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_free_atsr':
>> drivers/iommu/intel-iommu.c:4098:2: error: implicit declaration of function 'dmar_free_dev_scope' [-Werror=implicit-function-declaration]
dmar_free_dev_scope(&atsru->devices, &atsru->devices_cnt);
^
drivers/iommu/intel-iommu.c: In function 'dmar_check_one_atsr':
drivers/iommu/intel-iommu.c:4133:4: error: expected ';' before 'return'
return -EBUSY;
^
drivers/iommu/intel-iommu.c: In function 'dmar_find_matched_atsr_unit':
>> drivers/iommu/intel-iommu.c:4288:3: error: implicit declaration of function 'for_each_dev_scope' [-Werror=implicit-function-declaration]
for_each_dev_scope(atsru->devices, atsru->devices_cnt, i, tmp)
^
drivers/iommu/intel-iommu.c:4289:4: error: expected ';' before 'if'
if (tmp == &bridge->dev)
^
drivers/iommu/intel-iommu.c: At top level:
>> drivers/iommu/intel-iommu.c:4302:40: warning: 'struct dmar_pci_notify_info' declared inside parameter list
int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)
^
>> drivers/iommu/intel-iommu.c:4302:40: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/iommu/intel-iommu.c: In function 'dmar_iommu_notify_scope_dev':
drivers/iommu/intel-iommu.c:4316:11: error: dereferencing pointer to incomplete type 'struct dmar_pci_notify_info'
if (info->event == BUS_NOTIFY_ADD_DEVICE) {
^
>> drivers/iommu/intel-iommu.c:4317:10: error: implicit declaration of function 'dmar_insert_dev_scope' [-Werror=implicit-function-declaration]
ret = dmar_insert_dev_scope(info, (void *)(rmrr + 1),
^
>> drivers/iommu/intel-iommu.c:4324:4: error: implicit declaration of function 'dmar_remove_dev_scope' [-Werror=implicit-function-declaration]
dmar_remove_dev_scope(info, rmrr->segment,
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_memory_notifier':
drivers/iommu/intel-iommu.c:4401:5: error: expected ';' before 'iommu_flush_iotlb_psi'
iommu_flush_iotlb_psi(iommu, si_domain,
^
drivers/iommu/intel-iommu.c: In function 'intel_disable_iommus':
drivers/iommu/intel-iommu.c:4455:3: error: expected ';' before 'iommu_disable_translation'
iommu_disable_translation(iommu);
^
drivers/iommu/intel-iommu.c: In function 'probe_acpi_namespace_devices':
drivers/iommu/intel-iommu.c:4587:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:4585:9: warning: unused variable 'ret' [-Wunused-variable]
int i, ret = 0;
^
drivers/iommu/intel-iommu.c:4585:6: warning: unused variable 'i' [-Wunused-variable]
int i, ret = 0;
^
drivers/iommu/intel-iommu.c:4584:17: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev;
^
drivers/iommu/intel-iommu.c:4620:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_init':
>> drivers/iommu/intel-iommu.c:4640:14: error: 'dmar_global_lock' undeclared (first use in this function)
down_write(&dmar_global_lock);
^
drivers/iommu/intel-iommu.c:4640:14: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/iommu/intel-iommu.c:4641:6: error: implicit declaration of function 'dmar_table_init' [-Werror=implicit-function-declaration]
if (dmar_table_init()) {
^
>> drivers/iommu/intel-iommu.c:4647:6: error: implicit declaration of function 'dmar_dev_scope_init' [-Werror=implicit-function-declaration]
if (dmar_dev_scope_init() < 0) {
^
>> drivers/iommu/intel-iommu.c:4659:2: error: implicit declaration of function 'dmar_register_bus_notifier' [-Werror=implicit-function-declaration]
dmar_register_bus_notifier();
^
drivers/iommu/intel-iommu.c:4674:5: error: expected ';' before 'iommu_disable_protect_mem_regions'
iommu_disable_protect_mem_regions(iommu);
^
drivers/iommu/intel-iommu.c:4719:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c:4739:30: error: expected ';' before '{' token
for_each_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'scalable_mode_support':
drivers/iommu/intel-iommu.c:5214:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'iommu_pasid_support':
drivers/iommu/intel-iommu.c:5232:37: error: expected ';' before '{' token
for_each_active_iommu(iommu, drhd) {
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_add_device':
drivers/iommu/intel-iommu.c:5266:20: error: passing argument 1 of 'iommu_device_link' from incompatible pointer type [-Werror=incompatible-pointer-types]
iommu_device_link(&iommu->iommu, dev);
^
In file included from drivers/iommu/intel-iommu.c:33:0:
include/linux/iommu.h:846:19: note: expected 'struct device *' but argument is of type 'struct iommu_device *'
static inline int iommu_device_link(struct device *dev, struct device *link)
^
>> drivers/iommu/intel-iommu.c:5271:10: error: implicit declaration of function 'iommu_group_get_for_dev' [-Werror=implicit-function-declaration]
group = iommu_group_get_for_dev(dev);
^
drivers/iommu/intel-iommu.c:5271:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
group = iommu_group_get_for_dev(dev);
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_remove_device':
drivers/iommu/intel-iommu.c:5321:22: error: passing argument 1 of 'iommu_device_unlink' from incompatible pointer type [-Werror=incompatible-pointer-types]
iommu_device_unlink(&iommu->iommu, dev);
^
In file included from drivers/iommu/intel-iommu.c:33:0:
include/linux/iommu.h:851:20: note: expected 'struct device *' but argument is of type 'struct iommu_device *'
static inline void iommu_device_unlink(struct device *dev, struct device *link)
^
drivers/iommu/intel-iommu.c: In function 'intel_iommu_get_resv_regions':
drivers/iommu/intel-iommu.c:5333:13: error: 'dmar_global_lock' undeclared (first use in this function)
down_read(&dmar_global_lock);
^
drivers/iommu/intel-iommu.c:5336:18: error: expected ';' before '{' token
i, i_dev) {
^
>> drivers/iommu/intel-iommu.c:5373:8: error: implicit declaration of function 'iommu_alloc_resv_region' [-Werror=implicit-function-declaration]
reg = iommu_alloc_resv_region(IOAPIC_RANGE_START,
^
drivers/iommu/intel-iommu.c:5373:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
reg = iommu_alloc_resv_region(IOAPIC_RANGE_START,
^
drivers/iommu/intel-iommu.c:5327:6: warning: unused variable 'prot' [-Wunused-variable]
int prot = DMA_PTE_READ | DMA_PTE_WRITE;
^
drivers/iommu/intel-iommu.c: At top level:
>> drivers/iommu/intel-iommu.c:5610:2: error: unknown field 'capable' specified in initializer
.capable = intel_iommu_capable,
^
drivers/iommu/intel-iommu.c:5610:14: warning: excess elements in struct initializer
.capable = intel_iommu_capable,
^
drivers/iommu/intel-iommu.c:5610:14: note: (near initialization for 'intel_iommu_ops')
>> drivers/iommu/intel-iommu.c:5611:2: error: unknown field 'domain_alloc' specified in initializer
.domain_alloc = intel_iommu_domain_alloc,
^
drivers/iommu/intel-iommu.c:5611:19: warning: excess elements in struct initializer
.domain_alloc = intel_iommu_domain_alloc,
^
drivers/iommu/intel-iommu.c:5611:19: note: (near initialization for 'intel_iommu_ops')
>> drivers/iommu/intel-iommu.c:5612:2: error: unknown field 'domain_free' specified in initializer
.domain_free = intel_iommu_domain_free,
^
drivers/iommu/intel-iommu.c:5612:18: warning: excess elements in struct initializer
.domain_free = intel_iommu_domain_free,
^
drivers/iommu/intel-iommu.c:5612:18: note: (near initialization for 'intel_iommu_ops')
vim +/for_each_active_iommu +622 drivers/iommu/intel-iommu.c
8c11e798eee2ce drivers/pci/intel-iommu.c Weidong Han 2008-12-08 600
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 601 static void domain_update_iommu_coherency(struct dmar_domain *domain)
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 602 {
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 603 struct dmar_drhd_unit *drhd;
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 604 struct intel_iommu *iommu;
2f119c7895af56 drivers/iommu/intel-iommu.c Quentin Lambert 2015-02-06 605 bool found = false;
2f119c7895af56 drivers/iommu/intel-iommu.c Quentin Lambert 2015-02-06 606 int i;
2e12bc29fc5a12 drivers/iommu/intel-iommu.c Alex Williamson 2011-11-11 607
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 608 domain->iommu_coherency = 1;
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 609
29a27719abaa4d drivers/iommu/intel-iommu.c Joerg Roedel 2015-07-21 610 for_each_domain_iommu(i, domain) {
2f119c7895af56 drivers/iommu/intel-iommu.c Quentin Lambert 2015-02-06 611 found = true;
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 612 if (!ecap_coherent(g_iommus[i]->ecap)) {
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 613 domain->iommu_coherency = 0;
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 614 break;
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 615 }
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 616 }
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 617 if (found)
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 618 return;
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 619
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 620 /* No hardware attached; use lowest common denominator */
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 621 rcu_read_lock();
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 @622 for_each_active_iommu(iommu, drhd) {
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 623 if (!ecap_coherent(iommu->ecap)) {
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 624 domain->iommu_coherency = 0;
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 625 break;
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 626 }
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 627 }
d0501960874624 drivers/iommu/intel-iommu.c David Woodhouse 2014-03-11 628 rcu_read_unlock();
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 629 }
8e604097ddc483 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 630
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 631 static int domain_update_iommu_snooping(struct intel_iommu *skip)
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 632 {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 633 struct dmar_drhd_unit *drhd;
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 634 struct intel_iommu *iommu;
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 635 int ret = 1;
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 636
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 637 rcu_read_lock();
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 638 for_each_active_iommu(iommu, drhd) {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 639 if (iommu != skip) {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 640 if (!ecap_sc_support(iommu->ecap)) {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 641 ret = 0;
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 642 break;
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 643 }
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 644 }
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 645 }
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 646 rcu_read_unlock();
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 647
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 648 return ret;
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 649 }
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 650
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 651 static int domain_update_iommu_superpage(struct intel_iommu *skip)
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 652 {
8140a95d228efb drivers/iommu/intel-iommu.c Allen Kay 2011-10-14 653 struct dmar_drhd_unit *drhd;
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 654 struct intel_iommu *iommu;
8140a95d228efb drivers/iommu/intel-iommu.c Allen Kay 2011-10-14 655 int mask = 0xf;
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 656
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 657 if (!intel_iommu_superpage) {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 658 return 0;
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 659 }
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 660
8140a95d228efb drivers/iommu/intel-iommu.c Allen Kay 2011-10-14 661 /* set iommu_superpage to the smallest common denominator */
0e242612d9cdb4 drivers/iommu/intel-iommu.c Jiang Liu 2014-02-19 662 rcu_read_lock();
8140a95d228efb drivers/iommu/intel-iommu.c Allen Kay 2011-10-14 663 for_each_active_iommu(iommu, drhd) {
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 664 if (iommu != skip) {
8140a95d228efb drivers/iommu/intel-iommu.c Allen Kay 2011-10-14 665 mask &= cap_super_page_val(iommu->cap);
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 666 if (!mask)
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 667 break;
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 668 }
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 669 }
0e242612d9cdb4 drivers/iommu/intel-iommu.c Jiang Liu 2014-02-19 670 rcu_read_unlock();
0e242612d9cdb4 drivers/iommu/intel-iommu.c Jiang Liu 2014-02-19 671
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 672 return fls(mask);
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 673 }
6dd9a7c73761a8 drivers/pci/intel-iommu.c Youquan Song 2011-05-25 674
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 675 /* Some capabilities may be different across iommus */
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 676 static void domain_update_iommu_cap(struct dmar_domain *domain)
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 677 {
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 678 domain_update_iommu_coherency(domain);
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 679 domain->iommu_snooping = domain_update_iommu_snooping(NULL);
161f693460772e drivers/iommu/intel-iommu.c Jiang Liu 2014-07-11 680 domain->iommu_superpage = domain_update_iommu_superpage(NULL);
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 681 }
58c610bd1a3f50 drivers/pci/intel-iommu.c Sheng Yang 2009-03-18 682
26b86092c46503 drivers/iommu/intel-iommu.c Sohil Mehta 2018-09-11 683 struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
26b86092c46503 drivers/iommu/intel-iommu.c Sohil Mehta 2018-09-11 684 u8 devfn, int alloc)
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 685 {
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 686 struct root_entry *root = &iommu->root_entry[bus];
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 687 struct context_entry *context;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 688 u64 *entry;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 689
4df4eab168c1c4 drivers/iommu/intel-iommu.c Joerg Roedel 2015-08-25 690 entry = &root->lo;
765b6a98c1de3d drivers/iommu/intel-iommu.c Lu Baolu 2018-12-10 691 if (sm_supported(iommu)) {
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 692 if (devfn >= 0x80) {
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 693 devfn -= 0x80;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 694 entry = &root->hi;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 695 }
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 696 devfn *= 2;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 697 }
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 698 if (*entry & 1)
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 699 context = phys_to_virt(*entry & VTD_PAGE_MASK);
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 700 else {
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 701 unsigned long phy_addr;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 702 if (!alloc)
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 703 return NULL;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 704
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 705 context = alloc_pgtable_page(iommu->node);
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 706 if (!context)
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 707 return NULL;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 708
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 709 __iommu_flush_cache(iommu, (void *)context, CONTEXT_SIZE);
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 710 phy_addr = virt_to_phys((void *)context);
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 711 *entry = phy_addr | 1;
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 712 __iommu_flush_cache(iommu, entry, sizeof(*entry));
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 713 }
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 714 return &context[devfn];
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 715 }
03ecc32c527496 drivers/iommu/intel-iommu.c David Woodhouse 2015-02-13 716
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 717 static int iommu_dummy(struct device *dev)
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 718 {
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 719 return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 720 }
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 721
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 722 /**
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 723 * is_downstream_to_pci_bridge - test if a device belongs to the PCI
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 724 * sub-hierarchy of a candidate PCI-PCI bridge
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 725 * @dev: candidate PCI device belonging to @bridge PCI sub-hierarchy
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 726 * @bridge: the candidate PCI-PCI bridge
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 727 *
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 728 * Return: true if @dev belongs to @bridge PCI sub-hierarchy, else false.
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 729 */
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 730 static bool
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 731 is_downstream_to_pci_bridge(struct device *dev, struct device *bridge)
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 732 {
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 733 struct pci_dev *pdev, *pbridge;
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 734
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 735 if (!dev_is_pci(dev) || !dev_is_pci(bridge))
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 736 return false;
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 737
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 738 pdev = to_pci_dev(dev);
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 739 pbridge = to_pci_dev(bridge);
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 740
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 741 if (pbridge->subordinate &&
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 742 pbridge->subordinate->number <= pdev->bus->number &&
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 743 pbridge->subordinate->busn_res.end >= pdev->bus->number)
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 744 return true;
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 745
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 746 return false;
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 747 }
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 748
156baca8d31e1a drivers/iommu/intel-iommu.c David Woodhouse 2014-03-09 749 static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn)
c7151a8dfefd11 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 750 {
c7151a8dfefd11 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 751 struct dmar_drhd_unit *drhd = NULL;
b683b230a244c3 drivers/iommu/intel-iommu.c Jiang Liu 2014-02-19 752 struct intel_iommu *iommu;
156baca8d31e1a drivers/iommu/intel-iommu.c David Woodhouse 2014-03-09 753 struct device *tmp;
b9a7f9816483b1 drivers/iommu/intel-iommu.c Eric Auger 2019-06-03 754 struct pci_dev *pdev = NULL;
aa4d066a2a8041 drivers/iommu/intel-iommu.c Yijing Wang 2014-05-26 755 u16 segment = 0;
c7151a8dfefd11 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 @756 int i;
c7151a8dfefd11 drivers/pci/intel-iommu.c Weidong Han 2008-12-08 757
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 758 if (iommu_dummy(dev))
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 759 return NULL;
4ed6a540fab8ea drivers/iommu/intel-iommu.c David Woodhouse 2015-05-11 760
156baca8d31e1a drivers/iommu/intel-iommu.c David Woodhouse 2014-03-09 761 if (dev_is_pci(dev)) {
1c387188c60f53 drivers/iommu/intel-iommu.c Ashok Raj 2016-10-21 762 struct pci_dev *pf_pdev;
1c387188c60f53 drivers/iommu/intel-iommu.c Ashok Raj 2016-10-21 763
156baca8d31e1a drivers/iommu/intel-iommu.c David Woodhouse 2014-03-09 764 pdev = to_pci_dev(dev);
5823e330b58c52 drivers/iommu/intel-iommu.c Jon Derrick 2017-08-30 765
:::::: The code at line 622 was first introduced by commit
:::::: d05019608746240d86a406fbf8d8c1fc71a87101 iommu/vt-d: Be less pessimistic about domain coherency where possible
:::::: TO: David Woodhouse <dwmw2 at infradead.org>
:::::: CC: David Woodhouse <David.Woodhouse at intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29842 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190910/e91b3a1e/attachment-0001.gz>
More information about the Intel-gfx
mailing list