Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754798AbbKLPMm (ORCPT ); Thu, 12 Nov 2015 10:12:42 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:12203 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753597AbbKLPMl (ORCPT ); Thu, 12 Nov 2015 10:12:41 -0500 Subject: Re: [PATCH 10/14] irqchip/mips-gic: Add a IPI hierarchy domain To: Thomas Gleixner References: <1446549181-31788-1-git-send-email-qais.yousef@imgtec.com> <1446549181-31788-11-git-send-email-qais.yousef@imgtec.com> CC: , , , , , From: Qais Yousef Message-ID: <5644AC66.2070508@imgtec.com> Date: Thu, 12 Nov 2015 15:12:38 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.154.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2341 Lines: 64 Hi Thomas, On 11/07/2015 02:51 PM, Thomas Gleixner wrote: > On Tue, 3 Nov 2015, Qais Yousef wrote: > >> Add a new ipi domain on top of the normal domain. >> >> MIPS GIC now supports dynamic allocation of an IPI. > I don't think you make use of the power of hierarchical irq > domains. You just whacked the current code into submission. > This time I'm having problems digesting your suggestion. I can't see how it would make things simpler to be honest. Issues I'm seeing: - Device domain would be identical to GIC domain and it would defer everything to the parent domain except for the extra level of indirection. No? - The race condition I mentioned in my earlier email where we must be told what hwirqs are available because we can't guarantee there's no real device connected to it which could interfere with the operation. We have always to work on a pre reserved set defined by the system. Currently GIC hard codes this set, but I'll be making it a DT property in the future. - If we remove the mapping, how can a coprocessor drivers find out the reverse mapping to pass the hwirq to the firmware so that it can send and listen on the correct hwirqs? I have to say my current patches missed dealing with this problem. Now I have something to test my rproc driver on I came to realise I haven't added the function to do the reverse mapping. In summary. I can't see how adding the device domain would help in making things simpler and without having generic explicit cpu mapping I don't know how I can implement a generic reverse mapping function to get the hwirq to pass to the coprocessor firmware. If I misunderstood your suggestion, mind rephrasing it please? I can see though if I use irq_*_alloc_parent() I can probably get rid off the below since I'd be able to use gic_irq_domain all the time to do the revmap. + if (test_bit(intr, ipi_intrs)) { + virq = irq_linear_revmap(gic_ipi_domain, + GIC_SHARED_TO_HWIRQ(intr)); + } else { + virq = irq_linear_revmap(gic_irq_domain, + GIC_SHARED_TO_HWIRQ(intr)); + } + Thanks, Qais -- 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/