26 #include <linux/compiler.h>
29 #include <linux/module.h>
30 #include <linux/types.h>
33 #include <asm/paravirt.h>
40 .paravirt_enabled = 0,
41 .name =
"bare hardware"
50 ia64_native_patch_branch(
unsigned long tag,
unsigned long type);
55 .patch_bundle = ia64_native_patch_bundle,
57 .patch_branch = ia64_native_patch_branch,
68 #define DEFINE_VOID_FUNC1(name) \
70 ia64_native_ ## name ## _func(unsigned long arg) \
72 ia64_native_ ## name(arg); \
75 #define DEFINE_VOID_FUNC1_VOID(name) \
77 ia64_native_ ## name ## _func(void *arg) \
79 ia64_native_ ## name(arg); \
82 #define DEFINE_VOID_FUNC2(name) \
84 ia64_native_ ## name ## _func(unsigned long arg0, \
87 ia64_native_ ## name(arg0, arg1); \
90 #define DEFINE_FUNC0(name) \
91 static unsigned long \
92 ia64_native_ ## name ## _func(void) \
94 return ia64_native_ ## name(); \
97 #define DEFINE_FUNC1(name, type) \
98 static unsigned long \
99 ia64_native_ ## name ## _func(type arg) \
101 return ia64_native_ ## name(arg); \
118 ia64_native_ssm_i_func(
void)
124 ia64_native_rsm_i_func(
void)
130 ia64_native_set_rr0_to_rr4_func(
unsigned long val0,
unsigned long val1,
131 unsigned long val2,
unsigned long val3,
137 #define CASE_GET_REG(id) \
138 case _IA64_REG_ ## id: \
139 res = ia64_native_getreg(_IA64_REG_ ## id); \
141 #define CASE_GET_AR(id) CASE_GET_REG(AR_ ## id)
142 #define CASE_GET_CR(id) CASE_GET_REG(CR_ ## id)
147 unsigned long res = -1;
217 #define CASE_SET_REG(id) \
218 case _IA64_REG_ ## id: \
219 ia64_native_setreg(_IA64_REG_ ## id, val); \
221 #define CASE_SET_AR(id) CASE_SET_REG(AR_ ## id)
222 #define CASE_SET_CR(id) CASE_SET_REG(CR_ ## id)
296 #define __DEFINE_FUNC(name, code) \
297 extern const char ia64_native_ ## name ## _direct_start[]; \
298 extern const char ia64_native_ ## name ## _direct_end[]; \
300 ".proc ia64_native_" #name "_func\n" \
301 "ia64_native_" #name "_func:\n" \
302 "ia64_native_" #name "_direct_start:\n" \
304 "ia64_native_" #name "_direct_end:\n" \
305 "br.cond.sptk.many b6\n" \
306 ".endp ia64_native_" #name "_func\n")
308 #define DEFINE_VOID_FUNC0(name, code) \
310 ia64_native_ ## name ## _func(void); \
311 __DEFINE_FUNC(name, code)
313 #define DEFINE_VOID_FUNC1(name, code) \
315 ia64_native_ ## name ## _func(unsigned long arg); \
316 __DEFINE_FUNC(name, code)
318 #define DEFINE_VOID_FUNC1_VOID(name, code) \
320 ia64_native_ ## name ## _func(void *arg); \
321 __DEFINE_FUNC(name, code)
323 #define DEFINE_VOID_FUNC2(name, code) \
325 ia64_native_ ## name ## _func(unsigned long arg0, \
326 unsigned long arg1); \
327 __DEFINE_FUNC(name, code)
329 #define DEFINE_FUNC0(name, code) \
330 extern unsigned long \
331 ia64_native_ ## name ## _func(void); \
332 __DEFINE_FUNC(name, code)
334 #define DEFINE_FUNC1(name, type, code) \
335 extern unsigned long \
336 ia64_native_ ## name ## _func(type arg); \
337 __DEFINE_FUNC(name, code)
343 " cmp.ne p6, p7 = r8, r0\n"
353 "mov rr[r8] = r9\n");
360 "and r8 = r2, r8\n");
365 "mov r8 = cpuid[r8]\n");
367 "mov r8 = pmd[r8]\n");
369 "mov r8 = rr[r8]\n");
371 DEFINE_VOID_FUNC0(ssm_i,
373 DEFINE_VOID_FUNC0(rsm_i,
377 ia64_native_set_rr0_to_rr4_func(
unsigned long val0,
unsigned long val1,
378 unsigned long val2,
unsigned long val3,
380 __DEFINE_FUNC(set_rr0_to_rr4,
382 "movl r2 = 0x2000000000000000\n"
393 "mov rr[r3] = r14\n");
396 asm(
".global ia64_native_getreg_func\n");
397 #define __DEFINE_GET_REG(id, reg) \
398 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
400 "cmp.eq p6, p0 = r2, r8\n" \
402 "(p6) mov r8 = " #reg "\n" \
403 "(p6) br.cond.sptk.many b6\n" \
405 #define __DEFINE_GET_AR(id, reg) __DEFINE_GET_REG(AR_ ## id, ar.reg)
406 #define __DEFINE_GET_CR(id, reg) __DEFINE_GET_REG(CR_ ## id, cr.reg)
408 __DEFINE_FUNC(getreg,
409 __DEFINE_GET_REG(
GP,
gp)
411 __DEFINE_GET_REG(
PSR,
psr)
412 __DEFINE_GET_REG(
TP, tp)
413 __DEFINE_GET_REG(
SP,
sp)
415 __DEFINE_GET_REG(AR_KR0, ar0)
416 __DEFINE_GET_REG(AR_KR1, ar1)
417 __DEFINE_GET_REG(AR_KR2, ar2)
418 __DEFINE_GET_REG(AR_KR3, ar3)
419 __DEFINE_GET_REG(AR_KR4, ar4)
420 __DEFINE_GET_REG(AR_KR5, ar5)
421 __DEFINE_GET_REG(AR_KR6, ar6)
422 __DEFINE_GET_REG(AR_KR7, ar7)
423 __DEFINE_GET_AR(RSC,
rsc)
424 __DEFINE_GET_AR(BSP, bsp)
425 __DEFINE_GET_AR(BSPSTORE, bspstore)
426 __DEFINE_GET_AR(RNAT, rnat)
428 __DEFINE_GET_AR(EFLAG, eflag)
429 __DEFINE_GET_AR(
CSD, csd)
430 __DEFINE_GET_AR(SSD, ssd)
431 __DEFINE_GET_REG(AR_CFLAG, ar27)
432 __DEFINE_GET_AR(
FSR, fsr)
434 __DEFINE_GET_AR(
FDR, fdr)
435 __DEFINE_GET_AR(CCV, ccv)
436 __DEFINE_GET_AR(UNAT, unat)
438 __DEFINE_GET_AR(ITC, itc)
439 __DEFINE_GET_AR(PFS,
pfs)
440 __DEFINE_GET_AR(
LC,
lc)
441 __DEFINE_GET_AR(
EC, ec)
444 __DEFINE_GET_CR(ITM, itm)
445 __DEFINE_GET_CR(
IVA, iva)
446 __DEFINE_GET_CR(PTA, pta)
447 __DEFINE_GET_CR(IPSR, ipsr)
449 __DEFINE_GET_CR(
IIP, iip)
450 __DEFINE_GET_CR(IFA, ifa)
451 __DEFINE_GET_CR(ITIR, itir)
452 __DEFINE_GET_CR(IIPA, iipa)
455 __DEFINE_GET_CR(IHA, iha)
457 __DEFINE_GET_CR(
IVR, ivr)
460 __DEFINE_GET_CR(IRR0, irr0)
461 __DEFINE_GET_CR(IRR1, irr1)
462 __DEFINE_GET_CR(IRR2, irr2)
463 __DEFINE_GET_CR(IRR3, irr3)
464 __DEFINE_GET_CR(ITV, itv)
465 __DEFINE_GET_CR(PMV, pmv)
466 __DEFINE_GET_CR(CMCV, cmcv)
467 __DEFINE_GET_CR(LRR0, lrr0)
468 __DEFINE_GET_CR(LRR1, lrr1)
474 asm(
".global ia64_native_setreg_func\n");
475 #define __DEFINE_SET_REG(id, reg) \
476 "mov r2 = " __stringify(_IA64_REG_ ## id) "\n" \
478 "cmp.eq p6, p0 = r2, r9\n" \
480 "(p6) mov " #reg " = r8\n" \
481 "(p6) br.cond.sptk.many b6\n" \
483 #define __DEFINE_SET_AR(id, reg) __DEFINE_SET_REG(AR_ ## id, ar.reg)
484 #define __DEFINE_SET_CR(id, reg) __DEFINE_SET_REG(CR_ ## id, cr.reg)
488 "cmp.eq p6, p0 = r2, r9\n"
490 "(p6) mov psr.l = r8\n"
491 #ifdef HAVE_SERIALIZE_DIRECTIVE
494 "(p6) br.cond.sptk.many b6\n"
495 __DEFINE_SET_REG(
GP,
gp)
496 __DEFINE_SET_REG(
SP,
sp)
498 __DEFINE_SET_REG(AR_KR0, ar0)
499 __DEFINE_SET_REG(AR_KR1, ar1)
500 __DEFINE_SET_REG(AR_KR2, ar2)
501 __DEFINE_SET_REG(AR_KR3, ar3)
502 __DEFINE_SET_REG(AR_KR4, ar4)
503 __DEFINE_SET_REG(AR_KR5, ar5)
504 __DEFINE_SET_REG(AR_KR6, ar6)
505 __DEFINE_SET_REG(AR_KR7, ar7)
506 __DEFINE_SET_AR(RSC,
rsc)
507 __DEFINE_SET_AR(BSP, bsp)
508 __DEFINE_SET_AR(BSPSTORE, bspstore)
509 __DEFINE_SET_AR(RNAT, rnat)
511 __DEFINE_SET_AR(EFLAG, eflag)
512 __DEFINE_SET_AR(
CSD, csd)
513 __DEFINE_SET_AR(SSD, ssd)
514 __DEFINE_SET_REG(AR_CFLAG, ar27)
515 __DEFINE_SET_AR(
FSR, fsr)
517 __DEFINE_SET_AR(
FDR, fdr)
518 __DEFINE_SET_AR(CCV, ccv)
519 __DEFINE_SET_AR(UNAT, unat)
521 __DEFINE_SET_AR(ITC, itc)
522 __DEFINE_SET_AR(PFS,
pfs)
523 __DEFINE_SET_AR(
LC,
lc)
524 __DEFINE_SET_AR(
EC, ec)
527 __DEFINE_SET_CR(ITM, itm)
528 __DEFINE_SET_CR(
IVA, iva)
529 __DEFINE_SET_CR(PTA, pta)
530 __DEFINE_SET_CR(IPSR, ipsr)
532 __DEFINE_SET_CR(
IIP, iip)
533 __DEFINE_SET_CR(IFA, ifa)
534 __DEFINE_SET_CR(ITIR, itir)
535 __DEFINE_SET_CR(IIPA, iipa)
538 __DEFINE_SET_CR(IHA, iha)
540 __DEFINE_SET_CR(
IVR, ivr)
543 __DEFINE_SET_CR(IRR0, irr0)
544 __DEFINE_SET_CR(IRR1, irr1)
545 __DEFINE_SET_CR(IRR2, irr2)
546 __DEFINE_SET_CR(IRR3, irr3)
547 __DEFINE_SET_CR(ITV, itv)
548 __DEFINE_SET_CR(PMV, pmv)
549 __DEFINE_SET_CR(CMCV, cmcv)
550 __DEFINE_SET_CR(LRR0, lrr0)
551 __DEFINE_SET_CR(LRR1, lrr1)
556 .fc = ia64_native_fc_func,
557 .thash = ia64_native_thash_func,
558 .get_cpuid = ia64_native_get_cpuid_func,
559 .get_pmd = ia64_native_get_pmd_func,
560 .ptcga = ia64_native_ptcga_func,
561 .get_rr = ia64_native_get_rr_func,
562 .set_rr = ia64_native_set_rr_func,
563 .set_rr0_to_rr4 = ia64_native_set_rr0_to_rr4_func,
564 .ssm_i = ia64_native_ssm_i_func,
567 .rsm_i = ia64_native_rsm_i_func,
568 .get_psr_i = ia64_native_get_psr_i_func,
569 .intrin_local_irq_restore
570 = ia64_native_intrin_local_irq_restore_func,
581 extern unsigned long paravirt_switch_to_targ;
582 extern unsigned long paravirt_leave_syscall_targ;
583 extern unsigned long paravirt_work_processed_syscall_targ;
584 extern unsigned long paravirt_leave_kernel_targ;
586 paravirt_switch_to_targ = cpu_asm_switch->switch_to;
587 paravirt_leave_syscall_targ = cpu_asm_switch->leave_syscall;
588 paravirt_work_processed_syscall_targ =
589 cpu_asm_switch->work_processed_syscall;
590 paravirt_leave_kernel_targ = cpu_asm_switch->leave_kernel;
599 ia64_native_iosapic_read(
char __iomem *iosapic,
unsigned int reg)
601 return __ia64_native_iosapic_read(iosapic, reg);
607 __ia64_native_iosapic_write(iosapic, reg, val);
614 .__read = ia64_native_iosapic_read,
615 .__write = ia64_native_iosapic_write,
630 .resend_irq = ia64_native_resend_irq,
641 ia64_native_do_steal_accounting(
unsigned long *new_itm)
647 .do_steal_accounting = ia64_native_do_steal_accounting,
657 #define IA64_NATIVE_PATCH_DEFINE_GET_REG(name, reg) \
658 __DEFINE_FUNC(get_ ## name, \
660 "mov r8 = " #reg "\n" \
663 #define IA64_NATIVE_PATCH_DEFINE_SET_REG(name, reg) \
664 __DEFINE_FUNC(set_ ## name, \
666 "mov " #reg " = r8\n" \
669 #define IA64_NATIVE_PATCH_DEFINE_REG(name, reg) \
670 IA64_NATIVE_PATCH_DEFINE_GET_REG(name, reg); \
671 IA64_NATIVE_PATCH_DEFINE_SET_REG(name, reg) \
673 #define IA64_NATIVE_PATCH_DEFINE_AR(name, reg) \
674 IA64_NATIVE_PATCH_DEFINE_REG(ar_ ## name, ar.reg)
676 #define IA64_NATIVE_PATCH_DEFINE_CR(name, reg) \
677 IA64_NATIVE_PATCH_DEFINE_REG(cr_ ## name, cr.reg)
680 IA64_NATIVE_PATCH_DEFINE_GET_REG(
psr,
psr);
681 IA64_NATIVE_PATCH_DEFINE_GET_REG(tp, tp);
684 __DEFINE_FUNC(set_psr_l,
687 #ifdef HAVE_SERIALIZE_DIRECTIVE
692 IA64_NATIVE_PATCH_DEFINE_REG(
gp,
gp);
693 IA64_NATIVE_PATCH_DEFINE_REG(
sp,
sp);
695 IA64_NATIVE_PATCH_DEFINE_REG(kr0, ar0);
696 IA64_NATIVE_PATCH_DEFINE_REG(kr1, ar1);
697 IA64_NATIVE_PATCH_DEFINE_REG(kr2, ar2);
698 IA64_NATIVE_PATCH_DEFINE_REG(kr3, ar3);
699 IA64_NATIVE_PATCH_DEFINE_REG(kr4, ar4);
700 IA64_NATIVE_PATCH_DEFINE_REG(kr5, ar5);
701 IA64_NATIVE_PATCH_DEFINE_REG(kr6, ar6);
702 IA64_NATIVE_PATCH_DEFINE_REG(kr7, ar7);
704 IA64_NATIVE_PATCH_DEFINE_AR(
rsc,
rsc);
705 IA64_NATIVE_PATCH_DEFINE_AR(bsp, bsp);
706 IA64_NATIVE_PATCH_DEFINE_AR(bspstore, bspstore);
707 IA64_NATIVE_PATCH_DEFINE_AR(rnat, rnat);
708 IA64_NATIVE_PATCH_DEFINE_AR(
fcr,
fcr);
709 IA64_NATIVE_PATCH_DEFINE_AR(eflag, eflag);
710 IA64_NATIVE_PATCH_DEFINE_AR(csd, csd);
711 IA64_NATIVE_PATCH_DEFINE_AR(ssd, ssd);
712 IA64_NATIVE_PATCH_DEFINE_REG(ar27, ar27);
713 IA64_NATIVE_PATCH_DEFINE_AR(fsr, fsr);
714 IA64_NATIVE_PATCH_DEFINE_AR(
fir,
fir);
715 IA64_NATIVE_PATCH_DEFINE_AR(fdr, fdr);
716 IA64_NATIVE_PATCH_DEFINE_AR(ccv, ccv);
717 IA64_NATIVE_PATCH_DEFINE_AR(unat, unat);
718 IA64_NATIVE_PATCH_DEFINE_AR(
fpsr,
fpsr);
719 IA64_NATIVE_PATCH_DEFINE_AR(itc, itc);
720 IA64_NATIVE_PATCH_DEFINE_AR(
pfs,
pfs);
721 IA64_NATIVE_PATCH_DEFINE_AR(
lc,
lc);
722 IA64_NATIVE_PATCH_DEFINE_AR(ec, ec);
724 IA64_NATIVE_PATCH_DEFINE_CR(
dcr,
dcr);
725 IA64_NATIVE_PATCH_DEFINE_CR(itm, itm);
726 IA64_NATIVE_PATCH_DEFINE_CR(iva, iva);
727 IA64_NATIVE_PATCH_DEFINE_CR(pta, pta);
728 IA64_NATIVE_PATCH_DEFINE_CR(ipsr, ipsr);
729 IA64_NATIVE_PATCH_DEFINE_CR(
isr,
isr);
730 IA64_NATIVE_PATCH_DEFINE_CR(iip, iip);
731 IA64_NATIVE_PATCH_DEFINE_CR(ifa, ifa);
732 IA64_NATIVE_PATCH_DEFINE_CR(itir, itir);
733 IA64_NATIVE_PATCH_DEFINE_CR(iipa, iipa);
734 IA64_NATIVE_PATCH_DEFINE_CR(
ifs,
ifs);
735 IA64_NATIVE_PATCH_DEFINE_CR(
iim,
iim);
736 IA64_NATIVE_PATCH_DEFINE_CR(iha, iha);
737 IA64_NATIVE_PATCH_DEFINE_CR(
lid,
lid);
738 IA64_NATIVE_PATCH_DEFINE_CR(ivr, ivr);
739 IA64_NATIVE_PATCH_DEFINE_CR(
tpr,
tpr);
740 IA64_NATIVE_PATCH_DEFINE_CR(
eoi,
eoi);
741 IA64_NATIVE_PATCH_DEFINE_CR(irr0, irr0);
742 IA64_NATIVE_PATCH_DEFINE_CR(irr1, irr1);
743 IA64_NATIVE_PATCH_DEFINE_CR(irr2, irr2);
744 IA64_NATIVE_PATCH_DEFINE_CR(irr3, irr3);
745 IA64_NATIVE_PATCH_DEFINE_CR(itv, itv);
746 IA64_NATIVE_PATCH_DEFINE_CR(pmv, pmv);
747 IA64_NATIVE_PATCH_DEFINE_CR(cmcv, cmcv);
748 IA64_NATIVE_PATCH_DEFINE_CR(lrr0, lrr0);
749 IA64_NATIVE_PATCH_DEFINE_CR(lrr1, lrr1);
754 #define IA64_NATIVE_PATCH_BUNDLE_ELEM(name, type) \
756 (void*)ia64_native_ ## name ## _direct_start, \
757 (void*)ia64_native_ ## name ## _direct_end, \
758 PARAVIRT_PATCH_TYPE_ ## type, \
761 IA64_NATIVE_PATCH_BUNDLE_ELEM(
fc,
FC),
763 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_cpuid, GET_CPUID),
764 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_pmd, GET_PMD),
765 IA64_NATIVE_PATCH_BUNDLE_ELEM(ptcga, PTCGA),
766 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_rr, GET_RR),
767 IA64_NATIVE_PATCH_BUNDLE_ELEM(set_rr, SET_RR),
768 IA64_NATIVE_PATCH_BUNDLE_ELEM(set_rr0_to_rr4, SET_RR0_TO_RR4),
769 IA64_NATIVE_PATCH_BUNDLE_ELEM(ssm_i, SSM_I),
770 IA64_NATIVE_PATCH_BUNDLE_ELEM(rsm_i, RSM_I),
771 IA64_NATIVE_PATCH_BUNDLE_ELEM(get_psr_i, GET_PSR_I),
772 IA64_NATIVE_PATCH_BUNDLE_ELEM(intrin_local_irq_restore,
773 INTRIN_LOCAL_IRQ_RESTORE),
775 #define IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(name, reg) \
777 (void*)ia64_native_get_ ## name ## _direct_start, \
778 (void*)ia64_native_get_ ## name ## _direct_end, \
779 PARAVIRT_PATCH_TYPE_GETREG + _IA64_REG_ ## reg, \
782 #define IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
784 (void*)ia64_native_set_ ## name ## _direct_start, \
785 (void*)ia64_native_set_ ## name ## _direct_end, \
786 PARAVIRT_PATCH_TYPE_SETREG + _IA64_REG_ ## reg, \
789 #define IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(name, reg) \
790 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(name, reg), \
791 IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(name, reg) \
793 #define IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(name, reg) \
794 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(ar_ ## name, AR_ ## reg)
796 #define IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(name, reg) \
797 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(cr_ ## name, CR_ ## reg)
799 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(
psr,
PSR),
800 IA64_NATIVE_PATCH_BUNDLE_ELEM_GETREG(tp,
TP),
802 IA64_NATIVE_PATCH_BUNDLE_ELEM_SETREG(psr_l, PSR_L),
804 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(
gp,
GP),
805 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(
sp,
SP),
807 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr0, AR_KR0),
808 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr1, AR_KR1),
809 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr2, AR_KR2),
810 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr3, AR_KR3),
811 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr4, AR_KR4),
812 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr5, AR_KR5),
813 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr6, AR_KR6),
814 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(kr7, AR_KR7),
816 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
rsc, RSC),
817 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(bsp, BSP),
818 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(bspstore, BSPSTORE),
819 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(rnat, RNAT),
820 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
fcr,
FCR),
821 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(eflag, EFLAG),
822 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(csd,
CSD),
823 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ssd, SSD),
824 IA64_NATIVE_PATCH_BUNDLE_ELEM_REG(ar27, AR_CFLAG),
825 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fsr,
FSR),
826 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
fir,
FIR),
827 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(fdr,
FDR),
828 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ccv, CCV),
829 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(unat, UNAT),
830 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
fpsr,
FPSR),
831 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(itc, ITC),
832 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
pfs, PFS),
833 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(
lc,
LC),
834 IA64_NATIVE_PATCH_BUNDLE_ELEM_AR(ec,
EC),
836 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
dcr,
DCR),
837 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itm, ITM),
838 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iva,
IVA),
839 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(pta, PTA),
840 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ipsr, IPSR),
841 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
isr,
ISR),
842 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iip,
IIP),
843 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ifa, IFA),
844 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itir, ITIR),
845 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iipa, IIPA),
846 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
ifs,
IFS),
847 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
iim,
IIM),
848 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(iha, IHA),
849 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
lid,
LID),
850 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(ivr,
IVR),
851 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
tpr,
TPR),
852 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(
eoi,
EOI),
853 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr0, IRR0),
854 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr1, IRR1),
855 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr2, IRR2),
856 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(irr3, IRR3),
857 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(itv, ITV),
858 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(pmv, PMV),
859 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(cmcv, CMCV),
860 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(lrr0, LRR0),
861 IA64_NATIVE_PATCH_BUNDLE_ELEM_CR(lrr1, LRR1),
867 const unsigned long nelems =
sizeof(ia64_native_patch_bundle_elems) /
868 sizeof(ia64_native_patch_bundle_elems[0]);
870 return __paravirt_patch_apply_bundle(sbundle, ebundle, type,
871 ia64_native_patch_bundle_elems,
883 #define PARAVIRT_BR_TARGET(name, type) \
885 ia64_native_ ## name, \
886 PARAVIRT_PATCH_TYPE_BR_ ## type, \
895 ia64_native_patch_branch(
unsigned long tag,
unsigned long type)
897 const unsigned long nelem =
898 sizeof(ia64_native_branch_target) /
899 sizeof(ia64_native_branch_target[0]);
901 ia64_native_branch_target, nelem);