Commit d37f496e authored by Peter Marheine's avatar Peter Marheine Committed by Carles Cufi
Browse files

it8xxx2: allow placing arithmetic functions in ILM



These functions are small and may be very hot depending on the workload,
so are usually a good choice to execute from RAM.

Signed-off-by: default avatarPeter Marheine <pmarheine@chromium.org>
parent d4549ed8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -10,8 +10,14 @@
 * The workaround requires the nop instruction, please don't optimize it.
 */

#ifdef CONFIG_SOC_IT8XXX2_USE_ILM
#define SECTION .__ram_code.arithmetic.
#else
#define SECTION .text.it8xxx2.arithmetic.
#endif

.macro __int_arithmetic func opcode
.section .text
.section SECTION\func
.align 2
.globl \func
.type \func, @function
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ SECTIONS
		__ilm_flash_start = .;
		/* Specially-tagged functions in SoC sources */
		KEEP(*(.__ram_code))
		*(.__ram_code.*)
		__ilm_flash_end = .;
		/* ILM mapping is always a multiple of 4k size; ensure following
		 * sections won't incorrectly redirect to RAM. */