Linux clock framework development
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
       [not found] <20250603170058.5e1e1058@canb.auug.org.au>
@ 2025-06-03 17:01 ` Randy Dunlap
  2025-06-05  3:06   ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2025-06-03 17:01 UTC (permalink / raw)
  To: Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, Andrea della Porta, florian.fainelli,
	linux-clk



On 6/3/25 12:00 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Please do not add any material destined for v6.17 to you rlinux-next
> included branches until after v6.16-rc1 has been released.
> 
> Changes since 20250530:
> 

on i386:

ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'

caused by
	/* must sleep 10 pll vco cycles */
	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);


-- 
~Randy


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
  2025-06-03 17:01 ` linux-next: Tree for Jun 3 (clk/clk-rp1.c) Randy Dunlap
@ 2025-06-05  3:06   ` Florian Fainelli
  2025-06-05  9:13     ` Andrea della Porta
  2025-06-05 13:52     ` Andrea della Porta
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2025-06-05  3:06 UTC (permalink / raw)
  To: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, Andrea della Porta, linux-clk



On 6/3/2025 10:01 AM, Randy Dunlap wrote:
> 
> 
> On 6/3/25 12:00 AM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Please do not add any material destined for v6.17 to you rlinux-next
>> included branches until after v6.16-rc1 has been released.
>>
>> Changes since 20250530:
>>
> 
> on i386:
> 
> ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
> clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'
> 
> caused by
> 	/* must sleep 10 pll vco cycles */
> 	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
> 
> 

Andrea, do you mind fixing this build error for a 32-bit kernel? Thanks!
-- 
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
  2025-06-05  3:06   ` Florian Fainelli
@ 2025-06-05  9:13     ` Andrea della Porta
  2025-06-05 13:52     ` Andrea della Porta
  1 sibling, 0 replies; 6+ messages in thread
From: Andrea della Porta @ 2025-06-05  9:13 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Andrea della Porta, linux-clk

Hi Florian,

On 20:06 Wed 04 Jun     , Florian Fainelli wrote:
> 
> 
> On 6/3/2025 10:01 AM, Randy Dunlap wrote:
> > 
> > 
> > On 6/3/25 12:00 AM, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Please do not add any material destined for v6.17 to you rlinux-next
> > > included branches until after v6.16-rc1 has been released.
> > > 
> > > Changes since 20250530:
> > > 
> > 
> > on i386:
> > 
> > ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
> > clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'
> > 
> > caused by
> > 	/* must sleep 10 pll vco cycles */
> > 	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
> > 
> > 
> 
> Andrea, do you mind fixing this build error for a 32-bit kernel? Thanks!

Sure, I'm on it...

Regards,
Andrea

> -- 
> Florian
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
  2025-06-05  3:06   ` Florian Fainelli
  2025-06-05  9:13     ` Andrea della Porta
@ 2025-06-05 13:52     ` Andrea della Porta
  2025-06-05 17:07       ` Randy Dunlap
  1 sibling, 1 reply; 6+ messages in thread
From: Andrea della Porta @ 2025-06-05 13:52 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Randy Dunlap, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Andrea della Porta, linux-clk

On 20:06 Wed 04 Jun     , Florian Fainelli wrote:
> 
> 
> On 6/3/2025 10:01 AM, Randy Dunlap wrote:
> > 
> > 
> > On 6/3/25 12:00 AM, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Please do not add any material destined for v6.17 to you rlinux-next
> > > included branches until after v6.16-rc1 has been released.
> > > 
> > > Changes since 20250530:
> > > 
> > 
> > on i386:
> > 
> > ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
> > clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'
> > 
> > caused by
> > 	/* must sleep 10 pll vco cycles */
> > 	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
> > 
> > 
> 
> Andrea, do you mind fixing this build error for a 32-bit kernel? Thanks!

Sorry for the delay, this should fix it:

