File tree Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ struct ppc_bat {
66
66
67
67
#ifndef __ASSEMBLY__
68
68
69
+ /*
70
+ * This macro defines the mapping from contexts to VSIDs (virtual
71
+ * segment IDs). We use a skew on both the context and the high 4 bits
72
+ * of the 32-bit virtual address (the "effective segment ID") in order
73
+ * to spread out the entries in the MMU hash table. Note, if this
74
+ * function is changed then hash functions will have to be
75
+ * changed to correspond.
76
+ */
77
+ #define CTX_TO_VSID (c , id ) ((((c) * (897 * 16)) + (id * 0x111)) & 0xffffff)
78
+
69
79
/*
70
80
* Hardware Page Table Entry
71
81
* Note that the xpn and x bitfields are used only by processors that
Original file line number Diff line number Diff line change @@ -353,9 +353,6 @@ void kvmppc_mmu_destroy_pr(struct kvm_vcpu *vcpu)
353
353
preempt_enable ();
354
354
}
355
355
356
- /* From mm/mmu_context_hash32.c */
357
- #define CTX_TO_VSID (c , id ) ((((c) * (897 * 16)) + (id * 0x111)) & 0xffffff)
358
-
359
356
int kvmppc_mmu_init_pr (struct kvm_vcpu * vcpu )
360
357
{
361
358
struct kvmppc_vcpu_book3s * vcpu3s = to_book3s (vcpu );
Original file line number Diff line number Diff line change 39
39
#define LAST_CONTEXT 32767
40
40
#define FIRST_CONTEXT 1
41
41
42
- /*
43
- * This function defines the mapping from contexts to VSIDs (virtual
44
- * segment IDs). We use a skew on both the context and the high 4 bits
45
- * of the 32-bit virtual address (the "effective segment ID") in order
46
- * to spread out the entries in the MMU hash table. Note, if this
47
- * function is changed then arch/ppc/mm/hashtable.S will have to be
48
- * changed to correspond.
49
- *
50
- *
51
- * CTX_TO_VSID(ctx, va) (((ctx) * (897 * 16) + ((va) >> 28) * 0x111) \
52
- * & 0xffffff)
53
- */
54
-
55
42
static unsigned long next_mmu_context ;
56
43
static unsigned long context_map [LAST_CONTEXT / BITS_PER_LONG + 1 ];
57
44
You can’t perform that action at this time.
0 commit comments