2 * Copyright (C) 2000 Murray Jensen <Murray.Jensen@cmst.csiro.au>
4 * SPDX-License-Identifier: GPL-2.0+
12 #include <ppc_asm.tmpl>
15 #include <asm/cache.h>
18 #if defined(CONFIG_CMD_KGDB)
21 * cache flushing routines for kgdb
24 .globl kgdb_flush_cache_all
34 .globl kgdb_flush_cache_range
35 kgdb_flush_cache_range:
36 li r5,CONFIG_SYS_CACHELINE_SIZE-1
40 srwi. r4,r4,CONFIG_SYS_CACHELINE_SHIFT
45 addi r3,r3,CONFIG_SYS_CACHELINE_SIZE
47 sync /* wait for dcbst's to get to ram */
50 addi r6,r6,CONFIG_SYS_CACHELINE_SIZE