1*11304SJanie.Lu@Sun.COM/* 2*11304SJanie.Lu@Sun.COM * CDDL HEADER START 3*11304SJanie.Lu@Sun.COM * 4*11304SJanie.Lu@Sun.COM * The contents of this file are subject to the terms of the 5*11304SJanie.Lu@Sun.COM * Common Development and Distribution License (the "License"). 6*11304SJanie.Lu@Sun.COM * You may not use this file except in compliance with the License. 7*11304SJanie.Lu@Sun.COM * 8*11304SJanie.Lu@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*11304SJanie.Lu@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*11304SJanie.Lu@Sun.COM * See the License for the specific language governing permissions 11*11304SJanie.Lu@Sun.COM * and limitations under the License. 12*11304SJanie.Lu@Sun.COM * 13*11304SJanie.Lu@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*11304SJanie.Lu@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*11304SJanie.Lu@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*11304SJanie.Lu@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*11304SJanie.Lu@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*11304SJanie.Lu@Sun.COM * 19*11304SJanie.Lu@Sun.COM * CDDL HEADER END 20*11304SJanie.Lu@Sun.COM */ 21*11304SJanie.Lu@Sun.COM 22*11304SJanie.Lu@Sun.COM/* 23*11304SJanie.Lu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*11304SJanie.Lu@Sun.COM * Use is subject to license terms. 25*11304SJanie.Lu@Sun.COM */ 26*11304SJanie.Lu@Sun.COM 27*11304SJanie.Lu@Sun.COM/* 28*11304SJanie.Lu@Sun.COM * Assembly language support for the iospc IO performance counter driver. 29*11304SJanie.Lu@Sun.COM */ 30*11304SJanie.Lu@Sun.COM 31*11304SJanie.Lu@Sun.COM#include <sys/asm_linkage.h> 32*11304SJanie.Lu@Sun.COM#include <sys/hypervisor_api.h> 33*11304SJanie.Lu@Sun.COM#include "rfios_acc.h" 34*11304SJanie.Lu@Sun.COM 35*11304SJanie.Lu@Sun.COM/*LINTLIBRARY*/ 36*11304SJanie.Lu@Sun.COM 37*11304SJanie.Lu@Sun.COM#if defined(lint) 38*11304SJanie.Lu@Sun.COM 39*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 40*11304SJanie.Lu@Sun.COMint 41*11304SJanie.Lu@Sun.COMrfiospc_get_perfreg(cntr_handle_t handle, int regid, uint64_t *data) 42*11304SJanie.Lu@Sun.COM{ return (0); } 43*11304SJanie.Lu@Sun.COM 44*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 45*11304SJanie.Lu@Sun.COMint 46*11304SJanie.Lu@Sun.COMrfiospc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) 47*11304SJanie.Lu@Sun.COM{ return (0); } 48*11304SJanie.Lu@Sun.COM 49*11304SJanie.Lu@Sun.COM#else /* lint */ 50*11304SJanie.Lu@Sun.COM 51*11304SJanie.Lu@Sun.COM ENTRY(rfiospc_get_perfreg) 52*11304SJanie.Lu@Sun.COM mov RFIOS_GET_PERFREG, %o5 53*11304SJanie.Lu@Sun.COM ta FAST_TRAP 54*11304SJanie.Lu@Sun.COM brz,a %o0, 1f 55*11304SJanie.Lu@Sun.COM stx %o1, [%o2] 56*11304SJanie.Lu@Sun.COM1: retl 57*11304SJanie.Lu@Sun.COM nop 58*11304SJanie.Lu@Sun.COM SET_SIZE(rfiospc_get_perfreg) 59*11304SJanie.Lu@Sun.COM 60*11304SJanie.Lu@Sun.COM ENTRY(rfiospc_set_perfreg) 61*11304SJanie.Lu@Sun.COM mov RFIOS_SET_PERFREG, %o5 62*11304SJanie.Lu@Sun.COM ta FAST_TRAP 63*11304SJanie.Lu@Sun.COM retl 64*11304SJanie.Lu@Sun.COM nop 65*11304SJanie.Lu@Sun.COM SET_SIZE(rfiospc_set_perfreg) 66*11304SJanie.Lu@Sun.COM 67*11304SJanie.Lu@Sun.COM#endif 68