Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3509148pxv; Mon, 12 Jul 2021 19:55:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP/w7YdC120Zyswvw7aEHFFiFc1ZMSOD48JLqMHtBJdSs7/OlITLuXzM44NneBdhcmNZuw X-Received: by 2002:a02:630e:: with SMTP id j14mr1937935jac.86.1626144938764; Mon, 12 Jul 2021 19:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626144938; cv=none; d=google.com; s=arc-20160816; b=xfWilyW7xSIW2vzKBi8Iw2YoJCzFUZ/KmrDkHQc84Y/ZGAWfIEOZ7p5JHBC9iaH3zu FdcVuSIvDTtsKMbvZauy/Fygo2ojc0VZigO6P/UyVaFD9VghjKAWLYxLplISWNHWN1E2 7cTXUDSaB0et5dEtWis/bHQqGfqaFwLbSeuqQIksxpwoSy0Hoimcun5svyBxDaWRKioZ MpEREqmldADUjcXptrdk0HiJx+5Oo/33ainznkmCz1wTWPnXlXhha1QkwB0/mWJ+Q3Nr Hu73xXcQaVz31HwH/sNLID84jBDKnxYneTjQqm3kkpUNOpTkPqMy88cgrpUKZCd2sWFz DQrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=BJvQLOjsl0gAGxHxBpVZlBksMhyHLgr2VpfSWU0djEQ=; b=0xP726crfQ5GUqY00asTdXC1pEcsDS2Ir0Ei5vNuqlN2z27Lygh+7jtSc8kjVPcxKf QEgShhnDVdLFUkVJFuUqLWpkc2Q7SbTZnQfIkCdqkACT3LY0QIAV2tHMsqPcrfsZjLqe bvo1TwSw+scmiCcTli0SqCXNtVt3693JDiT9iNhLE4lrWCr8hAQ7uS009mYxmGEJkDS2 2ab+toerJoNnk1Zg1hwhs/vKSjq0H/01B77pau/FHtt3qs9H5f3J1kS+WZ76d8p+wHJL 0N7Llrkc1VUymsufCItxe9Zt1qkaB1llBx23hrfCNPu5uSBcxADy+SBq7UrBjEYKwHN4 KH7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LOq5AtbL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si2500424ilm.77.2021.07.12.19.55.26; Mon, 12 Jul 2021 19:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LOq5AtbL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233756AbhGMC5p (ORCPT + 99 others); Mon, 12 Jul 2021 22:57:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233911AbhGMC5o (ORCPT ); Mon, 12 Jul 2021 22:57:44 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86AEBC0613E9 for ; Mon, 12 Jul 2021 19:54:55 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id p14-20020a17090ad30eb02901731c776526so504552pju.4 for ; Mon, 12 Jul 2021 19:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BJvQLOjsl0gAGxHxBpVZlBksMhyHLgr2VpfSWU0djEQ=; b=LOq5AtbLxPPaTzVUgPka2d5dQ3lxkfE2BVJo5G4NhinBzDwZXhGdRCwvXszkvMfJdN lLtS4QzEAVLGKrVTnC/a+92vAdruhEEHlXmmglbxdzKUdRxOBF+2WnG7e7qLK4YYYmKz Iqk8QZKNpsz7q/tfIM8VhUM6oCRC0DWozhLJU7rOS01QIPbTce+LBo9IV6Vzi/n/wiN4 vgX/hQDDZQgc3XoheAgX93Qs4/oUCbOkBxjjnjWa7QXpKWG7lRPRuSQE0meK2wPbJEcm LwZ2MygQD2cY1kZmn356e+74JqkDQkM05akS+dh3zHwzNHRGzLp7nMuZWnN+01bWbaa0 7Pzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BJvQLOjsl0gAGxHxBpVZlBksMhyHLgr2VpfSWU0djEQ=; b=jPtNzV9bphJqthIarINKOGHNlkeCj82O8bjRQtRqJmtu1JR3dTTej0SRR/IsfoJAyB MOAjnooQqtFgKcb5d+pSAIY6tN0zqwrjMPsvrLIqvTEeLKWHNyNq6u8XNeAdJYKIBwze R2m6vylVk5H0pJNf+ek6g4HC3V/ju1aiH9LYhyYROmBLhV8bp/J8GiAHUYY8cTnixHNW r8XaAViFrnoPqtfUNuwVw9qUUs3uneK4Vjmo2ckYZG0Xz4CxKtgXwjM2wl+94eFH3CNj wLgtK0TzjBK33PZqEYXFzsvSNcx0aXEJ2a1X7jClX5iHlv4kPV+risQsCapmxZ6+U/Qg l97w== X-Gm-Message-State: AOAM53348scjCnyLaT1xJMVbLdivnPFcElEd6ViPVBkc33cDuz6QRYD5 hJELWwVOzDoEmdK48KZrOiG77w== X-Received: by 2002:a17:902:7d8f:b029:116:4b69:c7c5 with SMTP id a15-20020a1709027d8fb02901164b69c7c5mr1682692plm.58.1626144894904; Mon, 12 Jul 2021 19:54:54 -0700 (PDT) Received: from localhost.localdomain ([45.135.186.134]) by smtp.gmail.com with ESMTPSA id r14sm19303344pgm.28.2021.07.12.19.54.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jul 2021 19:54:54 -0700 (PDT) From: Zhangfei Gao To: Bjorn Helgaas , Greg Kroah-Hartman , Arnd Bergmann , jean-philippe , kenneth-lee-2012@foxmail.com, Wangzhou Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Zhangfei Gao Subject: [PATCH v5 0/3] PCI: Add a quirk to enable SVA for HiSilicon chip Date: Tue, 13 Jul 2021 10:54:33 +0800 Message-Id: <1626144876-11352-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HiSilicon KunPeng920 and KunPeng930 have devices appear as PCI but are actually on the AMBA bus. These fake PCI devices have PASID capability though not supporting TLP. Add a quirk to set pasid_no_tlp and dma-can-stall for these devices. v5: no change, base on 5.14-rc1 v4: Applied to Linux 5.13-rc2, and build successfully with only these three patches. v3: https://lore.kernel.org/linux-pci/1615258837-12189-1-git-send-email-zhangfei.gao@linaro.org/ Rebase to Linux 5.12-rc1 Change commit msg adding: Property dma-can-stall depends on patchset https://lore.kernel.org/linux-iommu/20210302092644.2553014-1-jean-philippe@linaro.org/ By the way the patchset can directly applied on 5.12-rc1 and build successfully though without the dependent patchset. v2: Add a new pci_dev bit: pasid_no_tlp, suggested by Bjorn "Apparently these devices have a PASID capability. I think you should add a new pci_dev bit that is specific to this idea of "PASID works without TLP prefixes" and then change pci_enable_pasid() to look at that bit as well as eetlp_prefix_path." https://lore.kernel.org/linux-pci/20210112170230.GA1838341@bjorn-Precision-5520/ Zhangfei Gao (3): PCI: PASID can be enabled without TLP prefix PCI: Add a quirk to set pasid_no_tlp for HiSilicon chips PCI: Set dma-can-stall for HiSilicon chips drivers/pci/ats.c | 2 +- drivers/pci/quirks.c | 27 +++++++++++++++++++++++++++ include/linux/pci.h | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) -- 2.7.4