xref: /linux/arch/mips/mm/cex-gen.S (revision 06d07429858317ded2db7986113a9e0129cd599b)
11da177e4SLinus Torvalds/*
21da177e4SLinus Torvalds * This file is subject to the terms and conditions of the GNU General Public
31da177e4SLinus Torvalds * License.  See the file "COPYING" in the main directory of this archive
41da177e4SLinus Torvalds * for more details.
51da177e4SLinus Torvalds *
61da177e4SLinus Torvalds * Copyright (C) 1995 - 1999 Ralf Baechle
71da177e4SLinus Torvalds * Copyright (C) 1999 Silicon Graphics, Inc.
81da177e4SLinus Torvalds *
91da177e4SLinus Torvalds * Cache error handler
101da177e4SLinus Torvalds */
111da177e4SLinus Torvalds#include <asm/asm.h>
121da177e4SLinus Torvalds#include <asm/regdef.h>
131da177e4SLinus Torvalds#include <asm/mipsregs.h>
141da177e4SLinus Torvalds#include <asm/stackframe.h>
151da177e4SLinus Torvalds
161da177e4SLinus Torvalds/*
171da177e4SLinus Torvalds * Game over.  Go to the button.  Press gently.	 Swear where allowed by
181da177e4SLinus Torvalds * legislation.
191da177e4SLinus Torvalds */
201da177e4SLinus Torvalds	LEAF(except_vec2_generic)
211da177e4SLinus Torvalds	.set	noreorder
221da177e4SLinus Torvalds	.set	noat
231da177e4SLinus Torvalds	.set	mips0
241da177e4SLinus Torvalds	/*
251da177e4SLinus Torvalds	 * This is a very bad place to be.  Our cache error
261da177e4SLinus Torvalds	 * detection has triggered.  If we have write-back data
271da177e4SLinus Torvalds	 * in the cache, we may not be able to recover.	 As a
28*2f9060b1SBjorn Helgaas	 * first-order desperate measure, turn off KSEG0 caching.
291da177e4SLinus Torvalds	 */
301da177e4SLinus Torvalds	mfc0	k0,CP0_CONFIG
311da177e4SLinus Torvalds	li	k1,~CONF_CM_CMASK
321da177e4SLinus Torvalds	and	k0,k0,k1
331da177e4SLinus Torvalds	ori	k0,k0,CONF_CM_UNCACHED
341da177e4SLinus Torvalds	mtc0	k0,CP0_CONFIG
351da177e4SLinus Torvalds	/* Give it a few cycles to sink in... */
361da177e4SLinus Torvalds	nop
371da177e4SLinus Torvalds	nop
381da177e4SLinus Torvalds	nop
391da177e4SLinus Torvalds
401da177e4SLinus Torvalds	j	cache_parity_error
411da177e4SLinus Torvalds	nop
421da177e4SLinus Torvalds	END(except_vec2_generic)
43