From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753641AbbATUXw (ORCPT ); Tue, 20 Jan 2015 15:23:52 -0500 Received: from mail-bn1on0119.outbound.protection.outlook.com ([157.56.110.119]:21408 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752053AbbATUXu (ORCPT ); Tue, 20 Jan 2015 15:23:50 -0500 Date: Tue, 20 Jan 2015 14:03:49 -0600 From: Kim Phillips To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , Wang Dongsheng , Anton Blanchard , Himangi Saraogi , Aaron Sierra CC: , Subject: [PATCH] powerpc/fsl_pci: Fix pci stack build bug with FRAME_WARN Message-ID: <20150120140349.a7a9885065c241b555b91717@freescale.com> Organization: Freescale Semiconductor, Inc. X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Kim.Phillips@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(199003)(189002)(92566002)(50226001)(100306002)(62966003)(64706001)(97736003)(47776003)(33646002)(85426001)(104016003)(86362001)(68736005)(50986999)(77096005)(95246002)(105606002)(6806004)(46406003)(19580395003)(19580405001)(46102003)(229853001)(50466002)(87936001)(106466001)(77156002)(36756003)(23726002)(95446003);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR03MB188;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(3005004);SRVR:BN1PR03MB188; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:BN1PR03MB188; X-Forefront-PRVS: 0462918D61 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR03MB188; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2015 20:09:06.1017 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR03MB188 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix this: CC arch/powerpc/sysdev/fsl_pci.o arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pcie_check_link': arch/powerpc/sysdev/fsl_pci.c:91:1: error: the frame size of 1360 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] when configuring FRAME_WARN, by converting the allocation from the stack to the heap. We use GFP_ATOMIC since this function can be called with interrupts disabled. Signed-off-by: Kim Phillips --- arch/powerpc/sysdev/fsl_pci.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 6455c1e..635d743 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -69,11 +69,13 @@ static int fsl_pcie_check_link(struct pci_controller *hose) if (hose->indirect_type & PPC_INDIRECT_TYPE_FSL_CFG_REG_LINK) { if (hose->ops->read == fsl_indirect_read_config) { - struct pci_bus bus; - bus.number = hose->first_busno; - bus.sysdata = hose; - bus.ops = hose->ops; - indirect_read_config(&bus, 0, PCIE_LTSSM, 4, &val); + struct pci_bus *bus; + bus = kmalloc(sizeof(*bus), GFP_ATOMIC); + bus->number = hose->first_busno; + bus->sysdata = hose; + bus->ops = hose->ops; + indirect_read_config(bus, 0, PCIE_LTSSM, 4, &val); + kfree(bus); } else early_read_config_dword(hose, 0, 0, PCIE_LTSSM, &val); if (val < PCIE_LTSSM_L0) -- 2.2.2