From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Liang Yang <liang.yang@amlogic.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Kevin Hilman <khilman@baylibre.com>,
linux-amlogic@lists.infradead.org,
Nathan Chancellor <natechancellor@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix linking error on 32-bit platforms
Date: Wed, 30 Jan 2019 10:32:20 +0100 [thread overview]
Message-ID: <20190130103220.27b13ab9@xps13> (raw)
In-Reply-To: <42d2e92e-9f5a-62b2-c0af-b7f3544d79d2@amlogic.com>
Hi Liang, Nathan,
Liang Yang <liang.yang@amlogic.com> wrote on Wed, 30 Jan 2019 17:26:39
+0800:
> Hi Nathan,
>
> On 2019/1/30 5:46, Nathan Chancellor wrote:
> > On arm little endian allyesconfig:
> >
> > ld.lld: error: undefined symbol: __aeabi_uldivmod
> > >>> referenced by meson_nand.c
> > >>> mtd/nand/raw/meson_nand.o:(meson_nfc_setup_data_interface) in archive drivers/built-in.a
> >
> > The dividend tBERS_max is u64, meaning we need to use DIV_ROUND_UP_ULL
> > (which wraps do_div) to prevent the compiler from emitting
> > __aebi_uldivmod.
> >
> > Fixes: 2d570b34b41a ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > drivers/mtd/nand/raw/meson_nand.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
> > index e858d58d97b0..6f12a96195d1 100644
> > --- a/drivers/mtd/nand/raw/meson_nand.c
> > +++ b/drivers/mtd/nand/raw/meson_nand.c
> > @@ -1116,8 +1116,8 @@ int meson_nfc_setup_data_interface(struct nand_chip *nand, int csline,
> > div * NFC_CLK_CYCLE);
> > meson_chip->tadl = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tADL_min),
> > div * NFC_CLK_CYCLE);
> > - tbers_clocks = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tBERS_max),
> > - div * NFC_CLK_CYCLE);
> > + tbers_clocks = DIV_ROUND_UP_ULL(PSEC_TO_NSEC(timings->tBERS_max),
> > + div * NFC_CLK_CYCLE);
>
> Looks good to me:
>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
This is nand/next material, so if you don't mind I would like to squash
this fix into the original commit inserting the driver.
Thanks,
Miquèl
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Liang Yang <liang.yang@amlogic.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Kevin Hilman <khilman@baylibre.com>,
linux-amlogic@lists.infradead.org,
Nathan Chancellor <natechancellor@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix linking error on 32-bit platforms
Date: Wed, 30 Jan 2019 10:32:20 +0100 [thread overview]
Message-ID: <20190130103220.27b13ab9@xps13> (raw)
In-Reply-To: <42d2e92e-9f5a-62b2-c0af-b7f3544d79d2@amlogic.com>
Hi Liang, Nathan,
Liang Yang <liang.yang@amlogic.com> wrote on Wed, 30 Jan 2019 17:26:39
+0800:
> Hi Nathan,
>
> On 2019/1/30 5:46, Nathan Chancellor wrote:
> > On arm little endian allyesconfig:
> >
> > ld.lld: error: undefined symbol: __aeabi_uldivmod
> > >>> referenced by meson_nand.c
> > >>> mtd/nand/raw/meson_nand.o:(meson_nfc_setup_data_interface) in archive drivers/built-in.a
> >
> > The dividend tBERS_max is u64, meaning we need to use DIV_ROUND_UP_ULL
> > (which wraps do_div) to prevent the compiler from emitting
> > __aebi_uldivmod.
> >
> > Fixes: 2d570b34b41a ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > drivers/mtd/nand/raw/meson_nand.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
> > index e858d58d97b0..6f12a96195d1 100644
> > --- a/drivers/mtd/nand/raw/meson_nand.c
> > +++ b/drivers/mtd/nand/raw/meson_nand.c
> > @@ -1116,8 +1116,8 @@ int meson_nfc_setup_data_interface(struct nand_chip *nand, int csline,
> > div * NFC_CLK_CYCLE);
> > meson_chip->tadl = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tADL_min),
> > div * NFC_CLK_CYCLE);
> > - tbers_clocks = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tBERS_max),
> > - div * NFC_CLK_CYCLE);
> > + tbers_clocks = DIV_ROUND_UP_ULL(PSEC_TO_NSEC(timings->tBERS_max),
> > + div * NFC_CLK_CYCLE);
>
> Looks good to me:
>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
This is nand/next material, so if you don't mind I would like to squash
this fix into the original commit inserting the driver.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Liang Yang <liang.yang@amlogic.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Kevin Hilman <khilman@baylibre.com>,
linux-amlogic@lists.infradead.org,
Nathan Chancellor <natechancellor@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: meson: Fix linking error on 32-bit platforms
Date: Wed, 30 Jan 2019 10:32:20 +0100 [thread overview]
Message-ID: <20190130103220.27b13ab9@xps13> (raw)
In-Reply-To: <42d2e92e-9f5a-62b2-c0af-b7f3544d79d2@amlogic.com>
Hi Liang, Nathan,
Liang Yang <liang.yang@amlogic.com> wrote on Wed, 30 Jan 2019 17:26:39
+0800:
> Hi Nathan,
>
> On 2019/1/30 5:46, Nathan Chancellor wrote:
> > On arm little endian allyesconfig:
> >
> > ld.lld: error: undefined symbol: __aeabi_uldivmod
> > >>> referenced by meson_nand.c
> > >>> mtd/nand/raw/meson_nand.o:(meson_nfc_setup_data_interface) in archive drivers/built-in.a
> >
> > The dividend tBERS_max is u64, meaning we need to use DIV_ROUND_UP_ULL
> > (which wraps do_div) to prevent the compiler from emitting
> > __aebi_uldivmod.
> >
> > Fixes: 2d570b34b41a ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > drivers/mtd/nand/raw/meson_nand.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
> > index e858d58d97b0..6f12a96195d1 100644
> > --- a/drivers/mtd/nand/raw/meson_nand.c
> > +++ b/drivers/mtd/nand/raw/meson_nand.c
> > @@ -1116,8 +1116,8 @@ int meson_nfc_setup_data_interface(struct nand_chip *nand, int csline,
> > div * NFC_CLK_CYCLE);
> > meson_chip->tadl = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tADL_min),
> > div * NFC_CLK_CYCLE);
> > - tbers_clocks = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tBERS_max),
> > - div * NFC_CLK_CYCLE);
> > + tbers_clocks = DIV_ROUND_UP_ULL(PSEC_TO_NSEC(timings->tBERS_max),
> > + div * NFC_CLK_CYCLE);
>
> Looks good to me:
>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
This is nand/next material, so if you don't mind I would like to squash
this fix into the original commit inserting the driver.
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Liang Yang <liang.yang@amlogic.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
Kevin Hilman <khilman@baylibre.com>,
<linux-mtd@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: meson: Fix linking error on 32-bit platforms
Date: Wed, 30 Jan 2019 10:32:20 +0100 [thread overview]
Message-ID: <20190130103220.27b13ab9@xps13> (raw)
In-Reply-To: <42d2e92e-9f5a-62b2-c0af-b7f3544d79d2@amlogic.com>
Hi Liang, Nathan,
Liang Yang <liang.yang@amlogic.com> wrote on Wed, 30 Jan 2019 17:26:39
+0800:
> Hi Nathan,
>
> On 2019/1/30 5:46, Nathan Chancellor wrote:
> > On arm little endian allyesconfig:
> >
> > ld.lld: error: undefined symbol: __aeabi_uldivmod
> > >>> referenced by meson_nand.c
> > >>> mtd/nand/raw/meson_nand.o:(meson_nfc_setup_data_interface) in archive drivers/built-in.a
> >
> > The dividend tBERS_max is u64, meaning we need to use DIV_ROUND_UP_ULL
> > (which wraps do_div) to prevent the compiler from emitting
> > __aebi_uldivmod.
> >
> > Fixes: 2d570b34b41a ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > drivers/mtd/nand/raw/meson_nand.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
> > index e858d58d97b0..6f12a96195d1 100644
> > --- a/drivers/mtd/nand/raw/meson_nand.c
> > +++ b/drivers/mtd/nand/raw/meson_nand.c
> > @@ -1116,8 +1116,8 @@ int meson_nfc_setup_data_interface(struct nand_chip *nand, int csline,
> > div * NFC_CLK_CYCLE);
> > meson_chip->tadl = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tADL_min),
> > div * NFC_CLK_CYCLE);
> > - tbers_clocks = DIV_ROUND_UP(PSEC_TO_NSEC(timings->tBERS_max),
> > - div * NFC_CLK_CYCLE);
> > + tbers_clocks = DIV_ROUND_UP_ULL(PSEC_TO_NSEC(timings->tBERS_max),
> > + div * NFC_CLK_CYCLE);
>
> Looks good to me:
>
> Acked-by: Liang Yang <liang.yang@amlogic.com>
This is nand/next material, so if you don't mind I would like to squash
this fix into the original commit inserting the driver.
Thanks,
Miquèl
next prev parent reply other threads:[~2019-01-30 9:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-29 21:46 [PATCH] mtd: rawnand: meson: Fix linking error on 32-bit platforms Nathan Chancellor
2019-01-29 21:46 ` Nathan Chancellor
2019-01-29 21:46 ` Nathan Chancellor
2019-01-29 21:46 ` Nathan Chancellor
2019-01-30 5:20 ` Liang Yang
2019-01-30 5:20 ` Liang Yang
2019-01-30 5:20 ` Liang Yang
2019-01-30 5:20 ` Liang Yang
2019-01-30 9:26 ` Liang Yang
2019-01-30 9:26 ` Liang Yang
2019-01-30 9:26 ` Liang Yang
2019-01-30 9:26 ` Liang Yang
2019-01-30 9:32 ` Miquel Raynal [this message]
2019-01-30 9:32 ` Miquel Raynal
2019-01-30 9:32 ` Miquel Raynal
2019-01-30 9:32 ` Miquel Raynal
2019-01-30 15:27 ` Nathan Chancellor
2019-01-30 15:27 ` Nathan Chancellor
2019-01-30 15:27 ` Nathan Chancellor
2019-01-30 15:27 ` Nathan Chancellor
2019-01-31 2:42 ` Liang Yang
2019-01-31 2:42 ` Liang Yang
2019-01-31 2:42 ` Liang Yang
2019-01-31 2:42 ` Liang Yang
2019-02-05 19:06 ` Miquel Raynal
2019-02-05 19:06 ` Miquel Raynal
2019-02-05 19:06 ` Miquel Raynal
2019-02-05 19:06 ` Miquel Raynal
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=20190130103220.27b13ab9@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=khilman@baylibre.com \
--cc=liang.yang@amlogic.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=natechancellor@gmail.com \
--cc=richard@nod.at \
/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.