mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: agrover@redhat.com, linux-kernel@vger.kernel.org,
	target-devel <target-devel@vger.kernel.org>
Subject: Re: drivers/target/target_core_transport.c breakage on i386
Date: Mon, 08 Aug 2011 12:12:46 -0700	[thread overview]
Message-ID: <1312830766.12502.12.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20110808001055.GB2203@ZenIV.linux.org.uk>

On Mon, 2011-08-08 at 01:10 +0100, Al Viro wrote:
> In commit ec98f7825c6eaa4a9afb0eb518826efc8a2ed4a2
> Author: Andy Grover <agrover@redhat.com>
> Date:   Wed Jul 20 19:28:46 2011 +0000
> 
>     target: Eliminate usage of struct se_mem
> 
> we got
> +       task_count = DIV_ROUND_UP(sectors, dev_max_sectors);
> and that's sector_t/sector_t.  64bit division on i386 is no-no in
> the kernel - it emits __udivdi3 call and it's not there.  Can
> sectors really reach 2^32 here?
> 

Hi Al,

Just a heads up that this was caught this before -rc1, and we ended up
adding DIV_ROUND_UP_ULL using do_div() for the 32-bit case here, and
another DIV_ROUND_UP_SECTOR_T macro that target_core_transport.c is now
using to address this for i386.

kernel.h: Add DIV_ROUND_UP_ULL and DIV_ROUND_UP_SECTOR_T macro usage
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=36a26c69b4c70396ef569c3452690fba0c1dec08

Thanks,

--nab



      reply	other threads:[~2011-08-08 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08  0:10 Al Viro
2011-08-08 19:12 ` Nicholas A. Bellinger [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=1312830766.12502.12.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=agrover@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

Powered by JetHome