4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
26 #include <sys/types.h>
35 /* Non-shipping header - see Makefile.PL */
36 #include <sys/pci_tools.h>
45 char intrpath[MAXPATHLEN];
47 (void) strcpy(intrpath, "/devices");
48 (void) strcat(intrpath, path);
49 (void) strcat(intrpath, ":intr");
50 return (open(intrpath, O_RDWR));
53 MODULE = Sun::Solaris::Intrs PACKAGE = Sun::Solaris::Intrs
57 intrmove(path, oldcpu, ino, cpu, num_ino)
65 pcitool_intr_set_t iset;
68 if ((fd = open_dev(path)) == -1) {
71 iset.old_cpu = oldcpu;
74 iset.flags = (num_ino > 1) ? PCITOOL_INTR_FLAG_SET_GROUP : 0;
75 iset.user_version = PCITOOL_VERSION;
77 ret = ioctl(fd, PCITOOL_DEVICE_SET_INTR, &iset);
91 pcitool_intr_info_t iinfo;
94 if ((fd = open_dev(path)) == -1) {
97 iinfo.user_version = PCITOOL_VERSION;
99 ret = ioctl(fd, PCITOOL_SYSTEM_INTR_INFO, &iinfo);
106 if (iinfo.ctlr_type == PCITOOL_CTLR_TYPE_PCPLUSMP ||
107 iinfo.ctlr_type == PCITOOL_CTLR_TYPE_APIX) {