Netdev List
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: David Laight <David.Laight@aculab.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Sujith Sankar <ssujith@cisco.com>,
	Neel Patel <neepatel@cisco.com>,
	Govindarajulu Varadarajan <_govind@gmx.com>,
	"David S. Miller" <davem@davemloft.net>,
	Christian Benvenuti <benve@cisco.com>
Subject: Re: [PATCH] enic: fix adaptive irq coalescing on 32-bit
Date: Fri, 23 May 2014 11:29:15 +0200	[thread overview]
Message-ID: <14330971.FOHpOT3kal@wuerfel> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1724C45F@AcuExch.aculab.com>

On Friday 23 May 2014 08:29:52 David Laight wrote:
> From: Arnd Bergmann
> > 7c2ce6e60f703 "enic: Add support for adaptive interrupt coalescing"
> > introduced a 64-bit division that causes a link error on all 32-bit
> > machines:
> > 
> > drivers/built-in.o: In function `enic_poll_msix':
> > :(.text+0x54ff00): undefined reference to `__aeabi_uldivmod'
> > 
> > Since we are dividing another 32-bit value and are only interested
> > in the approximate range here, it should always be safe to limit
> > the delta to an u32 value.
> ...
> >  	traffic <<= 3;
> > -	traffic /= delta;
> > +	traffic /= min_t(u32, delta, UINT_MAX);
> 
> I suspect that doesn't have the desired effect.
> I think it is the same as:
> 	traffic /= (u32)delta;

Ah, you are right, sorry for that.

> If you was the correct value for large 'delta' then maybe:
> 	traffic = delta > UINT_MAX ? 0 : traffic / (u32)delta;

That looks better, yes.

	Arnd

      reply	other threads:[~2014-05-23  9:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23  7:51 [PATCH] enic: fix adaptive irq coalescing on 32-bit Arnd Bergmann
2014-05-23  8:29 ` David Laight
2014-05-23  9:29   ` Arnd Bergmann [this message]

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=14330971.FOHpOT3kal@wuerfel \
    --to=arnd@arndb.de \
    --cc=David.Laight@aculab.com \
    --cc=_govind@gmx.com \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=neepatel@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=ssujith@cisco.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