aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/patch.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2007-04-30 16:56:00 -0400
committerTony Luck <tony.luck@intel.com>2007-04-30 16:56:00 -0400
commitb643b0fdbc59cf6bbb086974b29d2571e9e9f646 (patch)
tree59d1a1298ffc98877183a8def5c180c0f74e568b /arch/ia64/kernel/patch.c
parente0cc09e295f346b7921e921f385fe5213472316a (diff)
parent00b65985fb2fc542b855b03fcda0d0f2bab4f442 (diff)
Pull percpu-dtc into release branch
Diffstat (limited to 'arch/ia64/kernel/patch.c')
-rw-r--r--arch/ia64/kernel/patch.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index bc11bb096f58..e796e29f8e15 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -195,3 +195,23 @@ ia64_patch_gate (void)
195 ia64_patch_vtop(START(vtop), END(vtop)); 195 ia64_patch_vtop(START(vtop), END(vtop));
196 ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); 196 ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9));
197} 197}
198
199void ia64_patch_phys_stack_reg(unsigned long val)
200{
201 s32 * offp = (s32 *) __start___phys_stack_reg_patchlist;
202 s32 * end = (s32 *) __end___phys_stack_reg_patchlist;
203 u64 ip, mask, imm;
204
205 /* see instruction format A4: adds r1 = imm13, r3 */
206 mask = (0x3fUL << 27) | (0x7f << 13);
207 imm = (((val >> 7) & 0x3f) << 27) | (val & 0x7f) << 13;
208
209 while (offp < end) {
210 ip = (u64) offp + *offp;
211 ia64_patch(ip, mask, imm);
212 ia64_fc(ip);
213 ++offp;
214 }
215 ia64_sync_i();
216 ia64_srlz_i();
217}