@@ -754,7 +769,7 @@ static int rp1_pll_divider_set_rate(struct clk_hw *hw,
        clockman_write(clockman, data->ctrl_reg, sec);
 
        /* must sleep 10 pll vco cycles */
-       ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
+       ndelay(div64_ul(10ULL * div * NSEC_PER_SEC, parent_rate));
 
        sec &= ~PLL_SEC_RST;
        clockman_write(clockman, data->ctrl_reg, sec);

should I send a new patch with this fix only (against linux-next or stblinux/next?)
or Florian is it better if you make the change in your next branch directly?

Many thanks,
Andrea

> -- 
> Florian
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
  2025-06-05 13:52     ` Andrea della Porta
@ 2025-06-05 17:07       ` Randy Dunlap
  2025-06-05 17:56         ` Florian Fainelli
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2025-06-05 17:07 UTC (permalink / raw)
  To: Andrea della Porta, Florian Fainelli
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, linux-clk



On 6/5/25 6:52 AM, Andrea della Porta wrote:
> On 20:06 Wed 04 Jun     , Florian Fainelli wrote:
>>
>>
>> On 6/3/2025 10:01 AM, Randy Dunlap wrote:
>>>
>>>
>>> On 6/3/25 12:00 AM, Stephen Rothwell wrote:
>>>> Hi all,
>>>>
>>>> Please do not add any material destined for v6.17 to you rlinux-next
>>>> included branches until after v6.16-rc1 has been released.
>>>>
>>>> Changes since 20250530:
>>>>
>>>
>>> on i386:
>>>
>>> ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
>>> clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'
>>>
>>> caused by
>>> 	/* must sleep 10 pll vco cycles */
>>> 	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
>>>
>>>
>>
>> Andrea, do you mind fixing this build error for a 32-bit kernel? Thanks!
> 
> Sorry for the delay, this should fix it:
> 
> @@ -754,7 +769,7 @@ static int rp1_pll_divider_set_rate(struct clk_hw *hw,
>         clockman_write(clockman, data->ctrl_reg, sec);
>  
>         /* must sleep 10 pll vco cycles */
> -       ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
> +       ndelay(div64_ul(10ULL * div * NSEC_PER_SEC, parent_rate));
>  
>         sec &= ~PLL_SEC_RST;
>         clockman_write(clockman, data->ctrl_reg, sec);
> 
> should I send a new patch with this fix only (against linux-next or stblinux/next?)
> or Florian is it better if you make the change in your next branch directly?

Yes, this fixes the 32-bit build error. Thanks.

Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

-- 
~Randy

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: Tree for Jun 3 (clk/clk-rp1.c)
  2025-06-05 17:07       ` Randy Dunlap
@ 2025-06-05 17:56         ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2025-06-05 17:56 UTC (permalink / raw)
  To: Randy Dunlap, Andrea della Porta
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, linux-clk

On 6/5/25 10:07, Randy Dunlap wrote:
> 
> 
> On 6/5/25 6:52 AM, Andrea della Porta wrote:
>> On 20:06 Wed 04 Jun     , Florian Fainelli wrote:
>>>
>>>
>>> On 6/3/2025 10:01 AM, Randy Dunlap wrote:
>>>>
>>>>
>>>> On 6/3/25 12:00 AM, Stephen Rothwell wrote:
>>>>> Hi all,
>>>>>
>>>>> Please do not add any material destined for v6.17 to you rlinux-next
>>>>> included branches until after v6.16-rc1 has been released.
>>>>>
>>>>> Changes since 20250530:
>>>>>
>>>>
>>>> on i386:
>>>>
>>>> ld: drivers/clk/clk-rp1.o: in function `rp1_pll_divider_set_rate':
>>>> clk-rp1.c:(.text+0xba1): undefined reference to `__udivdi3'
>>>>
>>>> caused by
>>>> 	/* must sleep 10 pll vco cycles */
>>>> 	ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
>>>>
>>>>
>>>
>>> Andrea, do you mind fixing this build error for a 32-bit kernel? Thanks!
>>
>> Sorry for the delay, this should fix it:
>>
>> @@ -754,7 +769,7 @@ static int rp1_pll_divider_set_rate(struct clk_hw *hw,
>>          clockman_write(clockman, data->ctrl_reg, sec);
>>   
>>          /* must sleep 10 pll vco cycles */
>> -       ndelay(10ULL * div * NSEC_PER_SEC / parent_rate);
>> +       ndelay(div64_ul(10ULL * div * NSEC_PER_SEC, parent_rate));
>>   
>>          sec &= ~PLL_SEC_RST;
>>          clockman_write(clockman, data->ctrl_reg, sec);
>>
>> should I send a new patch with this fix only (against linux-next or stblinux/next?)
>> or Florian is it better if you make the change in your next branch directly?
> 
> Yes, this fixes the 32-bit build error. Thanks.
> 
> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
> 

Thank you both, amended the original commit with the change and added 
Randy's tag.
-- 
Florian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-05 17:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250603170058.5e1e1058@canb.auug.org.au>
2025-06-03 17:01 ` linux-next: Tree for Jun 3 (clk/clk-rp1.c) Randy Dunlap
2025-06-05  3:06   ` Florian Fainelli
2025-06-05  9:13     ` Andrea della Porta
2025-06-05 13:52     ` Andrea della Porta
2025-06-05 17:07       ` Randy Dunlap
2025-06-05 17:56         ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox