From patchwork Tue Sep 26 17:52:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13399433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9660E7E656 for ; Tue, 26 Sep 2023 17:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=baUiG0gxiyhMpY6yiyG8GNVRlsVwXg4hIdSvO0Z0Vvg=; b=N9ez59tu4Wq/64/C7r8IV7En7w R/uMBfwEkTYNKf1si9GLTD2Cd9MJ0lX54kQXqAqFwjyKpIbVgNLgsjOMjwLuZgE7QMadTXPxCzWsj crKgLZg4b017DHbiUOkAR+V1ezpOtPvHaJTXk6Lg79Wup7IjGwUzD/Cq16hKJcex4Dld3q4ab/ZSi izyBckMMiX00+L1GmmfegBU4nNE4oY2Zk2EfMmggSEOSZ7YXPwKQJP/41pca868UPUT2rNujh5ZY/ Tff4aKbkMIVR8Kn7NcIEI8pbwbI62luakB56tiwN9cmc7YWw0B3u8vGpSIvoXtb7NfQ3KJG8WAhQa Sx5qxNmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlCER-00Go64-2L; Tue, 26 Sep 2023 17:52:23 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlCEK-00Go3l-1X for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 17:52:17 +0000 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-41214998fc2so58222511cf.0 for ; Tue, 26 Sep 2023 10:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1695750735; x=1696355535; darn=lists.infradead.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=zhz/gyW8FVcm2OOXIsS2/r4pDkwYA+0+fNYlD6iTCbQ=; b=Xij5KrQ5vA5Bb1pmJj/mhoZSR5MjKrqrgLLDkNb8JB7piLFy4wC22xjCmCdH8Naqrw bC6fjS1dV5/UPp8E4a2yzUq2gthWzmhpikeckVqrns8BEXap2LyYjR+Dd0teDCWarzqQ yaE5StQp5qIgEXfVtoqtq1xHgIPgjYVE/y7rk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695750735; x=1696355535; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zhz/gyW8FVcm2OOXIsS2/r4pDkwYA+0+fNYlD6iTCbQ=; b=tcfg5IxfwudxiYvInruC8RxnZiTMR3tLogcQHJpb+W55J/bXnYzsixrTCDxH48PYd/ aQz3fJEDzcwnTbYZV0OxPDT00GG5Z0CwWohMDui9sRGgnRfLWxtvECOoiVyiGaGR9a0R DGzf+g3mFWE1atzT6Jxro5fO18ZP4sccJShNm22QgFJhAyOnJAVXbUrVHsW4rVWJ1Ge6 yFbrJzNc7wKmv9Dezk0pLAAe6ud6AefDguc8vZeEGKPIIZAX1cFDQDy+uTP+SN3wCSJ1 nL/Jf+IIELbXs0cTAilNzQWMuyJ2Zm3RRuAbUg0yFrwrx91VR9QV+VXfttaPflEq0ciZ FZpg== X-Gm-Message-State: AOJu0YzB0Uhosf5IJnxZ2hyBgTNruilHywX60xDpKc5dGfPSBuAjom0F vKtS7lpdN19+q30Ed4ZrQc2j6g== X-Google-Smtp-Source: AGHT+IG9TX1Yxd5CYdHKHdjYInYMwVzA8buNL3I46lB2BF5ncwg1kQrP9S7IwW2ixjxJ1RNaB+IK/Q== X-Received: by 2002:ad4:5ce3:0:b0:651:631d:b379 with SMTP id iv3-20020ad45ce3000000b00651631db379mr14908887qvb.10.1695750734999; Tue, 26 Sep 2023 10:52:14 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id p9-20020a0cf549000000b0065b11053445sm1992076qvm.54.2023.09.26.10.52.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 10:52:14 -0700 (PDT) From: Jim Quinlan To: Christoph Hellwig , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, james.quinlan@broadcom.com Cc: Russell King , Arnd Bergmann , Geert Uytterhoeven , "Russell King (Oracle)" , Linus Walleij , Andrew Morton , Jonathan Corbet , Thomas Gleixner , Sebastian Reichel , "Mike Rapoport (IBM)" , Eric DeVolder , Nathan Chancellor , "Kirill A. Shutemov" , Christophe Leroy , linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 1/1] ARM: Select DMA_DIRECT_REMAP to fix restricted DMA Date: Tue, 26 Sep 2023 13:52:06 -0400 Message-Id: <20230926175208.9298-2-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230926175208.9298-1-james.quinlan@broadcom.com> References: <20230926175208.9298-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230926_105216_513331_2411E106 X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Without this commit, the use of dma_alloc_coherent() while using CONFIG_DMA_RESTRICTED_POOL=y breaks devices from working. For example, the common Wifi 7260 chip (iwlwifi) works fine on arm64 with restricted memory but not on arm, unless this commit is applied. Signed-off-by: Jim Quinlan --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9557808e8937..b6f1cea923cf 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -34,6 +34,7 @@ config ARM select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7 select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE + select DMA_DIRECT_REMAP select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_MEMTEST