diff options
author | Tony Luck <tony.luck@intel.com> | 2007-04-30 13:56:00 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-04-30 13:56:00 -0700 |
commit | b643b0fdbc59cf6bbb086974b29d2571e9e9f646 (patch) | |
tree | 59d1a1298ffc98877183a8def5c180c0f74e568b /arch/ia64/kernel/patch.c | |
parent | e0cc09e295f346b7921e921f385fe5213472316a (diff) | |
parent | 00b65985fb2fc542b855b03fcda0d0f2bab4f442 (diff) |
Pull percpu-dtc into release branch
Diffstat (limited to 'arch/ia64/kernel/patch.c')
-rw-r--r-- | arch/ia64/kernel/patch.c | 20 |
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) ia64_patch_vtop(START(vtop), END(vtop)); ia64_patch_mckinley_e9(START(mckinley_e9), END(mckinley_e9)); } + +void ia64_patch_phys_stack_reg(unsigned long val) +{ + s32 * offp = (s32 *) __start___phys_stack_reg_patchlist; + s32 * end = (s32 *) __end___phys_stack_reg_patchlist; + u64 ip, mask, imm; + + /* see instruction format A4: adds r1 = imm13, r3 */ + mask = (0x3fUL << 27) | (0x7f << 13); + imm = (((val >> 7) & 0x3f) << 27) | (val & 0x7f) << 13; + + while (offp < end) { + ip = (u64) offp + *offp; + ia64_patch(ip, mask, imm); + ia64_fc(ip); + ++offp; + } + ia64_sync_i(); + ia64_srlz_i(); +} |