Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1097391ybg; Thu, 11 Jun 2020 00:28:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrwATIjYFXTFf7yFlLnsPGLqr9t9FZGo9tme6tCOoxxN18rwEPz2YSuMq6M4nqSk4m6z7g X-Received: by 2002:a50:bb29:: with SMTP id y38mr5718662ede.358.1591860489343; Thu, 11 Jun 2020 00:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591860489; cv=none; d=google.com; s=arc-20160816; b=dkdyHUZBLV3Oz6rPJj8FihtjeFBjw3i8GSMB7Zmr9SIbZChbvrONeVbfkAlfJak2sA DXjNRBPt20iuFhiGCLzzBRGLHzM1pFz8DFS5vY4FTgCVAid/lSaUOXPaqKT/sg/WzwPM i4mB8+4a7yyw4rAqrW3pL6Pma1rwmcjWEoTrnuFXVwtwm4F3VUthO7tTJ2pSPKp7jejV uFnJXBlAkyYeLHl/3mcSvHv222ip6rG5GlmD8HJoa1UY28pNv23nheJ57XAzwPKlFiWa OEBrMK7EUnCkXnSyE+cR7UrWpELMpAfrFXKiNpRltORGk6FGokwn+wWt83iEXyOXHXR7 orKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:dkim-signature; bh=vewiDiSb1cN3kydqT+BXtXjpJ6GL0Th4yHgmJZ519bc=; b=zBKam7jdl6c3iG7+JF8VvfL6+OzUwX4wrDC/1X+NH049bqxPerhN/CaYVFcExDnR+T 5z0/Fkbz+bbk0sRm/MtYcQx+Dceh7otLHtq70z4iDlQPTQ7crZhWboMGUqAJj4W4CeOS U0UL/f3s3+0ECk6htkWQr+WJgAWopx/RR5R5NTZgX+vyCRuMEkkxGBWr9Y6tnWhgZ4Zc q4SlVUQD6ZK5DJcMFI7YLT5ARDeUBXS4fpavL7+ajvw5oPWC0wfb+kRrF5Jtp/6wMwrv iFO0oDjk0ci8jnIctGXoPbLHQ0iU/dBLCyp8Qn02G2qnWHg2yXBGaDmkUvdyQmXRbcnx OXug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="tpdQc/yd"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd25si1252204edb.134.2020.06.11.00.27.46; Thu, 11 Jun 2020 00:28:09 -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=@google.com header.s=20161025 header.b="tpdQc/yd"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726693AbgFKHZ7 (ORCPT + 99 others); Thu, 11 Jun 2020 03:25:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbgFKHZ7 (ORCPT ); Thu, 11 Jun 2020 03:25:59 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE9CC08C5C1 for ; Thu, 11 Jun 2020 00:25:59 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id e9so2169087pgo.9 for ; Thu, 11 Jun 2020 00:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=vewiDiSb1cN3kydqT+BXtXjpJ6GL0Th4yHgmJZ519bc=; b=tpdQc/ydcGLOP2OMknw/h0JOLqRFK+EpzRW18q9vdrzjQnf+z2k+sNMwNT5QjbF5/F bvOdfkwWF49Lj49PKrC4aiMXWG6O8C9Y4kjrn1G+9GNV6NLlfGX0kMeMqBCya1skey1V phEL7SWRJCBra7Pfvnm0BPdM4tGgIYI0dtp00g+YQVhEZaXurhzfe6yGbyTMdMUmYAhc eIJx8TDKo8KShNL6aX4r/6xTBX+mWjF0FYfUIgxh0WMWrpsfo/V2PtQE1gdpNRBf+DMV 7BUbvRal9LSMwakMrDkdA1BiHZG5J+2B8DAjJ3yr79RyorWZXFR5h3morG2JQ1XcKZs+ G6NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=vewiDiSb1cN3kydqT+BXtXjpJ6GL0Th4yHgmJZ519bc=; b=a20YuJDtWGryxkwMpVxy+un5wuhQbK6opuFQdtX4rH5dGnwiiP8h7stB5CK1jV7UH/ bjN8V0QwUa4ElUBYKEQ8LhCrM8FDDJpvGEbvji3if+iNvwESHDo01VF2VrSDtVgIlsxJ BcdQD5/grj8EyqC2ipLAeTK/w63npgveqhacvsTf1DG14EQIe8tpsGQ8QcuuxmWxCdvo vyb9MufbwokQJ7FCB3MXSS+z9hAGdGBd+tR+2jimEL1+SU1rR6sWuMP32GMmyBTKv+a8 S4SijrQA8pUfZssoNWHQLZ5rFEVrw617smy+PjGlTv1cojSPgKK13HhONP2byoOoSLLf 8o/Q== X-Gm-Message-State: AOAM532VoOKLPAinewhNFf7v92dzVH4xqVyDue/NIgSKqLTURkRSpylM eTdTdlwZmR/l5IfeFRDqN4Pf9w== X-Received: by 2002:a05:6a00:7c8:: with SMTP id n8mr5897765pfu.116.1591860358499; Thu, 11 Jun 2020 00:25:58 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id q65sm2181477pfc.155.2020.06.11.00.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 00:25:57 -0700 (PDT) Date: Thu, 11 Jun 2020 00:25:57 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Christoph Hellwig cc: "Alex Xu (Hello71)" , alsa-devel@alsa-project.org, bp@alien8.de, hch@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@redhat.com, Pavel Machek , perex@perex.cz, tglx@linutronix.de, tiwai@suse.com, x86@kernel.org Subject: [patch for-5.8] dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DMA_REMAP is an unnecessary requirement for AMD SEV, which requires DMA_COHERENT_POOL, so avoid selecting it when it is otherwise unnecessary. The only other requirement for DMA coherent pools is DMA_DIRECT_REMAP, so ensure that properly selects the config option when needed. Fixes: 82fef0ad811f ("x86/mm: unencrypted non-blocking DMA allocations use coherent pools") Suggested-by: Christoph Hellwig Signed-off-by: David Rientjes --- kernel/dma/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -73,18 +73,18 @@ config SWIOTLB config DMA_NONCOHERENT_MMAP bool +config DMA_COHERENT_POOL + bool + config DMA_REMAP + bool depends on MMU select GENERIC_ALLOCATOR select DMA_NONCOHERENT_MMAP - bool - -config DMA_COHERENT_POOL - bool - select DMA_REMAP config DMA_DIRECT_REMAP bool + select DMA_REMAP select DMA_COHERENT_POOL config DMA_CMA