Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-10 Thread Jean-Francois Dagenais
Hi, so I did a bit of testing...

> On Apr 5, 2019, at 11:42, Jean-Francois Dagenais  
> wrote:
> 
>> It is trying to reset the PP, and fails. Can you check if the power islands 
>> are turned on. 
>> 
>> Can you tell me the output of the following:
>> Devmem 0xFD4B006C
>> Devmem 0xFD4B4004

# devmem2 0xFD4B006C
/dev/mem opened.
Memory mapped at address 0x7f9f5c6000.
Read at address  0xFD4B006C (0x7f9f5c606c): 0x0B070101
# devmem2 0xFD4B4004
/dev/mem opened.
Memory mapped at address 0x7fb7cc2000.
Bus error


I am looking at how to introspect the power island status... Is this a good 
place to start? 
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842232/Zynq+UltraScale+MPSoC+Power+Management+-+Linux+Kernel


-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-05 Thread Jean-Francois Dagenais



> On Apr 4, 2019, at 16:19, Madhurkiran Harikrishnan  
> wrote:
> 
> Hi JFD,
> 
> It is trying to reset the PP, and fails. Can you check if the power islands 
> are turned on. 
> 
> Can you tell me the output of the following:
> Devmem 0xFD4B006C
> Devmem 0xFD4B4004

Thanks for the support guys. I had to revert back to 4.14 for the time being.

I will get back on this in a bit and test this. Bear with me.

Talk in a couple of days...
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-05 Thread Manjukumar Harthikote Matha
Hi JFD,

> -Original Message-
> From: Jean-Francois Dagenais [mailto:jeff.dagen...@gmail.com]
> Sent: Monday, April 1, 2019 1:45 PM
> To: Manjukumar Harthikote Matha 
> Cc: meta-xilinx@yoctoproject.org; Madhurkiran Harikrishnan
> 
> Subject: Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix
> errors associated with kernel upgrade to 4.19
> 
> 
> 
> > On Apr 1, 2019, at 16:36, Jean-Francois Dagenais
>  wrote:
> >
> >> We don't see the issue with above tree and the RFC patches.
> >>
> >
> > Any idea where to start? Could it be related to our handoff file?
> >
> 
> Or something missing in my defconfig? Is ./configs/xilinx_zynqmp_defconfig
> kept up to date in the kernel tree?

This is up to date 

> 
> For example, comparing zynqmp_defconfig changes from 4.14 to master, I
> see I am missing ZYNQMP_RESET_CONTROLLER.
> 
> I will check for more discrepancies, but any pointers from this community will
> help a lot.


Were you able to solve this? I am not seeing this issue in our builds.

> 
> Thanks again.
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-01 Thread Manjukumar Harthikote Matha
Hi JFD,

> -Original Message-
> From: Jean-Francois Dagenais [mailto:jeff.dagen...@gmail.com]
> Sent: Monday, April 01, 2019 12:52 PM
> To: Manjukumar Harthikote Matha 
> Cc: meta-xilinx@yoctoproject.org; Madhurkiran Harikrishnan
> 
> Subject: Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix 
> errors
> associated with kernel upgrade to 4.19
> 
> Hi Manju, guys,
> 
> I need to move up to 4.19 early for the kernel. I just tried this patchset 
> (only after
> having made my own... I had forgotten about yours here).
> 
> I am aligned with 2018.3, using meta-xilinx-tools, but am not using 
> meta-petalinux.
> We have our own kernel recipe which
> inherit kernel
> require recipes-kernel/linux/linux-yocto.inc
> 

Can you try with linux-xlnx master? https://github.com/Xilinx/linux-xlnx

> So using either my patches on kernel-module-mali, or yours, I get this:

We don't see the issue with above tree and the RFC patches. 

Thanks,
Manju

