Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243855

Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt controller.

From "majun (F)" <majun258@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt controller.
Date 2015-10-10 11:10 +0200
Message-ID <qhYk9-4Ky-1@gated-at.bofh.it> (permalink)
References <qembn-1aV-13@gated-at.bofh.it> <qembn-1aV-11@gated-at.bofh.it> <qexgu-oR-21@gated-at.bofh.it> <qfLU6-20A-5@gated-at.bofh.it> <qhGdA-3Jr-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



在 2015/10/9 21:47, Thomas Gleixner 写道:
> On Sun, 4 Oct 2015, majun (F) wrote:
>>>> +	info->reg_offset = get_mbigen_vec_reg_addr(info->nid, info->local_pin_offset);
>>>
>>> So you fill in a structure with 5 fields and the only information
[...]
>> On the other hand, it's a interrupt controller for the devices
>> connected to it.(handled in current patch).
>>
>> To bind these two different irqs, I made a data sutruce named
>> mbigen_irq_data which contains some information of this irq,
>> including private index, pin_offset, nid, and local_pin_offset.
>>
>> All these information can help us to find the corresponding reg addr
>> and msi_irq quickly.
> 
> This is completely wrong. Why would you need two linux virq numbers
> for one interrupt?
> 
> This needs to be expressed in one hierarchy. mbigen is just a
> translator between wired interrupts and MSI, nothing else.
> 
> So the hierarchy is:
> 
>   mbigen -> ITS-MSI -> ITS -> GIC

I think maybe you mean: mbigen -> ITS-pMSI -> ITS- > GIC

But there is a problem If i make the structure like you said.

For example, my hardware structure likes below:

uart ------> mbigen --> ITS-pMSI --> ITS --> GIC
     virq1

virq1 means the virq number allocted by irq_of_parse_and_map() function
when system parse the uart dts node in initializing  stage.

To create a ITS device, I need to call msi_domain_alloc_irqs() function
in my mbigen alloc function.

In this function, a new virq number(named as virq2 ) which different from
virq1 is allocated.
So, this is a big problem.

If we want to use the hierarchy structure, I think

mbigen -> ITS -> GIC

maybe is a possible way .

The only problem is I need to do some change in ITS driver.

I mean move its_create_device() and its_find_device() into
 its_irq_domain_alloc()

But this solution is similar to my v3 patch.

Thanks!
Ma Jun

















> 
> No need for extra levels of indirection. Your mbigen irqchip callbacks
> are simply doing:
> 
>     parent->callback(parent_data);
> 
> and you get that for free when using the hierarchy. No need for that
> chained interrupt handler either.
> 



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-09 15:50 +0200
  Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. "majun (F)" <majun258@huawei.com> - 2015-10-10 11:10 +0200
    Re: [PATCH v5 1/3] initialize each mbigen device node as a  interrupt controller. Marc Zyngier <marc.zyngier@arm.com> - 2015-10-10 12:20 +0200
      Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-11 12:00 +0200
        Re: [PATCH v5 1/3] initialize each mbigen device node as a  interrupt controller. Marc Zyngier <marc.zyngier@arm.com> - 2015-10-11 13:10 +0200
          Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-11 18:50 +0200
            Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. "majun (F)" <majun258@huawei.com> - 2015-10-13 08:40 +0200
              Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-13 09:00 +0200
                Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. "majun (F)" <majun258@huawei.com> - 2015-10-14 10:30 +0200
                Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-14 10:30 +0200
                Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. "majun (F)" <majun258@huawei.com> - 2015-10-14 11:10 +0200
            Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Marc Zyngier <marc.zyngier@arm.com> - 2015-10-14 11:00 +0200
              Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Thomas Gleixner <tglx@linutronix.de> - 2015-10-14 11:20 +0200
                Re: [PATCH v5 1/3] initialize each mbigen device node as a interrupt  controller. Marc Zyngier <marc.zyngier@arm.com> - 2015-10-14 11:50 +0200

csiph-web