1 #ifndef _ASM_IA64_ASMMACRO_H
2 #define _ASM_IA64_ASMMACRO_H
5 * Copyright (C) 2000-2001, 2003-2004 Hewlett-Packard Co
6 * David Mosberger-Tang <davidm@hpl.hp.com>
9 #include <linux/config.h>
16 #define ENTRY_MIN_ALIGN(name) \
21 #define GLOBAL_ENTRY(name) \
29 * Helper macros to make unwind directives more readable:
33 #define ASM_UNW_PRLG_RP 0x8
34 #define ASM_UNW_PRLG_PFS 0x4
35 #define ASM_UNW_PRLG_PSP 0x2
36 #define ASM_UNW_PRLG_PR 0x1
37 #define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
40 * Helper macros for accessing user memory.
42 * When adding any new .section/.previous entries here, make sure to
43 * also add it to the DISCARD section in arch/ia64/kernel/gate.lds.S or
44 * unpleasant things will happen.
47 .section "__ex_table", "a" // declare section & section attributes
51 .xdata4 "__ex_table", 99f-., y-.; \
53 # define EXCLR(y,x...) \
54 .xdata4 "__ex_table", 99f-., y-.+4; \
58 * Tag MCA recoverable instruction ranges.
61 .section "__mca_table", "a" // declare section & section attributes
64 # define MCA_RECOVER_RANGE(y) \
65 .xdata4 "__mca_table", y-., 99f-.; \
69 * Mark instructions that need a load of a virtual address patched to be
70 * a load of a physical address. We use this either in critical performance
71 * path (ivt.S - TLB miss processing) or in places where it might not be
72 * safe to use a "tpa" instruction (mca_asm.S - error recovery).
74 .section ".data.patch.vtop", "a" // declare section & section attributes
77 #define LOAD_PHYSICAL(pr, reg, obj) \
78 [1:](pr)movl reg = obj; \
79 .xdata4 ".data.patch.vtop", 1b-.
82 * For now, we always put in the McKinley E9 workaround. On CPUs that don't need it,
83 * we'll patch out the work-around bundles with NOPs, so their impact is minimal.
85 #define DO_MCKINLEY_E9_WORKAROUND
87 #ifdef DO_MCKINLEY_E9_WORKAROUND
88 .section ".data.patch.mckinley_e9", "a"
90 /* workaround for Itanium 2 Errata 9: */
91 # define FSYS_RETURN \
92 .xdata4 ".data.patch.mckinley_e9", 1f-.; \
96 br.call.sptk.many b7=2f;; \
101 br.ret.sptk.many b6;; \
104 # define FSYS_RETURN br.ret.sptk.many b6
108 * Up until early 2004, use of .align within a function caused bad unwind info.
109 * TEXT_ALIGN(n) expands into ".align n" if a fixed GAS is available or into nothing
112 #ifdef HAVE_WORKING_TEXT_ALIGN
113 # define TEXT_ALIGN(n) .align n
115 # define TEXT_ALIGN(n)
118 #ifdef HAVE_SERIALIZE_DIRECTIVE
119 # define dv_serialize_data .serialize.data
120 # define dv_serialize_instruction .serialize.instruction
122 # define dv_serialize_data
123 # define dv_serialize_instruction
126 #endif /* _ASM_IA64_ASMMACRO_H */