> 
> [  641.029489] SError Interrupt on CPU2, code 0xbf02 -- SError
> [  641.029492] CPU: 2 PID: 5232 Comm: insmod Tainted: GW  O  
> 4.19.0-jfd #1
> [  641.029493] Hardware name: dublin (DT)
> [  641.029495] pstate: 8005 (Nzcv daif -PAN -UAO)
> [  641.029497] pc : _mali_osk_mem_iowrite32+0x10/0x20 [mali]
> [  641.029498] lr : mali_pp_reset_async+0x50/0x1b0 [mali]
> [  641.029500] sp : ff8011ad38c0
> [  641.029501] x29: ff8011ad38d0 x28: ff80123bd000
> [  641.029504] x27: 0100 x26: ff80009052d0
> [  641.029508] x25: ff8000905280 x24: 
> [  641.029511] x23: 0001 x22: ffc036d0d600
> [  641.029514] x21: ff8011ad3968 x20: ff8000904000
> [  641.029518] x19: ffc035266b80 x18: fff0
> [  641.029521] x17:  x16: 
> [  641.029524] x15: ff8008a78ad8 x14: ff8008ad8d10
> [  641.029527] x13:  x12: 
> [  641.029531] x11: 0001 x10: ff800886ae50
> [  641.029534] x9 : ff8008a6e000 x8 : 
> [  641.029537] x7 : 0041 x6 : 
> [  641.029540] x5 : 0001 x4 : ff804936
> [  641.029544] x3 : 00e80f07 x2 : 1fff
> [  641.029547] x1 : 1020 x0 : ff800936
> [  641.029551] Kernel panic - not syncing: Asynchronous SError Interrupt
> [  641.029553] CPU: 2 PID: 5232 Comm: insmod Tainted: GW  O  
> 4.19.0-jfd #1
> [  641.029555] Hardware name: dublin (DT)
> [  641.029556] Call trace:
> [  641.029557]  dump_backtrace+0x0/0x180
> [  641.029558]  show_stack+0x14/0x20
> [  641.029560]  dump_stack+0x9c/0xbc
> [  641.029561]  panic+0x130/0x278
> [  641.029562]  nmi_panic+0x6c/0x70
> [  641.029563]  arm64_serror_panic+0x74/0x80
> [  641.029565]  is_valid_bugaddr+0x0/0x8
> [  641.029566]  el1_error+0x7c/0xdc
> [  641.029568]  _mali_osk_mem_iowrite32+0x10/0x20 [mali]
> [  641.029569]  mali_pp_create+0x7c/0x350 [mali]
> [  641.029571]  mali_initialize_subsystems+0x12c/0x5f8 [mali]
> [  641.029572]  mali_probe+0xf0/0x358 [mali]
> [  641.029574]  platform_drv_probe+0x50/0xa0
> [  641.029575]  really_probe+0x1e0/0x298
> [  641.029577]  driver_probe_device+0x54/0xe8
> [  641.029578]  __driver_attach+0xe4/0xe8
> [  641.029579]  bus_for_each_dev+0x70/0xc0
> [  641.029581]  driver_attach+0x20/0x28
> [  641.029582]  bus_add_driver+0x1dc/0x208
> [  641.029583]  driver_register+0x60/0x110
> [  641.029585]  __platform_driver_register+0x44/0x50
> [  641.029586]  init_module+0x30/0x140 [mali]
> [  641.029588]  do_one_initcall+0x74/0x178
> [  641.029589]  do_init_module+0x54/0x1c0
> [  641.029591]  load_module+0x1ae4/0x2108
> [  641.029592]  __se_sys_finit_module+0xb8/0xc8
> [  641.029594]  __arm64_sys_finit_module+0x18/0x20
> [  641.029595]  el0_svc_common+0x84/0xd8
> [  641.029596]  el0_svc_handler+0x6c/0x88
> [  641.029598]  el0_svc+0x8/0xc
> [  641.029625] SMP: stopping secondary CPUs
> [  641.029626] Kernel Offset: disabled
> [  641.029628] CPU features: 0x0,20802004
> [  641.029629] Memory Limit: none
> [  641.295015] ---[ end Kernel panic - not syncing: Asynchronous SError 
> Interrupt ]---
> 
> 
> Any clues?
> 
> 
> > On Mar 13, 2019, at 14:23, Manjukumar Matha  ma...@xilinx.com> wrote:
> >
> > From: Madhurkiran Harikrishnan 
> >
> > These patches fixes errors caused by removal of ancient init_timer API.
> > Also, addresses the removal of hot/cold cache pages in the kernel.
> >
> > Signed-off-by: Madhurkiran Harikrishnan 
> > 
> > Signed-off-by: Manjukumar Matha 
> > ---
> > .../recipes-graphics/mali/kernel-module-mali.bb|   3 +
> > ...ux-mali_

Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-01 Thread Jean-Francois Dagenais



