1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate *
4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate * with the License.
8*7c478bd9Sstevel@tonic-gate *
9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate *
14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate *
20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate */
26*7c478bd9Sstevel@tonic-gate
27*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
28*7c478bd9Sstevel@tonic-gate
29*7c478bd9Sstevel@tonic-gate #include <sys/proc.h>
30*7c478bd9Sstevel@tonic-gate #include <sys/priocntl.h>
31*7c478bd9Sstevel@tonic-gate #include <sys/class.h>
32*7c478bd9Sstevel@tonic-gate #include <sys/disp.h>
33*7c478bd9Sstevel@tonic-gate #include <sys/fx.h>
34*7c478bd9Sstevel@tonic-gate #include <sys/fxpriocntl.h>
35*7c478bd9Sstevel@tonic-gate #include <sys/modctl.h>
36*7c478bd9Sstevel@tonic-gate
37*7c478bd9Sstevel@tonic-gate /*
38*7c478bd9Sstevel@tonic-gate * The purpose of this file is to allow a user to make their own
39*7c478bd9Sstevel@tonic-gate * fx_dptbl. The contents of this file should be included in the
40*7c478bd9Sstevel@tonic-gate * fx_dptbl(4) man page with proper instructions for making
41*7c478bd9Sstevel@tonic-gate * and replacing the FX_DPTBL in usr/kernel/sched.
42*7c478bd9Sstevel@tonic-gate * It is recommended that the system calls be used to change the time
43*7c478bd9Sstevel@tonic-gate * quantums instead of re-building the module.
44*7c478bd9Sstevel@tonic-gate */
45*7c478bd9Sstevel@tonic-gate
46*7c478bd9Sstevel@tonic-gate static struct modlmisc modlmisc = {
47*7c478bd9Sstevel@tonic-gate &mod_miscops, "Fixed priority dispatch table"
48*7c478bd9Sstevel@tonic-gate };
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gate static struct modlinkage modlinkage = {
51*7c478bd9Sstevel@tonic-gate MODREV_1, &modlmisc, 0
52*7c478bd9Sstevel@tonic-gate };
53*7c478bd9Sstevel@tonic-gate
54*7c478bd9Sstevel@tonic-gate int
_init()55*7c478bd9Sstevel@tonic-gate _init()
56*7c478bd9Sstevel@tonic-gate {
57*7c478bd9Sstevel@tonic-gate return (mod_install(&modlinkage));
58*7c478bd9Sstevel@tonic-gate }
59*7c478bd9Sstevel@tonic-gate
60*7c478bd9Sstevel@tonic-gate int
_info(struct modinfo * modinfop)61*7c478bd9Sstevel@tonic-gate _info(struct modinfo *modinfop)
62*7c478bd9Sstevel@tonic-gate {
63*7c478bd9Sstevel@tonic-gate return (mod_info(&modlinkage, modinfop));
64*7c478bd9Sstevel@tonic-gate }
65*7c478bd9Sstevel@tonic-gate
66*7c478bd9Sstevel@tonic-gate #define FXGPUP0 0 /* Global priority for FX user priority 0 */
67*7c478bd9Sstevel@tonic-gate
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gate
70*7c478bd9Sstevel@tonic-gate fxdpent_t config_fx_dptbl[] = {
71*7c478bd9Sstevel@tonic-gate
72*7c478bd9Sstevel@tonic-gate /* glbpri qntm */
73*7c478bd9Sstevel@tonic-gate
74*7c478bd9Sstevel@tonic-gate FXGPUP0+0, 20,
75*7c478bd9Sstevel@tonic-gate FXGPUP0+1, 20,
76*7c478bd9Sstevel@tonic-gate FXGPUP0+2, 20,
77*7c478bd9Sstevel@tonic-gate FXGPUP0+3, 20,
78*7c478bd9Sstevel@tonic-gate FXGPUP0+4, 20,
79*7c478bd9Sstevel@tonic-gate FXGPUP0+5, 20,
80*7c478bd9Sstevel@tonic-gate FXGPUP0+6, 20,
81*7c478bd9Sstevel@tonic-gate FXGPUP0+7, 20,
82*7c478bd9Sstevel@tonic-gate FXGPUP0+8, 20,
83*7c478bd9Sstevel@tonic-gate FXGPUP0+9, 20,
84*7c478bd9Sstevel@tonic-gate FXGPUP0+10, 16,
85*7c478bd9Sstevel@tonic-gate FXGPUP0+11, 16,
86*7c478bd9Sstevel@tonic-gate FXGPUP0+12, 16,
87*7c478bd9Sstevel@tonic-gate FXGPUP0+13, 16,
88*7c478bd9Sstevel@tonic-gate FXGPUP0+14, 16,
89*7c478bd9Sstevel@tonic-gate FXGPUP0+15, 16,
90*7c478bd9Sstevel@tonic-gate FXGPUP0+16, 16,
91*7c478bd9Sstevel@tonic-gate FXGPUP0+17, 16,
92*7c478bd9Sstevel@tonic-gate FXGPUP0+18, 16,
93*7c478bd9Sstevel@tonic-gate FXGPUP0+19, 16,
94*7c478bd9Sstevel@tonic-gate FXGPUP0+20, 12,
95*7c478bd9Sstevel@tonic-gate FXGPUP0+21, 12,
96*7c478bd9Sstevel@tonic-gate FXGPUP0+22, 12,
97*7c478bd9Sstevel@tonic-gate FXGPUP0+23, 12,
98*7c478bd9Sstevel@tonic-gate FXGPUP0+24, 12,
99*7c478bd9Sstevel@tonic-gate FXGPUP0+25, 12,
100*7c478bd9Sstevel@tonic-gate FXGPUP0+26, 12,
101*7c478bd9Sstevel@tonic-gate FXGPUP0+27, 12,
102*7c478bd9Sstevel@tonic-gate FXGPUP0+28, 12,
103*7c478bd9Sstevel@tonic-gate FXGPUP0+29, 12,
104*7c478bd9Sstevel@tonic-gate FXGPUP0+30, 8,
105*7c478bd9Sstevel@tonic-gate FXGPUP0+31, 8,
106*7c478bd9Sstevel@tonic-gate FXGPUP0+32, 8,
107*7c478bd9Sstevel@tonic-gate FXGPUP0+33, 8,
108*7c478bd9Sstevel@tonic-gate FXGPUP0+34, 8,
109*7c478bd9Sstevel@tonic-gate FXGPUP0+35, 8,
110*7c478bd9Sstevel@tonic-gate FXGPUP0+36, 8,
111*7c478bd9Sstevel@tonic-gate FXGPUP0+37, 8,
112*7c478bd9Sstevel@tonic-gate FXGPUP0+38, 8,
113*7c478bd9Sstevel@tonic-gate FXGPUP0+39, 8,
114*7c478bd9Sstevel@tonic-gate FXGPUP0+40, 4,
115*7c478bd9Sstevel@tonic-gate FXGPUP0+41, 4,
116*7c478bd9Sstevel@tonic-gate FXGPUP0+42, 4,
117*7c478bd9Sstevel@tonic-gate FXGPUP0+43, 4,
118*7c478bd9Sstevel@tonic-gate FXGPUP0+44, 4,
119*7c478bd9Sstevel@tonic-gate FXGPUP0+45, 4,
120*7c478bd9Sstevel@tonic-gate FXGPUP0+46, 4,
121*7c478bd9Sstevel@tonic-gate FXGPUP0+47, 4,
122*7c478bd9Sstevel@tonic-gate FXGPUP0+48, 4,
123*7c478bd9Sstevel@tonic-gate FXGPUP0+49, 4,
124*7c478bd9Sstevel@tonic-gate FXGPUP0+50, 4,
125*7c478bd9Sstevel@tonic-gate FXGPUP0+51, 4,
126*7c478bd9Sstevel@tonic-gate FXGPUP0+52, 4,
127*7c478bd9Sstevel@tonic-gate FXGPUP0+53, 4,
128*7c478bd9Sstevel@tonic-gate FXGPUP0+54, 4,
129*7c478bd9Sstevel@tonic-gate FXGPUP0+55, 4,
130*7c478bd9Sstevel@tonic-gate FXGPUP0+56, 4,
131*7c478bd9Sstevel@tonic-gate FXGPUP0+57, 4,
132*7c478bd9Sstevel@tonic-gate FXGPUP0+58, 4,
133*7c478bd9Sstevel@tonic-gate FXGPUP0+59, 2,
134*7c478bd9Sstevel@tonic-gate FXGPUP0+60, 2,
135*7c478bd9Sstevel@tonic-gate };
136*7c478bd9Sstevel@tonic-gate
137*7c478bd9Sstevel@tonic-gate pri_t config_fx_maxumdpri = sizeof (config_fx_dptbl) / sizeof (fxdpent_t) - 1;
138*7c478bd9Sstevel@tonic-gate
139*7c478bd9Sstevel@tonic-gate /*
140*7c478bd9Sstevel@tonic-gate * Return the address of config_fx_dptbl
141*7c478bd9Sstevel@tonic-gate */
142*7c478bd9Sstevel@tonic-gate fxdpent_t *
fx_getdptbl()143*7c478bd9Sstevel@tonic-gate fx_getdptbl()
144*7c478bd9Sstevel@tonic-gate {
145*7c478bd9Sstevel@tonic-gate return (config_fx_dptbl);
146*7c478bd9Sstevel@tonic-gate }
147*7c478bd9Sstevel@tonic-gate
148*7c478bd9Sstevel@tonic-gate
149*7c478bd9Sstevel@tonic-gate /*
150*7c478bd9Sstevel@tonic-gate * Return the address of fx_maxumdpri
151*7c478bd9Sstevel@tonic-gate */
152*7c478bd9Sstevel@tonic-gate pri_t
fx_getmaxumdpri()153*7c478bd9Sstevel@tonic-gate fx_getmaxumdpri()
154*7c478bd9Sstevel@tonic-gate {
155*7c478bd9Sstevel@tonic-gate /*
156*7c478bd9Sstevel@tonic-gate * the config_fx_dptbl table.
157*7c478bd9Sstevel@tonic-gate */
158*7c478bd9Sstevel@tonic-gate return (config_fx_maxumdpri);
159*7c478bd9Sstevel@tonic-gate }
160