From: Logan Gunthorpe <logang@deltatee.com>
To: Song Liu <song@kernel.org>
Cc: open list <linux-kernel@vger.kernel.org>,
linux-raid <linux-raid@vger.kernel.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] md/raid5: Fix divide type in raid5_make_request()
Date: Thu, 23 Jun 2022 11:18:42 -0600 [thread overview]
Message-ID: <09153aee-f05e-22ae-dcf5-0fbfb3b9823c@deltatee.com> (raw)
In-Reply-To: <CAPhsuW50vG=M6JhBEe3qwef10GQt84cg9p_ji5tqyRnMA1-xRQ@mail.gmail.com>
On 2022-06-23 11:15, Song Liu wrote:
> On Thu, Jun 23, 2022 at 9:56 AM Logan Gunthorpe <logang@deltatee.com> wrote:
>>
>> 0day reports a build failure on the hexagon architecture:
>>
>> ld.lld: error: undefined symbol: __hexagon_udivdi3
>> referenced by raid5.c
>> md/raid5.o:(raid5_make_request) in archive drivers/built-in.a
>> referenced by raid5.c
>> md/raid5.o:(raid5_make_request) in archive drivers/built-in.a
>> did you mean: __hexagon_udivsi3
>> defined in: arch/hexagon/built-in.a(lib/udivsi3.o)
>>
>> This is caused by using DIV_ROUND_UP on a sector_t type.
>>
>> The actual value is known to be less than 256 so a wide 64bit divide
>> here is not desirable. Thus cast the argument to an int to ensure it
>> uses a 32bit divide.
>
> I force pushed an update that uses DIV_ROUND_UP_SECTOR_T instead.
> I guess that should also work?
Ah, yes, that'll also fix the bug. I chose to cast to minimize the
performance impact of an unnecessarily wide divide. But I don't have any
strong basis to suggest the performance will be worse with the wider
division. So fix it whichever way you think is best.
Logan
prev parent reply other threads:[~2022-06-23 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 16:55 [PATCH] md/raid5: Fix divide type in raid5_make_request() Logan Gunthorpe
2022-06-23 17:15 ` Song Liu
2022-06-23 17:18 ` Logan Gunthorpe [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=09153aee-f05e-22ae-dcf5-0fbfb3b9823c@deltatee.com \
--to=logang@deltatee.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=lkp@intel.com \
--cc=song@kernel.org \
/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