Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbbGWHGu (ORCPT ); Thu, 23 Jul 2015 03:06:50 -0400 Received: from mail-bn1bon0116.outbound.protection.outlook.com ([157.56.111.116]:47374 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750859AbbGWHGi (ORCPT ); Thu, 23 Jul 2015 03:06:38 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; arm.com; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NRXHMC-07-90O-02 X-M-MSG: Subject: Re: [RFCv2 PATCH 0/8] Introducing ACPI support for GICv2m To: Marc Zyngier , "tglx@linutronix.de" , Lorenzo Pieralisi , "hanjun.guo@linaro.org" , "tomasz.nowicki@linaro.org" References: <1436778864-17645-1-git-send-email-Suravee.Suthikulpanit@amd.com> <55A9235A.6010505@arm.com> CC: "rjw@rjwysocki.net" , "al.stone@linaro.org" , Catalin Marinas , Will Deacon , "msalter@redhat.com" , "grant.likely@linaro.org" , "leo.duran@amd.com" , "sherry.hurwitz@amd.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" From: Suravee Suthikulpanit Message-ID: <55B08E64.1020005@amd.com> Date: Thu, 23 Jul 2015 13:49:08 +0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55A9235A.6010505@arm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC006;1:24GJWKGZEvFIePm/R/VvnoJhm6rCRa1wMbvu/4I1QTX+HiAR+ioDVkd8pQ39o6uNDGW2IiQOJBL+EcGgBVOC0B3+O78HP8WkptgPo6dtvuqnVNxhGmP0YZkg+0BJIMLCuoHKj7Tu9ILoWZneyWmgdrPlCxpmsTP8OuMZNmrqUNi6/mfxjk8Yo0GaA5BecxmRnZ7oTj4Ui9JhgObNFJ4DCFn4dKmouOD8okP6jPnxYgMymVsuLShcQraaMGoaHApD+QixjPnaHwdH2agVaS4d7E610Q7aTJow3CiH+QpAJ4s= X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(428002)(189002)(164054003)(52314003)(199003)(479174004)(24454002)(19580395003)(106466001)(92566002)(2501003)(2950100001)(62966003)(15975445007)(105586002)(36756003)(50466002)(33656002)(77156002)(77096005)(189998001)(65956001)(64126003)(80316001)(83506001)(4001350100001)(65806001)(87936001)(76176999)(65816999)(47776003)(54356999)(5001770100001)(86362001)(23746002)(50986999)(87266999)(46102003)(59896002)(2201001)(5003600100002)(53416004)(101416001);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR0201MB1491;H:atltwp01.amd.com;FPR:;SPF:None;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BLUPR0201MB1491;2:81vQg5tIa+DuwLw2/mAtvOW79JQHI7cet+dDqM6ExSn+UiYXPOZaENQstnCbX4wF;3:VZGpTTiw6OPTUB1/VCCfMoNcNha0pF6sI9rqx4/ydeQ6rAW5/2268bJIFm0ku88KsxA/tROqCEaRULUgLmd9GGzTFNPQaOz6b1Z5UpnD/BfortEzym0Iks01+gn1IVITu8tZnj89FE/0CwBu0Ig8G249OgmGarAlWlAoV6o59UTi/XL7Xe+/F6aZ4FaEeQOTOHHHqIZ2ze85jVZB1qvuPAAuPsL5C1KZfeNKH9XYf1arMGpNFQeb687sm0rkasM1;25:BZxT1UL27rm2QLCuPehm/p24DHIz0ltTwQgFM4hOGdA4ihCSrxs4LN03nVGXIpOG9/Cbo90BytOpugEwX7b1o1zZpXh/h0416YxbrRMivOnrgt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BLUPR0201MB1491: 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:BLUPR0201MB1491;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0201MB1491; X-Forefront-PRVS: 06469BCC91 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BLUPR0201MB1491;23:PK2mkDx7DGSh8Pc8gzdvJTHfM4XM5wc5VHy?= =?Windows-1252?Q?sxgvVAkdeqWxMvtBS9w9Dz93ppdRHzNewbaFdYCZ+DzH/S39Ahuz74Nv?= =?Windows-1252?Q?SOEJIdle8MpXfZW+jGvq+IrD7I4TkKikpt7rwXlvVkA5oNPs3qQdJ2II?= =?Windows-1252?Q?92jPRK3/S7IH/dhpl/PwQQiaa49i9vOfQyoWkOFckOn1i66JORkNWmTU?= =?Windows-1252?Q?yBXNBYyFglEOKyAnDkRxMWgD0aIHuZ/hk52lBoSWEPKhja6/QZjHrIyW?= =?Windows-1252?Q?hyqnx2009QPArH18Sij4Kk+F2TyeltKz26vVyk95KlJsW+p1ske5agkR?= =?Windows-1252?Q?mgpQG5/JcEohpDzhePxpx/rrMwbgRD+hygaTajtiQcr3eSM+xJmRFCiU?= =?Windows-1252?Q?WNTMCq8bCm+zfbEMp30X+I86vZvqjn7EMemlSa8bJ5qS0Pko7c7zbAYW?= =?Windows-1252?Q?1DZvR7ur0EcbIHUo/ph19HH2LLoPvp01h1KG9KYxKlTk6U5S4eBxCFbI?= =?Windows-1252?Q?f9+iR3bt16bY7WsdLU7ttdsaGB/N2tcS+EPFK0SsLwoy57P0dnh6duMj?= =?Windows-1252?Q?wuABZQZ2jijtoofj6m3zT4bS/Equ/TKGw+ClDK6c/UAMYEBLau0pMxpD?= =?Windows-1252?Q?uCKF1hLI7841XVMc6yokNLNbTt9fvmDG6dqQ2bhj1DfVkVxAkjyAfx8C?= =?Windows-1252?Q?HNNyC73nbaoYciC+SGrjswnbKW/I7ixNELsVy5Kr4Auv0Uvl6Of02jgS?= =?Windows-1252?Q?3/aMdEpI910vBM8WYpXyG/atUsi+AjUFjnDcgqWVVqYp2dyxSPKEsYMW?= =?Windows-1252?Q?YgZE0KCsZbitrit59xoO7dR+xvJ2tIU5X6uyVcOgHgcloA+r36OkTsvz?= =?Windows-1252?Q?6snET0E85/9JOXgriWztwATVB+oe2FEraZ+jLNfw5hrH5nFNOzX/+DAC?= =?Windows-1252?Q?mgIEzPYzkAohYoU0TJ7LIqOVACCQzA0KNWDTenxn5+p1ZVtXTg5szVcQ?= =?Windows-1252?Q?Wzb6ug9BU9fYqrmCDuL7vesw9r5mpOGRWSXVaFTyldxa3uG+Q1s4jqUR?= =?Windows-1252?Q?jepnsNtoiLGuy1QY1IyuPC2/b0GfjiAQhixh0arzZxk9x6/E0NJtRT97?= =?Windows-1252?Q?lEwPAI/LQANr6kBA4b+CpJ+NTPoRhuES6+SGQ1f+XN/It2Tl0oWpaNnk?= =?Windows-1252?Q?wz9SUPbstrPxK3hZ57IOAZY90hznnjPoBYojgvodryZIPbMpqIokzjWv?= =?Windows-1252?Q?SKY01GK4GV+f8s2Zh7g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR0201MB1491;5:mNglWEVMPLowibJLIA44W+Gd88FRafmPXg1BpgllyoPv5HsvXl94zvwbd0LZZAY/0t1sTw4FYT+huXoBa4R3dwftRjcczk3m4+wn0K08qjS68T4sffQiYjR1quDtFC8zuASwXgW95o6gyVaSg4hAMw==;24:CdAi+X1Csw9ScG7cCATke1GYJ71Of5Z4swwKCCWTAXnvtXsbYnxJfUeW3t98TWvBd37yfVBkZpqe5YQZBXB6AInT/5hCaQSHI0YEslev/6o=;20:hjVZTUHpxPOyflieLgugp21AeprRwxV54Ewd2FE2ZrcWKiv2pnmsZDxrt2HZ28bcUFJX1FI4wa+4kafGPl3P9Q== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2015 07:06:35.3200 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1491 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3142 Lines: 77 Hi Marc, Sorry for delay reply. Please see my comments below. On 7/17/15 22:46, Marc Zyngier wrote: > Hi Suravee, > > On 13/07/15 10:14, Suravee Suthikulpanit wrote: >> ACPI core patches for ARM64 are now upstreamed in 4.1. The PCI support >> patches for ARM64 ACPI are also in progress. I am sending out this RFC to >> introduce ACPI support for GICv2m. This would allow MSI to work when >> booting ACPI. >> >> There are some modifications to the irq_domain and acpi/gsi code. >> >> Due to a large number of prerequisite patches, I have put together a branch >> on GitHub for review and testing: >> >> https://github.com/ssuthiku/linux.git acpi-pci-msi-rfc2 >> >> This branch has been tested on AMD Seattle Platform. Any feedback and >> comments are appreciated. > > I've had a look at this, and mostly the init_alloc_info method you > introduce. I have a few issues with the concept: > > - The first thing that annoys me a tiny bit is that the bottom irqchip > (the GIC in your case) is allocating memory on the behalf of all the > others in the stack, while the actual users are sitting on top. It feels > really backward. Why can't this allocation be performed at the top of > the stack? The order of the request goes from top to bottom anyway, so > what am I missing? The reason I am allocating struct gic_irq_alloc_info in gic_init_irq_alloc_info() is because this structure is specific to GIC, and GIC have control of what information it would need to store in this structure. The upper levels (ACPI, DT, and GICv2m domains) should not need to know about the detail of this structure. They mainly just need to keep track of the handle for this structure, and pass it into the irq_domain_alloc_irqs(). > - This gic_irq_alloc_info structure is completely GIC specific, and > contains things that don't make much sense to most domains. Exactly. Also, I think another benefits is to consolidate the different mapping that GIC supports (e.g. SPI, PPI, GSI) used in different places. Please refer to patch 2. > Here, it is > only useful to the GICv2m driver, but not to the top MSI layer. So why > should this structure be passed around across domains that don't care? Actually, this structure is not used just by the GICv2m driver. It's also used by the ACPI acpi_register_gsi(), which is also allocating interrupts with GSI mapping. > So I'd like to get back to the intent: why do you need to turn the logic > around? I understand that of_phandle_args is not ideal for ACPI, and I'm > happy to find ways around its limitations. But why do we need to reverse > the allocation logic and make this structure global along the stack, > rather than keeping it for local interaction at the frontier of two domains? Please see the explanation above. Let me know if you have other ideas or if I am missing your point on the reverse allocation. Thanks, Suravee > Thanks, > > M. > -- 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/