IMX8QM MEK GIC ITS configuration in device tree

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX8QM MEK GIC ITS configuration in device tree

跳至解决方案
136 次查看
carloscs11
Contributor II

Hello guys,

I am trying to configure the PCIe controller to use MSI interrupts using the ITS component in GIC.
However, there isn't any available device tree configuration of ITS online. I'm using the kernel version 6.6.3.

This is my gic configuration at the moment:

gic:interrupt-controller@51a00000 {
  compatible = "arm,gic-v3";
  reg = <0x00 0x51a00000 0x00 0x10000 0x00 0x51b00000 0x00 0xc0000 0x00 0x52000000 0x00 0x2000 0x00 0x52010000 0x00 0x1000 0x00 0x52020000 0x00 0x20000>;
  #interrupt-cells = <0x03>;
  interrupt-controller;
  interrupts = <0x01 0x09 0x04>;
  interrupt-parent = <&gic>;
  #address-cells = <0x02>;
  #size-cells = <0x02>;
  ranges;
  phandle = <0x01>;
  its@51a20000 {
    reg = <0x00 0x51a20000 0x00 0x20000>;
    phandle = <0x8004>;
    compatible = "arm,gic-v3-its";
    msi-controller;
  };
};

 And the following warning message is received:
------------[ cut here ]------------␍␊
[09:45:30:076] [ 4.707694] WARNING: CPU: 0 PID: 42 at /drivers/irqchip/irq-gic-v3.c:1744 gic_irq_domain_select+0x148/0x17c␍␊
[09:45:30:092] [ 4.717471] Modules linked in:␍␊
[09:45:30:092] [ 4.720536] CPU: 0 PID: 42 Comm: kworker/u2:2 Not tainted 6.6.3-lts-next-gccf0a99701a7-dirty #1␍␊
[09:45:30:108] [ 4.729252] Hardware name: Freescale i.MX8QM MEK (DT)␍␊
[09:45:30:108] [ 4.734314] Workqueue: events_unbound async_run_entry_fn␍␊
[09:45:30:108] [ 4.739647] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)␍␊
[09:45:30:124] [ 4.746623] pc : gic_irq_domain_select+0x148/0x17c␍␊
[09:45:30:124] [ 4.751425] lr : gic_irq_domain_select+0xb0/0x17c␍␊
[09:45:30:124] [ 4.756142] sp : ffff800082fa3630␍␊
[09:45:30:140] [ 4.759462] x29: ffff800082fa3650 x28: 0000000000000000 x27: 0000000000000000␍␊
[09:45:30:140] [ 4.766622] x26: ffff800082fa3728 x25: ffff0008ff44f910 x24: ffff8000828f1010␍␊
[09:45:30:156] [ 4.773779] x23: ffff0008ff44f8f8 x22: ffff8000816a1ac0 x21: ffff8000816a1ac0␍␊
[09:45:30:156] [ 4.780929] x20: ffff000800020000 x19: ffff800082fa3728 x18: ffffffffffffffff␍␊
[09:45:30:156] [ 4.788079] x17: 6572702066666666 x16: 6666313678302d30 x15: ffff800082fa38a0␍␊
[09:45:30:172] [ 4.795238] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000004␍␊
[09:45:30:172] [ 4.802396] x11: 0101010101010101 x10: fffffffffffb02a0 x9 : 0000000000000005␍␊
[09:45:30:188] [ 4.809555] x8 : ffff800082fa3778 x7 : 0000000000000000 x6 : 070f1900f2f2f5f0␍␊
[09:45:30:188] [ 4.816706] x5 : ffff8000816a1ac0 x4 : 00000000a110c8ee x3 : ffff800082fa363c␍␊
[09:45:30:204] [ 4.823863] x2 : ffff800082fa3640 x1 : ffff800082fa3728 x0 : 00000000ffffffea␍␊
[09:45:30:204] [ 4.831024] Call trace:␍␊
[09:45:30:204] [ 4.833472] gic_irq_domain_select+0x148/0x17c␍␊
[09:45:30:220] [ 4.837929] irq_find_matching_fwspec+0x7c/0x114␍␊
[09:45:30:220] [ 4.842557] irq_create_fwspec_mapping+0x44/0x350␍␊
[09:45:30:220] [ 4.847274] irq_create_of_mapping+0x84/0xb4␍␊
[09:45:30:220] [ 4.851557] of_irq_parse_and_map_pci+0xf4/0x1ec␍␊
[09:45:30:236] [ 4.856188] pci_assign_irq+0x90/0xfc␍␊
[09:45:30:236] [ 4.859862] pci_device_probe+0x50/0x214␍␊
[09:45:30:236] [ 4.863798] really_probe+0x148/0x2b0␍␊
[09:45:30:236] [ 4.867472] __driver_probe_device+0x78/0x12c␍␊
[09:45:30:252] [ 4.871834] driver_probe_device+0xd8/0x15c␍␊
[09:45:30:252] [ 4.876021] __device_attach_driver+0xb8/0x134␍␊
[09:45:30:252] [ 4.880469] bus_for_each_drv+0x88/0xe8␍␊
[09:45:30:252] [ 4.884317] __device_attach+0xa0/0x190␍␊
[09:45:30:268] [ 4.888168] device_attach+0x14/0x20␍␊
[09:45:30:268] [ 4.891753] pci_bus_add_device+0x64/0xd4␍␊
[09:45:30:268] [ 4.895776] pci_bus_add_devices+0x38/0x84␍␊
[09:45:30:268] [ 4.899885] pci_host_probe+0x44/0xbc␍␊
[09:45:30:284] [ 4.903560] dw_pcie_host_init+0x250/0x600␍␊
[09:45:30:284] [ 4.907669] imx6_pcie_probe+0x3c8/0xa58␍␊
[09:45:30:284] [ 4.911605] platform_probe+0x68/0xc8␍␊
[09:45:30:284] [ 4.915279] really_probe+0x148/0x2b0␍␊
[09:45:30:300] [ 4.918947] __driver_probe_device+0x78/0x12c␍␊
[09:45:30:300] [ 4.923316] driver_probe_device+0xd8/0x15c␍␊
[09:45:30:300] [ 4.927503] __device_attach_driver+0xb8/0x134␍␊
[09:45:30:300] [ 4.931960] bus_for_each_drv+0x88/0xe8␍␊
[09:45:30:316] [ 4.935802] __device_attach_async_helper+0xb4/0xd8␍␊
[09:45:30:316] [ 4.940693] async_run_entry_fn+0x34/0xe0␍␊
[09:45:30:316] [ 4.944715] process_one_work+0x138/0x248␍␊
[09:45:30:316] [ 4.948737] worker_thread+0x320/0x438␍␊
[09:45:30:332] [ 4.952501] kthread+0x110/0x114␍␊
[09:45:30:332] [ 4.955739] ret_from_fork+0x10/0x20␍␊
[09:45:30:332] [ 4.959328] ---[ end trace 0000000000000000 ]---␍␊
[09:45:30:332] [ 4.963989] irq: no irq domain found for interrupt-controller@51a00000 !␍␊

I figured out that the problem should be in the ranges property. However I wasn't able to fix it yet.

If anyone could share any device tree configuration working, would be really helpful.

0 项奖励
回复
1 解答
115 次查看
carloscs11
Contributor II

Okay I figure it out!

I nedded to change the pcie node's interrupt-map property after adding the ranges property into the gic node.

I followed this configuration and it works fine!

Still, don't get it the logic behind the two zeros after &gic cell.

在原帖中查看解决方案

0 项奖励
回复
1 回复
116 次查看
carloscs11
Contributor II

Okay I figure it out!

I nedded to change the pcie node's interrupt-map property after adding the ranges property into the gic node.

I followed this configuration and it works fine!

Still, don't get it the logic behind the two zeros after &gic cell.

0 项奖励
回复