svn commit: r184609 - in projects/releng_7_xen/sys: conf i386/conf
i386/i386 i386/include i386/xen
Kip Macy
kmacy at FreeBSD.org
Mon Nov 3 18:07:36 PST 2008
Author: kmacy
Date: Tue Nov 4 02:07:34 2008
New Revision: 184609
URL: http://svn.freebsd.org/changeset/base/184609
Log:
make XEN config build
Modified:
projects/releng_7_xen/sys/conf/files
projects/releng_7_xen/sys/i386/conf/DEFAULTS
projects/releng_7_xen/sys/i386/conf/XEN
projects/releng_7_xen/sys/i386/i386/apic_vector.s
projects/releng_7_xen/sys/i386/i386/machdep.c
projects/releng_7_xen/sys/i386/i386/support.s
projects/releng_7_xen/sys/i386/include/pmap.h
projects/releng_7_xen/sys/i386/xen/clock.c
projects/releng_7_xen/sys/i386/xen/mp_machdep.c
projects/releng_7_xen/sys/i386/xen/pmap.c
Modified: projects/releng_7_xen/sys/conf/files
==============================================================================
--- projects/releng_7_xen/sys/conf/files Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/conf/files Tue Nov 4 02:07:34 2008 (r184609)
@@ -1594,6 +1594,7 @@ libkern/strcasecmp.c standard
libkern/strcat.c standard
libkern/strcmp.c standard
libkern/strcpy.c standard
+libkern/strcspn.c standard
libkern/strdup.c standard
libkern/strlcat.c standard
libkern/strlcpy.c standard
Modified: projects/releng_7_xen/sys/i386/conf/DEFAULTS
==============================================================================
--- projects/releng_7_xen/sys/i386/conf/DEFAULTS Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/conf/DEFAULTS Tue Nov 4 02:07:34 2008 (r184609)
@@ -25,3 +25,5 @@ options GEOM_MBR
# KSE support went from being default to a kernel option
options KSE
+options NATIVE
+device atpic
\ No newline at end of file
Modified: projects/releng_7_xen/sys/i386/conf/XEN
==============================================================================
--- projects/releng_7_xen/sys/i386/conf/XEN Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/conf/XEN Tue Nov 4 02:07:34 2008 (r184609)
@@ -80,6 +80,7 @@ option XEN
nodevice atpic
nodevice isa
options MCLSHIFT=12
+device genclock
# To make an SMP kernel, the next two lines are needed
options SMP # Symmetric MultiProcessor Kernel
Modified: projects/releng_7_xen/sys/i386/i386/apic_vector.s
==============================================================================
--- projects/releng_7_xen/sys/i386/i386/apic_vector.s Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/i386/apic_vector.s Tue Nov 4 02:07:34 2008 (r184609)
@@ -270,6 +270,7 @@ IDTVEC(invlcache)
/*
* Handler for IPIs sent via the per-cpu IPI bitmap.
*/
+#ifndef XEN
.text
SUPERALIGN_TEXT
IDTVEC(ipi_intr_bitmap_handler)
@@ -284,7 +285,8 @@ IDTVEC(ipi_intr_bitmap_handler)
call ipi_bitmap_handler
MEXITCOUNT
jmp doreti
-
+#endif
+
/*
* Executed by a CPU when it receives an IPI_STOP from another CPU.
*/
Modified: projects/releng_7_xen/sys/i386/i386/machdep.c
==============================================================================
--- projects/releng_7_xen/sys/i386/i386/machdep.c Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/i386/machdep.c Tue Nov 4 02:07:34 2008 (r184609)
@@ -1218,7 +1218,7 @@ void
cpu_idle(void)
{
-#ifdef SMP
+#if defined(SMP) && !defined(XEN)
if (mp_grab_cpu_hlt())
return;
#endif
Modified: projects/releng_7_xen/sys/i386/i386/support.s
==============================================================================
--- projects/releng_7_xen/sys/i386/i386/support.s Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/i386/support.s Tue Nov 4 02:07:34 2008 (r184609)
@@ -1459,10 +1459,11 @@ END(bcmp)
*/
/* void lgdt(struct region_descriptor *rdp); */
ENTRY(lgdt)
- /* reload the descriptor table */
+#ifndef XEN
+ /* reload the descriptor table */
movl 4(%esp),%eax
lgdt (%eax)
-
+#endif
/* flush the prefetch q */
jmp 1f
nop
Modified: projects/releng_7_xen/sys/i386/include/pmap.h
==============================================================================
--- projects/releng_7_xen/sys/i386/include/pmap.h Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/include/pmap.h Tue Nov 4 02:07:34 2008 (r184609)
@@ -470,7 +470,9 @@ void pmap_bootstrap(vm_paddr_t);
int pmap_change_attr(vm_offset_t, vm_size_t, int);
void pmap_init_pat(void);
void pmap_kenter(vm_offset_t va, vm_paddr_t pa);
+#ifndef XEN
void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode);
+#endif
void *pmap_kenter_temporary(vm_paddr_t pa, int i);
void pmap_kremove(vm_offset_t);
void *pmap_mapbios(vm_paddr_t, vm_size_t);
Modified: projects/releng_7_xen/sys/i386/xen/clock.c
==============================================================================
--- projects/releng_7_xen/sys/i386/xen/clock.c Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/xen/clock.c Tue Nov 4 02:07:34 2008 (r184609)
@@ -908,27 +908,3 @@ idle_block(void)
PANIC_IF(HYPERVISOR_set_timer_op(processed_system_time + NS_PER_TICK) != 0);
HYPERVISOR_sched_op(SCHEDOP_block, 0);
}
-
-int
-timer_spkr_acquire(void)
-{
-
- return (0);
-}
-
-int
-timer_spkr_release(void)
-{
-
- return (0);
-}
-
-void
-timer_spkr_setfreq(int freq)
-{
-
-}
-
-
-
-
Modified: projects/releng_7_xen/sys/i386/xen/mp_machdep.c
==============================================================================
--- projects/releng_7_xen/sys/i386/xen/mp_machdep.c Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/xen/mp_machdep.c Tue Nov 4 02:07:34 2008 (r184609)
@@ -154,40 +154,6 @@ extern void Xhypervisor_callback(void);
extern void failsafe_callback(void);
extern void pmap_lazyfix_action(void);
-struct cpu_group *
-cpu_topo(void)
-{
- if (cpu_cores == 0)
- cpu_cores = 1;
- if (cpu_logical == 0)
- cpu_logical = 1;
- if (mp_ncpus % (cpu_cores * cpu_logical) != 0) {
- printf("WARNING: Non-uniform processors.\n");
- printf("WARNING: Using suboptimal topology.\n");
- return (smp_topo_none());
- }
- /*
- * No multi-core or hyper-threaded.
- */
- if (cpu_logical * cpu_cores == 1)
- return (smp_topo_none());
- /*
- * Only HTT no multi-core.
- */
- if (cpu_logical > 1 && cpu_cores == 1)
- return (smp_topo_1level(CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
- /*
- * Only multi-core no HTT.
- */
- if (cpu_cores > 1 && cpu_logical == 1)
- return (smp_topo_1level(CG_SHARE_NONE, cpu_cores, 0));
- /*
- * Both HTT and multi-core.
- */
- return (smp_topo_2level(CG_SHARE_NONE, cpu_cores,
- CG_SHARE_L1, cpu_logical, CG_FLAG_HTT));
-}
-
/*
* Calculate usable address in base memory for AP trampoline code.
*/
@@ -381,7 +347,12 @@ smp_reschedule_interrupt(void *unused)
#ifdef COUNT_IPIS
(*ipi_preempt_counts[cpu])++;
#endif
- sched_preempt(curthread);
+ thread_lock(curthread);
+ if (curthread->td_critnest > 1)
+ curthread->td_owepreempt = 1;
+ else
+ mi_switch(SW_INVOL | SW_PREEMPT, NULL);
+ thread_unlock(curthread);
}
if (ipi_bitmap & (1 << IPI_AST)) {
Modified: projects/releng_7_xen/sys/i386/xen/pmap.c
==============================================================================
--- projects/releng_7_xen/sys/i386/xen/pmap.c Tue Nov 4 01:45:49 2008 (r184608)
+++ projects/releng_7_xen/sys/i386/xen/pmap.c Tue Nov 4 02:07:34 2008 (r184609)
@@ -2629,7 +2629,7 @@ retry:
* insert this page into the given map NOW.
*/
void
-pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
+pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m,
vm_prot_t prot, boolean_t wired)
{
vm_paddr_t pa;
@@ -3433,56 +3433,6 @@ pmap_page_exists_quick(pmap_t pmap, vm_p
}
/*
- * pmap_page_wired_mappings:
- *
- * Return the number of managed mappings to the given physical page
- * that are wired.
- */
-int
-pmap_page_wired_mappings(vm_page_t m)
-{
- pv_entry_t pv;
- pt_entry_t *pte;
- pmap_t pmap;
- int count;
-
- count = 0;
- if ((m->flags & PG_FICTITIOUS) != 0)
- return (count);
- mtx_assert(&vm_page_queue_mtx, MA_OWNED);
- sched_pin();
- TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
- pmap = PV_PMAP(pv);
- PMAP_LOCK(pmap);
- pte = pmap_pte_quick(pmap, pv->pv_va);
- if ((*pte & PG_W) != 0)
- count++;
- PMAP_UNLOCK(pmap);
- }
- sched_unpin();
- return (count);
-}
-
-/*
- * Returns TRUE if the given page is mapped individually or as part of
- * a 4mpage. Otherwise, returns FALSE.
- */
-boolean_t
-pmap_page_is_mapped(vm_page_t m)
-{
- struct md_page *pvh;
-
- if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0)
- return (FALSE);
- mtx_assert(&vm_page_queue_mtx, MA_OWNED);
- if (TAILQ_EMPTY(&m->md.pv_list)) {
- pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
- return (!TAILQ_EMPTY(&pvh->pv_list));
- } else
- return (TRUE);
-}
-
-/*
* Remove all pages from specified address space
* this aids process exit speeds. Also, this code
* is special cased for current process only, but
@@ -4075,28 +4025,16 @@ pmap_activate(struct thread *td)
critical_exit();
}
-/*
- * Increase the starting virtual address of the given mapping if a
- * different alignment might result in more superpage mappings.
- */
-void
-pmap_align_superpage(vm_object_t object, vm_ooffset_t offset,
- vm_offset_t *addr, vm_size_t size)
+vm_offset_t
+pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size)
{
- vm_offset_t superpage_offset;
- if (size < NBPDR)
- return;
- if (object != NULL && (object->flags & OBJ_COLORED) != 0)
- offset += ptoa(object->pg_color);
- superpage_offset = offset & PDRMASK;
- if (size - ((NBPDR - superpage_offset) & PDRMASK) < NBPDR ||
- (*addr & PDRMASK) == superpage_offset)
- return;
- if ((*addr & PDRMASK) < superpage_offset)
- *addr = (*addr & ~PDRMASK) + superpage_offset;
- else
- *addr = ((*addr + PDRMASK) & ~PDRMASK) + superpage_offset;
+ if ((obj == NULL) || (size < NBPDR) || (obj->type != OBJT_DEVICE)) {
+ return addr;
+ }
+
+ addr = (addr + PDRMASK) & ~PDRMASK;
+ return addr;
}
#if defined(PMAP_DEBUG)
More information about the svn-src-projects
mailing list