Skip to content

Commit 97634da

Browse files
author
Marc Zyngier
committed
KVM: arm64: nv: Make ps_to_output_size() generally available
Make this helper visible to at.c, we are going to need it. Signed-off-by: Marc Zyngier <[email protected]>
1 parent be04ceb commit 97634da

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

arch/arm64/include/asm/kvm_nested.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,18 @@ static inline u64 kvm_encode_nested_level(struct kvm_s2_trans *trans)
227227
shift; \
228228
})
229229

230+
static inline unsigned int ps_to_output_size(unsigned int ps)
231+
{
232+
switch (ps) {
233+
case 0: return 32;
234+
case 1: return 36;
235+
case 2: return 40;
236+
case 3: return 42;
237+
case 4: return 44;
238+
case 5:
239+
default:
240+
return 48;
241+
}
242+
}
243+
230244
#endif /* __ARM64_KVM_NESTED_H */

arch/arm64/kvm/nested.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,6 @@ struct s2_walk_info {
103103
bool be;
104104
};
105105

106-
static unsigned int ps_to_output_size(unsigned int ps)
107-
{
108-
switch (ps) {
109-
case 0: return 32;
110-
case 1: return 36;
111-
case 2: return 40;
112-
case 3: return 42;
113-
case 4: return 44;
114-
case 5:
115-
default:
116-
return 48;
117-
}
118-
}
119-
120106
static u32 compute_fsc(int level, u32 fsc)
121107
{
122108
return fsc | (level & 0x3);

0 commit comments

Comments
 (0)