Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4143703rwe; Tue, 30 Aug 2022 05:30:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5FRXC5twJp/3JIbV4KhGZ8e6g1SbzhE51BD6lq92cVYc8iNCWiJmUHBMXOnhWKR67urTbJ X-Received: by 2002:a63:564f:0:b0:425:f2cd:d0ce with SMTP id g15-20020a63564f000000b00425f2cdd0cemr17634233pgm.143.1661862631736; Tue, 30 Aug 2022 05:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661862631; cv=none; d=google.com; s=arc-20160816; b=NQQxdjt9EXNUGIWiapX2YzyZOhxBmV/FC4Dp9fSM52uawlpMnH2W40oP5Tb5ahVdH0 8yZ8S8uvFJm8R5kqQGE2zz6+PXg6K+DL8+uHud/dL/iCHKRjMhTw5fQvRHCHqhog/O6a eaGGJBK5U1ji9mWi8ZiMDnbTA2DZM+o4OGL7SAEKm1P1kH4+mFDXZQok92EfRjHFr9NU 8+gfq9tqlXUL2QA8VdclHbZPKLnxgdmJ6+ZCefWMItKyp5Nk66c1tfXkabDQolQn/xUC QAgoUtJanJSyY21S+kTKKKGI8TfKrDV1Ylwtv6LhQqgEXCJXBTqosxOThGC5tKUpaoDN 8LgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=1u12VWcY9f9c4YWvf9SPyUOq8UptkN3jogXsdl69wwk=; b=qekXS/l9JBdw8klIsoys3WcIFPW3JwjV/J6tYA3HAxgYeUsaHTR8fGaHBJGmuoq2+5 Flfzat+XykNXKeztC2sHYpXVtCm0DBjUSiYF3CqKwAksotXJ5+07+tVWli3q2dMHduNQ 6XrIysf/uVgxVTKDqNV4180vR9WM0r4kw+UtfEB96Olsu6uyl7jDOWMmomonCnBI9B+y sJfbQIl1Rlkf/GAZU6uREZoXWByAb00mVZYM/7lQ9RNhao3C8Bs8WmUhC8MkSj5nZ1Qf z5lXt1SNeVFZ1BQFxCWvHfaY7N9fF9uzRY5wEKcDYPM2RBRVoCwtpTrMspr+gWLK/RgG 5dBw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn18-20020a17090b38d200b001f3250578ffsi12295783pjb.20.2022.08.30.05.30.19; Tue, 30 Aug 2022 05:30:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbiH3MWI (ORCPT + 99 others); Tue, 30 Aug 2022 08:22:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbiH3MV5 (ORCPT ); Tue, 30 Aug 2022 08:21:57 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76151E9921 for ; Tue, 30 Aug 2022 05:21:45 -0700 (PDT) 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 825E41063; Tue, 30 Aug 2022 05:21:50 -0700 (PDT) Received: from [10.57.13.45] (unknown [10.57.13.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1DC623F71A; Tue, 30 Aug 2022 05:21:42 -0700 (PDT) Message-ID: <15a6c200-8683-37f4-1e8e-5c6010e90b07@arm.com> Date: Tue, 30 Aug 2022 13:21:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v2 5/4] ARM: footbridge: remove custom DMA address handling Content-Language: en-GB To: Arnd Bergmann , Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Russell King , Linus Walleij , Marc Zyngier References: <20220821055326.GA25950@lst.de> <20220825201544.1931658-1-arnd@kernel.org> From: Robin Murphy In-Reply-To: <20220825201544.1931658-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 2022-08-25 21:15, Arnd Bergmann wrote: [...] > diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c > index 372600bc15c8..f8920d0010de 100644 > --- a/arch/arm/mach-footbridge/dc21285.c > +++ b/arch/arm/mach-footbridge/dc21285.c > @@ -5,6 +5,7 @@ > * Copyright (C) 1998-2001 Russell King > * Copyright (C) 1998-2000 Phil Blundell > */ > +#include > #include > #include > #include > @@ -241,6 +242,22 @@ static irqreturn_t dc21285_parity_irq(int irq, void *dev_id) > return IRQ_HANDLED; > } > > +static int dc21285_pci_bus_notifier(struct notifier_block *nb, > + unsigned long action, > + void *data) > +{ > + if (action != BUS_NOTIFY_ADD_DEVICE) > + return NOTIFY_DONE; > + > + dma_direct_set_offset(data, PHYS_OFFSET, BUS_OFFSET, SZ_256M); FWIW I've always had it in mind that for this kind of special case the platform could just statically allocate the dma_range_map and assign it to all devices. However in practice that needs some kfree_const() tweaks in the driver core, which I'm sure are out-of-scope for this series, so I'm mostly flagging this up to help myself remember that it might be worth doing a dma_direct_set_offset() cleanup sweep soon. As-is the patch at least makes things a lot clearer, and presumably there aren't likely to be enough PCI devices for the extra allocations to have noticeable impact in the meantime. Cheers, Robin.