> On Apr 1, 2019, at 16:36, Jean-Francois Dagenais  
> wrote:
> 
>> We don't see the issue with above tree and the RFC patches. 
>> 
> 
> Any idea where to start? Could it be related to our handoff file?
> 

Or something missing in my defconfig? Is ./configs/xilinx_zynqmp_defconfig kept 
up to date in the kernel tree?

For example, comparing zynqmp_defconfig changes from 4.14 to master, I see I am 
missing ZYNQMP_RESET_CONTROLLER.

I will check for more discrepancies, but any pointers from this community will 
help a lot.

Thanks again.
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-01 Thread Jean-Francois Dagenais


> On Apr 1, 2019, at 16:21, Manjukumar Harthikote Matha  
> wrote:
> 
> 
> Can you try with linux-xlnx master? https://github.com/Xilinx/linux-xlnx 
> 

I am only missing the last two commits: "revert spi..." and "zynqmp-reset defer 
probe..." Shouldn't matter right?

> 
>> So using either my patches on kernel-module-mali, or yours, I get this:
> 
> We don't see the issue with above tree and the RFC patches. 
> 

Any idea where to start? Could it be related to our handoff file?

Thanks.

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-04-01 Thread Jean-Francois Dagenais
Hi Manju, guys,

I need to move up to 4.19 early for the kernel. I just tried this patchset 
(only after having made my own... I had forgotten about yours here).

I am aligned with 2018.3, using meta-xilinx-tools, but am not using 
meta-petalinux. We have our own kernel recipe which
inherit kernel
require recipes-kernel/linux/linux-yocto.inc

So using either my patches on kernel-module-mali, or yours, I get this:

