From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/iommu/arm/arm-smmu/arm-smmu.c:831 arm_smmu_init_domain_context() warn: should '~0 << ias' be a 64 bit
Date: Fri, 26 Feb 2021 16:22:17 +0800 [thread overview]
Message-ID: <202102261607.jnpLC122-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 26314 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jordan Crouse <jcrouse@codeaurora.org>
CC: Will Deacon <will@kernel.org>
CC: Rob Clark <robdclark@chromium.org>
CC: Bjorn Andersson <bjorn.andersson@linaro.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2c87f7a38f930ef6f6a7bdd04aeb82ce3971b54b
commit: 67f1a7a314a2c29832ae604f839653408492ee5d iommu/arm-smmu: Add support for split pagetables
date: 5 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 5 months ago
config: arm-randconfig-m031-20210226 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/iommu/arm/arm-smmu/arm-smmu.c:831 arm_smmu_init_domain_context() warn: should '~0 << ias' be a 64 bit type?
Old smatch warnings:
drivers/iommu/arm/arm-smmu/arm-smmu.c:686 arm_smmu_init_domain_context() warn: missing error code 'ret'
drivers/iommu/arm/arm-smmu/arm-smmu.c:1855 arm_smmu_device_cfg_probe() warn: should '2 * size << smmu->pgshift' be a 64 bit type?
vim +831 drivers/iommu/arm/arm-smmu/arm-smmu.c
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 666
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 667 static int arm_smmu_init_domain_context(struct iommu_domain *domain,
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 668 struct arm_smmu_device *smmu)
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 669 {
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 670 int irq, start, ret = 0;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 671 unsigned long ias, oas;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 672 struct io_pgtable_ops *pgtbl_ops;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 673 struct io_pgtable_cfg pgtbl_cfg;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 674 enum io_pgtable_fmt fmt;
1d672638fca24d drivers/iommu/arm-smmu.c Joerg Roedel 2015-03-26 675 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 676 struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 677 irqreturn_t (*context_fault)(int irq, void *dev);
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 678
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 679 mutex_lock(&smmu_domain->init_mutex);
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 680 if (smmu_domain->smmu)
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 681 goto out_unlock;
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 682
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 683 if (domain->type == IOMMU_DOMAIN_IDENTITY) {
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 684 smmu_domain->stage = ARM_SMMU_DOMAIN_BYPASS;
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 685 smmu_domain->smmu = smmu;
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 686 goto out_unlock;
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 687 }
61bc671179f190 drivers/iommu/arm-smmu.c Will Deacon 2017-01-06 688
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 689 /*
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 690 * Mapping the requested stage onto what we support is surprisingly
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 691 * complicated, mainly because the spec allows S1+S2 SMMUs without
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 692 * support for nested translation. That means we end up with the
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 693 * following table:
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 694 *
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 695 * Requested Supported Actual
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 696 * S1 N S1
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 697 * S1 S1+S2 S1
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 698 * S1 S2 S2
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 699 * S1 S1 S1
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 700 * N N N
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 701 * N S1+S2 S2
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 702 * N S2 S2
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 703 * N S1 S1
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 704 *
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 705 * Note that you can't actually request stage-2 mappings.
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 706 */
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 707 if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1))
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 708 smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 709 if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S2))
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 710 smmu_domain->stage = ARM_SMMU_DOMAIN_S1;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 711
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 712 /*
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 713 * Choosing a suitable context format is even more fiddly. Until we
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 714 * grow some way for the caller to express a preference, and/or move
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 715 * the decision into the io-pgtable code where it arguably belongs,
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 716 * just aim for the closest thing to the rest of the system, and hope
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 717 * that the hardware isn't esoteric enough that we can't assume AArch64
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 718 * support to be a superset of AArch32 support...
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 719 */
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 720 if (smmu->features & ARM_SMMU_FEAT_FMT_AARCH32_L)
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 721 cfg->fmt = ARM_SMMU_CTX_FMT_AARCH32_L;
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 722 if (IS_ENABLED(CONFIG_IOMMU_IO_PGTABLE_ARMV7S) &&
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 723 !IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_ARM_LPAE) &&
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 724 (smmu->features & ARM_SMMU_FEAT_FMT_AARCH32_S) &&
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 725 (smmu_domain->stage == ARM_SMMU_DOMAIN_S1))
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 726 cfg->fmt = ARM_SMMU_CTX_FMT_AARCH32_S;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 727 if ((IS_ENABLED(CONFIG_64BIT) || cfg->fmt == ARM_SMMU_CTX_FMT_NONE) &&
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 728 (smmu->features & (ARM_SMMU_FEAT_FMT_AARCH64_64K |
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 729 ARM_SMMU_FEAT_FMT_AARCH64_16K |
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 730 ARM_SMMU_FEAT_FMT_AARCH64_4K)))
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 731 cfg->fmt = ARM_SMMU_CTX_FMT_AARCH64;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 732
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 733 if (cfg->fmt == ARM_SMMU_CTX_FMT_NONE) {
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 734 ret = -EINVAL;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 735 goto out_unlock;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 736 }
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 737
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 738 switch (smmu_domain->stage) {
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 739 case ARM_SMMU_DOMAIN_S1:
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 740 cfg->cbar = CBAR_TYPE_S1_TRANS_S2_BYPASS;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 741 start = smmu->num_s2_context_banks;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 742 ias = smmu->va_size;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 743 oas = smmu->ipa_size;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 744 if (cfg->fmt == ARM_SMMU_CTX_FMT_AARCH64) {
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 745 fmt = ARM_64_LPAE_S1;
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 746 } else if (cfg->fmt == ARM_SMMU_CTX_FMT_AARCH32_L) {
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 747 fmt = ARM_32_LPAE_S1;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 748 ias = min(ias, 32UL);
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 749 oas = min(oas, 40UL);
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 750 } else {
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 751 fmt = ARM_V7S;
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 752 ias = min(ias, 32UL);
6070529bebd26e drivers/iommu/arm-smmu.c Robin Murphy 2016-08-11 753 oas = min(oas, 32UL);
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 754 }
abfd6fe0cd535d drivers/iommu/arm-smmu.c Will Deacon 2019-07-02 755 smmu_domain->flush_ops = &arm_smmu_s1_tlb_ops;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 756 break;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 757 case ARM_SMMU_DOMAIN_NESTED:
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 758 /*
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 759 * We will likely want to change this if/when KVM gets
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 760 * involved.
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 761 */
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 762 case ARM_SMMU_DOMAIN_S2:
9c5c92e35cf5c4 drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 763 cfg->cbar = CBAR_TYPE_S2_TRANS;
9c5c92e35cf5c4 drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 764 start = 0;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 765 ias = smmu->ipa_size;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 766 oas = smmu->pa_size;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 767 if (cfg->fmt == ARM_SMMU_CTX_FMT_AARCH64) {
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 768 fmt = ARM_64_LPAE_S2;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 769 } else {
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 770 fmt = ARM_32_LPAE_S2;
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 771 ias = min(ias, 40UL);
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 772 oas = min(oas, 40UL);
7602b8710645da drivers/iommu/arm-smmu.c Robin Murphy 2016-04-28 773 }
11febfca241965 drivers/iommu/arm-smmu.c Robin Murphy 2017-03-30 774 if (smmu->version == ARM_SMMU_V2)
abfd6fe0cd535d drivers/iommu/arm-smmu.c Will Deacon 2019-07-02 775 smmu_domain->flush_ops = &arm_smmu_s2_tlb_ops_v2;
11febfca241965 drivers/iommu/arm-smmu.c Robin Murphy 2017-03-30 776 else
abfd6fe0cd535d drivers/iommu/arm-smmu.c Will Deacon 2019-07-02 777 smmu_domain->flush_ops = &arm_smmu_s2_tlb_ops_v1;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 778 break;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 779 default:
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 780 ret = -EINVAL;
c752ce45b213de drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 781 goto out_unlock;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 782 }
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 783 ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 784 smmu->num_context_banks);
287980e49ffc0f drivers/iommu/arm-smmu.c Arnd Bergmann 2016-05-27 785 if (ret < 0)
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 786 goto out_unlock;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 787
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 788 cfg->cbndx = ret;
b7862e3559f9ab drivers/iommu/arm-smmu.c Robin Murphy 2016-04-13 789 if (smmu->version < ARM_SMMU_V2) {
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 790 cfg->irptndx = atomic_inc_return(&smmu->irptndx);
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 791 cfg->irptndx %= smmu->num_context_irqs;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 792 } else {
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 793 cfg->irptndx = cfg->cbndx;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 794 }
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 795
280b683ceaceb7 drivers/iommu/arm-smmu.c Robin Murphy 2017-03-30 796 if (smmu_domain->stage == ARM_SMMU_DOMAIN_S2)
ba7e4a08bbf744 drivers/iommu/arm-smmu.c Robin Murphy 2019-08-15 797 cfg->vmid = cfg->cbndx + 1;
280b683ceaceb7 drivers/iommu/arm-smmu.c Robin Murphy 2017-03-30 798 else
ba7e4a08bbf744 drivers/iommu/arm-smmu.c Robin Murphy 2019-08-15 799 cfg->asid = cfg->cbndx;
ba7e4a08bbf744 drivers/iommu/arm-smmu.c Robin Murphy 2019-08-15 800
ba7e4a08bbf744 drivers/iommu/arm-smmu.c Robin Murphy 2019-08-15 801 smmu_domain->smmu = smmu;
280b683ceaceb7 drivers/iommu/arm-smmu.c Robin Murphy 2017-03-30 802
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 803 pgtbl_cfg = (struct io_pgtable_cfg) {
d546635731317a drivers/iommu/arm-smmu.c Robin Murphy 2016-05-09 804 .pgsize_bitmap = smmu->pgsize_bitmap,
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 805 .ias = ias,
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 806 .oas = oas,
4f41845b340783 drivers/iommu/arm-smmu.c Will Deacon 2019-06-25 807 .coherent_walk = smmu->features & ARM_SMMU_FEAT_COHERENT_WALK,
696bcfb7098620 drivers/iommu/arm-smmu.c Robin Murphy 2019-09-18 808 .tlb = smmu_domain->flush_ops,
2df7a25ce4a790 drivers/iommu/arm-smmu.c Robin Murphy 2015-07-29 809 .iommu_dev = smmu->dev,
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 810 };
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 811
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 812 if (smmu->impl && smmu->impl->init_context) {
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 813 ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg);
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 814 if (ret)
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 815 goto out_clear_smmu;
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 816 }
dd147a89f37d5a drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 817
44f6876a00e83d drivers/iommu/arm-smmu.c Robin Murphy 2018-09-20 818 if (smmu_domain->non_strict)
44f6876a00e83d drivers/iommu/arm-smmu.c Robin Murphy 2018-09-20 819 pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT;
44f6876a00e83d drivers/iommu/arm-smmu.c Robin Murphy 2018-09-20 820
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 821 pgtbl_ops = alloc_io_pgtable_ops(fmt, &pgtbl_cfg, smmu_domain);
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 822 if (!pgtbl_ops) {
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 823 ret = -ENOMEM;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 824 goto out_clear_smmu;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 825 }
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 826
d546635731317a drivers/iommu/arm-smmu.c Robin Murphy 2016-05-09 827 /* Update the domain's page sizes to reflect the page table format */
d546635731317a drivers/iommu/arm-smmu.c Robin Murphy 2016-05-09 828 domain->pgsize_bitmap = pgtbl_cfg.pgsize_bitmap;
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 829
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 830 if (pgtbl_cfg.quirks & IO_PGTABLE_QUIRK_ARM_TTBR1) {
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 @831 domain->geometry.aperture_start = ~0UL << ias;
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 832 domain->geometry.aperture_end = ~0UL;
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 833 } else {
455eb7d34ad11b drivers/iommu/arm-smmu.c Robin Murphy 2016-09-12 834 domain->geometry.aperture_end = (1UL << ias) - 1;
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 835 }
67f1a7a314a2c2 drivers/iommu/arm/arm-smmu/arm-smmu.c Jordan Crouse 2020-09-05 836
455eb7d34ad11b drivers/iommu/arm-smmu.c Robin Murphy 2016-09-12 837 domain->geometry.force_aperture = true;
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 838
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 839 /* Initialise the context bank with our page table cfg */
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 840 arm_smmu_init_context_bank(smmu_domain, &pgtbl_cfg);
90df373cc62e52 drivers/iommu/arm-smmu.c Robin Murphy 2017-08-08 841 arm_smmu_write_context_bank(smmu, cfg->cbndx);
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 842
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 843 /*
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 844 * Request context fault interrupt. Do this last to avoid the
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 845 * handler seeing a half-initialised domain state.
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 846 */
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 847 irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx];
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 848
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 849 if (smmu->impl && smmu->impl->context_fault)
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 850 context_fault = smmu->impl->context_fault;
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 851 else
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 852 context_fault = arm_smmu_context_fault;
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 853
aa7ec73297df57 drivers/iommu/arm-smmu.c Krishna Reddy 2020-07-18 854 ret = devm_request_irq(smmu->dev, irq, context_fault,
bee140044579fb drivers/iommu/arm-smmu.c Peng Fan 2016-07-04 855 IRQF_SHARED, "arm-smmu-context-fault", domain);
287980e49ffc0f drivers/iommu/arm-smmu.c Arnd Bergmann 2016-05-27 856 if (ret < 0) {
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 857 dev_err(smmu->dev, "failed to request context IRQ %d (%u)\n",
44680eedf9409d drivers/iommu/arm-smmu.c Will Deacon 2014-06-25 858 cfg->irptndx, irq);
fba6e960772b7b drivers/iommu/arm-smmu.c Will Deacon 2020-01-10 859 cfg->irptndx = ARM_SMMU_INVALID_IRPTNDX;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 860 }
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 861
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 862 mutex_unlock(&smmu_domain->init_mutex);
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 863
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 864 /* Publish page table ops for map/unmap */
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 865 smmu_domain->pgtbl_ops = pgtbl_ops;
a9a1b0b53d8b7c drivers/iommu/arm-smmu.c Will Deacon 2014-05-01 866 return 0;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 867
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 868 out_clear_smmu:
6db7bfb431220d drivers/iommu/arm-smmu.c Liu Xiang 2019-09-16 869 __arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx);
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 870 smmu_domain->smmu = NULL;
a18037b27ebd23 drivers/iommu/arm-smmu.c Mitchel Humpherys 2014-07-30 871 out_unlock:
518f7136244c16 drivers/iommu/arm-smmu.c Will Deacon 2014-11-14 872 mutex_unlock(&smmu_domain->init_mutex);
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 873 return ret;
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 874 }
45ae7cff3684ab drivers/iommu/arm-smmu.c Will Deacon 2013-06-24 875
---
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: 29132 bytes --]
next reply other threads:[~2021-02-26 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 8:22 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-22 12:29 drivers/iommu/arm/arm-smmu/arm-smmu.c:831 arm_smmu_init_domain_context() warn: should '~0 << ias' be a 64 bit kernel test robot
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=202102261607.jnpLC122-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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 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.