From: Krzysztof Halasa <khc@pm.waw.pl>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, zaitcev@redhat.com,
alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] RFC: kills consistent_dma_mask
Date: 18 Aug 2003 23:58:47 +0200 [thread overview]
Message-ID: <m3n0e6mxuw.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <20030818115052.41e62a90.davem@redhat.com>
"David S. Miller" <davem@redhat.com> writes:
> drivers/net/tg3.c
No... I know of tg3.c:
/* Configure DMA attributes. */
if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
pci_using_dac = 1;
if (pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL)) {
printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
"for consistent allocations\n");
goto err_out_free_res;
}
} else {
err = pci_set_dma_mask(pdev, (u64) 0xffffffff);
if (err) {
printk(KERN_ERR PFX "No usable DMA configuration, "
"aborting.\n");
goto err_out_free_res;
}
pci_using_dac = 0;
}
As you can see it tg3 uses consistent_dma_mask = dma_mask so this one
doesn't need two masks.
Ok, I assume there is a real need for two masks. Still, having different
archs rely on different variables for the same task is a bug which needs
fixing.
Example:
$ grep DMA_MASK sound/oss/emu10k1/main.c
#define EMU10K1_DMA_MASK 0x1fffffff /* DMA buffer mask for pci_alloc_consist */
if (pci_set_dma_mask(pci_dev, EMU10K1_DMA_MASK)) {
Do you see a problem here? It will work if and only if pci_alloc_consistent
uses dma_mask rather than consistent_dma_mask.
Ok, I will make a patch which uses consistent_dma_mask for consistent allocs
on all archs. This will break drivers but they are already broken on
x86-64 and ia64, and it's easier to fix drivers than to write them when
the core is faulty.
Hope that it is ok?
--
Krzysztof Halasa
Network Administrator
next prev parent reply other threads:[~2003-08-18 22:00 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-17 22:34 [PATCH] RFC: kills consistent_dma_mask Krzysztof Halasa
2003-08-18 6:37 ` David S. Miller
2003-08-18 12:44 ` Krzysztof Halasa
2003-08-18 12:43 ` David S. Miller
2003-08-18 15:54 ` Krzysztof Halasa
2003-08-18 16:49 ` David S. Miller
2003-08-18 18:21 ` Krzysztof Halasa
2003-08-18 18:50 ` David S. Miller
2003-08-18 21:58 ` Krzysztof Halasa [this message]
2003-08-19 9:24 ` Jes Sorensen
2003-08-19 9:21 ` Jes Sorensen
2003-08-18 13:00 ` Jes Sorensen
2003-08-18 8:07 ` Christoph Hellwig
2003-08-18 15:15 ` Pete Zaitcev
2003-08-18 16:14 ` Krzysztof Halasa
2003-08-19 9:16 ` Jes Sorensen
2003-08-19 9:49 ` Krzysztof Halasa
2003-08-19 10:15 ` Jes Sorensen
2003-08-19 9:03 ` Jes Sorensen
2003-08-19 13:07 ` Alan Cox
2003-08-19 13:20 ` Jes Sorensen
2003-08-19 16:55 ` David S. Miller
2003-08-19 18:33 ` Alan Cox
2003-08-19 18:31 ` David S. Miller
2003-08-19 20:31 ` Krzysztof Halasa
2003-08-22 11:54 ` Krzysztof Halasa
2003-08-23 17:11 ` Jes Sorensen
2003-08-24 12:06 ` Krzysztof Halasa
2003-08-24 13:00 ` David S. Miller
2003-08-24 19:58 ` Krzysztof Halasa
2003-08-25 8:50 ` Jes Sorensen
2003-08-30 21:18 ` Krzysztof Halasa
2003-08-31 1:50 ` David S. Miller
2003-08-31 12:52 ` Alan Cox
2003-08-31 15:24 ` Krzysztof Halasa
2003-09-01 5:22 ` David S. Miller
2003-09-01 7:34 ` Krzysztof Halasa
2003-09-01 7:43 ` David S. Miller
2003-09-01 17:14 ` Krzysztof Halasa
2003-09-01 17:28 ` David S. Miller
2003-09-01 18:24 ` Krzysztof Halasa
2003-09-01 7:54 ` Alan Cox
2003-09-01 7:52 ` David S. Miller
2003-09-01 16:27 ` Krzysztof Halasa
2003-09-01 17:33 ` David S. Miller
2003-08-25 8:47 ` Jes Sorensen
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=m3n0e6mxuw.fsf@defiant.pm.waw.pl \
--to=khc@pm.waw.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zaitcev@redhat.com \
/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).