[  641.029489] SError Interrupt on CPU2, code 0xbf02 -- SError
[  641.029492] CPU: 2 PID: 5232 Comm: insmod Tainted: GW  O  
4.19.0-jfd #1
[  641.029493] Hardware name: dublin (DT)
[  641.029495] pstate: 8005 (Nzcv daif -PAN -UAO)
[  641.029497] pc : _mali_osk_mem_iowrite32+0x10/0x20 [mali]
[  641.029498] lr : mali_pp_reset_async+0x50/0x1b0 [mali]
[  641.029500] sp : ff8011ad38c0
[  641.029501] x29: ff8011ad38d0 x28: ff80123bd000 
[  641.029504] x27: 0100 x26: ff80009052d0 
[  641.029508] x25: ff8000905280 x24:  
[  641.029511] x23: 0001 x22: ffc036d0d600 
[  641.029514] x21: ff8011ad3968 x20: ff8000904000 
[  641.029518] x19: ffc035266b80 x18: fff0 
[  641.029521] x17:  x16:  
[  641.029524] x15: ff8008a78ad8 x14: ff8008ad8d10 
[  641.029527] x13:  x12:  
[  641.029531] x11: 0001 x10: ff800886ae50 
[  641.029534] x9 : ff8008a6e000 x8 :  
[  641.029537] x7 : 0041 x6 :  
[  641.029540] x5 : 0001 x4 : ff804936 
[  641.029544] x3 : 00e80f07 x2 : 1fff 
[  641.029547] x1 : 1020 x0 : ff800936 
[  641.029551] Kernel panic - not syncing: Asynchronous SError Interrupt
[  641.029553] CPU: 2 PID: 5232 Comm: insmod Tainted: GW  O  
4.19.0-jfd #1
[  641.029555] Hardware name: dublin (DT)
[  641.029556] Call trace:
[  641.029557]  dump_backtrace+0x0/0x180
[  641.029558]  show_stack+0x14/0x20
[  641.029560]  dump_stack+0x9c/0xbc
[  641.029561]  panic+0x130/0x278
[  641.029562]  nmi_panic+0x6c/0x70
[  641.029563]  arm64_serror_panic+0x74/0x80
[  641.029565]  is_valid_bugaddr+0x0/0x8
[  641.029566]  el1_error+0x7c/0xdc
[  641.029568]  _mali_osk_mem_iowrite32+0x10/0x20 [mali]
[  641.029569]  mali_pp_create+0x7c/0x350 [mali]
[  641.029571]  mali_initialize_subsystems+0x12c/0x5f8 [mali]
[  641.029572]  mali_probe+0xf0/0x358 [mali]
[  641.029574]  platform_drv_probe+0x50/0xa0
[  641.029575]  really_probe+0x1e0/0x298
[  641.029577]  driver_probe_device+0x54/0xe8
[  641.029578]  __driver_attach+0xe4/0xe8
[  641.029579]  bus_for_each_dev+0x70/0xc0
[  641.029581]  driver_attach+0x20/0x28
[  641.029582]  bus_add_driver+0x1dc/0x208
[  641.029583]  driver_register+0x60/0x110
[  641.029585]  __platform_driver_register+0x44/0x50
[  641.029586]  init_module+0x30/0x140 [mali]
[  641.029588]  do_one_initcall+0x74/0x178
[  641.029589]  do_init_module+0x54/0x1c0
[  641.029591]  load_module+0x1ae4/0x2108
[  641.029592]  __se_sys_finit_module+0xb8/0xc8
[  641.029594]  __arm64_sys_finit_module+0x18/0x20
[  641.029595]  el0_svc_common+0x84/0xd8
[  641.029596]  el0_svc_handler+0x6c/0x88
[  641.029598]  el0_svc+0x8/0xc
[  641.029625] SMP: stopping secondary CPUs
[  641.029626] Kernel Offset: disabled
[  641.029628] CPU features: 0x0,20802004
[  641.029629] Memory Limit: none
[  641.295015] ---[ end Kernel panic - not syncing: Asynchronous SError 
Interrupt ]---


Any clues?


> On Mar 13, 2019, at 14:23, Manjukumar Matha 
>  wrote:
> 
> From: Madhurkiran Harikrishnan 
> 
> These patches fixes errors caused by removal of ancient init_timer API.
> Also, addresses the removal of hot/cold cache pages in the kernel.
> 
> Signed-off-by: Madhurkiran Harikrishnan 
> Signed-off-by: Manjukumar Matha 
> ---
> .../recipes-graphics/mali/kernel-module-mali.bb|   3 +
> ...ux-mali_memory_os_alloc-Remove-__GFP_COLD.patch |  33 +
> ...memory_secure-Add-header-file-dma-direct..patch |  34 +
> ...4-linux-mali_-timer-Get-rid-of-init_timer.patch | 156 +
> 4 files changed, 226 insertions(+)
> create mode 100644 
> meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
> create mode 100644 
> meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
> create mode 100644 
> meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch
> 

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] [meta-xilinx-bsp][RFC] kernel-module-mali: Fix errors associated with kernel upgrade to 4.19

2019-03-13 Thread Manjukumar Matha
From: Madhurkiran Harikrishnan 

These patches fixes errors caused by removal of ancient init_timer API.
Also, addresses the removal of hot/cold cache pages in the kernel.

