[linux-yocto] [PATCH] nxp-s32g2xx: set HW_RANDOM to y by default

2021-04-13 Thread Zhantao Tang
HW_RANDOM kernel config is M by default, but if build the kernel
with nodistro project, there will be build error, like the following:

aarch64-oe-linux-ld.bfd: drivers/crypto/hse/hse-rng.o: in function 
`hse_hwrng_register':
hse-rng.c.text+0x2bc): undefined reference to `devm_hwrng_register'

So set it to y to fix this issue.

Signed-off-by: Zhantao Tang 
---
 bsp/nxp-s32g2xx/nxp-s32g2xx.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bsp/nxp-s32g2xx/nxp-s32g2xx.cfg b/bsp/nxp-s32g2xx/nxp-s32g2xx.cfg
index 1a172d93..c6b720c5 100644
--- a/bsp/nxp-s32g2xx/nxp-s32g2xx.cfg
+++ b/bsp/nxp-s32g2xx/nxp-s32g2xx.cfg
@@ -158,3 +158,6 @@ CONFIG_REGULATOR=y
 CONFIG_UIO=y
 CONFIG_CRYPTO_DEV_NXP_HSE=y
 CONFIG_CRYPTO_DEV_NXP_HSE_UIO=y
+
+#RANDOM
+CONFIG_HW_RANDOM=y
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9742): 
https://lists.yoctoproject.org/g/linux-yocto/message/9742
Mute This Topic: https://lists.yoctoproject.org/mt/82059290/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [yocto-kernel-cache yocto-5.10]: nxp-s32g2xx: set HW_RANDOM to y by default

2021-04-13 Thread Zhantao Tang

Hi Bruce,

On S32G platform, HW_RANDOM config is M by default, but when building 
linux-yocto with nodistro project,
there will be errors, the following patch is to fix it.

Would you please help to merge this patch into yocto-kernel-cache, branch is 
yocto-5.10 ?


Thanks,
Zhantao

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9741): 
https://lists.yoctoproject.org/g/linux-yocto/message/9741
Mute This Topic: https://lists.yoctoproject.org/mt/82059289/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] Question about aufs in kernel 5.10

2021-04-13 Thread Zhang, Qiang
Hello Bruce

commit 06fd68d75bd1fd41105e6726fee39594e134c558
Author: Bruce Ashfield 
Date:   Fri Oct 30 16:39:57 2020 -0400

aufs: initial port to v5.10

get_fs/set_fs are only around for nommu systems, we need to
replace them with:

mm_segment_t old_fs = force_uaccess_begin();
force_uaccess_end(old_fs);

Pairs. This may or may not be the last porting effort.

Signed-off-by: Bruce Ashfield 

There is a problem with this patch,  in standard kernel 5.10, bsp is xilinx-zynq
enable CONFIG_SET_FS=y,  due to remove set_fs(KERNEL_DS) , when mount aufs, the 
vfs_write(file, ubuf, count, ppos) will be called, because the ubuf is kernel 
space address, but remove set_fs(KERNEL_DS), the ubuf will treated as user mode 
address processing, when call raw_copy_from_user, the error

"aufs au_xino_set:1635:mount[373]: I/O Error, failed setting xino(-14).
mount: /tmp/aufs: mount(2) system call failed: Bad address."
 
will trigger. 

in aufs5, the vfs_write replace by kernel_write, this problem is solved, I find 
the aufs be update in kernel-next. 

Thanks
Qiang
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9743): 
https://lists.yoctoproject.org/g/linux-yocto/message/9743
Mute This Topic: https://lists.yoctoproject.org/mt/82060140/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v5.10/standard/nxp-sdk-5.4/nxp-s32g2xx]: patche to fix pfe calltrace when reserve memory

2021-04-13 Thread Zhantao Tang

Hi Bruce,


The following patch is to fix pfe calltrace, which is due to pfe reserve memory 
address is overlapped with kernel image.

Would you please help to merge the patch into linux-ycoto kernel, v5.10, branch 
is v5.10/standard/nxp-sdk-5.4/nxp-s32g2xx?


Thanks,
Zhantao


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9744): 
https://lists.yoctoproject.org/g/linux-yocto/message/9744
Mute This Topic: https://lists.yoctoproject.org/mt/82060160/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][PATCH 1/1] dts: s32g27a: pfe: move reserve memory address to leave enough space for kernel image

2021-04-13 Thread Zhantao Tang
For normal kernel image, it is acceptable if pfe reserved-memory starts
from 8300, but for bts or kts v5.10 kernel image, due to the kernel
image much larger than normal, so move pfe reserved-memory address to
8f00 to avoid intersect with kernel image, otherwise, the pfe will
failed when try to reserve memory, and can not work then.

