# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID fcfc614d3713dabfc625ec5e453ced4845d654d3
# Parent e8383c2fcd50109d9434855348c083acb7eb7d9e
[IA64] cleanup
Cleanup: add static, remove unused code/variables/macros.
Simplifications.
Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
diff -r e8383c2fcd50 -r fcfc614d3713 xen/arch/ia64/linux-xen/smp.c
--- a/xen/arch/ia64/linux-xen/smp.c Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/arch/ia64/linux-xen/smp.c Wed Apr 26 12:44:45 2006 -0600
@@ -57,7 +57,6 @@
//Huh? This seems to be used on ia64 even if !CONFIG_SMP
void flush_tlb_mask(cpumask_t mask)
{
-#ifdef CONFIG_SMP
int cpu;
cpu = smp_processor_id();
@@ -66,6 +65,7 @@ void flush_tlb_mask(cpumask_t mask)
local_flush_tlb_all ();
}
+#ifdef CONFIG_SMP
if (cpus_empty(mask))
return;
@@ -92,14 +92,6 @@ void smp_send_event_check_mask(cpumask_t
for (cpu = 0; cpu < NR_CPUS; ++cpu)
if (cpu_isset(cpu, mask))
platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0);
-}
-
-
-//Huh? This seems to be used on ia64 even if !CONFIG_SMP
-int try_flush_tlb_mask(cpumask_t mask)
-{
- dummy();
- return 1;
}
#endif
#endif
diff -r e8383c2fcd50 -r fcfc614d3713 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c Wed Apr 26 12:44:45 2006 -0600
@@ -598,14 +598,13 @@ __assign_new_domain_page(struct domain *
p = mfn_to_page((mpaddr >> PAGE_SHIFT));
return p;
}
- else
-#endif
- {
- p = alloc_domheap_page(d);
- // zero out pages for security reasons
- if (p)
- clear_page(page_to_virt(p));
- }
+#endif
+
+ p = alloc_domheap_page(d);
+ // zero out pages for security reasons
+ if (p)
+ clear_page(page_to_virt(p));
+
if (unlikely(!p)) {
printf("assign_new_domain_page: Can't alloc!!!! Aaaargh!\n");
return(p);
diff -r e8383c2fcd50 -r fcfc614d3713 xen/arch/ia64/xen/regionreg.c
--- a/xen/arch/ia64/xen/regionreg.c Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/arch/ia64/xen/regionreg.c Wed Apr 26 12:44:45 2006 -0600
@@ -250,25 +250,6 @@ int set_one_rr(unsigned long rr, unsigne
return 0;
}
-#if 0
- memrrv.rrval = rrv.rrval;
- if (rreg == 7) {
- newrrv.rid = newrid;
- newrrv.ve = VHPT_ENABLED_REGION_7;
- newrrv.ps = IA64_GRANULE_SHIFT;
- ia64_new_rr7(vmMangleRID(newrrv.rrval),v->vcpu_info,
- v->arch.privregs);
- }
- else {
- newrrv.rid = newrid;
- // FIXME? region 6 needs to be uncached for EFI to work
- if (rreg == 6) newrrv.ve = VHPT_ENABLED_REGION_7;
- else newrrv.ve = VHPT_ENABLED_REGION_0_TO_6;
- newrrv.ps = PAGE_SHIFT;
- if (rreg == 0) v->arch.metaphysical_saved_rr0 = newrrv.rrval;
- set_rr(rr,newrrv.rrval);
- }
-#else
memrrv.rrval = rrv.rrval;
newrrv.rid = newrid;
newrrv.ve = 1; // VHPT now enabled for region 7!!
@@ -285,7 +266,6 @@ int set_one_rr(unsigned long rr, unsigne
} else {
set_rr(rr,newrrv.rrval);
}
-#endif
return 1;
}
diff -r e8383c2fcd50 -r fcfc614d3713 xen/arch/ia64/xen/xenmem.c
--- a/xen/arch/ia64/xen/xenmem.c Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/arch/ia64/xen/xenmem.c Wed Apr 26 12:44:45 2006 -0600
@@ -100,7 +100,7 @@ alloc_table_page(unsigned long fill)
return mfn;
}
-int
+static int
create_frametable_page_table (u64 start, u64 end, void *arg)
{
unsigned long address, start_page, end_page;
@@ -136,7 +136,7 @@ create_frametable_page_table (u64 start,
return 0;
}
-int
+static int
create_mpttable_page_table (u64 start, u64 end, void *arg)
{
unsigned long address, start_page, end_page;
diff -r e8383c2fcd50 -r fcfc614d3713 xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/arch/ia64/xen/xenmisc.c Wed Apr 26 12:44:45 2006 -0600
@@ -69,21 +69,19 @@ unsigned long
unsigned long
gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn)
{
+ unsigned long pte;
+
#ifndef CONFIG_XEN_IA64_DOM0_VP
if (d == dom0)
return(gpfn);
- else
#endif
- {
- unsigned long pte = lookup_domain_mpa(d,gpfn << PAGE_SHIFT);
- if (!pte) {
-printk("gmfn_to_mfn_foreign: bad gpfn. spinning...\n");
-while(1);
- return 0;
- }
- return ((pte & _PFN_MASK) >> PAGE_SHIFT);
+ pte = lookup_domain_mpa(d,gpfn << PAGE_SHIFT);
+ if (!pte) {
+ panic("gmfn_to_mfn_foreign: bad gpfn. spinning...\n");
}
-}
+ return ((pte & _PFN_MASK) >> PAGE_SHIFT);
+}
+
#if 0
u32
mfn_to_gmfn(struct domain *d, unsigned long frame)
@@ -96,13 +94,6 @@ while(1);
return frame;
}
#endif
-
-///////////////////////////////
-// from arch/x86/flushtlb.c
-///////////////////////////////
-
-u32 tlbflush_clock;
-u32 tlbflush_time[NR_CPUS];
///////////////////////////////
// from arch/x86/memory.c
@@ -287,8 +278,8 @@ static long cnt[16] = { 50,50,50,50,50,5
static long cnt[16] = { 50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50};
static int i = 100;
int id = ((struct vcpu *)current)->domain->domain_id & 0xf;
-if (!cnt[id]--) { printk("%x",id); cnt[id] = 500000; }
-if (!i--) { printk("+"); i = 1000000; }
+if (!cnt[id]--) { cnt[id] = 500000; printk("%x",id); }
+if (!i--) { i = 1000000; printk("+"); }
}
if (VMX_DOMAIN(current)){
diff -r e8383c2fcd50 -r fcfc614d3713 xen/include/asm-ia64/flushtlb.h
--- a/xen/include/asm-ia64/flushtlb.h Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/include/asm-ia64/flushtlb.h Wed Apr 26 12:44:45 2006 -0600
@@ -3,14 +3,7 @@
#include <asm/tlbflush.h>
-/* The current time as shown by the virtual TLB clock. */
-extern u32 tlbflush_clock;
-
-/* Time at which each CPU's TLB was last flushed. */
-extern u32 tlbflush_time[NR_CPUS];
-
-#define tlbflush_current_time() tlbflush_clock
+#define tlbflush_current_time() 0
#define tlbflush_filter(x,y) ((void)0)
-#define NEED_FLUSH(x, y) (0)
#endif
diff -r e8383c2fcd50 -r fcfc614d3713 xen/include/asm-ia64/vhpt.h
--- a/xen/include/asm-ia64/vhpt.h Wed Apr 26 12:40:56 2006 -0600
+++ b/xen/include/asm-ia64/vhpt.h Wed Apr 26 12:44:45 2006 -0600
@@ -2,8 +2,6 @@
#define ASM_VHPT_H
#define VHPT_ENABLED 1
-#define VHPT_ENABLED_REGION_0_TO_6 1
-#define VHPT_ENABLED_REGION_7 0
/* Size of the VHPT. */
#define VHPT_SIZE_LOG2 24
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|