From: Shalom Toledo <shalomt@mellanox.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
Ido Schimmel <idosch@mellanox.com>,
Jiri Pirko <jiri@mellanox.com>
Cc: Petr Machata <petrm@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: arm32 build failure after 992aa864dca068554802a65a467a2640985cc213
Date: Tue, 18 Jun 2019 12:05:56 +0000 [thread overview]
Message-ID: <60390608-aec3-503d-e4f2-2b4e93aeefaa@mellanox.com> (raw)
In-Reply-To: <20190618014604.GA17174@archlinux-epyc>
On 18/06/2019 4:46, Nathan Chancellor wrote:
> Hi all,
>
> A 32-bit ARM allyesconfig fails to link after commit 992aa864dca0
> ("mlxsw: spectrum_ptp: Add implementation for physical hardware clock
> operations") because of 64-bit division:
>
> arm-linux-gnueabi-ld:
> drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.o: in function
> `mlxsw_sp1_ptp_phc_settime':
> spectrum_ptp.c:(.text+0x39c): undefined reference to `__aeabi_uldivmod'
>
> The following diff fixes it but I have no idea if it is proper or not
> (hence reaching out before sending it, in case one of you has a more
> proper idea).
>
> Cheers,
> Nathan
>
> ---
>
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> index 2a9bbc90225e..65686f0b6834 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c
> @@ -87,7 +87,7 @@ mlxsw_sp1_ptp_phc_settime(struct mlxsw_sp_ptp_clock *clock, u64 nsec)
> u32 next_sec;
> int err;
>
> - next_sec = nsec / NSEC_PER_SEC + 1;
> + next_sec = (u32)div64_u64(nsec, NSEC_PER_SEC + 1);
> next_sec_in_nsec = next_sec * NSEC_PER_SEC;
>
> spin_lock(&clock->lock);
>
>
Thanks for the report. I will send a fix.
prev parent reply other threads:[~2019-06-18 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 1:46 Nathan Chancellor
2019-06-18 12:05 ` Shalom Toledo [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=60390608-aec3-503d-e4f2-2b4e93aeefaa@mellanox.com \
--to=shalomt@mellanox.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.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
all inboxes | Powered by JetHome®