Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754610AbbGQQiz (ORCPT ); Fri, 17 Jul 2015 12:38:55 -0400 Received: from mail-bl2on0094.outbound.protection.outlook.com ([65.55.169.94]:42313 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751966AbbGQQiw (ORCPT ); Fri, 17 Jul 2015 12:38:52 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; Message-ID: <55A92F95.307@caviumnetworks.com> Date: Fri, 17 Jul 2015 09:38:45 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Lorenzo Pieralisi CC: David Daney , "linux-arm-kernel@lists.infradead.org" , Catalin Marinas , Will Deacon , Bjorn Helgaas , "linux-pci@vger.kernel.org" , Thomas Gleixner , Jason Cooper , "linux-kernel@vger.kernel.org" , Robert Richter , David Daney Subject: Re: [PATCH 3/5] arm64, pci: Allow RC drivers to supply pcibios_add_device() implementation. References: <1436979285-8177-1-git-send-email-ddaney.cavm@gmail.com> <1436979285-8177-4-git-send-email-ddaney.cavm@gmail.com> <20150716090426.GA17097@red-moon> <55A7E334.3030101@caviumnetworks.com> <20150717110016.GB19067@red-moon> In-Reply-To: <20150717110016.GB19067@red-moon> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BY2PR07CA046.namprd07.prod.outlook.com (10.141.251.21) To CY1PR0701MB1725.namprd07.prod.outlook.com (25.163.21.14) X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;2:aB7Wb9QJL2ZgmN9bLRGWh/ZZ8RJuehUahKe1wYjAQLD8iUGe7RutMExkEMNhG8H2;3:Gl9r3JQKaHtJ7oqGVdis07HOGbreuknMIO6fUwmTZ6c7w32bESmuoQA5P8lJfnM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BtyQanBIDk5449d6vIaDt04fglWwHaxCBBHMXKGv3SBc6BvzESLW3CLeJQv+SxE/iSdtSycjGWFqFUFNnzAiT/GOkppSD/17nwGyy0E+YwxvJQIDtBoNexri1c4I6vYBd59/8onEFpVED/5rgW5WPOSagCA1LgUCcsbCSZTSQG5LIsTXxQEPaDYOs4+v5sWdAS1O9GGJn6QU7XccGsHszMkdPepdozYLj5AhYwNe5ElaAZFCwlBSLLvl3lKm8cOpYQurrHpTMKPmE6COEgleySxh6zfVb8uLlL3M= CY1PR0701MB1725: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR0701MB1725;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1725; X-Forefront-PRVS: 06400060E1 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(479174004)(377454003)(164054003)(33656002)(46102003)(19580395003)(36756003)(19580405001)(53416004)(42186005)(23756003)(64126003)(83506001)(122386002)(87976001)(62966003)(2950100001)(65806001)(50466002)(92566002)(65956001)(110136002)(5001960100002)(77156002)(77096005)(93886004)(4001350100001)(54356999)(76176999)(65816999)(50986999)(47776003)(189998001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1725;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;23:7p0VHAnkyrBzbfeouLS8na1inTTBNLkj0kjj3jeTubT4iBQa3zWkSS1r3qZ+9ssC/qYm94fhQnnWauF6IG2iIm2wpJ3R9jnXg3BXZlCoEeHnlkUcFV40qduQJlk3DelXQU8crzlmDP7LNwb8MWbhw/gDZAz2X3j+UVvTD1vlciMqTTxRhhMTddoaCZ2EPUK+foC9nOw5Wf80ALCh+qgcPBl3Wulx7RJwq7uM7oJQVFBu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jNtMkWiUY0WlLHn2Gv5meA08DrPzPmgLzwwr3SpZEx/NS1zNg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2015 16:38:48.6777 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2269 Lines: 78 On 07/17/2015 04:00 AM, Lorenzo Pieralisi wrote: > Hi David, > > On Thu, Jul 16, 2015 at 06:00:36PM +0100, David Daney wrote: >> On 07/16/2015 02:04 AM, Lorenzo Pieralisi wrote: >>> Hi David, >>> >>> On Wed, Jul 15, 2015 at 05:54:43PM +0100, David Daney wrote: >>>> From: David Daney >>>> >> [...] >>>> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c >>>> index 4095379..3356023 100644 >>>> --- a/arch/arm64/kernel/pci.c >>>> +++ b/arch/arm64/kernel/pci.c >>>> @@ -38,11 +38,21 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res, >>>> return res->start; >>>> } >>>> >>>> +static int (*pcibios_add_device_impl)(struct pci_dev *); >>>> + >>>> +void set_pcibios_add_device(int (*arg)(struct pci_dev *)) >>>> +{ >>>> + pcibios_add_device_impl = arg; >>>> +} >>>> + >>>> /* >>>> * Try to assign the IRQ number from DT when adding a new device >>>> */ >>>> int pcibios_add_device(struct pci_dev *dev) >>>> { >>>> + if (pcibios_add_device_impl) >>>> + return pcibios_add_device_impl(dev); >>> >>> I am totally against this (and to be honest by reading the other >>> patches I failed to understand why you even need it), see above. >>> >> >> It is because ... >> >> >>> Thanks, >>> Lorenzo >>> >>>> + >>>> dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); >> >> >> ... this is total crap. But I didn't want to break existing systems. > > That's a good aim, but you are still failing to explain the issue properly > I am afraid. > >> The PCI RC drivers need a way to configure the legacy virtual-wire >> interrupts, because the existing code doesn't do it. > > Can I ask you please to explain the issue a bit more clearly (and why > the OF API does not work for you ?) Several problems: 1) It prints many times to the boot log this string: pci 0000:01:0e.2: of_irq_parse_pci() failed with rc=-19 2) For a RC with no device_node it does nothing (in addition to printing the annoying message). > > Thank you ! > Lorenzo > -- 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/