From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 944A4C47095 for ; Wed, 9 Jun 2021 03:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 797DC610E5 for ; Wed, 9 Jun 2021 03:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236467AbhFIDjG (ORCPT ); Tue, 8 Jun 2021 23:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236449AbhFIDjG (ORCPT ); Tue, 8 Jun 2021 23:39:06 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50D67C061756 for ; Tue, 8 Jun 2021 20:36:59 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id k15so17351778pfp.6 for ; Tue, 08 Jun 2021 20:36:59 -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=oubMStFNGrtV4LE+3WOGbMFsCnKASljsoNpfRmbbGlw=; b=I9gQ9HCmiAJcqC1oTV6XW+qgj+jecrM9jYzZbj0yvo2ONVzPHopjLXH02JeTChRr9+ QRQm/NaAfdEr42swK1wGhwrFiMnMLDIRlLp5vRe23stYEUf/USxsiF/GnkbjG2mg+3z2 aFtKXxR+nOzPD+K6YZe73dvECSex8wpSwf7Gt+/wqj13cQXdqff8Pay9+df3oYMlnI4x Dhdsr6eazTZBMPk5wgYhWxw4OODLXnh4oZV3C+kc1CMCM4nztJOA0jq+hXpwhI8uRvc0 QUx+zRRIOnSi5UD6ys6HjCoVXy97tz/pt1RF+jIbY1VOLic51sqhUeK27WARM1PvYEv5 MHQg== 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=oubMStFNGrtV4LE+3WOGbMFsCnKASljsoNpfRmbbGlw=; b=BZlzs8l7uy1gzKbkjC/6Z75p9WYkASsCXLQDgPg1C9iHH6zgMcaJpduaoyHlZqtgqi QrtAlXEwnMI9gLmILDt2YWtbAfkwiYQhO2Y9+LA7SPg+s6wuXzj7Ym6nkMEYbin0qtjp xo43vpeHB5qtWuhd2w9JeSoyVwVzWesSM7XKKt5Etv2bDUz4LYyUr48V9xHfWFsQUTGO oDNPcyeeGRk2CyAUevszlOpcZBEndgzWiY8nm2LUN2duYCivM5pxtV8ktHRMy3TxkA5F gLldhrP1TLYZKW8JmU6NIXWaJpu5B0jXMxseIVh0EP2eaEdTFDTc9ew5E+CdYikrwBeU 7NWQ== X-Gm-Message-State: AOAM5319AFPEay6G+NZOgI5RRHITdqs5ykFvT1yFjgdAuY17GRoQFMtq QV3Jo1e8bgCnmZq633i8Gobagw== X-Google-Smtp-Source: ABdhPJwR+7W6O5QClSyBgLz+We60zX4lg8j0nOjpURIHwLZDB0g3ckTMsGLQDoy7ABIUIsXTnp6uUg== X-Received: by 2002:a63:b043:: with SMTP id z3mr1636587pgo.89.1623209817652; Tue, 08 Jun 2021 20:36:57 -0700 (PDT) Received: from localhost.localdomain ([45.135.186.135]) by smtp.gmail.com with ESMTPSA id t24sm3473904pji.56.2021.06.08.20.36.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jun 2021 20:36:56 -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 v4 0/3] PCI: Add a quirk to enable SVA for HiSilicon chip Date: Wed, 9 Jun 2021 11:36:38 +0800 Message-Id: <1623209801-1709-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. Jean's dma-can-stall patchset has been accepted https://lore.kernel.org/linux-iommu/162314710744.3707892.6632600736379822229.b4-ty@kernel.org/ 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