diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-10-09 04:45:19 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-10-09 04:45:19 +0000 |
commit | 65e20bda0996ed88b33ac28272610e8f80624028 (patch) | |
tree | 00d373c5cebfa55cc10bd71e5bd0cb5c04c0a6a9 /sys/sun4v | |
parent | e9d6f8c90513a65c602d0b73a29af6c05d1a5136 (diff) | |
download | FreeBSD-src-65e20bda0996ed88b33ac28272610e8f80624028.zip FreeBSD-src-65e20bda0996ed88b33ac28272610e8f80624028.tar.gz |
kernel clean up to make the sun4v kernel build
Reviewed by: jmg
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/sun4v')
-rw-r--r-- | sys/sun4v/conf/GENERIC | 7 | ||||
-rw-r--r-- | sys/sun4v/include/asi.h | 15 | ||||
-rw-r--r-- | sys/sun4v/include/tte.h | 11 | ||||
-rw-r--r-- | sys/sun4v/sun4v/exception.S | 19 | ||||
-rw-r--r-- | sys/sun4v/sun4v/machdep.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/t1_copy.S | 1 | ||||
-rw-r--r-- | sys/sun4v/sun4v/tsb.c | 2 | ||||
-rw-r--r-- | sys/sun4v/sun4v/vnex.c | 2 |
8 files changed, 51 insertions, 8 deletions
diff --git a/sys/sun4v/conf/GENERIC b/sys/sun4v/conf/GENERIC index 0acbaab..168d27c 100644 --- a/sys/sun4v/conf/GENERIC +++ b/sys/sun4v/conf/GENERIC @@ -211,6 +211,9 @@ device ums # Mouse #options DEBUG_VFS_LOCKS device ccd -options SPIN_PROFILING + +# sched_lock incurs a rather high overhead at a 1000Hz with 32 cpus +# on most arches and in most cases 1000Hz pessimizes performance +# its choice was not adequately researched options HZ=100 -#device vnet + diff --git a/sys/sun4v/include/asi.h b/sys/sun4v/include/asi.h index 799938b..d2a2b1c 100644 --- a/sys/sun4v/include/asi.h +++ b/sys/sun4v/include/asi.h @@ -151,5 +151,20 @@ #define Q(queue_head) (queue_head >> 4) +/* + * sparc64 compat for the loader + */ +#define AA_IMMU_TAR 0x30 +#define AA_DMMU_TAR 0x30 + +#define ASI_UPA_CONFIG_REG 0x4a /* US-I, II */ +#define ASI_IMMU 0x50 +#define ASI_ITLB_DATA_IN_REG 0x54 +#define ASI_ITLB_DATA_ACCESS_REG 0x55 +#define ASI_ITLB_TAG_READ_REG 0x56 +#define ASI_DMMU 0x58 +#define ASI_DTLB_DATA_IN_REG 0x5c +#define ASI_DTLB_DATA_ACCESS_REG 0x5d +#define ASI_DTLB_TAG_READ_REG 0x5e #endif /* !_MACHINE_ASI_H_ */ diff --git a/sys/sun4v/include/tte.h b/sys/sun4v/include/tte.h index 8367575..4cdcd0d 100644 --- a/sys/sun4v/include/tte.h +++ b/sys/sun4v/include/tte.h @@ -125,6 +125,17 @@ struct pmap; #define VTD_32M TTE32M #define VTD_256M TTE256M + +/* + * sparc64 compatibility for the loader + */ + +#define TD_SIZE_SHIFT (61) +#define TS_4M (3UL) + +#define TD_V (1UL << 63) +#define TD_4M (TS_4M << TD_SIZE_SHIFT) + /* * default flags for kernel pages */ diff --git a/sys/sun4v/sun4v/exception.S b/sys/sun4v/sun4v/exception.S index 33251ca..71b7210 100644 --- a/sys/sun4v/sun4v/exception.S +++ b/sys/sun4v/sun4v/exception.S @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$") #include <machine/tstate.h> #include <machine/wstate.h> #include <machine/hypervisorvar.h> -#include <machine/errata.h> #include "assym.s" #include <machine/mmu.h> @@ -694,6 +693,7 @@ tick_ ## tl ## _entry: \ .align 32 .endm +#ifdef KDTRACE .macro dtrace_fasttrap sethi %hi(dtrace_fasttrap_probe_ptr), %g4 ldx [%g4 + %lo(dtrace_fasttrap_probe_ptr)], %g4 @@ -716,7 +716,22 @@ tick_ ## tl ## _entry: \ sub %g0, 1, %g4 .align 32 .endm - +#else + .macro dtrace_fasttrap + nop + .align 32 + .endm + + .macro dtrace_pid + nop + .align 32 + .endm + + .macro dtrace_return + nop + .align 32 + .endm +#endif .macro tl0_fp_restore GET_PCB(PCB_REG) ! 3 instructions ldx [%g6 + PCB_FLAGS], %g1 diff --git a/sys/sun4v/sun4v/machdep.c b/sys/sun4v/sun4v/machdep.c index 1d8208f..22a37a6 100644 --- a/sys/sun4v/sun4v/machdep.c +++ b/sys/sun4v/sun4v/machdep.c @@ -376,7 +376,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) * Initialize proc0 stuff (p_contested needs to be done early). */ - proc_linkup(&proc0, &thread0); + proc_linkup(&proc0, &ksegrp0, &thread0); proc0.p_md.md_sigtramp = NULL; proc0.p_md.md_utrap = NULL; frame0.tf_tstate = TSTATE_IE | TSTATE_PEF | TSTATE_PRIV; diff --git a/sys/sun4v/sun4v/t1_copy.S b/sys/sun4v/sun4v/t1_copy.S index 23bdeeb..67440d8 100644 --- a/sys/sun4v/sun4v/t1_copy.S +++ b/sys/sun4v/sun4v/t1_copy.S @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$") #include <machine/tstate.h> #include <machine/wstate.h> #include <machine/hypervisorvar.h> -#include <machine/errata.h> .register %g2,#ignore .register %g3,#ignore diff --git a/sys/sun4v/sun4v/tsb.c b/sys/sun4v/sun4v/tsb.c index 83ed926..6f1e3fa 100644 --- a/sys/sun4v/sun4v/tsb.c +++ b/sys/sun4v/sun4v/tsb.c @@ -120,8 +120,8 @@ tsb_deinit(hv_tsb_info_t *hvtsb) for (i = 0, tm = m; i < TSB_SIZE; i++, m++) { tm->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); + vm_page_free(tm); } - vm_page_release_contig(m, TSB_SIZE); } diff --git a/sys/sun4v/sun4v/vnex.c b/sys/sun4v/sun4v/vnex.c index 11aa182..a9e57c2 100644 --- a/sys/sun4v/sun4v/vnex.c +++ b/sys/sun4v/sun4v/vnex.c @@ -26,9 +26,9 @@ * */ +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/cdefs.h> #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> |