diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-11 10:57:52 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-06-11 10:57:52 +0000 |
commit | 22b39eba6f5b77f245fb66ea6bd256541a97cee5 (patch) | |
tree | cb464ed6e05457e4cd81d6605e800aac42ffd550 /sys/arch | |
parent | eb21d18fad992a896e5d3f4e538778f45e35a565 (diff) |
nuke unused stuff
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/cpu.c | 85 |
2 files changed, 2 insertions, 88 deletions
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index b29f112e679..9347a7c338e 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.11 2002/06/07 21:33:43 nordin Exp $ */ +/* $OpenBSD: cpu.h,v 1.12 2002/06/11 10:57:51 art Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -253,9 +253,6 @@ extern struct intrhand *intrlev[MAXINTNUM]; void intr_establish(int level, struct intrhand *); -/* cpu.c */ -paddr_t cpu_alloc(void); -u_int64_t cpu_init(paddr_t, int); /* disksubr.c */ struct dkbad; int isbad(struct dkbad *bt, int, int, int); diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index eb558d6535a..4cd0b713792 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.7 2002/03/14 01:26:45 millert Exp $ */ +/* $OpenBSD: cpu.c,v 1.8 2002/06/11 10:57:51 art Exp $ */ /* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */ /* @@ -123,89 +123,6 @@ static char *iu_vendor[16] = { }; #endif -/* - * Overhead involved in firing up a new CPU: - * - * Allocate a cpuinfo/interrupt stack - * Map that into the kernel - * Initialize the cpuinfo - * Return the TLB entry for the cpuinfo. - */ -u_int64_t -cpu_init(pa, cpu_num) - paddr_t pa; - int cpu_num; -{ - struct cpu_info *ci; - u_int64_t pagesize; - u_int64_t pte; - struct vm_page *m; - psize_t size; - vaddr_t va; - struct pglist mlist; - int error; - - size = NBPG; /* XXXX 8K, 64K, 512K, or 4MB */ - TAILQ_INIT(&mlist); - if ((error = uvm_pglistalloc((psize_t)size, (paddr_t)0, (paddr_t)-1, - (paddr_t)size, (paddr_t)0, &mlist, 1, 0)) != 0) - panic("cpu_start: no memory, error %d", error); - - va = uvm_km_valloc(kernel_map, size); - if (va == 0) - panic("cpu_start: no memory"); - - m = TAILQ_FIRST(&mlist); - pa = VM_PAGE_TO_PHYS(m); - pte = TSB_DATA(0 /* global */, - pagesize, - pa, - 1 /* priv */, - 1 /* Write */, - 1 /* Cacheable */, - 1 /* ALIAS -- Disable D$ */, - 1 /* valid */, - 0 /* IE */); - - /* Map the pages */ - for (; m != NULL; m = TAILQ_NEXT(m,pageq)) { - pa = VM_PAGE_TO_PHYS(m); - pmap_zero_page(pa); - pmap_enter(pmap_kernel(), va, pa | PMAP_NVC, - VM_PROT_READ|VM_PROT_WRITE, - VM_PROT_READ|VM_PROT_WRITE|PMAP_WIRED); - va += NBPG; - } - pmap_update(pmap_kernel()); - - if (!cpus) cpus = (struct cpu_info *)va; - else { - for (ci = cpus; ci->ci_next; ci=ci->ci_next); - ci->ci_next = (struct cpu_info *)va; - } - - switch (size) { -#define K *1024 - case 8 K: - pagesize = TLB_8K; - break; - case 64 K: - pagesize = TLB_64K; - break; - case 512 K: - pagesize = TLB_512K; - break; - case 4 K K: - pagesize = TLB_4M; - break; - default: - panic("cpu_start: stack size %x not a machine page size\n", - (unsigned)size); - } - return (pte|TLB_L); -} - - int cpu_match(parent, vcf, aux) struct device *parent; |