From: Ali Rouhi <arouhi@sitime.com>
To: "ivecera@redhat.com" <ivecera@redhat.com>
Cc: "jiri@resnulli.us" <jiri@resnulli.us>,
"vadim.fedorenko@linux.dev" <vadim.fedorenko@linux.dev>,
"arkadiusz.kubalewski@intel.com" <arkadiusz.kubalewski@intel.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"cjubran@nvidia.com" <cjubran@nvidia.com>,
"Oleg.Zadorozhnyi@devoxsoftware.com"
<Oleg.Zadorozhnyi@devoxsoftware.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v7 3/3] dpll: add SiTime SiT9531x DPLL clock driver
Date: Fri, 21 Aug 2026 01:06:18 +0000 [thread overview]
Message-ID: <20260821010618.97324-1-arouhi@sitime.com> (raw)
In-Reply-To: <1ab30a5b-6c55-4a3a-8e6d-d94c6a64aa87@redhat.com>
On 20/08/2026 19:57, Ivan Vecera wrote:
>> + u64 t_out_ps = div64_u64(1000000000000ULL, freq);
>> + u64 advance = (u64)(-(s64)phase_ps);
>> +
>> + if (t_out_ps == 0)
>> + return -EINVAL;
>> + advance %= t_out_ps;
>
> This causes build failure on 32bit systems... You could use something
> like this:
>
> div64_u64_rem(advance, t_out_ps, &advance);
Fixed exactly as you suggest - div64_u64_rem() in that one place, which
was the only 64-bit modulo in the driver. Jakub reported the same
failure from a 32-bit x86 build, so the commit carries his Reported-by.
A 32-bit build is now a standing gate on every patch of the series, not
only on the final tree.
>> +/*
>> + * I2C register model:
>> + * - Page select register at offset 0x01
>> + * - Each page has 128 registers (0x00-0x7F)
>> + * - Some pages are paired (e.g. 0x0A/0x1A for PLLA)
>> + */
>> +#define SIT9531X_PAGE_SEL 0xFF
>> +#define SIT9531X_PAGE_SIZE 0x100
>> +#define SIT9531X_NUM_PAGES 32
>
> The comment at the top of regs.h says the page select register is at
> offset 0x01 and each page has 128 registers (0x00-0x7F) but the code
> defines it differently (selector at 0xff and page size 256).
>
> One of them is wrong.
The comment was wrong; the defines are correct. The page select lives
at 0xFF and is visible from every page, and a page is a full 256
registers. The per-PLL manual input selection registers sit at
0xE8-0xEB, past the 0x7F the comment claims as the end of a page.
Corrected in our tree, with your Reported-by and a Closes: link to this
mail.
Thanks for the review,
Ali
prev parent reply other threads:[~2026-08-21 1:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 22:19 [PATCH net-next v7 0/3] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-08-15 22:19 ` [PATCH net-next v7 1/3] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-08-15 22:19 ` [PATCH net-next v7 2/3] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-08-16 22:19 ` sashiko-bot
2026-08-15 22:19 ` [PATCH net-next v7 3/3] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-08-16 22:19 ` sashiko-bot
2026-08-18 17:06 ` Jakub Kicinski
2026-08-19 21:16 ` Vadim Fedorenko
2026-08-20 17:27 ` Ivan Vecera
2026-08-21 1:06 ` Ali Rouhi
2026-08-21 1:05 ` Ali Rouhi
2026-08-25 9:00 ` Jiri Pirko
2026-08-25 21:55 ` Ali Rouhi
2026-08-27 17:12 ` Jiri Pirko
2026-08-20 17:57 ` Ivan Vecera
2026-08-21 1:06 ` Ali Rouhi [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=20260821010618.97324-1-arouhi@sitime.com \
--to=arouhi@sitime.com \
--cc=Oleg.Zadorozhnyi@devoxsoftware.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=cjubran@nvidia.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=robh@kernel.org \
--cc=vadim.fedorenko@linux.dev \
/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.