cmt.h revision 203829
152284Sobrien/*-
252284Sobrien * Copyright (c) 2010 Marius Strobl <marius@FreeBSD.org>
352284Sobrien * All rights reserved.
452284Sobrien *
552284Sobrien * Redistribution and use in source and binary forms, with or without
652284Sobrien * modification, are permitted provided that the following conditions
752284Sobrien * are met:
852284Sobrien * 1. Redistributions of source code must retain the above copyright
952284Sobrien *    notice, this list of conditions and the following disclaimer.
1052284Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1152284Sobrien *    notice, this list of conditions and the following disclaimer in the
1252284Sobrien *    documentation and/or other materials provided with the distribution.
1352284Sobrien *
1452284Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1552284Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1652284Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1752284Sobrien * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1852284Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1952284Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2052284Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2152284Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2252284Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2352284Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2452284Sobrien * SUCH DAMAGE.
2552284Sobrien *
2652284Sobrien * $FreeBSD: head/sys/sparc64/include/cmt.h 203829 2010-02-13 14:13:39Z marius $
2752284Sobrien */
2852284Sobrien
2952284Sobrien#ifndef _MACHINE_CMT_H_
3052284Sobrien#define	_MACHINE_CMT_H_
3152284Sobrien
3252284Sobrien#define	INTR_ID_ID_SHIFT	(0)
3352284Sobrien#define	INTR_ID_ID_SIZE		(10)
3452284Sobrien#define	INTR_ID_ID_MASK							\
3552284Sobrien	(((1 << INTR_ID_ID_SIZE) - 1) << INTR_ID_ID_SHIFT)
3652284Sobrien
3752284Sobrien#define	INTR_ID_GET_ID(cr)	((cr & INTR_ID_ID_MASK) >> INTR_ID_ID_SHIFT)
3852284Sobrien
3952284Sobrien#endif /* _MACHINE_CMT_H_ */
4052284Sobrien