From patchwork Tue Jun 23 17:18:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kyle mcmartin X-Patchwork-Id: 32018 X-Patchwork-Delegate: kyle@mcmartin.ca Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5NHPXhL029693 for ; Tue, 23 Jun 2009 17:25:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467AbZFWRZ3 (ORCPT ); Tue, 23 Jun 2009 13:25:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752672AbZFWRZ3 (ORCPT ); Tue, 23 Jun 2009 13:25:29 -0400 Received: from there.is.no.cabal.ca ([134.117.69.58]:37802 "EHLO shortfin.cabal.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbZFWRZ2 (ORCPT ); Tue, 23 Jun 2009 13:25:28 -0400 X-Greylist: delayed 446 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Jun 2009 13:25:28 EDT Received: from kyle by shortfin.cabal.ca with local (Exim 4.69) (envelope-from ) id 1MJ9dc-0003uP-00 for linux-parisc@vger.kernel.org; Tue, 23 Jun 2009 13:18:28 -0400 From: Kyle McMartin To: Subject: [PATCH 1/2] parisc: processor.c, fix bloated stack frame Date: Tue, 23 Jun 2009 13:18:26 -0400 Message-Id: <1245777507-14997-1-git-send-email-kyle@mcmartin.ca> X-Mailer: git-send-email 1.6.3.1 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org From: Kyle McMartin The pa_pdc_cell struct can be kmalloc'd, so do that instead. Signed-off-by: Kyle McMartin --- arch/parisc/kernel/processor.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 1ca69a8..c8fb61e 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c @@ -120,22 +120,28 @@ static int __cpuinit processor_probe(struct parisc_device *dev) if (is_pdc_pat()) { ulong status; unsigned long bytecnt; - pdc_pat_cell_mod_maddr_block_t pa_pdc_cell; + pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell; #undef USE_PAT_CPUID #ifdef USE_PAT_CPUID struct pdc_pat_cpu_num cpu_info; #endif + pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL); + if (!pa_pdc_cell) + panic("couldn't allocate memory for PDC_PAT_CELL!"); + status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc, - dev->mod_index, PA_VIEW, &pa_pdc_cell); + dev->mod_index, PA_VIEW, pa_pdc_cell); BUG_ON(PDC_OK != status); /* verify it's the same as what do_pat_inventory() found */ - BUG_ON(dev->mod_info != pa_pdc_cell.mod_info); - BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location); + BUG_ON(dev->mod_info != pa_pdc_cell->mod_info); + BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location); + + txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */ - txn_addr = pa_pdc_cell.mod[0]; /* id_eid for IO sapic */ + kfree(pa_pdc_cell); #ifdef USE_PAT_CPUID /* We need contiguous numbers for cpuid. Firmware's notion