From: simon.kagstrom@netinsight.net (Simon Kågström)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 1/2] ARM: ixp4xx: Make dma_set_coherent_mask common, correct implementation
Date: Tue, 18 Mar 2014 09:09:05 +0100 [thread overview]
Message-ID: <20140318090905.72a686e8@marrow.netinsight.se> (raw)
In-Reply-To: <m3iorcj6nb.fsf@t19.piap.pl>
On Tue, 18 Mar 2014 08:41:12 +0100
Krzysztof Ha?asa <khalasa@piap.pl> wrote:
> Believe it or not, the correct patch is the one I'm attaching. One can
> add extra *set_masks* (e.g. the new call setting both streaming and
> coherent masks) in the drivers, but essentially it must do what this one
> does. Also, converting the mask (in the dev struct) from a pointer to a
> simple value would IMHO make sense, too.
OK, you know the hardware better so if you say so!
> I'm unable to look at this ATM but I will update the patch to the new
> kernel, perhaps soon.
Some comments below though:
> #include <asm/mach/map.h>
> #include <asm/mach/irq.h>
> #include <asm/mach/time.h>
> @@ -578,6 +577,56 @@ void ixp4xx_restart(enum reboot_mode mode, const char *cmd)
> }
> }
>
> +#ifdef CONFIG_PCI
To me it seems the conditional compilation is superfluous - dev_is_pci
is used to check for PCI-devices anyway, and the compiler should be
smart enough to remove dead code for the non-PCI case.
> +static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
> +{
> + return (dma_addr + size) >= SZ_64M;
> +}
> +
> +static int ixp4xx_platform_notify_remove(struct device *dev)
> +{
> + if (dev->bus == &pci_bus_type)
if (dev_is_pci(dev))
> + dmabounce_unregister_dev(dev);
> +
> + return 0;
> +}
// Simon
next prev parent reply other threads:[~2014-03-18 8:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 9:54 [PATCH RESEND 0/2]: ixp4xx: Fix 3.7 regression for IXP4xx ethernet driver Simon Kågström
2014-03-17 9:56 ` [PATCH RESEND 1/2] ARM: ixp4xx: Make dma_set_coherent_mask common, correct implementation Simon Kågström
2014-03-17 11:29 ` Arnd Bergmann
2014-03-17 11:54 ` Simon Kågström
2014-03-18 7:41 ` Krzysztof Hałasa
2014-03-18 8:09 ` Simon Kågström [this message]
2014-03-18 10:23 ` Krzysztof Hałasa
2014-03-17 9:57 ` [PATCH RESEND 2/2] ixp4xx_eth: Setup coherent_dma_mask Simon Kågström
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=20140318090905.72a686e8@marrow.netinsight.se \
--to=simon.kagstrom@netinsight.net \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).