Print this page
de-linting of .s files
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/sunfire/ml/fhc_asm.s
+++ new/usr/src/uts/sun4u/sunfire/ml/fhc_asm.s
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -
29 27 #include <sys/param.h>
30 28 #include <sys/errno.h>
31 29 #include <sys/asm_linkage.h>
32 30 #include <sys/machthread.h>
33 31 #include <sys/asi.h>
34 32 #include <sys/privregs.h>
35 33 #include <sys/spitregs.h>
36 34
37 -#if defined(lint)
38 -
39 -#else /* lint */
40 35 #include "assym.h"
41 -#endif /* lint */
42 36
43 37 /*
44 38 * fhc_shutdown_asm(u_longlong_t base, int size)
45 39 *
46 40 * Flush cpu E$ then shutdown.
47 41 * This function is special in that it really sets the D-tags to
48 42 * a known state. And this is the behavior we're looking for.
49 43 *
50 44 * The flush address is known to be a cpu-unique non-existent
51 45 * cacheable address. We write to non-existent memory, using
52 46 * the side effect of d-tag invalidation.
53 47 *
54 48 * Also, note that this function is never run from main memory.
55 49 * Rather it is copied to non-cacheable SRAM (hence the ..._end
56 50 * label at the bottom of the function). This implies that the
57 51 * function must be position independent code that doesn't reference
58 52 * cacheable real memory.
59 53 */
60 -#if defined(lint)
61 54
62 -/*ARGSUSED*/
63 -void
64 -fhc_shutdown_asm(u_longlong_t base, int size)
65 -{}
66 -
67 -#else /* lint */
68 -
69 55 ENTRY(fhc_shutdown_asm)
70 56 ! turn off errors (we'll be writing to non-existent memory)
71 57 stxa %g0, [%g0]ASI_ESTATE_ERR
72 58 membar #Sync ! SYNC
73 59
74 60 rdpr %pstate, %o4
75 61 andn %o4, PSTATE_IE | PSTATE_AM, %o3
76 62 wrpr %o3, %g0, %pstate
77 63 1:
78 64 brlez,pn %o1, 2f ! if (len <= 0) exit loop
79 65 dec 64, %o1 ! size -= 64
80 66 sta %g0, [%o0]ASI_MEM ! store (unpopulated) word
81 67 ba 1b
82 68 inc 64, %o0 ! addr += 64
83 69 2:
84 70 membar #Sync ! SYNC
85 71 shutdown ! SHUTDOWN
86 72 /*NOTREACHED*/
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
87 73
88 74 ! if, for some reason, this cpu doesn't shutdown, just sit here
89 75 3:
90 76 ba 3b
91 77 nop ! eventually the master will notice
92 78 SET_SIZE(fhc_shutdown_asm)
93 79
94 80 .global fhc_shutdown_asm_end
95 81 fhc_shutdown_asm_end:
96 82
97 -#endif /* lint */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX