Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp960192rwe; Thu, 25 Aug 2022 12:23:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR44UhR7O5daqy/WP1/el5e64KLVAajE7vOEgtnuxfclqDHEOso3p8W6kACcewcR2XWb0sC8 X-Received: by 2002:a17:907:7601:b0:73d:9f0b:d99f with SMTP id jx1-20020a170907760100b0073d9f0bd99fmr3324054ejc.300.1661455395301; Thu, 25 Aug 2022 12:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661455395; cv=none; d=google.com; s=arc-20160816; b=HY4I4J9aEmjMPUZQu2+cLP7o6vtmBbLhpUgX0mHhAsFs/llEOyV+Kuc/KDeqf5/UeP 3lb+Ot7rJ+gxofzu7x5OgOsXN2Avo2ARbpFQy34xusNksBEVEJgVGyh6HuD4V1uV6IbI mwDNf7I2kj064wzUTRvN/y/frIEJGcSFpyt3Jcj4gjqf5DPjTQMSfSXVRyZvs6ANnP3q ZaxSmUc4FJZmsqjiL3b7X7D1aSPhwLJUD4TyFTumVJKYfVY21SnfJnGys/OOW2Xm8f01 rKtpJXa0EQqjZrwlCHhefJK0je4qvp+7o9HRQ4ZAZafpEc7xwKeefWy620IqYe1GmW5t 9/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=UaweP+hutoQUCrkWUYrkD+ciXP7WXgYs/dDq7y/nMqY=; b=tGYI4zy9B2ciGemUYkdoTrbjIrv51BTeNOl+53T8Dbj7TwA9mC+NfOErERjO4idGa5 DF+nYslnI9OrmkXd6G2QNHUjzimvrNaQwCbT+Cp244i7uKsL94BxNos5Pl9eKT9S9no4 IxBJjfQKJF6Ia88bAeX1PyIQk4O8Zm7fAWZMBroMgKB1kfGE7BWcJZlRx/QjtXHMa68d WUx6UkB40fWkQOguOpjSNhXoOb7ghcZFZXE4bwoo1fLumcMZyowkUe21p+aPmEw1h0mV f6vYUfTN9S4QaB1YdAzdMKB7T9PQe4qT8yyWKhfkmvYsSS3gjq/WeEetz7OKIMHSS3s9 5gKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RsCXT18g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a056402254900b00446512358d5si196325edb.377.2022.08.25.12.22.49; Thu, 25 Aug 2022 12:23:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RsCXT18g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243481AbiHYSvE (ORCPT + 99 others); Thu, 25 Aug 2022 14:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbiHYSvC (ORCPT ); Thu, 25 Aug 2022 14:51:02 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E7B2B0896 for ; Thu, 25 Aug 2022 11:51:01 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-33da75a471cso89679847b3.20 for ; Thu, 25 Aug 2022 11:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc; bh=UaweP+hutoQUCrkWUYrkD+ciXP7WXgYs/dDq7y/nMqY=; b=RsCXT18g9rB4L6xdxOFuMmvdk3RedLQEKhf6SHh/O5yoemRRhp8mu8g4um1BhlHHWP XHs1/fCTCkqzMABIK1+LaKhWpLTH+NISFBrG2Pam3kumPnNsw0Jb08r1C2GLurK+7xR3 Dw4DnUuNOlMsJBNXK4WUZRBsZKsqLPKfAkc+QKv44409bL+ATMWPUIK1GYnjJhW6wRFn sZNRWTExWa4hknKPzCesdVwzKz05pv7+hK6Mcl2rFa6q1GVLc9oko8BfZCLqUfC0POk2 KYk7oCbTvcWJu/IxZlQCppiISlqauiJa+88ftnOPeNW/0zGFQb4GhDlY0XD/XOKBOP/A xp+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc; bh=UaweP+hutoQUCrkWUYrkD+ciXP7WXgYs/dDq7y/nMqY=; b=frjjxjHBALETa9wbRPO5lfybz2v3qg9eGsyQD5JFEzWuc2Cbh5zdcjxsuoEkbhF3ow 20Lm7X8I3Y1E6NhLh778JqRXKR4E/EPImDcgGM1/V+bNNmxqJPw8eKpjAm09Ag0IrGo9 V+m04DfYhdG5Bec64H77GMmsSZCztotDXPpoGfkrob6Lq30EU6qRrCwds4uUPYxJ+8rd NS9NEb08xT871QqZmGL7G1JdhR/mgozEe9WwIsAPYFnBjZfgE5eTD9V+kTIKPJtun475 YAAFeJAHPiW+bzKqGvy25lG099pA19StSENAApu2SXfVoHTAqS6+6KBkACvXDoLUDc0E vDRw== X-Gm-Message-State: ACgBeo04mA1TqZ2fkn10J8aMHdqUrD7Wjjw2nHKpQJy2PQPICnLMcxRC YNbm5F9F7qwwz4IUpfV014w9zuJ+GZkGwhiHiOU= X-Received: from wmcvicker.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5ebe]) (user=willmcvicker job=sendgmr) by 2002:a25:d9d8:0:b0:695:58d5:e7f6 with SMTP id q207-20020a25d9d8000000b0069558d5e7f6mr4269117ybg.101.1661453460634; Thu, 25 Aug 2022 11:51:00 -0700 (PDT) Date: Thu, 25 Aug 2022 18:50:23 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220825185026.3816331-1-willmcvicker@google.com> Subject: [PATCH v5 0/2] PCI: dwc: Add support for 64-bit MSI target addresses From: Will McVicker To: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Rob Herring , "=?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?=" , Bjorn Helgaas , Will McVicker Cc: kernel-team@android.com, Vidya Sagar , Christoph Hellwig , Robin Murphy , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, I have updated the second patch to first try allocating the DMA buffer with a 32-bit mask. If that fails and the host supports a 64-bit msi_msg buffer, then the driver will retry the allocation with a 64-bit DMA mask. I rebased the series and tested with a Pixel 6 on 6.0-rc1 (android-mainline) and a db845c with 5.15. Thanks for the reviews! Regards, Will Will McVicker (2): PCI: dwc: Drop dependency on ZONE_DMA32 PCI: dwc: Add support for 64-bit MSI target address v5: * Updated patch 2/2 to first try with a 32-bit DMA mask. On failure, retry with a 64-bit mask if supported. v4: * Updated commit descriptions. * Renamed msi_64b -> msi_64bit. * Dropped msi_64bit ternary use. * Dropped export of dw_pcie_msi_capabilities. v3: * Switched to a managed DMA allocation. * Simplified the DMA allocation cleanup. * Dropped msi_page from struct dw_pcie_rp. * Allocating a u64 instead of a full page. v2: * Fixed build error caught by kernel test robot * Fixed error handling reported by Isaac Manjarres .../pci/controller/dwc/pcie-designware-host.c | 54 ++++++++++--------- drivers/pci/controller/dwc/pcie-designware.c | 8 +++ drivers/pci/controller/dwc/pcie-designware.h | 2 +- 3 files changed, 39 insertions(+), 25 deletions(-) base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.2.672.g94769d06f0-goog