Re: [linux-sunxi] [PATCH v3 30/30] ARM: sun8i: a83t: full range OPP tables and CPUfreq

2018-08-30 Thread Philipp Rossak

On 30.08.2018 18:38, Ondřej Jirman wrote:

Hello,

On Thu, Aug 30, 2018 at 05:45:18PM +0200, Philipp Rossak wrote:

Since we have now thermal trotteling enabeled we can now add the full
range of the OPP table.


I'm not sure we can. I have a tablet with A83T SoC and it gets unstable
at these frequencies even with thermal throttling on mainline kernel. (Though
I have my own THS driver, but I doubt a different driver will change much.)

There might be some other issue left in the cpufreq code. I'll let others
test this on a better cooled boards though.

Did you/someone test this?

regards,
   o.
I have a good cooled device, with big heatsinks and a fan blowing 
directly on it. But there is some big issue left!


cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
[   85.076270] Unable to handle kernel paging request at virtual address 
2e83c684

[   85.083519] pgd = (ptrval)
[   85.086220] [2e83c684] *pgd=
[   85.089813] Internal error: Oops: 5 [#3] SMP ARM
[   85.094429] Modules linked in:
[   85.097483] CPU: 4 PID: 127 Comm: sh Tainted: G  D W 
4.18.0-00031-g8f59917020b9-dirty #2

[   85.106597] Hardware name: Allwinner A83t board
[   85.30] PC is at down_write+0x14/0x54
[   85.115135] LR is at anon_vma_clone+0x9c/0x1e4
[   85.119571] pc : []lr : []psr: 6013
[   85.125826] sp : ede45e70  ip : 01a0  fp : eea3c690
[   85.131041] r10: eea4193c  r9 : 00400200  r8 : c0a942a4
[   85.136255] r7 : 2e83c680  r6 : eea3aea0  r5 : eea3b220  r4 : 2e83c684
[   85.142771] r3 : 0001  r2 : 2e83c680  r1 : ede45e58  r0 : 2e83c684
[   85.149287] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM 
Segment none

[   85.156410] Control: 10c5387d  Table: 6df1806a  DAC: 0051
[   85.162145] Process sh (pid: 127, stack limit = 0x(ptrval))
[   85.167706] Stack: (0xede45e70 to 0xede46000)
[   85.172057] 5e60: eea3b900 
c01e71b8 eea41900 ffebd684
[   85.180221] 5e80: c0a637b0 c07ea07c c0a10754 eea3aea0 eea41900 
c0a04c48 edd71880 
[   85.188385] 5ea0: eea3aea0 eea41900 c0a69030 c01e7324 0002 
edd701c0 c0a04c48 edd71880
[   85.196548] 5ec0:  c011c2f4 0069  0002 
  
[   85.204711] 5ee0:  edd701c0 edd82280 eea3af00 edd701f8 
edd718b8 eea3af08 eea3af14
[   85.212875] 5f00: eea3af10 ede44000 edd8255c 01200011  
ede45f14 ede45f14 b61ea11a
[   85.221039] 5f20: edd805c0 01200011 c0a04c48 beef38b0  
  0078
[   85.229202] 5f40: beef38dc c011ce0c    
ede44000 00ae c012d9e0
[   85.237365] 5f60: eea43480  0400 b61ea11a  
b6fb5068 b6f8b670 beef38b0
[   85.245529] 5f80: 0078 c0101204 ede44000 0078 beef38dc 
c011d1bc b6fb5068 
[   85.253692] 5fa0: 00ae c0101000 b6fb5068 b6f8b670 01200011 
  
[   85.261856] 5fc0: b6fb5068 b6f8b670 beef38b0 0078 b6f8ac4c 
b6fb5490  beef38dc
[   85.270020] 5fe0: 0002 beef38b0  b6f5bfd0 6010 
01200011  
[   85.278191] [] (down_write) from [] 
(anon_vma_clone+0x9c/0x1e4)
[   85.285836] [] (anon_vma_clone) from [] 
(anon_vma_fork+0x24/0x160)
[   85.293741] [] (anon_vma_fork) from [] 
(copy_process.part.3+0xbc4/0x158c)
[   85.302253] [] (copy_process.part.3) from [] 
(_do_fork+0xb0/0x394)
[   85.310157] [] (_do_fork) from [] 
(sys_clone+0x20/0x28)
[   85.317107] [] (sys_clone) from [] 
(ret_fast_syscall+0x0/0x54)

[   85.324661] Exception stack(0xede45fa8 to 0xede45ff0)
[   85.329704] 5fa0:   b6fb5068 b6f8b670 01200011 
  
[   85.337868] 5fc0: b6fb5068 b6f8b670 beef38b0 0078 b6f8ac4c 
b6fb5490  beef38dc

[   85.346021] 5fe0: 0002 beef38b0  b6f5bfd0
[   85.351068] Code: e1a04000 f590f000 e3a03001 e34f3fff (e1902f9f)
[   85.357200] ---[ end trace aad10e0b4fcbf194 ]---


OR

cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
[   73.873939] [ cut here ]
[   73.878584] WARNING: CPU: 5 PID: 132 at mm/rmap.c:235 
unlink_anon_vmas+0x1f4/0x1fc

[   73.886210] Modules linked in:
[   73.889276] CPU: 5 PID: 132 Comm: sh Tainted: G  D 
4.18.0-00031-g8f59917020b9-dirty #2

[   73.898391] Hardware name: Allwinner A83t board
[   73.902934] [] (unwind_backtrace) from [] 
(show_stack+0x10/0x14)
[   73.910671] [] (show_stack) from [] 
(dump_stack+0x84/0x98)
[   73.917887] [] (dump_stack) from [] 
(__warn+0xfc/0x114)
[   73.924840] [] (__warn) from [] 
(warn_slowpath_null+0x40/0x48)
[   73.932398] [] (warn_slowpath_null) from [] 
(unlink_anon_vmas+0x1f4/0x1fc)
[   73.941006] [] (unlink_anon_vmas) from [] 
(free_pgtables+0x78/0xcc)
[   73.948999] [] (free_pgtables) from [] 
(exit_mmap+0xe4/0x188)

[   73.956471] [] (exit_mmap) from [] (mmput+0x40/0xf0)
[   73.963169] [] (mmput) from [] 
(flush_old_exec+0x550/0x6e0)
[   73.970473] [] (flush_old_exec) from [] 
(load_elf_binary+0x2f0/0x1324)
[   73.978726] [] (load_elf_binary) from 

Re: [linux-sunxi] [PATCH v3 30/30] ARM: sun8i: a83t: full range OPP tables and CPUfreq

2018-08-30 Thread 'Ondřej Jirman' via linux-sunxi
Hello,

On Thu, Aug 30, 2018 at 05:45:18PM +0200, Philipp Rossak wrote:
> Since we have now thermal trotteling enabeled we can now add the full
> range of the OPP table.

I'm not sure we can. I have a tablet with A83T SoC and it gets unstable
at these frequencies even with thermal throttling on mainline kernel. (Though
I have my own THS driver, but I doubt a different driver will change much.)

There might be some other issue left in the cpufreq code. I'll let others
test this on a better cooled boards though.

Did you/someone test this?

regards,
  o.

> The operating points were found in Allwinner BSP and fex files.
> 
> Signed-off-by: Philipp Rossak 
> ---
>  arch/arm/boot/dts/sun8i-a83t.dtsi | 32 
>  1 file changed, 32 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi 
> b/arch/arm/boot/dts/sun8i-a83t.dtsi
> index 78aa448e869f..ddcf404f9c80 100644
> --- a/arch/arm/boot/dts/sun8i-a83t.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
> @@ -250,6 +250,22 @@
>   opp-microvolt = <84>;
>   clock-latency-ns = <244144>; /* 8 32k periods */
>   };
> +
> + opp-160800 {
> + opp-hz = /bits/ 64 <160800>;
> + opp-microvolt = <92>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
> + opp-18 { /* BOOT FREQ */
> + opp-hz = /bits/ 64 <18>;
> + opp-microvolt = <100>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
> + opp-201600 {
> + opp-hz = /bits/ 64 <201600>;
> + opp-microvolt = <108>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
>   };
>  
>   cpu1_opp_table: opp_table1 {
> @@ -303,6 +319,22 @@
>   opp-microvolt = <84>;
>   clock-latency-ns = <244144>; /* 8 32k periods */
>   };
> +
> + opp-160800 {
> + opp-hz = /bits/ 64 <160800>;
> + opp-microvolt = <92>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
> + opp-18 { /* BOOT FREQ */
> + opp-hz = /bits/ 64 <18>;
> + opp-microvolt = <100>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
> + opp-201600 {
> + opp-hz = /bits/ 64 <201600>;
> + opp-microvolt = <108>;
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + };
>   };
>  
>   soc {
> -- 
> 2.11.0
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to linux-sunxi+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH v3 30/30] ARM: sun8i: a83t: full range OPP tables and CPUfreq

2018-08-30 Thread Philipp Rossak
Since we have now thermal trotteling enabeled we can now add the full
range of the OPP table.

The operating points were found in Allwinner BSP and fex files.

Signed-off-by: Philipp Rossak 
---
 arch/arm/boot/dts/sun8i-a83t.dtsi | 32 
 1 file changed, 32 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi 
b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 78aa448e869f..ddcf404f9c80 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -250,6 +250,22 @@
opp-microvolt = <84>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
+
+   opp-160800 {
+   opp-hz = /bits/ 64 <160800>;
+   opp-microvolt = <92>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
+   opp-18 { /* BOOT FREQ */
+   opp-hz = /bits/ 64 <18>;
+   opp-microvolt = <100>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
+   opp-201600 {
+   opp-hz = /bits/ 64 <201600>;
+   opp-microvolt = <108>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
};
 
cpu1_opp_table: opp_table1 {
@@ -303,6 +319,22 @@
opp-microvolt = <84>;
clock-latency-ns = <244144>; /* 8 32k periods */
};
+
+   opp-160800 {
+   opp-hz = /bits/ 64 <160800>;
+   opp-microvolt = <92>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
+   opp-18 { /* BOOT FREQ */
+   opp-hz = /bits/ 64 <18>;
+   opp-microvolt = <100>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
+   opp-201600 {
+   opp-hz = /bits/ 64 <201600>;
+   opp-microvolt = <108>;
+   clock-latency-ns = <244144>; /* 8 32k periods */
+   };
};
 
soc {
-- 
2.11.0

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.