diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2008-08-25 03:16:23 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2008-08-25 03:16:23 +0000 |
commit | ee73e55cdc31ad5d2e1aeae1952e22c7ccfc4b1d (patch) | |
tree | 83435f7cf14c63865bf1182a99f7c36eefc61ec0 /sys/arch/macppc/dev | |
parent | 0f675d6ffe4d39e242514c6d8150a3315ae4fcc7 (diff) |
how about i commit what was actually approved? wrong tree, bad todd ;-(
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r-- | sys/arch/macppc/dev/openpic.c | 69 | ||||
-rw-r--r-- | sys/arch/macppc/dev/snapper.c | 4 |
2 files changed, 7 insertions, 66 deletions
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c index 3baf5a9884e..436351f36df 100644 --- a/sys/arch/macppc/dev/openpic.c +++ b/sys/arch/macppc/dev/openpic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openpic.c,v 1.46 2008/08/24 23:44:44 todd Exp $ */ +/* $OpenBSD: openpic.c,v 1.47 2008/08/25 03:16:22 todd Exp $ */ /*- * Copyright (c) 1995 Per Fogelstrom @@ -75,14 +75,7 @@ void openpic_enable_irq_mask(int irq_mask); #define HWIRQ_MASK 0x0fffffff /* IRQ vector used for inter-processor interrupts. */ -#define IPI_VECTOR_DDB 64 -#define IPI_VECTOR_NOP 65 -#ifdef MULTIPROCESSOR -static struct evcount ipi_ddb[2]; -static struct evcount ipi_nop[2]; -static int ipi_nopirq = IPI_VECTOR_NOP; -static int ipi_ddbirq = IPI_VECTOR_DDB; -#endif +#define IPI_VECTOR 64 static __inline u_int openpic_read(int); static __inline void openpic_write(int, u_int); @@ -93,7 +86,6 @@ void openpic_init(void); void openpic_set_priority(int, int); static __inline int openpic_read_irq(int); static __inline void openpic_eoi(int); -void openpic_ipi_ddb(void); struct openpic_softc { struct device sc_dev; @@ -672,9 +664,6 @@ openpic_send_ipi(int cpu) #endif - -/* XXX */ extern long hostid; - void ext_intr_openpic() { @@ -690,16 +679,8 @@ ext_intr_openpic() while (realirq != 255) { #ifdef MULTIPROCESSOR - if (realirq == IPI_VECTOR_NOP) { - ipi_nop[ci->ci_cpuid].ec_count++; - openpic_eoi(ci->ci_cpuid); - realirq = openpic_read_irq(ci->ci_cpuid); - continue; - } - if (realirq == IPI_VECTOR_DDB) { - ipi_ddb[ci->ci_cpuid].ec_count++; + if (realirq == IPI_VECTOR) { openpic_eoi(ci->ci_cpuid); - openpic_ipi_ddb(); realirq = openpic_read_irq(ci->ci_cpuid); continue; } @@ -718,8 +699,8 @@ ext_intr_openpic() openpic_eoi(ci->ci_cpuid); } else { openpic_enable_irq_mask(~imask[o_intrmaxlvl[realirq]]); - ocpl = splraise(imask[o_intrmaxlvl[realirq]]); openpic_eoi(ci->ci_cpuid); + ocpl = splraise(imask[o_intrmaxlvl[realirq]]); ih = o_intrhand[irq]; while (ih) { @@ -780,22 +761,8 @@ openpic_init() /* Set up inter-processor interrupts. */ x = openpic_read(OPENPIC_IPI_VECTOR(0)); x &= ~(OPENPIC_IMASK | OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK); - x |= (15 << OPENPIC_PRIORITY_SHIFT) | IPI_VECTOR_NOP; + x |= (15 << OPENPIC_PRIORITY_SHIFT) | IPI_VECTOR; openpic_write(OPENPIC_IPI_VECTOR(0), x); - - evcount_attach(&ipi_nop[0], "ipi_nop0", (void *)&ipi_nopirq, - &evcount_intr); - evcount_attach(&ipi_nop[1], "ipi_nop1", (void *)&ipi_nopirq, - &evcount_intr); - - x = openpic_read(OPENPIC_IPI_VECTOR(1)); - x &= ~(OPENPIC_IMASK | OPENPIC_PRIORITY_MASK | OPENPIC_VECTOR_MASK); - x |= (15 << OPENPIC_PRIORITY_SHIFT) | IPI_VECTOR_DDB; - openpic_write(OPENPIC_IPI_VECTOR(1), x); - evcount_attach(&ipi_ddb[0], "ipi_ddb0", (void *)&ipi_ddbirq, - &evcount_intr); - evcount_attach(&ipi_ddb[1], "ipi_ddb1", (void *)&ipi_ddbirq, - &evcount_intr); #endif /* XXX set spurious intr vector */ @@ -828,29 +795,3 @@ openpic_prog_button (void *arg) #endif return 1; } - -void -openpic_ipi_ddb() -{ - printf("ipi_ddb() called\n"); - Debugger(); -} - -void -ppc_send_ipi(struct cpu_info *ci, int id) -{ - printf("sending IPI %d to %d\n", id, ci->ci_cpuid); - switch (id) { - case PPC_IPI_NOP: - id = 0; - break; - case PPC_IPI_DDB: - id = 1; - break; - default: - printf("invalid ipi send to cpu %d %d\n", ci->ci_cpuid, id); - return; - } - - openpic_write(OPENPIC_IPI(curcpu()->ci_cpuid, id), 1 << ci->ci_cpuid); -} diff --git a/sys/arch/macppc/dev/snapper.c b/sys/arch/macppc/dev/snapper.c index 8b424854dd8..110070a7ab6 100644 --- a/sys/arch/macppc/dev/snapper.c +++ b/sys/arch/macppc/dev/snapper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snapper.c,v 1.30 2008/08/24 23:44:44 todd Exp $ */ +/* $OpenBSD: snapper.c,v 1.31 2008/08/25 03:16:22 todd Exp $ */ /* $NetBSD: snapper.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */ /*- @@ -198,7 +198,7 @@ struct { int high, mid, low; } snapper_volumetab[] = { { 0x07, 0xF1, 0x7B }, /* 18.0 */ - { 0x07, 0x7F, 0xBB }, 0x/* 17.5 */ + { 0x07, 0x7F, 0xBB }, /* 17.5 */ { 0x07, 0x14, 0x57 }, /* 17.0 */ { 0x06, 0xAE, 0xF6 }, /* 16.5 */ { 0x06, 0x4F, 0x40 }, /* 16.0 */ |