Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp130649pxb; Mon, 8 Feb 2021 17:38:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyp8NFcgFZSLrfsFo8elGBgGadS/zA7kc/yJa+4Ozn+jXA1DiVAj+opQcMpXotO8yCfYo7u X-Received: by 2002:a05:6402:4389:: with SMTP id o9mr20131997edc.164.1612834735571; Mon, 08 Feb 2021 17:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612834735; cv=none; d=google.com; s=arc-20160816; b=wTQt9JH2K1dS/56vUOpzUMoxeXtiZEB/SKhuaevDiScJObjjthCNuK4aEvEu/eXuD2 W7TM8MmIxQ4A27Vui8aCyK+ey8qfdu+mmhgHCV5Rx421LO5NfreIpdiDpLOCP9AKEtrT y/wVDX0iIpaa2ztbuxVYmPRvAAb/o5fNysBQ54iPC3AbeZZaERWONcgrKRJrHZQxOUI2 +DJ5orPZUm1kt8tH8+9fKzGTgUvpSS8sdr8XdkcrQyOeFz5NT024CpFFnj+lX9VmrfIn umGGo71paioaCrp21/qr2sqfxf0ayJssd9W/yNCQK5bU1/AfatUTbMcULOemQl9DO23U IQFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sJeX9m2gVl5CjScr5KJ0hI1BM0XuJKBrdcYtlGvuPzE=; b=P1hbTF4w9b1YmKadGbEAzJZUzWm57EI3bcm2ep5GBseSQFIavJ/WPg4qxhZiG3be3C JGdwlEw2hv4fwLtFgeBH1OyHGm/di3AAmtznMwGCasLSG5yz24hCHjcaV8xX5Chh2u/e qcmbDAGbXpVTinhcC73nGSPS2zZbc+C5bCMC2dXXIiWOuWoCzV+X/zFULJyxUFcxTqmB rIzKb0rUnAi8YVqwUM0N/UnyqaCOnVNR0B0tCYqHiApHaSeeZ3UWy47kJUU7imWW8Usd l08TmNoxSi+A14yvp722tkIZ90bmd+o9oLQKtKtxnlv6WQ0mYUfL6E73ztiHbwxbN4wJ HZ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFlJGIRh; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si16289347edi.177.2021.02.08.17.38.25; Mon, 08 Feb 2021 17:38:55 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=qFlJGIRh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbhBIBhf (ORCPT + 99 others); Mon, 8 Feb 2021 20:37:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:53934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbhBIBhK (ORCPT ); Mon, 8 Feb 2021 20:37:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2781664DF2; Tue, 9 Feb 2021 01:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612834589; bh=GeneRGHAa6mtWP0C7hDko1vrvp1LSL3adVABNeZ6jD4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qFlJGIRhgAMU7d3IrGb90w8fBAZFnDMzYHoPUQ/yP1HYUTFUxU+4Lw+tmCZu0HuZM 8JVI2vh1zK/7K3A0xRL/K+Yxm+N8NZK9kpPYcklH2cGmEdhShXfqzT8xo4Ptzf9DOo C2c4cKL+dk2yR19trrNMl0DStwPuDuqLBamP9cPPx0DqAVqVRj12hlZETEFXt7eY31 Ej5GVQAs/xhEUTNqtB3nbOL/+f46wuVA3MXSnLxtKS35gdQXO5qxNCoD+n5bITNoWi pFC4bj9GBSNaARq9YG58b8RfAM5ER7WvG/5UgayltQJmVEyfichpmSM5yqeLzPcEsC pAT3TK9Pc2WbA== Received: by mail-io1-f45.google.com with SMTP id n201so17109941iod.12; Mon, 08 Feb 2021 17:36:29 -0800 (PST) X-Gm-Message-State: AOAM530y03JbmV2CwFSD7X1iQ13QNwtH95ILoMA3IQ4HiiEfZ9RnVgQD eUBq8DeQ99CbA1Qa/i9Rue4N/y3Zr8XK1ZqD7bo= X-Received: by 2002:a05:6638:388e:: with SMTP id b14mr20526766jav.96.1612834588516; Mon, 08 Feb 2021 17:36:28 -0800 (PST) MIME-Version: 1.0 References: <20210208145024.3320420-1-hch@lst.de> <20210208145024.3320420-7-hch@lst.de> In-Reply-To: <20210208145024.3320420-7-hch@lst.de> From: Huacai Chen Date: Tue, 9 Feb 2021 09:36:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 6/6] MIPS: remove CONFIG_DMA_PERDEV_COHERENT To: Christoph Hellwig Cc: Thomas Bogendoerfer , Greg Kroah-Hartman , "open list:MIPS" , LKML , iommu@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Huacai Chen On Mon, Feb 8, 2021 at 10:51 PM Christoph Hellwig wrote: > > Just select DMA_NONCOHERENT and ARCH_HAS_SETUP_DMA_OPS from the > MIPS_GENERIC platform instead. > > Signed-off-by: Christoph Hellwig > --- > arch/mips/Kconfig | 8 ++------ > arch/mips/mm/dma-noncoherent.c | 2 +- > 2 files changed, 3 insertions(+), 7 deletions(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index 1f1603a08a6d2d..fae02b0b9c599a 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -123,6 +123,7 @@ choice > > config MIPS_GENERIC_KERNEL > bool "Generic board-agnostic MIPS kernel" > + select ARCH_HAS_SETUP_DMA_OPS > select MIPS_GENERIC > select BOOT_RAW > select BUILTIN_DTB > @@ -132,7 +133,7 @@ config MIPS_GENERIC_KERNEL > select CPU_MIPSR2_IRQ_EI > select CPU_MIPSR2_IRQ_VI > select CSRC_R4K > - select DMA_PERDEV_COHERENT > + select DMA_NONCOHERENT > select HAVE_PCI > select IRQ_MIPS_CPU > select MIPS_AUTO_PFN_OFFSET > @@ -1127,11 +1128,6 @@ config FW_CFE > config ARCH_SUPPORTS_UPROBES > bool > > -config DMA_PERDEV_COHERENT > - bool > - select ARCH_HAS_SETUP_DMA_OPS > - select DMA_NONCOHERENT > - > config DMA_NONCOHERENT > bool > # > diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c > index 90b562753eb892..212f3ce75a6bd3 100644 > --- a/arch/mips/mm/dma-noncoherent.c > +++ b/arch/mips/mm/dma-noncoherent.c > @@ -135,7 +135,7 @@ void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size, > } > #endif > > -#ifdef CONFIG_DMA_PERDEV_COHERENT > +#ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS > void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > const struct iommu_ops *iommu, bool coherent) > { > -- > 2.29.2 >