summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2009-12-29 14:10:30 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2009-12-29 14:10:30 +0000
commit61637602eb7ffa3ac0b5717004ca6b59a46fa81e (patch)
tree9c88e2f49dbb9f75237db7cadc0c9d5df89441b3 /sys/arch/hppa/dev
parent4bbe32285a381a2eefebc10285326603d6cdb881 (diff)
Move hppa to a "cpu0 at mainbus0" configuration, rather than knocking CPUs
out in the cpu match function. Whilst here also hardwire the clock to IRQ 31, thus preventing one from building a kernel without hardclock. ok kettenis@ miod@
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r--sys/arch/hppa/dev/cpu.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/arch/hppa/dev/cpu.c b/sys/arch/hppa/dev/cpu.c
index 943a6e5beb6..b8f0ec92473 100644
--- a/sys/arch/hppa/dev/cpu.c
+++ b/sys/arch/hppa/dev/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.29 2009/02/08 18:33:28 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.30 2009/12/29 14:10:29 jsing Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
@@ -63,16 +63,17 @@ cpumatch(parent, cfdata, aux)
void *cfdata;
void *aux;
{
- struct confargs *ca = aux;
struct cfdata *cf = cfdata;
+ struct confargs *ca = aux;
- /* there will be only one for now XXX */
/* probe any 1.0, 1.1 or 2.0 */
- if (cf->cf_unit > 0 ||
- ca->ca_type.iodc_type != HPPA_TYPE_NPROC ||
+ if (ca->ca_type.iodc_type != HPPA_TYPE_NPROC ||
ca->ca_type.iodc_sv_model != HPPA_NPROC_HPPA)
return 0;
+ if (cf->cf_unit >= MAXCPUS)
+ return 0;
+
return 1;
}
@@ -92,7 +93,6 @@ cpuattach(parent, self, aux)
extern int cpu_hardclock(void *);
struct cpu_softc *sc = (struct cpu_softc *)self;
- struct confargs *ca = aux;
u_int mhz = 100 * cpu_ticksnum / cpu_ticksdenom;
const char *p;
@@ -150,12 +150,9 @@ cpuattach(parent, self, aux)
else if (pdc_btlb.finfo.num_i || pdc_btlb.finfo.num_d)
printf(", %u/%u D/I BTLBs",
pdc_btlb.finfo.num_i, pdc_btlb.finfo.num_d);
- printf("\n");
- /* sanity against lusers amongst config editors */
- if (ca->ca_irq == 31)
- sc->sc_ih = cpu_intr_establish(IPL_CLOCK, ca->ca_irq,
- cpu_hardclock, NULL /*frame*/, sc->sc_dev.dv_xname);
- else
- printf ("%s: bad irq %d\n", sc->sc_dev.dv_xname, ca->ca_irq);
+ sc->sc_ih = cpu_intr_establish(IPL_CLOCK, 31,
+ cpu_hardclock, NULL /*frame*/, sc->sc_dev.dv_xname);
+
+ printf("\n");
}