[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Cleanup: remove unused functions and definitions



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1202924238 25200
# Node ID 0a2ee4279326e27f9f2d2f1138bd5d8913cb38f3
# Parent  ef67e2867b448a7c4e61d2b28c6bf554fe422250
[IA64] Cleanup: remove unused functions and definitions

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c    |   76 --------------------------------------------
 xen/include/asm-ia64/vmmu.h |   39 +++++++++-------------
 2 files changed, 17 insertions(+), 98 deletions(-)

diff -r ef67e2867b44 -r 0a2ee4279326 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Wed Feb 13 10:35:56 2008 -0700
+++ b/xen/arch/ia64/vmx/vmmu.c  Wed Feb 13 10:37:18 2008 -0700
@@ -51,37 +51,6 @@ custom_param("vti_vtlb_size", parse_vtlb
 custom_param("vti_vtlb_size", parse_vtlb_size);
 custom_param("vti_vhpt_size", parse_vhpt_size);
 
-/*
- * Get the machine page frame number in 16KB unit
- * Input:
- *  d: 
- */
-static u64 get_mfn(struct domain *d, u64 gpfn)
-{
-//    struct domain *d;
-    u64    xen_gppn, xen_mppn, mpfn;
-/*
-    if ( domid == DOMID_SELF ) {
-        d = current->domain;
-    }
-    else {
-        d = get_domain_by_id(domid);
-    }
- */
-    xen_gppn = arch_to_xen_ppn(gpfn);
-    xen_mppn = gmfn_to_mfn(d, xen_gppn);
-/*
-    for (i=0; i<pages; i++) {
-        if ( gmfn_to_mfn(d, gpfn+i) == INVALID_MFN ) {
-            return INVALID_MFN;
-        }
-    }
-*/
-    mpfn= xen_to_arch_ppn(xen_mppn);
-    mpfn = mpfn | (((1UL <<(PAGE_SHIFT-ARCH_PAGE_SHIFT))-1)&gpfn);
-    return mpfn;
-    
-}
 
 static int init_domain_vhpt(struct vcpu *v)
 {
@@ -131,51 +100,6 @@ void free_domain_tlb(struct vcpu *v)
     free_domain_vhpt(v);
 }
 
-/*
- * Insert guest TLB to machine TLB.
- *  data:   In TLB format
- */
-void machine_tlb_insert(struct vcpu *v, thash_data_t *tlb)
-{
-    u64     psr;
-    thash_data_t    mtlb;
-    unsigned int    cl = tlb->cl;
-    unsigned long mtlb_ppn;
-    mtlb.ifa = tlb->vadr;
-    mtlb.itir = tlb->itir & ~ITIR_RV_MASK;
-    mtlb.page_flags = tlb->page_flags & ~PAGE_FLAGS_RV_MASK;
-    mtlb.ppn = get_mfn(v->domain, tlb->ppn);
-    mtlb_ppn=mtlb.ppn;
-
-#if 0
-    if (mtlb_ppn == INVALID_MFN)
-        panic_domain(vcpu_regs(v), "Machine tlb insert with invalid mfn 
number.\n");
-#endif
-
-    psr = ia64_clear_ic();
-    if ( cl == ISIDE_TLB ) {
-        ia64_itc(1, mtlb.ifa, mtlb.page_flags, IA64_ITIR_PS_KEY(mtlb.ps, 0));
-    }
-    else {
-        ia64_itc(2, mtlb.ifa, mtlb.page_flags, IA64_ITIR_PS_KEY(mtlb.ps, 0));
-    }
-    ia64_set_psr(psr);
-    ia64_srlz_i();
-    return;
-}
-
-/*
- *  Purge machine tlb.
- *  INPUT
- *      rr:     guest rr.
- *      va:     only bits 0:60 is valid
- *      size:   bits format (1<<size) for the address range to purge.
- *
- */
-void machine_tlb_purge(u64 va, u64 ps)
-{
-    ia64_ptcl(va, ps << 2);
-}
 
 int vhpt_enabled(VCPU *vcpu, uint64_t vadr, vhpt_ref_t ref)
 {
diff -r ef67e2867b44 -r 0a2ee4279326 xen/include/asm-ia64/vmmu.h
--- a/xen/include/asm-ia64/vmmu.h       Wed Feb 13 10:35:56 2008 -0700
+++ b/xen/include/asm-ia64/vmmu.h       Wed Feb 13 10:37:18 2008 -0700
@@ -49,6 +49,10 @@ enum {
 #define VTLB_PTE_IO_BIT     60
 #define VTLB_PTE_IO         (1UL<<VTLB_PTE_IO_BIT)
 #define VTLB_PTE_P         (1UL<<VTLB_PTE_P_BIT)
+
+#define ITIR_RV_MASK            (((1UL<<32)-1)<<32 | 0x3)
+#define PAGE_FLAGS_RV_MASK      (0x2 | (0x3UL<<50)|(((1UL<<11)-1)<<53))
+#define PAGE_FLAGS_AR_PL_MASK   ((0x7UL<<9)|(0x3UL<<7))
 
 #ifndef __ASSEMBLY__
 typedef struct thash_data {
@@ -126,20 +130,6 @@ typedef struct thash_data {
 #define INVALID_ENTRY(hcb, hdata)       INVALID_VHPT(hdata)
 
 
-/*
- * Architecture ppn is in 4KB unit while XEN
- * page may be different(1<<PAGE_SHIFT).
- */
-static inline u64 arch_to_xen_ppn(u64 appn)
-{
-    return (appn >>(PAGE_SHIFT-ARCH_PAGE_SHIFT));
-}
-
-static inline u64 xen_to_arch_ppn(u64 xppn)
-{
-    return (xppn <<(PAGE_SHIFT- ARCH_PAGE_SHIFT));
-}
-
 typedef struct thash_cb {
     /* THASH base information */
     thash_data_t    *hash; // hash table pointer, aligned at thash_sz.
@@ -202,17 +192,9 @@ extern thash_data_t *vtlb_lookup(struct 
 extern thash_data_t *vtlb_lookup(struct vcpu *v,u64 va,int is_data);
 
 
-#define   ITIR_RV_MASK      (((1UL<<32)-1)<<32 | 0x3)
-#define   PAGE_FLAGS_RV_MASK    (0x2 | (0x3UL<<50)|(((1UL<<11)-1)<<53))
-#define   PAGE_FLAGS_AR_PL_MASK ((0x7UL<<9)|(0x3UL<<7))
-extern u64 machine_ttag(PTA pta, u64 va);
-extern u64 machine_thash(PTA pta, u64 va);
-extern void machine_tlb_insert(struct vcpu *v, thash_data_t *tlb);
-extern ia64_rr vmmu_get_rr(struct vcpu *vcpu, u64 va);
 extern int init_domain_tlb(struct vcpu *v);
 extern void free_domain_tlb(struct vcpu *v);
 extern thash_data_t * vhpt_lookup(u64 va);
-extern void machine_tlb_purge(u64 va, u64 ps);
 extern unsigned long fetch_code(struct vcpu *vcpu, u64 gip, IA64_BUNDLE 
*pbundle);
 extern void emulate_io_inst(struct vcpu *vcpu, u64 padr, u64 ma);
 extern int vhpt_enabled(struct vcpu *vcpu, uint64_t vadr, vhpt_ref_t ref);
@@ -222,6 +204,19 @@ extern u64 guest_vhpt_lookup(u64 iha, u6
 extern u64 guest_vhpt_lookup(u64 iha, u64 *pte);
 extern int vhpt_access_rights_fixup(struct vcpu *v, u64 ifa, int is_data);
 
+/*
+ *  Purge machine tlb.
+ *  INPUT
+ *      rr:     guest rr.
+ *      va:     only bits 0:60 is valid
+ *      size:   bits format (1<<size) for the address range to purge.
+ *
+ */
+static inline void machine_tlb_purge(u64 va, u64 ps)
+{
+    ia64_ptcl(va, ps << 2);
+}
+
 static inline void vmx_vcpu_set_tr (thash_data_t *trp, u64 pte, u64 itir, u64 
va, u64 rid)
 {
     trp->page_flags = pte;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.