UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer nikola.stojkov
Observer
5,295 Views
Registered: ‎03-01-2017

Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi everybody,

 

I am facing some strange behavior occasionally when booting Linux (Kernel: Linux-3.15.0) on Xilinx ZC706 development board,

lets say once in 10 times when rebooting device via power switch or with PS SRST button.

Console log and devicetree can be found in attachments.

 

.

.

.

[ 1.888114] mmc0: no vqmmc regulator found
[ 1.892126] mmc0: no vmmc regulator found
[ 1.927742] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
[ 1.952826] si570 1-005d: registered, current frequency 148500000 Hz
[ 1.960528] TCP: cubic registered
[ 1.965860] NET: Registered protocol family 17
[ 1.970457] Registering SWP/SWPB emulation handler -- stuck after this line sometimes
[ 1.976190] RAMDISK: gzip image found at block 0 -- this line doesn't show

 

 

Any help will be appreciate.

Best regads!

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
8,194 Views
Registered: ‎12-04-2016

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi Nikola

 

Can you try disabling function clk_disable_unused() in drivers/clk/clk.c?

 

 

Best Regards

Shabbir

 

View solution in original post

Tags (1)
0 Kudos
10 Replies
Moderator
Moderator
5,212 Views
Registered: ‎12-04-2016

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi

 

Can you try changing once the value of CONF_TMEOUT_MAX from (HZ*30) to (HZ*1). you can find this as a macro in:

<petalinux_install_dir>/components/linux-kernel/xlnx-3.15/net/ipv4/ipconfig.c

 

Best Regards

Shabbir

0 Kudos
Observer nikola.stojkov
Observer
5,020 Views
Registered: ‎03-01-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi,

 

Thank you for reply!

 

Still the same issue. I got the same stalling after 20 times of rebooting at:

"Registering SWP/SWPB emulation handler"

 

Best Regards,

Nikola

ipconfig.PNG
0 Kudos
Highlighted
Moderator
Moderator
5,012 Views
Registered: ‎12-04-2016

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi Nicola

 

Also can you please check the Interrupt configuration in the devicetree for the UART, something like below:

        uart@e0000000 {
            compatible = "xlnx,ps7-uart-1.00.a";
            reg = <0xe0000000 0x1000>;
            interrupts = <0x0 0x3B 0x4>;
            interrupt-parent = <0x1>;
            clock = <0x2faf080>;
        };

 

Check specifically if interrupts are configured with proper details.

 

 

Best Regards

Shabbir

0 Kudos
Observer nikola.stojkov
Observer
4,943 Views
Registered: ‎03-01-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi,

 

Thank you for reply!

 

In zynq-7000.dtsi file this is the UART configuration:

 

uart0: serial@e0000000 {
compatible = "xlnx,xuartps";
status = "disabled";
clocks = <&clkc 23>, <&clkc 40>;
clock-names = "uart_clk", "pclk";
reg = <0xE0000000 0x1000>;
interrupts = <0 27 4>;
};

 

uart1: serial@e0001000 {
compatible = "xlnx,xuartps";
status = "disabled";
clocks = <&clkc 24>, <&clkc 41>;
clock-names = "uart_clk", "pclk";
reg = <0xE0001000 0x1000>;
interrupts = <0 50 4>;
};

 

As you see interrupts are different...

 

I will change IRQ as you proposed and let you know the result.

 

Br,

Nikola

 

0 Kudos
Observer nikola.stojkov
Observer
4,936 Views
Registered: ‎03-01-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

HI,

 

Linux won't boot if i change IRQ for UART as you suggested.

 

 

According to Table 7-3 in TRM’s section 7.2.3, UART1′s interrupt number is 82. Since the first value is 0, it’s declared as a non-SPI, so the second value should be the hardware number minus 32, which is 50, or 0x32.

 

Do you think this is not ok?

 

Br,

Nikola

0 Kudos
Observer nikola.stojkov
Observer
4,732 Views
Registered: ‎03-01-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Anybody ?

 

Can someone shed light on this issue?

Tags (1)
0 Kudos
Moderator
Moderator
8,195 Views
Registered: ‎12-04-2016

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi Nikola

 

Can you try disabling function clk_disable_unused() in drivers/clk/clk.c?

 

 

Best Regards

Shabbir

 

View solution in original post

Tags (1)
0 Kudos
Observer nikola.stojkov
Observer
4,701 Views
Registered: ‎03-01-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi shabbirk,

 

Thank you for reply!

I did what you suggested and did 50 reboots on board without the problem!

 

Console log now looks like:

.

.
[ 2.006436] Registering SWP/SWPB emulation handler
[ 2.011853] clk: Not disabling unused clocks
[ 2.016567] RAMDISK: gzip image found at block 0

.

.

 

As I can see next line after " Registering SWP/SWPB emulation handler" is definitely clock disabling function.

Can you explain to me why sometimes boot is stuck on disabling unused clocks ?  

Can i leave this as you suggested ? It won't affect any part of system if i leave it as a "PATCH"?

Br,

 

Nikola

0 Kudos
Moderator
Moderator
4,698 Views
Registered: ‎12-04-2016

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

Hi Nicolas

 

Glad that your problem has been solved.

 

Reason being we are enabling all the clocks irrespective of whether we use or not. It should not impact any functionality. And I also dont know in detail about this.

 

 

Best REgards

Shabbir

0 Kudos
Explorer
Explorer
526 Views
Registered: ‎10-14-2017

Re: Occasionally Linux boot freeze at Registering SWP/SWPB emulation handler

Jump to solution

This is an old post, but I've run into similar problem. When starting the kernel it hangs on the lines 

"Registering SWP/SWPB emulation handler"

In my case it always hangs, not only occacionally.

I tried the accepted solution of disabling the disable_clk_unused() function by chaning the clk_ignore_unused  to false, but it still hangs.


 

0 Kudos