summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/processor.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-04 10:35:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-04 10:35:12 -0700
commitde481ba925e880764e38b8756c93c05006892507 (patch)
tree8ed982c9440f75e3899ea0d4e62bb83f2947fdf9 /arch/parisc/kernel/processor.c
parentdd0888c264c0d5feb5d86eb69c1fdbcdb42566af (diff)
parent64daa4435a40aa1b7d0ece598ae783b89dda13ee (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: (27 commits) parisc: use generic atomic64 on 32-bit parisc: superio: fix build breakage parisc: Fix PCI resource allocation on non-PAT SBA machines parisc: perf: wire up sys_perf_counter_open parisc: add task_pt_regs macro parisc: wire sys_perf_counter_open to sys_ni_syscall parisc: inventory.c, fix bloated stack frame parisc: processor.c, fix bloated stack frame parisc: fix compile warning in mm/init.c parisc: remove dead code from sys_parisc32.c parisc: wire up rt_tgsigqueueinfo parisc: ensure broadcast tlb purge runs single threaded parisc: fix "delay!" timer handling parisc: fix mismatched parenthesis in memcpy.c parisc: Fix gcc 4.4 warning in lba_pci.c parisc: add parameter to read_cr16() parisc: decode_exc.c should include kernel.h parisc: remove obsolete hw_interrupt_type parisc: fix irq compile bugs in arch/parisc/kernel/irq.c parisc: advertise PCI devs after "assign_resources" ... Manually fixed up trivial conflicts in tools/perf/perf.h due to addition of SH vs HPPA perf-counter support.
Diffstat (limited to 'arch/parisc/kernel/processor.c')
-rw-r--r--arch/parisc/kernel/processor.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index e09d0f7fb6b0..c8fb61ed32f4 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -1,5 +1,4 @@
-/* $Id: processor.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $
- *
+/*
* Initial setup-routines for HP 9000 based hardware.
*
* Copyright (C) 1991, 1992, 1995 Linus Torvalds
@@ -121,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