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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2015 by Delphix. All rights reserved.
24 */
25
26 /* Copyright (c) 1988 AT&T */
27 /* All Rights Reserved */
28
29
30 #ifndef _SYS_MACHPARAM_H
31 #define _SYS_MACHPARAM_H
32
33 #if !defined(_ASM)
34 #include <sys/types.h>
35
36 #if defined(__xpv)
37 #include <sys/xpv_impl.h>
38 #endif
39
40 #endif
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 #ifndef _ASM
47 #define ADDRESS_C(c) c ## ul
48 #else /* _ASM */
49 #define ADDRESS_C(c) (c)
50 #endif /* _ASM */
51
52 /*
53 * Machine dependent parameters and limits.
54 */
55
56 #if defined(__amd64)
57 #define NCPU 256
58 #define NCPU_LOG2 8
59 #elif defined(__i386)
60 #define NCPU 32
61 #define NCPU_LOG2 5
62 #endif
63
64 /* NCPU_P2 is NCPU rounded to a power of 2 */
65 #define NCPU_P2 (1 << NCPU_LOG2)
66
67 /*
68 * The value defined below could grow to 16. hat structure and
69 * page_t have room for 16 nodes.
70 */
71 #define MAXNODES 4
72 #define NUMA_NODEMASK 0x0f
73
74 /*
75 * Define the FPU symbol if we could run on a machine with an external
76 * FPU (i.e. not integrated with the normal machine state like the vax).
|
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2015 by Delphix. All rights reserved.
24 * Copyright 2016 Joyent, Inc.
25 */
26
27 /* Copyright (c) 1988 AT&T */
28 /* All Rights Reserved */
29
30
31 #ifndef _SYS_MACHPARAM_H
32 #define _SYS_MACHPARAM_H
33
34 #if !defined(_ASM)
35 #include <sys/types.h>
36
37 #if defined(__xpv)
38 #include <sys/xpv_impl.h>
39 #endif
40
41 #endif
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47 #ifndef _ASM
48 #define ADDRESS_C(c) c ## ul
49 #else /* _ASM */
50 #define ADDRESS_C(c) (c)
51 #endif /* _ASM */
52
53 /*
54 * Machine dependent parameters and limits.
55 */
56
57 #if defined(__amd64)
58 /*
59 * If NCPU grows beyond 256, sizing for the x86 comm page will require
60 * adjustment.
61 */
62 #define NCPU 256
63 #define NCPU_LOG2 8
64 #elif defined(__i386)
65 #define NCPU 32
66 #define NCPU_LOG2 5
67 #endif
68
69 /* NCPU_P2 is NCPU rounded to a power of 2 */
70 #define NCPU_P2 (1 << NCPU_LOG2)
71
72 /*
73 * The value defined below could grow to 16. hat structure and
74 * page_t have room for 16 nodes.
75 */
76 #define MAXNODES 4
77 #define NUMA_NODEMASK 0x0f
78
79 /*
80 * Define the FPU symbol if we could run on a machine with an external
81 * FPU (i.e. not integrated with the normal machine state like the vax).
|