From 24b0d2effdb8575faa28c95b65830070e034b86e Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Wed, 19 Jun 2013 11:11:28 +0200 Subject: [PATCH] MIPS: pbl: add pbl_probe_mem macro Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- arch/mips/include/asm/pbl_macros.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h index fde94348b..1d9d6ab7e 100644 --- a/arch/mips/include/asm/pbl_macros.h +++ b/arch/mips/include/asm/pbl_macros.h @@ -38,6 +38,18 @@ .set pop .endm + .macro pbl_probe_mem ret1 ret2 addr + .set push + .set noreorder + la \ret1, \addr + sw zero, 0(\ret1) + li \ret2, 0x12345678 + sw \ret2, 0(\ret1) + lw \ret2, 0(\ret1) + li \ret1, 0x12345678 + .set pop + .endm + /* * ADR macro instruction (inspired by ARM) *