Signed-off-by: Madhurkiran Harikrishnan 
Signed-off-by: Manjukumar Matha 
---
 .../recipes-graphics/mali/kernel-module-mali.bb|   3 +
 ...ux-mali_memory_os_alloc-Remove-__GFP_COLD.patch |  33 +
 ...memory_secure-Add-header-file-dma-direct..patch |  34 +
 ...4-linux-mali_-timer-Get-rid-of-init_timer.patch | 156 +
 4 files changed, 226 insertions(+)
 create mode 100644 
meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
 create mode 100644 
meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
 create mode 100644 
meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch

diff --git a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb 
b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb
index 327f8f0..fe2fbdc 100644
--- a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb
+++ b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali.bb
@@ -21,6 +21,9 @@ SRC_URI = " \
file://0009-mali_memory_swap_alloc.c-Rename-global_page_state-wi.patch \
file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \
file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\
+   file://0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch\
+   file://0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch\
+   file://0014-linux-mali_-timer-Get-rid-of-init_timer.patch\
"
 SRC_URI[md5sum] = "8f04ae86957fd56197ad5a9d017b84ff"
 SRC_URI[sha256sum] = 
"bfd14fa3f75a71d4ba313534e651ca1c58dc354e882c0b39867e335882a06350"
diff --git 
a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
 
b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
new file mode 100644
index 000..24f0a22
--- /dev/null
+++ 
b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch
@@ -0,0 +1,33 @@
+From 779b1883d56804ecd08fe7f57d6c01e3db4e893b Mon Sep 17 00:00:00 2001
+From: Madhurkiran Harikrishnan 
+Date: Wed, 5 Dec 2018 18:07:29 -0800
+Subject: [PATCH 1/3] linux: mali_memory_os_alloc: Remove __GFP_COLD
+
+The support for Cache hot and cold pages are removed from the kernel.
+For more information refer kernel commit 
453f85d43fa9ee243f0fc3ac4e1be45615301e3f
+
+Signed-off-by: Madhurkiran Harikrishnan 
+Reviewed-by: Hyun Kwon 
+Upstream Status: Pending
+---
+ driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c 
b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c
+index 1602371..830e8c6 100644
+--- linux/mali_memory_os_alloc.c
 b/linux/mali_memory_os_alloc.c
+@@ -202,7 +202,9 @@ int mali_mem_os_alloc_pages(mali_mem_os_mem *os_mem, u32 
size)
+   /* Allocate new pages, if needed. */
+   for (i = 0; i < remaining; i++) {
+   dma_addr_t dma_addr;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++  gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
++#elif LINUX_VERSION_CODE == KERNEL_VERSION(4, 14, 0)
+   gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN | 
__GFP_COLD;
+ #else
+   gfp_t flags = __GFP_ZERO | __GFP_REPEAT | __GFP_NOWARN | 
__GFP_COLD;
+-- 
+2.7.4
+
diff --git 
a/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
 
b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
new file mode 100644
index 000..c28a83f
--- /dev/null
+++ 
b/meta-xilinx-bsp/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch
@@ -0,0 +1,34 @@
+From d20b6eb3e48e56558488dbdda98875b1aed0c29f Mon Sep 17 00:00:00 2001
+From: Madhurkiran Harikrishnan 
+Date: Wed, 5 Dec 2018 18:13:28 -0800
+Subject: [PATCH 2/3] linux: mali_memory_secure: Add header file dma-direct.h
+
+Add dma-direct.h header, as API dma_to_phys is defined here.
+refer kernel commit ea8c64ace86647260ec4255f483e5844d62af2df
+
+Signed-off-by: Madhurkiran Harikrishnan 
+Reviewed-by: Hyun Kwon 
+Upstream Status: Pending
+---
+ driver/src/devicedrv/mali/linux/mali_memory_secure.c | 4 
+ 1 file changed, 4 insertions(+)
+
+diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c 
b/driver/src/devicedrv/mali/linux/mali_memory_secure.c
+index 2836b1b..4f55fa5 100644
+---