Skip to content

Commit 10011f7

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARCv2: support loop buffer (LPB) disabling
On HS cores, loop buffer (LPB) is programmable in runtime and can be optionally disabled. Signed-off-by: Eugeniy Paltsev <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 040ece2 commit 10011f7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

arch/arc/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,12 @@ config ARC_IRQ_NO_AUTOSAVE
474474
This is programmable and can be optionally disabled in which case
475475
software INTERRUPT_PROLOGUE/EPILGUE do the needed work
476476

477+
config ARC_LPB_DISABLE
478+
bool "Disable loop buffer (LPB)"
479+
help
480+
On HS cores, loop buffer (LPB) is programmable in runtime and can
481+
be optionally disabled.
482+
477483
endif # ISA_ARCV2
478484

479485
endmenu # "ARC CPU Configuration"

arch/arc/kernel/head.S

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
bclr r5, r5, STATUS_AD_BIT
6060
#endif
6161
kflag r5
62+
63+
#ifdef CONFIG_ARC_LPB_DISABLE
64+
lr r5, [ARC_REG_LPB_BUILD]
65+
breq r5, 0, 1f ; LPB doesn't exist
66+
mov r5, 1
67+
sr r5, [ARC_REG_LPB_CTRL]
68+
1:
69+
#endif /* CONFIG_ARC_LPB_DISABLE */
6270
#endif
6371
; Config DSP_CTRL properly, so kernel may use integer multiply,
6472
; multiply-accumulate, and divide operations

0 commit comments

Comments
 (0)