Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4138d653 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

powerpc: Inline ppc64_runlatch_off



I'm sick of seeing ppc64_runlatch_off in our profiles, so inline it
into the callers. To avoid a mess of circular includes I didn't add
it as an inline function.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 954e6da5
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -951,7 +951,14 @@
#ifdef CONFIG_PPC64
#ifdef CONFIG_PPC64


extern void ppc64_runlatch_on(void);
extern void ppc64_runlatch_on(void);
extern void ppc64_runlatch_off(void);
extern void __ppc64_runlatch_off(void);

#define ppc64_runlatch_off()					\
	do {							\
		if (cpu_has_feature(CPU_FTR_CTRL) &&		\
		    test_thread_flag(TIF_RUNLATCH))		\
			__ppc64_runlatch_off();			\
	} while (0)


extern unsigned long scom970_read(unsigned int address);
extern unsigned long scom970_read(unsigned int address);
extern void scom970_write(unsigned int address, unsigned long value);
extern void scom970_write(unsigned int address, unsigned long value);
+6 −8
Original line number Original line Diff line number Diff line
@@ -1199,11 +1199,10 @@ void ppc64_runlatch_on(void)
	}
	}
}
}


void ppc64_runlatch_off(void)
void __ppc64_runlatch_off(void)
{
{
	unsigned long ctrl;
	unsigned long ctrl;


	if (cpu_has_feature(CPU_FTR_CTRL) && test_thread_flag(TIF_RUNLATCH)) {
	HMT_medium();
	HMT_medium();


	clear_thread_flag(TIF_RUNLATCH);
	clear_thread_flag(TIF_RUNLATCH);
@@ -1212,7 +1211,6 @@ void ppc64_runlatch_off(void)
	ctrl &= ~CTRL_RUNLATCH;
	ctrl &= ~CTRL_RUNLATCH;
	mtspr(SPRN_CTRLT, ctrl);
	mtspr(SPRN_CTRLT, ctrl);
}
}
}
#endif
#endif


#if THREAD_SHIFT < PAGE_SHIFT
#if THREAD_SHIFT < PAGE_SHIFT