Signed-off-by: Zhantao Tang 
---
 arch/arm64/boot/dts/freescale/fsl-s32g274a.dtsi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-s32g274a.dtsi 
b/arch/arm64/boot/dts/freescale/fsl-s32g274a.dtsi
index 056eed4d6a1e..afefb7a89c49 100644
--- a/arch/arm64/boot/dts/freescale/fsl-s32g274a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-s32g274a.dtsi
@@ -38,15 +38,15 @@ reserved-memory {
#size-cells = <2>;
ranges;
 
-   pfe_reserved: pfebufs@8300 {
+   pfe_reserved: pfebufs@8f00 {
compatible = "shared-dma-pool";
-   reg = <0 0x8300 0 0xc0>;
+   reg = <0 0x8f00 0 0xc0>;
no-map;
status = "okay";
};
-   pfe_reserved_slave: pfebufs@83c0 {
+   pfe_reserved_slave: pfebufs@8fc0 {
compatible = "shared-dma-pool";
-   reg = <0 0x83c0 0 0x40>;
+   reg = <0 0x8fc0 0 0x40>;
no-map;
status = "disabled";
};
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9745): 
https://lists.yoctoproject.org/g/linux-yocto/message/9745
Mute This Topic: https://lists.yoctoproject.org/mt/82060161/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] Question about aufs in kernel 5.10

2021-04-13 Thread Bruce Ashfield
On Tue, Apr 13, 2021 at 4:36 AM Zhang, Qiang  wrote:
>
> Hello Bruce
>
> commit 06fd68d75bd1fd41105e6726fee39594e134c558
> Author: Bruce Ashfield 
> Date:   Fri Oct 30 16:39:57 2020 -0400
>
> aufs: initial port to v5.10
>
> get_fs/set_fs are only around for nommu systems, we need to
> replace them with:
>
> mm_segment_t old_fs = force_uaccess_begin();
> force_uaccess_end(old_fs);
>
> Pairs. This may or may not be the last porting effort.
>
> Signed-off-by: Bruce Ashfield 
>
> There is a problem with this patch,  in standard kernel 5.10, bsp is 
> xilinx-zynq
> enable CONFIG_SET_FS=y,  due to remove set_fs(KERNEL_DS) , when mount aufs, 
> the vfs_write(file, ubuf, count, ppos) will be called, because the ubuf is 
> kernel space address, but remove set_fs(KERNEL_DS), the ubuf will treated as 
> user mode address processing, when call raw_copy_from_user, the error
>
> "aufs au_xino_set:1635:mount[373]: I/O Error, failed setting xino(-14).
> mount: /tmp/aufs: mount(2) system call failed: Bad address."
>
> will trigger.
>
> in aufs5, the vfs_write replace by kernel_write, this problem is solved, I 
> find the aufs be update in kernel-next.
>

Paul Gortmaker was mentioning on Monday that another aufs issue was
being looked at, can you coordinate with him ?

At this point in the 5.10 cycle, I'd prefer not to do a full aufs
update, but see if we can pull a fix out of the latest aufs branches
(not really as a commit, but as some code we identify and manually
port).

I always need the new version before the aufs code base is ready, so I
do end up doing the initial port, and revisit if issues are found.

As you mentioned, I've already done an update in the -dev kernel
through the aufs5.x-rcN branch, so we do have that reference to check
for fixes.

Bruce

> Thanks
> Qiang



--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9746): 
https://lists.yoctoproject.org/g/linux-yocto/message/9746
Mute This Topic: https://lists.yoctoproject.org/mt/82060140/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][linux-yocto v5.10/standard/ti-sdk-5.4/ti-j72xx][PATCH] drm/tidss: replace dev kzalloc with devm_drm_dev_alloc

2021-04-13 Thread Bruce Ashfield
merged.

Bruce

In message: [linux-yocto][linux-yocto 
v5.10/standard/ti-sdk-5.4/ti-j72xx][PATCH] drm/tidss: replace dev kzalloc with 
devm_drm_dev_alloc
on 13/04/2021 Xulin Sun wrote:

> devm_drm_dev_alloc() has integrated the device initialization and
> allocated device structure, using the function devm_drm_dev_alloc()
> will be simple and to avoid below call trace:
> 
> Unable to handle kernel paging request at virtual address fc080776f285
> Mem abort info:
>   ESR = 0x9621
>   EC = 0x25: DABT (current EL), IL = 32 bits
>   SET = 0, FnV = 0
>   EA = 0, S1PTW = 0
> Data abort info:
>   ISV = 0, ISS = 0x0021
>   CM = 0, WnR = 0
> swapper pgtable: 64k pages, 42-bit VAs, pgdp=8364
> [fc080776f285] pgd=0008fffa0003, p4d=0008fffa0003, 
> pud=0008fffa0003, pmd=0008fffa0003, pte=0068000887760707
> Internal error: Oops: 9621 [#1] PREEMPT SMP
> Modules linked in: cdns3_ti(+) snd_soc_pcm3168a_i2c snd_soc_pcm3168a 
> sch_fq_codel openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 
> nf_defrag_ipv4 fuse configfs
> CPU: 0 PID: 26 Comm: kworker/0:1 Not tainted 5.10.27-yocto-standard #1
> Hardware name: Texas Instruments K3 J721E SoC (DT)
> Workqueue: events deferred_probe_work_func
> pstate: 8085 (Nzcv daIf -PAN -UAO -TCO BTYPE=--)
> pc : do_raw_spin_trylock+0x24/0x74
> lr : _raw_spin_lock_irqsave+0x94/0x150
> sp : fe001494f9f0
> x29: fe001494f9f0 x28: 
> x27: fe0011dabcc8 x26: fe0012d6e500
> x25: fe0012cf2120 x24: 
> x23: fe0012db6000 x22: 
> x21: fc080776f29d x20: fc080776f285
> x19: fe0010aa6930 x18: 
> x17: 0001 x16: 352cea7bc416
> x15: 00d4ca0b7927dfe6 x14: fe00110e1e80
> x13: 00e7 x12: fe0012ff10b0
> x11: 000c0286 x10: b31216b5
> x9 : fe0011084734 x8 : fe0012de6bf8
> x7 :  x6 : fc08010ce130
> x5 : ad79931f x4 : d363a9ed
> x3 : 0001 x2 : 
> x1 : fc080776f285 x0 : 
> Call trace:
>  do_raw_spin_trylock+0x24/0x74
>  add_dr+0x30/0x80
>  __drmm_add_action+0xc4/0x130
>  drm_dev_init+0x134/0x2f0
>  devm_drm_dev_init+0x38/0xe0
>  tidss_probe+0x5c/0x220
>  platform_drv_probe+0x60/0xb4
>  really_probe+0xf0/0x4c0
>  driver_probe_device+0x64/0xcc
>  __device_attach_driver+0xb8/0x114
>  bus_for_each_drv+0x88/0xe0
>  __device_attach+0xe8/0x190
>  device_initial_probe+0x20/0x2c
>  bus_probe_device+0xac/0xb4
>  deferred_probe_work_func+0x84/0xc0
>  process_one_work+0x2bc/0x72c
>  worker_thread+0x80/0x474
>  kthread+0x158/0x164
>  ret_from_fork+0x10/0x3c
> 
> Signed-off-by: Xulin Sun 
> ---
>  drivers/gpu/drm/tidss/tidss_drv.c | 18 --
>  1 file changed, 4 insertions(+), 14 deletions(-)
>  mode change 100644 => 100755 drivers/gpu/drm/tidss/tidss_drv.c
> 
> diff --git a/drivers/gpu/drm/tidss/tidss_drv.c 
> b/drivers/gpu/drm/tidss/tidss_drv.c
> old mode 100644
> new mode 100755
> index 1ff57e5c9fce..550627fdd324
> --- a/drivers/gpu/drm/tidss/tidss_drv.c
> +++ b/drivers/gpu/drm/tidss/tidss_drv.c
> @@ -103,11 +103,7 @@ static const struct dev_pm_ops tidss_pm_ops = {
>  
>  static void tidss_release(struct drm_device *ddev)
>  {
> - struct tidss_device *tidss = ddev->dev_private;
> -
>   drm_kms_helper_poll_fini(ddev);
> -
> - kfree(tidss);
>  }
>  
>  DEFINE_DRM_GEM_CMA_FOPS(tidss_fops);
> @@ -139,19 +135,13 @@ static int tidss_probe(struct platform_device *pdev)
>  
>   dev_dbg(dev, "%s\n", __func__);
>  
> - /* Can't use devm_* since drm_device's lifetime may exceed dev's */
> - tidss = kzalloc(sizeof(*tidss), GFP_KERNEL);
> - if (!tidss)
> - return -ENOMEM;
> + tidss = devm_drm_dev_alloc(&pdev->dev, &tidss_driver,
> +struct tidss_device, ddev);
> + if (IS_ERR(tidss))
> + return PTR_ERR(tidss);
>  
>   ddev = &tidss->ddev;
>  
> - ret = devm_drm_dev_init(&pdev->dev, ddev, &tidss_driver);
> - if (ret) {
> - kfree(ddev);
> - return ret;
> - }
> -
>   tidss->dev = dev;
>   tidss->feat = of_device_get_match_data(dev);
>  
> -- 
> 2.17.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9747): 
https://lists.yoctoproject.org/g/linux-yocto/message/9747
Mute This Topic: https://lists.yoctoproject.org/mt/82057452/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] [yocto-kernel-cache yocto-5.10]: nxp-s32g2xx: set HW_RANDOM to y by default

2021-04-13 Thread Bruce Ashfield

In message: [linux-yocto] [yocto-kernel-cache yocto-5.10]: nxp-s32g2xx: set 
HW_RANDOM to y by default
on 13/04/2021 Zhantao Tang wrote:

> 
> Hi Bruce,
> 
> On S32G platform, HW_RANDOM config is M by default, but when building 
> linux-yocto with nodistro project,
> there will be errors, the following patch is to fix it.

merged.

Bruce

> 
> Would you please help to merge this patch into yocto-kernel-cache, branch is 
> yocto-5.10 ?
> 
> 
> Thanks,
> Zhantao

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9748): 
https://lists.yoctoproject.org/g/linux-yocto/message/9748
Mute This Topic: https://lists.yoctoproject.org/mt/82059289/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] [linux-yocto v5.10/standard/nxp-sdk-5.4/nxp-s32g2xx]: patche to fix pfe calltrace when reserve memory

2021-04-13 Thread Bruce Ashfield
In message: [linux-yocto] [linux-yocto v5.10/standard/nxp-sdk-5.4/nxp-s32g2xx]: 
patche to fix pfe calltrace when reserve memory
on 13/04/2021 Zhantao Tang wrote:

> 
> Hi Bruce,
> 
> 
> The following patch is to fix pfe calltrace, which is due to pfe reserve 
> memory address is overlapped with kernel image.
> 
> Would you please help to merge the patch into linux-ycoto kernel, v5.10, 
> branch is v5.10/standard/nxp-sdk-5.4/nxp-s32g2xx?

merged.

Bruce

> 
> 
> Thanks,
> Zhantao
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9749): 
https://lists.yoctoproject.org/g/linux-yocto/message/9749
Mute This Topic: https://lists.yoctoproject.org/mt/82060160/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] drm/bridge: adv7511: fix a memory leak when application changeset fails

