aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-13 17:32:43 +0000
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-11-13 17:32:43 +0000
commitadafcbebd29e4d229ed5b0dd339d5f2447885031 (patch)
tree447ef3bc97cce6fc8e51dfb35156d5fab7104dd3
parent5435ea302127058a5f7f9b76f20d64ded949fd5a (diff)
downloadxen-adafcbebd29e4d229ed5b0dd339d5f2447885031.tar.gz
xen-adafcbebd29e4d229ed5b0dd339d5f2447885031.tar.bz2
xen-adafcbebd29e4d229ed5b0dd339d5f2447885031.zip
bitkeeper revision 1.1159.170.20 (4196453bO-PrYERhRRpFAeXiVJP1Sw)
Remove redundant code and fix small bug in entry.S
-rw-r--r--xen/arch/x86/x86_32/entry.S2
-rw-r--r--xen/arch/x86/x86_32/mm.c31
-rw-r--r--xen/common/schedule.c51
3 files changed, 11 insertions, 73 deletions
diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S
index d0dba03cde..a5e96c4d4c 100644
--- a/xen/arch/x86/x86_32/entry.S
+++ b/xen/arch/x86/x86_32/entry.S
@@ -63,7 +63,7 @@
#include <public/xen.h>
#define GET_CURRENT(reg) \
- movl $4096-4, reg; \
+ movl $8192-4, reg; \
orl %esp, reg; \
andl $~3,reg; \
movl (reg),reg;
diff --git a/xen/arch/x86/x86_32/mm.c b/xen/arch/x86/x86_32/mm.c
index 40acc39c81..d9a0414d2e 100644
--- a/xen/arch/x86/x86_32/mm.c
+++ b/xen/arch/x86/x86_32/mm.c
@@ -54,32 +54,8 @@ void __set_fixmap(enum fixed_addresses idx,
}
-static void __init fixrange_init(unsigned long start,
- unsigned long end,
- l2_pgentry_t *pg_base)
-{
- l2_pgentry_t *l2e;
- int i;
- unsigned long vaddr, page;
-
- vaddr = start;
- i = l2_table_offset(vaddr);
- l2e = pg_base + i;
-
- for ( ; (i < ENTRIES_PER_L2_PAGETABLE) && (vaddr != end); l2e++, i++ )
- {
- if ( l2_pgentry_val(*l2e) != 0 )
- continue;
- page = (unsigned long)alloc_xenheap_page();
- clear_page(page);
- *l2e = mk_l2_pgentry(__pa(page) | __PAGE_HYPERVISOR);
- vaddr += 1 << L2_PAGETABLE_SHIFT;
- }
-}
-
void __init paging_init(void)
{
- unsigned long addr;
void *ioremap_pt;
int i;
@@ -89,13 +65,6 @@ void __init paging_init(void)
mk_l2_pgentry((i << L2_PAGETABLE_SHIFT) |
__PAGE_HYPERVISOR | _PAGE_PSE);
- /*
- * Fixed mappings, only the page table structure has to be
- * created - mappings will be set by set_fixmap():
- */
- addr = FIXADDR_START & ~((1<<L2_PAGETABLE_SHIFT)-1);
- fixrange_init(addr, 0, idle_pg_table);
-
/* Create page table for ioremap(). */
ioremap_pt = (void *)alloc_xenheap_page();
clear_page(ioremap_pt);
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index c037c9e177..4aceef7d2a 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -56,13 +56,11 @@
#define TRC_SCHED_S_TIMER_FN 0x0001000A
#define TRC_SCHED_T_TIMER_FN 0x0001000B
#define TRC_SCHED_DOM_TIMER_FN 0x0001000C
-#define TRC_SCHED_FALLBACK_TIMER_FN 0x0001000D
/* Various timer handlers. */
static void s_timer_fn(unsigned long unused);
static void t_timer_fn(unsigned long unused);
static void dom_timer_fn(unsigned long data);
-static void fallback_timer_fn(unsigned long unused);
/* This is global for now so that private implementations can reach it */
schedule_data_t schedule_data[NR_CPUS];
@@ -87,12 +85,6 @@ static struct scheduler ops;
/* Per-CPU periodic timer sends an event to the currently-executing domain. */
static struct ac_timer t_timer[NR_CPUS];
-/*
- * Per-CPU timer which ensures that even guests with very long quantums get
- * their time-of-day state updated often enough to avoid wrapping.
- */
-static struct ac_timer fallback_timer[NR_CPUS];
-
extern xmem_cache_t *domain_struct_cachep;
void free_domain_struct(struct domain *d)
@@ -428,7 +420,6 @@ int idle_cpu(int cpu)
* - s_timer: per CPU timer for preemption and scheduling decisions
* - t_timer: per CPU periodic timer to send timer interrupt to current dom
* - dom_timer: per domain timer to specifiy timeout values
- * - fallback_timer: safeguard to ensure time is up to date
****************************************************************************/
/* The scheduler timer: force a run through the scheduler*/
@@ -442,41 +433,27 @@ static void s_timer_fn(unsigned long unused)
/* Periodic tick timer: send timer event to current domain*/
static void t_timer_fn(unsigned long unused)
{
- struct domain *p = current;
+ struct domain *d = current;
TRACE_0D(TRC_SCHED_T_TIMER_FN);
- if ( !is_idle_task(p) ) {
- update_dom_time(p->shared_info);
- send_guest_virq(p, VIRQ_TIMER);
+ if ( !is_idle_task(d) )
+ {
+ update_dom_time(d->shared_info);
+ send_guest_virq(d, VIRQ_TIMER);
}
- t_timer[p->processor].expires = NOW() + MILLISECS(10);
- add_ac_timer(&t_timer[p->processor]);
+ t_timer[d->processor].expires = NOW() + MILLISECS(10);
+ add_ac_timer(&t_timer[d->processor]);
}
/* Domain timer function, sends a virtual timer interrupt to domain */
static void dom_timer_fn(unsigned long data)
{
- struct domain *p = (struct domain *)data;
+ struct domain *d = (struct domain *)data;
TRACE_0D(TRC_SCHED_DOM_TIMER_FN);
- update_dom_time(p->shared_info);
- send_guest_virq(p, VIRQ_TIMER);
-}
-
-
-/* Fallback timer to ensure guests get time updated 'often enough'. */
-static void fallback_timer_fn(unsigned long unused)
-{
- struct domain *p = current;
-
- TRACE_0D(TRC_SCHED_FALLBACK_TIMER_FN);
-
- if ( !is_idle_task(p) )
- update_dom_time(p->shared_info);
-
- fallback_timer[p->processor].expires = NOW() + MILLISECS(500);
- add_ac_timer(&fallback_timer[p->processor]);
+ update_dom_time(d->shared_info);
+ send_guest_virq(d, VIRQ_TIMER);
}
/* Initialise the data structures. */
@@ -500,11 +477,6 @@ void __init scheduler_init(void)
t_timer[i].cpu = i;
t_timer[i].data = 3;
t_timer[i].function = &t_timer_fn;
-
- init_ac_timer(&fallback_timer[i]);
- fallback_timer[i].cpu = i;
- fallback_timer[i].data = 4;
- fallback_timer[i].function = &fallback_timer_fn;
}
schedule_data[0].idle = &idle0_task;
@@ -538,9 +510,6 @@ void schedulers_start(void)
t_timer_fn(0);
smp_call_function((void *)t_timer_fn, NULL, 1, 1);
-
- fallback_timer_fn(0);
- smp_call_function((void *)fallback_timer_fn, NULL, 1, 1);
}