diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2009-12-29 14:10:30 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2009-12-29 14:10:30 +0000 |
commit | 61637602eb7ffa3ac0b5717004ca6b59a46fa81e (patch) | |
tree | 9c88e2f49dbb9f75237db7cadc0c9d5df89441b3 | |
parent | 4bbe32285a381a2eefebc10285326603d6cdb881 (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@
-rw-r--r-- | sys/arch/hppa/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/hppa/dev/cpu.c | 23 |
2 files changed, 12 insertions, 15 deletions
diff --git a/sys/arch/hppa/conf/GENERIC b/sys/arch/hppa/conf/GENERIC index 447f82575ca..64c8f84fb1e 100644 --- a/sys/arch/hppa/conf/GENERIC +++ b/sys/arch/hppa/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.131 2009/12/21 22:17:37 matthieu Exp $ +# $OpenBSD: GENERIC,v 1.132 2009/12/29 14:10:29 jsing Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -41,7 +41,7 @@ mem* at mainbus0 flags 0x0000 # /dev/*mem and memory controller pdc0 at mainbus0 # PDC/IODC wrapper for boot console power0 at mainbus0 # power/fail manager (iv 30) lcd0 at mainbus0 # LCD -cpu* at mainbus0 irq 31 # HP PA-RISC cpu +cpu0 at mainbus0 irq 31 # HP PA-RISC cpu #fpu* at mainbus0 # HP PA-RISC fpu (iv N/A) #pmu* at mainbus0 irq 29 # HP PA-RISC performance monitor unit phantomas0 at mainbus0 # Phantom PseudoBC GSC+ Port 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"); } |