2021-04-13 Thread Bruce Ashfield
merged.

Bruce

In message: [linux-yocto] [kernel v5.10/standard/nxp-sdk-5.4/nxp-imx8][PATCH] 
drm/bridge: adv7511: fix a memory leak when application changeset fails
on 13/04/2021 Xiaolei Wang wrote:

> Changeset application failure should be destroyed
> 
> unreferenced object 0x0008f2656480 (size 128):
>   comm "kworker/2:1", pid 83, jiffies 4294893570 (age 70.724s)
>   hex dump (first 32 bytes):
> c0 b6 db 11 00 80 ff ff c0 b6 db 11 00 80 ff ff  
> 02 00 00 00 00 00 00 00 28 9e 45 ff 08 00 ff ff  (.E.
>   backtrace:
> [<716ba1d6>] kmem_cache_alloc_trace+0x198/0x3a4
> [] of_changeset_action+0x44/0xb4
> [] adv7511_probe+0x8c4/0x948
> [<9d4149ff>] i2c_device_probe+0x24c/0x2cc
> [] really_probe+0xec/0x414
> [<453d11fb>] driver_probe_device+0x60/0xf0
> [] __device_attach_driver+0xb0/0x100
> [] bus_for_each_drv+0x8c/0xe0
> [] __device_attach+0xe0/0x180
> [<2d2d1388>] device_initial_probe+0x28/0x34
> [] bus_probe_device+0xa4/0xb0
> [] device_add+0x35c/0x670
> [] device_register+0x2c/0x40
> [] i2c_new_client_device+0x150/0x28c
> [<0505c5a6>] i2c_new_device+0x2c/0x40
> [] of_i2c_register_devices+0xe8/0x180
> 
> Signed-off-by: Xiaolei Wang 
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c 
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index d8989e0c040b..74e390896921 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1388,10 +1388,12 @@ static int adv7511_probe(struct i2c_client *i2c, 
> const struct i2c_device_id *id)
>   of_changeset_init(&ocs);
>   of_changeset_detach_node(&ocs, endpoint);
>   ret = of_changeset_apply(&ocs);
> - if (!ret)
> + if (!ret) {
> + of_changeset_destroy(&ocs);
>   dev_warn(dev,
>"Probe failed. Remote port '%s' disabled\n",
>remote_node->full_name);
> + }
>  
>   return ret;
>  }
> -- 
> 2.29.2
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9750): 
https://lists.yoctoproject.org/g/linux-yocto/message/9750
Mute This Topic: https://lists.yoctoproject.org/mt/82058891/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-