All of lore.kernel.org
 help / color / mirror / Atom feed
From: majun258@huawei.com (majun (F))
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] initialize each mbigen device node as a interrupt controller.
Date: Wed, 14 Oct 2015 16:16:15 +0800	[thread overview]
Message-ID: <561E0F4F.3080202@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1510130842070.6097@nanos>

Hi Thomas:

? 2015/10/13 14:55, Thomas Gleixner ??:
> Majun,
> 
> On Tue, 13 Oct 2015, majun (F) wrote:
>> ? 2015/10/12 0:45, Thomas Gleixner ??:
>>> So now in the mbigen case this looks like this:
>>>
>>>     [MSI-BUS] ----- [MBIGEN]<-------------------[Device interrupt]
>>>
>>> Again, you have a 'wire' from the device to the MSI unit (MBIGEN) and
>>> we do not care about that 'wire' either. What we care about is how we
>>> find the MSI (mbigen) configuration registers for a particular
>>> device. So we need a DT/ACPI entry which describes those configuration
>>> registers and whatever supplementary information is required. That
>>> will make the mbigen driver extremly simple.
>>>
>>
>> According to your suggestions, I tried to make the hardware structure likes below:
>>
>> device(8250 uart) -> mbigne -> ITS-pMSI --> ITS --> GIC
> 
> I'm not sure whether mbigen should be connected to ITS-pMSI (I assume
> you mean ITS-PCI-MSI).

ITS domain has two child domains. One is ITS-pMSI for Non-PCI devices,
the other one is ITS-MSI for PCI devices.

> 
> mbigen is a seperate MSI domain, so it should connect to ITS, but I
> leave that to Marc.

I also think mbigen should connected to ITS.

Now, the hierarchy structure is
MBIGEN -> ITS -> GIC.

This structure is really similar to the structure in my v3 patch except the
dts.

>  
>> And  8250 uart dts node is:
>>
>>  8250_uart {
>> 	compatible = "xxx";
>> 	msi-parent = < &mbigen>;
>> 	config_addr = <xxxxx> ; /* configuration register */
>> 	interrupts = <x>;
>> 	interrupt-parent = ?
>> }
>>
>> My question is what's the interrupt-parent should be?
> 
> There is no interrupt parent for 8250_uart. Why would you want that?
> I'm really not a DT expert, but I think you want something like this:
> 
>   8250_uart {
>  	compatible = "xxx";
>  	msi-parent = < &mbigen_node5>;
>  	interrupt-map = <&mbigen5 0>;
>   };
> 

Maybe you mean
interrupt-map = <&mbigen_node5 0>;

I have some questions about this

[1]: I noticed there is no interrupts property,
So, do you mean we don't need this property here ?

[2]: I am confused about interrupt-map.

This property is parsed in function of_irq_parse_raw().
In this fucntion

"
ipar = of_node_get(out_irq->np);
of_get_property(ipar, "interrupt-map", &imaplen);
"
When this function is called by of_irq_parse_one(),
the input para out_irq->np pointed to GIC or mbigen (depends on dts).

So, of_get_property() tried to get the interrupt-map from
GIC or mbgien node.

But there is no interrupt-map property in GIC or mbigen node.



> and then have
> 
>   mbigen_node5 {
>   	...
> 	reg = <....>;
>   };
> 
> So the other devices which are connected to mbigen_node5 have the same
> msi-parent. But then again, please discuss that with Marc and the DT
> wizards.
> 

WARNING: multiple messages have this Message-ID (diff)
From: "majun (F)" <majun258@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>, <Catalin.Marinas@arm.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <Will.Deacon@arm.com>,
	<mark.rutland@arm.com>, <jason@lakedaemon.net>,
	<lizefan@huawei.com>, <huxinwei@huawei.com>,
	<dingtianhong@huawei.com>, <zhaojunhua@hisilicon.com>,
	<liguozhu@hisilicon.com>, <xuwei5@hisilicon.com>,
	<wei.chenwei@hisilicon.com>, <guohanjun@huawei.com>,
	<wuyun.wu@huawei.com>, <guodong.xu@linaro.org>,
	<haojian.zhuang@linaro.org>, <zhangfei.gao@linaro.org>,
	<usman.ahmad@linaro.org>, <klimov.linux@gmail.com>
Subject: Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt controller.
Date: Wed, 14 Oct 2015 16:16:15 +0800	[thread overview]
Message-ID: <561E0F4F.3080202@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1510130842070.6097@nanos>

Hi Thomas:

在 2015/10/13 14:55, Thomas Gleixner 写道:
> Majun,
> 
> On Tue, 13 Oct 2015, majun (F) wrote:
>> 在 2015/10/12 0:45, Thomas Gleixner 写道:
>>> So now in the mbigen case this looks like this:
>>>
>>>     [MSI-BUS] ----- [MBIGEN]<-------------------[Device interrupt]
>>>
>>> Again, you have a 'wire' from the device to the MSI unit (MBIGEN) and
>>> we do not care about that 'wire' either. What we care about is how we
>>> find the MSI (mbigen) configuration registers for a particular
>>> device. So we need a DT/ACPI entry which describes those configuration
>>> registers and whatever supplementary information is required. That
>>> will make the mbigen driver extremly simple.
>>>
>>
>> According to your suggestions, I tried to make the hardware structure likes below:
>>
>> device(8250 uart) -> mbigne -> ITS-pMSI --> ITS --> GIC
> 
> I'm not sure whether mbigen should be connected to ITS-pMSI (I assume
> you mean ITS-PCI-MSI).

