remove unused functions and definitions.
Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
diff -r 9203ee23e724 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c Thu Feb 07 11:08:49 2008 -0700
+++ b/xen/arch/ia64/vmx/vmmu.c Tue Feb 12 20:02:11 2008 +0900
@@ -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 9203ee23e724 xen/include/asm-ia64/vmmu.h
--- a/xen/include/asm-ia64/vmmu.h Thu Feb 07 11:08:49 2008 -0700
+++ b/xen/include/asm-ia64/vmmu.h Tue Feb 12 20:02:11 2008 +0900
@@ -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);
@@ -221,6 +203,19 @@ extern void thash_vhpt_insert(struct vcp
int type);
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)
{
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|