Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1795988rdb; Wed, 31 Jan 2024 09:14:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPMjpYogkiAWVsBXftsNFAOWexQVb0n4eJMIoMhE5YmlCjVVbMsDp2K2m9x8IKzJU2yzN4 X-Received: by 2002:ac2:5b05:0:b0:511:24da:ca21 with SMTP id v5-20020ac25b05000000b0051124daca21mr87536lfn.9.1706721270087; Wed, 31 Jan 2024 09:14:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706721270; cv=pass; d=google.com; s=arc-20160816; b=KGPlGsxnjFGEoUQ59k7eSe42IouTBnm+dC2E6K/GuuHQBJcSVXZCJhlgrd9Xfa4OdN GASiGEzC2vkoK9QXexoeTtVI1L4COh036vdg3a+s9/2SR4rabIVYi4NT8wYhjoKSr2ZN aCeQCPkFydrEEJPcU7+5DcMtvBM57deJHG4WCj6XtVYzvdVqzUoc2XMeD8lIxPGWDHYl 07eXzyyAgwBLPkCx+3dGjgth0wS60rX/qGNL0bgSrGnicXG+0lCbfiDyInsmNcfn5BZ/ v5yfxe6WyyLrYtr0g6PrXtBlDka9MZPcTdzXcRvQVnBzjBTfWnctBZJDJ+dVNN5T7hvg chTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=86B7nacVADhaNBnPz4JMgyPhuUXcizHNqaAs8J3F1UU=; fh=lLPnlCUKxXBqJDFP1cJQiZzaHaRGdt2+TD/5p820Mio=; b=UpyNgm2z/Gx7DM3npUSA7evZgcXmMlyC/kUdSmGiJufFLIk2fUYgClQFsOp1d5DxoC LKJHCWVzwhTFyqfsLQQnQBYorftiutQEQZExrG7tzYTVZmkkCg0Sc8pCYq0+VucrpmTp ye+8Y+VQ51Hnj+0T0FVGx+9bCKIeek2H9yRBZ9+8sPSSVVXkoNsAjytqGoucH41Y9npe UjUwjHnQPGEDAdKWgnPqTfgyeUchwFoYeTti/cFORkdwFi5GxBSXNo9OE2jqbgqNBj7c UlqmQ8DDuHZRZ+2v5CFV3PvX1ztUkmZJshqJmn6K1JgqM6dTmkI2LXMk8IEkSXH1adhb lwIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-46883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCUlZPFCwsgL0u/Yz9FRho5S443dzC5/ovSdlrMnl8ueMvzLOmSqQDMRXw4kky40FEpxtl9OCpEN63X5cl+XvL7bQYs8rWSzDpuKKUjQRQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f17-20020a1709062c5100b00a316103ff0esi5852798ejh.36.2024.01.31.09.14.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 09:14:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-46883-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46883-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A2DAC1F22850 for ; Wed, 31 Jan 2024 17:14:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A3B812CD97; Wed, 31 Jan 2024 17:14:13 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E79EC12C534; Wed, 31 Jan 2024 17:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706721253; cv=none; b=bgte0ZFolrohiWt6ePRI8c5/a+RKV9DMFQMhxwc6YroPaIMfTz6MYJ0IM+0m6JuKk35dQlbGkugrnk3pcRZzM5VZ4BLNiiO1jx8vA4GV1XOYTTOk/WV/lTdLyBPLPonJM9u24k7fBY9zk1UaiWsirTRYXl4UrGLHqpX5dSv0tcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706721253; c=relaxed/simple; bh=jPob66oqqRD+u/Ws6WgtJDB/RPp0fCgA3pNTgEg6TEo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qbEzwDZUzZRYTrZQDZuEJa96dVAxQtmz01tQu0OASlMSISl/xh7sJnIIcL98wRugWRjyKT5/l8bVdYj4FlP8c/Gx8Xknwr/UD4KcbZkhyrzWlOagGZrJ9w9+0ZGoE9ONipVmP3rnG/gRYnzeIuMNpfm2+2Gyk4M/9XcZIEhuSmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D936DA7; Wed, 31 Jan 2024 09:14:53 -0800 (PST) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 02F6F3F762; Wed, 31 Jan 2024 09:14:07 -0800 (PST) Message-ID: Date: Wed, 31 Jan 2024 17:14:06 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/7] dma: compile-out DMA sync op calls when not used Content-Language: en-GB To: Simon Horman , Alexander Lobakin Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christoph Hellwig , Marek Szyprowski , Joerg Roedel , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Magnus Karlsson , Maciej Fijalkowski , Alexander Duyck , bpf@vger.kernel.org, netdev@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20240126135456.704351-1-aleksander.lobakin@intel.com> <20240126135456.704351-2-aleksander.lobakin@intel.com> <20240131165258.GA401365@kernel.org> From: Robin Murphy In-Reply-To: <20240131165258.GA401365@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 31/01/2024 4:52 pm, Simon Horman wrote: > On Fri, Jan 26, 2024 at 02:54:50PM +0100, Alexander Lobakin wrote: >> Some platforms do have DMA, but DMA there is always direct and coherent. >> Currently, even on such platforms DMA sync operations are compiled and >> called. >> Add a new hidden Kconfig symbol, DMA_NEED_SYNC, and set it only when >> either sync operations are needed or there is DMA ops or swiotlb >> enabled. Set dma_need_sync() and dma_skip_sync() (stub for now) >> depending on this symbol state and don't call sync ops when >> dma_skip_sync() is true. >> The change allows for future optimizations of DMA sync calls depending >> on compile-time or runtime conditions. >> >> Signed-off-by: Alexander Lobakin > > Hi Alexander, > > This seems to cause x86_64 allmodconfig builds to fail: Oh yeah, the sync_single_range definitions shouldn't need touching at all, since they're unconditional wrappers around regular sync_single invocations (which already may or may not do anything). Thanks, Robin. > > ../drivers/media/platform/ti/omap3isp/ispstat.c:82:35: error: ‘dma_sync_single_range_for_device’ undeclared (first use in this function); did you mean ‘dma_sync_sgtable_for_device’? > 82 | dma_sync_single_range_for_device); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | dma_sync_sgtable_for_device > ../drivers/media/platform/ti/omap3isp/ispstat.c:82:35: note: each undeclared identifier is reported only once for each function it appears in > ../drivers/media/platform/ti/omap3isp/ispstat.c: In function ‘isp_stat_buf_sync_magic_for_cpu’: > ../drivers/media/platform/ti/omap3isp/ispstat.c:94:35: error: ‘dma_sync_single_range_for_cpu’ undeclared (first use in this function); did you mean ‘dma_sync_sgtable_for_cpu’? > 94 | dma_sync_single_range_for_cpu); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | dma_sync_sgtable_for_cpu