forked from luck/tmp_suning_uos_patched
MIPS: cpu-bugs64: Mark inline functions as __always_inline
Commit ac7c3e4ff4
("compiler: enable CONFIG_OPTIMIZE_INLINING
forcibly") allows compiler to uninline functions marked as 'inline'.
Leading to section mismatch in this case.
Since we're using const variables to pass assembly flags, 'inline's
can't be dropped. So we simply mark them as __always_inline.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: linux-mips@vger.kernel.org
[paul.burton@mips.com:
- Annotate these functions with __init, even if it only serves to
inform human readers when the code can be used.
- Drop the __always_inline from check_daddi() & check_daddiu() which
don't use arguments as immediates in inline asm.
- Rewrap the commit message.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
This commit is contained in:
parent
0889d07f3e
commit
d345d9cad2
|
@ -24,7 +24,8 @@ static char r4kwar[] __initdata =
|
|||
static char daddiwar[] __initdata =
|
||||
"Enable CPU_DADDI_WORKAROUNDS to rectify.";
|
||||
|
||||
static inline void align_mod(const int align, const int mod)
|
||||
static __always_inline __init
|
||||
void align_mod(const int align, const int mod)
|
||||
{
|
||||
asm volatile(
|
||||
".set push\n\t"
|
||||
|
@ -38,8 +39,9 @@ static inline void align_mod(const int align, const int mod)
|
|||
: "n"(align), "n"(mod));
|
||||
}
|
||||
|
||||
static __always_inline void mult_sh_align_mod(long *v1, long *v2, long *w,
|
||||
const int align, const int mod)
|
||||
static __always_inline __init
|
||||
void mult_sh_align_mod(long *v1, long *v2, long *w,
|
||||
const int align, const int mod)
|
||||
{
|
||||
unsigned long flags;
|
||||
int m1, m2;
|
||||
|
@ -113,7 +115,7 @@ static __always_inline void mult_sh_align_mod(long *v1, long *v2, long *w,
|
|||
*w = lw;
|
||||
}
|
||||
|
||||
static inline void check_mult_sh(void)
|
||||
static __always_inline __init void check_mult_sh(void)
|
||||
{
|
||||
long v1[8], v2[8], w[8];
|
||||
int bug, fix, i;
|
||||
|
@ -176,7 +178,7 @@ asmlinkage void __init do_daddi_ov(struct pt_regs *regs)
|
|||
exception_exit(prev_state);
|
||||
}
|
||||
|
||||
static inline void check_daddi(void)
|
||||
static __init void check_daddi(void)
|
||||
{
|
||||
extern asmlinkage void handle_daddi_ov(void);
|
||||
unsigned long flags;
|
||||
|
@ -242,7 +244,7 @@ static inline void check_daddi(void)
|
|||
|
||||
int daddiu_bug = IS_ENABLED(CONFIG_CPU_MIPSR6) ? 0 : -1;
|
||||
|
||||
static inline void check_daddiu(void)
|
||||
static __init void check_daddiu(void)
|
||||
{
|
||||
long v, w, tmp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user