ITS domain has two child domains. One is ITS-pMSI for Non-PCI devices,
the other one is ITS-MSI for PCI devices.

> 
> mbigen is a seperate MSI domain, so it should connect to ITS, but I
> leave that to Marc.

I also think mbigen should connected to ITS.

Now, the hierarchy structure is
MBIGEN -> ITS -> GIC.

This structure is really similar to the structure in my v3 patch except the
dts.

>  
>> And  8250 uart dts node is:
>>
>>  8250_uart {
>> 	compatible = "xxx";
>> 	msi-parent = < &mbigen>;
>> 	config_addr = <xxxxx> ; /* configuration register */
>> 	interrupts = <x>;
>> 	interrupt-parent = ?
>> }
>>
>> My question is what's the interrupt-parent should be?
> 
> There is no interrupt parent for 8250_uart. Why would you want that?
> I'm really not a DT expert, but I think you want something like this:
> 
>   8250_uart {
>  	compatible = "xxx";
>  	msi-parent = < &mbigen_node5>;
>  	interrupt-map = <&mbigen5 0>;
>   };
> 

Maybe you mean
interrupt-map = <&mbigen_node5 0>;

I have some questions about this

[1]: I noticed there is no interrupts property,
So, do you mean we don't need this property here ?

[2]: I am confused about interrupt-map.

This property is parsed in function of_irq_parse_raw().
In this fucntion

"
ipar = of_node_get(out_irq->np);
of_get_property(ipar, "interrupt-map", &imaplen);
"
When this function is called by of_irq_parse_one(),
the input para out_irq->np pointed to GIC or mbigen (depends on dts).

So, of_get_property() tried to get the interrupt-map from
GIC or mbgien node.

But there is no interrupt-map property in GIC or mbigen node.



> and then have
> 
>   mbigen_node5 {
>   	...
> 	reg = <....>;
>   };
> 
> So the other devices which are connected to mbigen_node5 have the same
> msi-parent. But then again, please discuss that with Marc and the DT
> wizards.
> 


  reply	other threads:[~2015-10-14  8:16 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30  9:39 [PATCH v5 0/3] Support Mbigen interrupt controller MaJun
2015-09-30  9:39 ` MaJun
2015-09-30  9:39 ` [PATCH v5 1/3] initialize each mbigen device node as a " MaJun
2015-09-30  9:39   ` MaJun
2015-09-30 21:37   ` Thomas Gleixner
2015-09-30 21:37     ` Thomas Gleixner
2015-10-04  7:22     ` majun (F)
2015-10-04  7:22       ` majun (F)
2015-10-09 13:47       ` Thomas Gleixner
2015-10-09 13:47         ` Thomas Gleixner
2015-10-10  9:01         ` majun (F)
2015-10-10  9:01           ` majun (F)
2015-10-10 10:09           ` Marc Zyngier
2015-10-10 10:09             ` Marc Zyngier
2015-10-11  9:54             ` Thomas Gleixner
2015-10-11  9:54               ` Thomas Gleixner
2015-10-11 11:03               ` Marc Zyngier
2015-10-11 11:03                 ` Marc Zyngier
2015-10-11 16:45                 ` Thomas Gleixner
2015-10-11 16:45                   ` Thomas Gleixner
2015-10-13  6:32                   ` majun (F)
2015-10-13  6:32                     ` majun (F)
2015-10-13  6:55                     ` Thomas Gleixner
2015-10-13  6:55                       ` Thomas Gleixner
2015-10-14  8:16                       ` majun (F) [this message]
2015-10-14  8:16                         ` majun (F)
2015-10-14  8:20                         ` Thomas Gleixner
2015-10-14  8:20                           ` Thomas Gleixner
2015-10-14  8:54                           ` majun (F)
2015-10-14  8:54                             ` majun (F)
2015-10-14  8:55                   ` Marc Zyngier
2015-10-14  8:55                     ` Marc Zyngier
2015-10-14  9:17                     ` Thomas Gleixner
2015-10-14  9:17                       ` Thomas Gleixner
2015-10-14  9:49                       ` Marc Zyngier
2015-10-14  9:49                         ` Marc Zyngier
2015-09-30  9:39 ` [PATCH v5 2/3] Probe mbigen chip and initial mbigen device as platform device MaJun
2015-09-30  9:39   ` MaJun
2015-09-30  9:39 ` [PATCH v5 3/3] dt-binding:Documents of the mbigen bindings MaJun
2015-09-30  9:39   ` MaJun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561E0F4F.3080202@huawei.com \
    --to=majun258@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.