Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
From: David Miller <davem@davemloft.net>
To: tbogendoerfer@suse.de
Cc: hch@lst.de, linux-mips@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] net: sgi: ioc3-eth: don't abuse dma_direct_* calls
Date: Thu, 31 Oct 2019 12:15:46 -0700 (PDT)
Message-ID: <20191031.121546.1075325111948179622.davem@davemloft.net> (raw)
In-Reply-To: <20191031161817.b24181a2e7af3df994eec6c5@suse.de>

From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Date: Thu, 31 Oct 2019 16:18:17 +0100

> On Thu, 31 Oct 2019 14:15:01 +0100
> Christoph Hellwig <hch@lst.de> wrote:
> 
>> On Thu, Oct 31, 2019 at 09:54:30AM +0100, Thomas Bogendoerfer wrote:
>> > I didn't want to argue about that. What I'm interested in is a way how 
>> > to allocate dma memory, which is 16kB aligned, via the DMA API ?
>> 
>> You can't.
> 
> So then __get_free_pages() and dma_map_page() is the only way ?
> 
> BTW I've successful tested your patches on an 8 CPU Origin 2k.

Nope, it is not the only way.

Allocate a (SIZE*2)-1 sized piece of DMA memory and align the
resulting CPU pointer and DMA address as needed.

  parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 21:12 ioc3_eth DMA API fixes Christoph Hellwig
2019-10-30 21:12 ` [PATCH 1/4] net: sgi: ioc3-eth: don't abuse dma_direct_* calls Christoph Hellwig
2019-10-30 22:05   ` Thomas Bogendoerfer
2019-10-30 22:38     ` Christoph Hellwig
2019-10-31  8:54       ` Thomas Bogendoerfer
2019-10-31 13:15         ` Christoph Hellwig
2019-10-31 15:18           ` Thomas Bogendoerfer
2019-10-31 17:01             ` Christoph Hellwig
2019-10-31 19:15             ` David Miller [this message]
2019-10-30 21:12 ` [PATCH 2/4] net: sgi: ioc3-eth: fix usage of GFP_* flags Christoph Hellwig
2019-10-30 21:12 ` [PATCH 3/4] net: sgi: ioc3-eth: simplify setting the DMA mask Christoph Hellwig
2019-10-30 21:12 ` [PATCH 4/4] net: sgi: ioc3-eth: fix setting NETIF_F_HIGHDMA Christoph Hellwig
2019-10-31 21:13 ` ioc3_eth DMA API fixes David Miller
2019-10-31 21:23   ` Christoph Hellwig

Reply instructions:

You may reply publically 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=20191031.121546.1075325111948179622.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tbogendoerfer@suse.de \
    /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

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git