From d2005818bea35e74b8991a615ac5bee389263126 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Tue, 25 Jun 2019 14:29:04 +1000 Subject: npu2: Increase timeout for L2/L3 cache purging On NVLink2 bridge reset, we purge all L2/L3 caches in the system. This is an asynchronous operation, we have a 2ms timeout here. There are reports that this is not enough and "PURGE L3 on core xxx timed out" messages appear (for the reference: on the test setup this takes 280us..780us). This defines the timeout as a macro and changes this from 2ms to 20ms. This adds a tracepoint to tell how long it took to purge all the caches. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Stewart Smith --- include/npu2-regs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/npu2-regs.h b/include/npu2-regs.h index 3cb587a..00a72e6 100644 --- a/include/npu2-regs.h +++ b/include/npu2-regs.h @@ -798,6 +798,8 @@ void npu2_scom_write(uint64_t gcid, uint64_t scom_base, #define L3_PRD_PURGE_TTYPE_MASK PPC_BIT(1) | PPC_BIT(2) | PPC_BIT(3) | PPC_BIT(4) #define L3_FULL_PURGE 0x0 +#define L2_L3_PRD_PURGE_TIMEOUT_MS 20 + /* Config registers for NPU2 */ #define NPU_STCK0_CS_SM0_MISC_CONFIG0 0x5011000 #define NPU_STCK0_CS_SM1_MISC_CONFIG0 0x5011030 -- cgit v1.1