linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zong Li <zongbox@gmail.com>
To: hch@infradead.org
Cc: palmer@sifive.com, aou@eecs.berkeley.edu, vincentc@andestech.com,
	zong@andestech.com, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines
Date: Tue, 25 Sep 2018 10:19:55 +0800	[thread overview]
Message-ID: <CA+ZOyaiJv-NZWk3ec_3zhRTSn7G-NGgyaiPTXOmuWfTWD7KSJw@mail.gmail.com> (raw)
In-Reply-To: <20180921070006.GC8401@infradead.org>

Christoph Hellwig <hch@infradead.org> 於 2018年9月21日 週五 下午3:00寫道:
>
> On Tue, Sep 18, 2018 at 05:19:15PM +0800, Zong Li wrote:
> > Add umoddi3 and udivmoddi4 support for 32-bit.
>
> This probably wants a better explanation of why you need them.
>
> > index 0000000..69f2d36
> > --- /dev/null
> > +++ b/lib/udivmoddi4.c
> > @@ -0,0 +1,291 @@
> > +// SPDX-License-Identifier: GPL-2.0
>
> Who wrote this code, where does it come from?

The RV32 need the umoddi3 to do modulo when the operands are long long
type, like other libraries implementation such as ucmpdi2, lshrdi3 and
so on. I encounter the undefined reference 'umoddi3' when I use the in
house dma driver, although it is in house driver, but I think that
umoddi3 is a common function for RV32. The udivmoddi4 and umoddi3 are
copies from libgcc in gcc. There are other functions use the
udivmoddi4 in libgcc, so I separate the umoddi3 and udivmoddi4 for
flexible extension in the future.

  reply	other threads:[~2018-09-25  2:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  9:19 [PATCH 0/5] Fix some bugs on RV32 build fail and issue Zong Li
2018-09-18  9:19 ` [PATCH 1/5] RISC-V: Build tishift only on 64-bit Zong Li
2018-09-21  6:58   ` Christoph Hellwig
2018-09-25  2:33     ` Zong Li
2018-09-18  9:19 ` [PATCH 2/5] RISC-V: Use swiotlb on RV64 only Zong Li
2018-09-21  6:59   ` Christoph Hellwig
2018-09-18  9:19 ` [PATCH 3/5] lib: Add umoddi3 and udivmoddi4 of GCC library routines Zong Li
2018-09-21  7:00   ` Christoph Hellwig
2018-09-25  2:19     ` Zong Li [this message]
2018-09-25  7:20       ` Andreas Schwab
2018-09-26  7:12         ` Zong Li
2018-09-25 15:25       ` Christoph Hellwig
2018-09-26  2:40         ` Zong Li
2018-09-18  9:19 ` [PATCH 4/5] RISC-V: Select GENERIC_LIB_UMODDI3 on RV32 Zong Li
2018-09-18  9:19 ` [PATCH 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap Zong Li
2018-09-21  7:00   ` Christoph Hellwig

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=CA+ZOyaiJv-NZWk3ec_3zhRTSn7G-NGgyaiPTXOmuWfTWD7KSJw@mail.gmail.com \
    --to=zongbox@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=vincentc@andestech.com \
    --cc=zong@andestech.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;
as well as URLs for NNTP newsgroup(s).