Path: blob/master/drivers/misc/sgi-xp/xp_nofault.S
15111 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (c) 2004-2008 Silicon Graphics, Inc. All Rights Reserved.6*/78/*9* The xp_nofault_PIOR function takes a pointer to a remote PIO register10* and attempts to load and consume a value from it. This function11* will be registered as a nofault code block. In the event that the12* PIO read fails, the MCA handler will force the error to look13* corrected and vector to the xp_error_PIOR which will return an error.14*15* The definition of "consumption" and the time it takes for an MCA16* to surface is processor implementation specific. This code17* is sufficient on Itanium through the Montvale processor family.18* It may need to be adjusted for future processor implementations.19*20* extern int xp_nofault_PIOR(void *remote_register);21*/2223.global xp_nofault_PIOR24xp_nofault_PIOR:25mov r8=r0 // Stage a success return value26ld8.acq r9=[r32];; // PIO Read the specified register27adds r9=1,r9;; // Add to force consumption28srlz.i;; // Allow time for MCA to surface29br.ret.sptk.many b0;; // Return success3031.global xp_error_PIOR32xp_error_PIOR:33mov r8=1 // Return value of 134br.ret.sptk.many b0;; // Return failure353637