Skip to content

Commit 64a0cdb

Browse files
committed
parisc: processor.c, fix bloated stack frame
The pa_pdc_cell struct can be kmalloc'd, so do that instead. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
1 parent 20dbc9f commit 64a0cdb

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

‎arch/parisc/kernel/processor.c‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,28 @@ static int __cpuinit processor_probe(struct parisc_device *dev)
120120
if (is_pdc_pat()) {
121121
ulong status;
122122
unsigned long bytecnt;
123-
pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;
123+
pdc_pat_cell_mod_maddr_block_t *pa_pdc_cell;
124124
#undef USE_PAT_CPUID
125125
#ifdef USE_PAT_CPUID
126126
struct pdc_pat_cpu_num cpu_info;
127127
#endif
128128

129+
pa_pdc_cell = kmalloc(sizeof (*pa_pdc_cell), GFP_KERNEL);
130+
if (!pa_pdc_cell)
131+
panic("couldn't allocate memory for PDC_PAT_CELL!");
132+
129133
status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc,
130-
dev->mod_index, PA_VIEW, &pa_pdc_cell);
134+
dev->mod_index, PA_VIEW, pa_pdc_cell);
131135

132136
BUG_ON(PDC_OK != status);
133137

134138
/* verify it's the same as what do_pat_inventory() found */
135-
BUG_ON(dev->mod_info != pa_pdc_cell.mod_info);
136-
BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location);
139+
BUG_ON(dev->mod_info != pa_pdc_cell->mod_info);
140+
BUG_ON(dev->pmod_loc != pa_pdc_cell->mod_location);
141+
142+
txn_addr = pa_pdc_cell->mod[0]; /* id_eid for IO sapic */
137143

138-
txn_addr = pa_pdc_cell.mod[0]; /* id_eid for IO sapic */
144+
kfree(pa_pdc_cell);
139145

140146
#ifdef USE_PAT_CPUID
141147
/* We need contiguous numbers for cpuid. Firmware's notion

0 commit comments

Comments
 (0)