Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755480AbbGPRAt (ORCPT ); Thu, 16 Jul 2015 13:00:49 -0400 Received: from mail-bl2on0070.outbound.protection.outlook.com ([65.55.169.70]:51499 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755294AbbGPRAr (ORCPT ); Thu, 16 Jul 2015 13:00:47 -0400 Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; Message-ID: <55A7E334.3030101@caviumnetworks.com> Date: Thu, 16 Jul 2015 10:00:36 -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> In-Reply-To: <20150716090426.GA17097@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: BLUPR07CA0045.namprd07.prod.outlook.com (10.255.223.158) To BY1PR0701MB1722.namprd07.prod.outlook.com (25.162.111.141) X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1722;2:IAYBuNDRWdE+y78r6WwC6voHQJ1AmUBSmB+6SRl1HwvpZEqwkObNX1z7BcX5Tu11;3:ALomTnaOOo8aY5Et6OMOgLPolQnqB3SFSQvE4y/AZquFTsd1tCqnBLKulu4OzRoB9Rm/9v8vhYzxAYWWa64Xsl0LT8hSuB2W8gt/rtP05wC2J0ysaQwy1UiYKkUq66+8avHMzD+XsPZoUPjjMoF0oQ==;25:QfcvqrfOvcnLVJ3JDCXUnVx3pCwc7+xPSjI2oU2GSV3sKA89Dr3N4BJvfZYKqubbHnhd6/+06BXNes+G1x0S/4NLR74KlrcUrzUQMSvhmyY8I16egHQp7g7TpWVlsetfgeV8Gew5VLLdoPIkhq8CkX3iO0tdWOBdokr86l+FjC6byeDlbJgz0SXbI7gLE+22dNLXslRND0qwYiketIlzFBoX8l/Mcd2c2m9EAKs2Km5yP6iPaph6puggRXlBJ3C+tG3x2fn0oqewicULspGV3A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1722;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1708; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1722;20:vOnkrb7m7mP+ptBXJ7mDnxrN+dhAh9FikA0yaGGR1NephuDYZwpxz6FpGnbrBaLWakiD34kNykiZ/1ltMCWT/N7m33LyauVrupDa7dAnZ7GZD0aPjSuTz35DX6bG8ZdrJb/t1wIj6Oq2alrsIVFGKcKTyZLhzh74LduW6mr1Tg1VGJnLh9Y1Q/afhZnFDAjdgZ2pvZaSQhpkMUf1CYzbwqRzslp1ipIKyTVIEIJmivGc7P7/AklN6W8xenj72edy261LBHFGO2ZlQ2krdq+SOR7bU9cBBVjPJ2i/WYLUNHiwqz2A7a427sVEEs704lVs/MefCs4/3lYxWh1PEhR4vvMoQrHa8eBDAF8wsoynaNmktGoW0VGuszp+KQ2cHigbjOVLTUkRh1pfOJqkpwHRrEl8DfW55FpJMz0BsEUldsecHglEsQJiFeFVxud9G+x4cwYVdUn53l6CNSpIGqWM3KBPPmNkww54SykYxizmRAtJP/VeG3NeRvlCwBCAWluL9d1EgPhyUEplh1ZZoWEoMaYe5cjrPLs6cIWw/9cAt88ODT0XfpRk4LW7op+1MinS4ciPOujgpmpk/0aQhhlyRmpBDaoIejmnlILAyDP2wPw=;4:y4MfgmuGNRPVGtLx728hQ1z70sQy+BKhVkIL1cTuqFYrlNveHnNLxEYg+7kzEjZG7xVSiCpBSjWF4AmwM/bXwNeEpwoajI9WGLIWbZE1hafUA9IV5Bbk0+FL4JVikLDBtuvjAvRvYXcWXoxPg3cXhUFQfF0HKC/vU3botxZrKiGEWyPR9F7w1j1nvWEe3QB17sFJTd/d3AFFYDqg7zTTqj5vdkBjOz9xXF1puBpUoJZ6Usl4T3wpL0u7ytJo0zck8Imym5J9m0MQumwiMtcIs8NojsTxnjRvsub7Gn3MxyY= BY1PR0701MB1722: 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:BY1PR0701MB1722;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1722; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(164054003)(24454002)(479174004)(59896002)(50986999)(62966003)(64126003)(4001350100001)(2950100001)(77156002)(36756003)(189998001)(80316001)(46102003)(87976001)(92566002)(77096005)(5001960100002)(19580395003)(19580405001)(122386002)(110136002)(40100003)(65816999)(23756003)(54356999)(76176999)(83506001)(53416004)(42186005)(50466002)(47776003)(33656002)(65806001)(65956001)(87266999)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1722;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BY1PR0701MB1722;23:4F8XoNpCMGL7wL485TD3yFltpZrVipZHB3Jhk?= =?iso-8859-1?Q?y+6uheENEHaVuIwX3KBay5681CL9onTpzWzJ8evbB8QOMqZgro6dMXze+U?= =?iso-8859-1?Q?cyNRM3iYBT98thaFCzmeQd//3YQx/3AQA16zApafIwlumTTAw2ulpw78KF?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d8XbK0uJhrYjT5b4ukbienqhM?= =?iso-8859-1?Q?c3e6PSkLuXQ5IHX8wN9GNeg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1722;5:xpSnHEZ6NHMN22E/H1XoaCi1xeUredu0TRyOe5P3AHhRoF/KQ2kr5vwbZYEtxykPyqOwGuM6euB4v1kzdliGR3vo7ASI/DWdWzhBho7h9fnxbJlnvHo2fBRB8Zuf9zMVByQFFOgurfzC42mXK1b7JQ==;24:CalbYbj3LyLK2kBLu6xc5jsR9Vt27ZUXhdh8sAQI13KFJ75/iHJ80N32aXqUHMS9JkhgoSAARQ9vIeg6yQ4Z3GGYSmWWp7wcKdQlsdgymug=;20:IBM15mUyDKqH4IBP3oW2C7Ez5vtDug0OXLbgX9Lmf+Czt3LWAiY57/YPvRWDgPfkGcoFO3iNsL0ePS4RgVZpEw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2015 17:00:41.7395 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1722 X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1708;2:wvpU3A+0EKrxr87g+hloDuae8JXUhS980X7klkDnCbnCFnzZvQ6KaunBdjJrWUMr;3:qTo0iIePPoDZ8R54kftMSTdY/S/mgvREt2La1ciVwFC8nkWG+bPIYAgW6Kpc17fbtgB1GXmt9qVv2tttXOugG10rYvNv7tgi9zFJy2tKf8CIfBuC7We6CZMdQVxceuzN47cN2t9F33hoY5G9731vXw==;25:lPJEm+Gf7YHR/J0Zk99qUDsvD+/5e+BZl5gYpwW6ORU6+OpGlhco7Y+Nz8FFRPHKWlmvGlSv3VM0M8B9jDbedp5EIssFb15QnYM9+GK//l0NpZ9j6to2VKcsZMALaaMHmPx0nLYMpWPmvHk13Q4QJSwZ5515hJJCMRvPgzZLPm06e20vhYS2vqJbF9kz/n1gQwezGSeoneOSAMk0meJcldivIGmm0EKV7eQS7KCX67U92XXFLcW1aPZQYUukoPKugU8hXAYYjm5WTpSnE219TA==;20:64KF88Rn/IhXqdr+dfYWTf0rQv0Oft2dKPObpgQgRqEbWIQ4R5NDLUWF+pLESlnjHBxrBpyrIiZIhDqlMV6Aww==;23:bcCJzdgo2glipyHGC34zf27awWQaEQmTtRWUImtbJSWNzKTTUhnrDvgwDMNjuYnwg+ITKnQfYBN7LrNrCCT6zGNbXj+FKtE3I0LuugulpE1QX1qdJYyuwRBuqDcJec1rlkc4yL8ECy/eR4leMIaU3+sd7zXbsCB1qkiMlWOMnonDx3GPTkx4yavAMieqHpGSf/yOpQf2pCOBqSyA+fWvRRJ45zqgo6frIQd3JH0YTeHD52s982wSRt7i+5Qhkd9u BY1PR0701MB1708: X-MS-Exchange-Organization-RulesExecuted X-OriginatorOrg: caviumnetworks.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1581 Lines: 58 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. The PCI RC drivers need a way to configure the legacy virtual-wire interrupts, because the existing code doesn't do it. David Daney -- 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/