All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitris Michailidis <dm@chelsio.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, netdev@vger.kernel.org
Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
Date: Sat, 27 Feb 2010 14:41:09 -0800	[thread overview]
Message-ID: <4B899F85.1000101@chelsio.com> (raw)
In-Reply-To: <20100227.014839.226753616.davem@davemloft.net>

David Miller wrote:
> From: "Dimitrios Michailidis" <dm@chelsio.com>
> Date: Fri, 26 Feb 2010 16:10:07 -0800
> 
>> I believe this function does not generate any code, the compiler
>> statically figures out the result and optimizes any conditionals that
>> call it.  What option do you have in mind that would tell the compiler
>> if unmap is nop?
> 
> I've got better questions:
> 
> 1) Why is your driver so damn special?
> 
>    If this optimization is useful, it dosen't belong privately in
>    some driver, it belongs in some generic spot.

I agree that it would be better if this were available at some generic 
place, eg an arch header.  It is implicitly available for most arches 
through the definition of DECLARE_PCI_UNMAP_ADDR and related macros, which 
is why the driver is looking at that, but it would be nicer if it were 
explicitly available.  Among the arches MIPS has an explicit indication 
through its CONFIG_DMA_NEED_PCI_MAP_STATE but it's the only one.

> 
> 2) What configuration does this even help for?  Even bog standard x86
>    and x86_64 uses IOMMUs and thus make use of the unmap address.
> 
>    I cannot think of one platform that matters where this will even
>    trigger.

While x86_32 has configurations that don't use unmapping (see 
arch/x86/include/asm/pci.h) it is more helpful with less powerful CPUs, like 
PPC or MIPS one finds in embedded systems.  People use this device with 
embedded CPUs.

> 
> Get rid of this junk, please.  Because even if it's valid, it doesn't
> belong privately in your driver.
> 

I'd love not to have this in the driver but I don't know how to get the same 
result without it with the current state of affairs.

  reply	other threads:[~2010-02-27 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27  0:10 [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Dimitrios Michailidis
2010-02-27  0:16 ` Stephen Hemminger
2010-02-27  9:48 ` David Miller
2010-02-27 22:41   ` Dimitris Michailidis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-02-28 16:09 [PATCH 0/7] cxgb4: driver submission V4 Dimitris Michailidis
2010-02-28 16:09 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
2010-02-28 16:09   ` [PATCH 2/7] cxgb4: Add FW API definitions Dimitris Michailidis
2010-02-28 16:09     ` [PATCH 3/7] cxgb4: Add HW and FW support code Dimitris Michailidis
2010-02-28 16:09       ` [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Dimitris Michailidis
2010-02-27  1:42 Dimitrios Michailidis
2010-02-27  0:52 Dimitrios Michailidis
2010-02-27  1:31 ` Stephen Hemminger
2010-02-26 23:35 [PATCH 0/7] cxgb4: driver submission V3 Dimitris Michailidis
2010-02-26 23:35 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
2010-02-26 23:35   ` [PATCH 2/7] cxgb4: Add FW API definitions Dimitris Michailidis
2010-02-26 23:35     ` [PATCH 3/7] cxgb4: Add HW and FW support code Dimitris Michailidis
2010-02-26 23:35       ` [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Dimitris Michailidis
2010-02-26 23:57         ` Stephen Hemminger
2010-02-27  9:46           ` David Miller

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=4B899F85.1000101@chelsio.com \
    --to=dm@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.