From: Robin Murphy <robin.murphy@arm.com>
To: Arnd Bergmann <arnd@kernel.org>, Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH v2 5/4] ARM: footbridge: remove custom DMA address handling
Date: Tue, 30 Aug 2022 13:21:37 +0100 [thread overview]
Message-ID: <15a6c200-8683-37f4-1e8e-5c6010e90b07@arm.com> (raw)
In-Reply-To: <20220825201544.1931658-1-arnd@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 <linux/dma-map-ops.h>
> #include <linux/kernel.h>
> #include <linux/pci.h>
> #include <linux/interrupt.h>
> @@ -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.
next prev parent reply other threads:[~2022-08-30 12:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 21:15 [PATCH 0/4] ARM: footbridge: cleanups Arnd Bergmann
2022-08-18 21:15 ` [PATCH 1/4] ARM: footbridge: remove addin mode Arnd Bergmann
2022-08-21 5:53 ` Christoph Hellwig
2022-08-24 10:33 ` Arnd Bergmann
2022-08-25 9:17 ` [PATCH 5/4] ARM: footbridge: remove custom DMA address handling Arnd Bergmann
2022-08-25 10:34 ` Russell King (Oracle)
2022-08-25 10:35 ` Russell King (Oracle)
2022-08-25 17:17 ` Arnd Bergmann
2022-08-25 20:15 ` [PATCH v2 " Arnd Bergmann
2022-08-30 12:21 ` Robin Murphy [this message]
2022-08-18 21:15 ` [PATCH 2/4] ARM: footbridge: remove leftover from personal-server Arnd Bergmann
2022-08-21 5:55 ` Christoph Hellwig
2022-08-24 10:37 ` Arnd Bergmann
2022-08-24 10:47 ` Russell King (Oracle)
2022-08-18 21:15 ` [PATCH 3/4] ARM: footbridge: move isa-dma support into footbridge Arnd Bergmann
2022-08-21 5:56 ` Christoph Hellwig
2022-08-18 21:15 ` [PATCH 4/4] ARM: footbridge: limit CONFIG_ISA to CATS Arnd Bergmann
2022-09-04 11:43 ` [PATCH 0/4] ARM: footbridge: cleanups Marc Zyngier
2022-09-04 12:09 ` Russell King (Oracle)
2022-09-04 16:10 ` Marc Zyngier
2022-09-04 21:47 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15a6c200-8683-37f4-1e8e-5c6010e90b07@arm.com \
--to=robin.murphy@arm.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=hch@lst.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®