Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754688AbcKUORb (ORCPT ); Mon, 21 Nov 2016 09:17:31 -0500 Received: from foss.arm.com ([217.140.101.70]:33254 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075AbcKUOR3 (ORCPT ); Mon, 21 Nov 2016 09:17:29 -0500 Subject: Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided To: Zubair Lutfullah Kakakhel , Thomas Gleixner References: <20161114121351.10924-1-Zubair.Kakakhel@imgtec.com> <20161114121351.10924-7-Zubair.Kakakhel@imgtec.com> <7f07be12-fb2e-e8ad-e0e6-52c58542470a@imgtec.com> Cc: monstr@monstr.eu, jason@lakedaemon.net, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Mon, 21 Nov 2016 14:17:26 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <7f07be12-fb2e-e8ad-e0e6-52c58542470a@imgtec.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1607 Lines: 48 On 21/11/16 14:05, Zubair Lutfullah Kakakhel wrote: > Hi, > > On 11/18/2016 01:29 PM, Thomas Gleixner wrote: >> On Mon, 14 Nov 2016, Zubair Lutfullah Kakakhel wrote: >> >>> The powerpc dts file does not have the xlnx,kind-of-intr property. >>> Instead of erroring out, give a warning instead. And attempt to >>> continue to probe the interrupt controller while assuming >>> kind-of-intr is 0x0 as a fall back. >> >> This is broken, really. On multiplatform kernels this will try to probe the >> chip no matter what. > > I'm not sure I understand why this driver will probe on multi-platform kernels > if the compatible string isn't in the DT? > >> >> Powerpc already has: >> >> static const struct of_device_id xilinx_intc_match[] __initconst = { >> { .compatible = "xlnx,opb-intc-1.00.c", }, >> { .compatible = "xlnx,xps-intc-1.00.a", }, >> {} >> }; >> >> Unless I'm missing something important, then adding those compatible >> strings to the driver will just keep stuff working as expected instead of >> adding unsafe and broken heuristics. >> > > The last two lines of the driver already specify the compatible strings. > > " > IRQCHIP_DECLARE(xilinx_intc_xps, "xlnx,xps-intc-1.00.a", xilinx_intc_of_init); > IRQCHIP_DECLARE(xilinx_intc_opb, "xlnx,opb-intc-1.00.c", xilinx_intc_of_init); > " Is PPC actually using this infrastructure? It predates the whole IRQCHIP_DECLARE business by about a decade. You seem to have tested it using QEMU, so I assume it "just works", but I'd feel more reassured it you stated so... Thanks, M. -- Jazz is not dead. It just smells funny...