lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Feb 2020 10:17:50 +0100
From:   Michal Simek <michal.simek@...inx.com>
To:     Marc Zyngier <maz@...nel.org>,
        Michal Simek <michal.simek@...inx.com>
Cc:     Mubin Usman Sayyed <mubin.usman.sayyed@...inx.com>,
        tglx@...utronix.de, jason@...edaemon.net,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        siva.durga.paladugu@...inx.com, anirudha.sarangi@...inx.com
Subject: Re: [PATCH v2] irqchip: xilinx: Add support for multiple instances

On 06. 02. 20 10:15, Marc Zyngier wrote:
> On 2020-02-06 09:11, Michal Simek wrote:
>> On 06. 02. 20 10:09, Marc Zyngier wrote:
>>> On 2020-02-06 07:06, Michal Simek wrote:
>>>> On 05. 02. 20 17:53, Marc Zyngier wrote:
>>>>> On 2020-02-05 14:05, Mubin Usman Sayyed wrote:
>>>
>>> [...]
>>>
>>>>>>  unsigned int xintc_get_irq(void)
>>>>>>  {
>>>>>> -       unsigned int hwirq, irq = -1;
>>>>>> +       int hwirq, irq = -1;
>>>>>>
>>>>>> -       hwirq = xintc_read(IVR);
>>>>>> +       hwirq = xintc_read(primary_intc->base + IVR);
>>>>>>         if (hwirq != -1U)
>>>>>> -               irq = irq_find_mapping(xintc_irqc->root_domain,
>>>>>> hwirq);
>>>>>> +               irq = irq_find_mapping(primary_intc->root_domain,
>>>>>> hwirq);
>>>>>>
>>>>>>         pr_debug("irq-xilinx: hwirq=%d, irq=%d\n", hwirq, irq);
>>>>>
>>>>> I have the ugly feeling I'm reading the same code twice... Surely you
>>>>> can
>>>>> make these two functions common code.
>>>>
>>>> I have some questions regarding this.
>>>> I have updated one patchset which is adding support for Microblaze SMP.
>>>> And when I was looking at current wiring of this driver I have decided
>>>> to change it.
>>>>
>>>> I have enabled  GENERIC_IRQ_MULTI_HANDLER and HANDLE_DOMAIN_IRQ.
>>>> This driver calls set_handle_irq(xil_intc_handle_irq)
>>>> and MB do_IRQ() call handle_arch_irq()
>>>> and IRQ routine here is using handle_domain_irq().
>>>>
>>>> I would expect that this chained IRQ handler can also use
>>>> handle_domain_irq().
>>>>
>>>> Is that correct understanding?
>>>
>>> handle_domain_irq() implies that you have a set of pt_regs, representing
>>> the context you interrupted. You can't fake that up, so I can't see how
>>> you use it in a chained context.
>>
>> ok. What's your recommendation for chained controller? Just go with
>> irq_find_mapping?
> 
> For now, yes. I have (distant) plans to improve this.

Thanks.
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