Mon Jul 27 12:32:54 2020 UTC ()
Don't remove the _LKM #ifdefs, but do s/_LKM/_MODULE/


(skrll)
diff -r1.20 -r1.21 src/sys/arch/hpcarm/include/intr.h
diff -r1.11 -r1.12 src/sys/arch/iyonix/include/intr.h
diff -r1.10 -r1.11 src/sys/arch/zaurus/include/intr.h

cvs diff -r1.20 -r1.21 src/sys/arch/hpcarm/include/intr.h (expand / switch to unified diff)

--- src/sys/arch/hpcarm/include/intr.h 2020/07/23 19:04:03 1.20
+++ src/sys/arch/hpcarm/include/intr.h 2020/07/27 12:32:54 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: intr.h,v 1.20 2020/07/23 19:04:03 skrll Exp $ */ 1/* $NetBSD: intr.h,v 1.21 2020/07/27 12:32:54 skrll Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997 Mark Brinicombe. 4 * Copyright (c) 1997 Mark Brinicombe.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -62,26 +62,34 @@ @@ -62,26 +62,34 @@
62#define IST_EDGE_BOTH 6 62#define IST_EDGE_BOTH 6
63 63
64#ifdef __OLD_INTERRUPT_CODE /* XXX XXX XXX */ 64#ifdef __OLD_INTERRUPT_CODE /* XXX XXX XXX */
65 65
66#include <machine/irqhandler.h> 66#include <machine/irqhandler.h>
67#include <arm/arm32/psl.h> 67#include <arm/arm32/psl.h>
68 68
69#else /* !__OLD_INTERRUPT_CODE */ 69#else /* !__OLD_INTERRUPT_CODE */
70 70
71#ifndef _LOCORE 71#ifndef _LOCORE
72 72
73#include <sys/queue.h> 73#include <sys/queue.h>
74 74
 75#if defined(_MODULE)
 76
 77int _splraise(int);
 78int _spllower(int);
 79void splx(int);
 80
 81#else /* _MODULE */
 82
75#include "opt_arm_intr_impl.h" 83#include "opt_arm_intr_impl.h"
76 84
77#if defined(ARM_INTR_IMPL) 85#if defined(ARM_INTR_IMPL)
78 86
79/* 87/*
80 * Each board needs to define the following functions: 88 * Each board needs to define the following functions:
81 * 89 *
82 * int _splraise(int); 90 * int _splraise(int);
83 * int _spllower(int); 91 * int _spllower(int);
84 * void splx(int); 92 * void splx(int);
85 * void _setsoftintr(int); 93 * void _setsoftintr(int);
86 * 94 *
87 * These may be defined as functions, static inline functions, or macros, 95 * These may be defined as functions, static inline functions, or macros,
@@ -108,26 +116,28 @@ @@ -108,26 +116,28 @@
108 * } 116 * }
109 */ 117 */
110 118
111#include ARM_INTR_IMPL 119#include ARM_INTR_IMPL
112 120
113#else /* ARM_INTR_IMPL */ 121#else /* ARM_INTR_IMPL */
114 122
115#error ARM_INTR_IMPL not defined. 123#error ARM_INTR_IMPL not defined.
116 124
117#endif /* ARM_INTR_IMPL */ 125#endif /* ARM_INTR_IMPL */
118 126
119#define splsoft() _splraise(IPL_SOFT) 127#define splsoft() _splraise(IPL_SOFT)
120 128
 129#endif /* _MODULE */
 130
121typedef uint8_t ipl_t; 131typedef uint8_t ipl_t;
122typedef struct { 132typedef struct {
123 ipl_t _ipl; 133 ipl_t _ipl;
124} ipl_cookie_t; 134} ipl_cookie_t;
125 135
126static inline ipl_cookie_t 136static inline ipl_cookie_t
127makeiplcookie(ipl_t ipl) 137makeiplcookie(ipl_t ipl)
128{ 138{
129 139
130 return (ipl_cookie_t){._ipl = ipl}; 140 return (ipl_cookie_t){._ipl = ipl};
131} 141}
132 142
133static inline int 143static inline int

cvs diff -r1.11 -r1.12 src/sys/arch/iyonix/include/intr.h (expand / switch to unified diff)

--- src/sys/arch/iyonix/include/intr.h 2020/07/23 19:23:49 1.11
+++ src/sys/arch/iyonix/include/intr.h 2020/07/27 12:32:54 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: intr.h,v 1.11 2020/07/23 19:23:49 skrll Exp $ */ 1/* $NetBSD: intr.h,v 1.12 2020/07/27 12:32:54 skrll Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -56,26 +56,34 @@ @@ -56,26 +56,34 @@
56#define IST_NONE 0 /* none */ 56#define IST_NONE 0 /* none */
57#define IST_PULSE 1 /* pulsed */ 57#define IST_PULSE 1 /* pulsed */
58#define IST_EDGE 2 /* edge-triggered */ 58#define IST_EDGE 2 /* edge-triggered */
59#define IST_LEVEL 3 /* level-triggered */ 59#define IST_LEVEL 3 /* level-triggered */
60 60
61#define IST_LEVEL_LOW IST_LEVEL 61#define IST_LEVEL_LOW IST_LEVEL
62#define IST_LEVEL_HIGH 4 62#define IST_LEVEL_HIGH 4
63#define IST_EDGE_FALLING IST_EDGE 63#define IST_EDGE_FALLING IST_EDGE
64#define IST_EDGE_RISING 5 64#define IST_EDGE_RISING 5
65#define IST_EDGE_BOTH 6 65#define IST_EDGE_BOTH 6
66 66
67#ifndef _LOCORE 67#ifndef _LOCORE
68 68
 69#if defined(_MODULE)
 70
 71int _splraise(int);
 72int _spllower(int);
 73void splx(int);
 74
 75#else /* _MODULE */
 76
69#include "opt_arm_intr_impl.h" 77#include "opt_arm_intr_impl.h"
70 78
71#if defined(ARM_INTR_IMPL) 79#if defined(ARM_INTR_IMPL)
72 80
73/* 81/*
74 * Each board needs to define the following functions: 82 * Each board needs to define the following functions:
75 * 83 *
76 * int _splraise(int); 84 * int _splraise(int);
77 * int _spllower(int); 85 * int _spllower(int);
78 * void splx(int); 86 * void splx(int);
79 * void _setsoftintr(int); 87 * void _setsoftintr(int);
80 * 88 *
81 * These may be defined as functions, static inline functions, or macros, 89 * These may be defined as functions, static inline functions, or macros,
@@ -100,26 +108,28 @@ @@ -100,26 +108,28 @@
100 * { 108 * {
101 * return boardtype_splx(spl); 109 * return boardtype_splx(spl);
102 * } 110 * }
103 */ 111 */
104 112
105#include ARM_INTR_IMPL 113#include ARM_INTR_IMPL
106 114
107#else /* ARM_INTR_IMPL */ 115#else /* ARM_INTR_IMPL */
108 116
109#error ARM_INTR_IMPL not defined. 117#error ARM_INTR_IMPL not defined.
110 118
111#endif /* ARM_INTR_IMPL */ 119#endif /* ARM_INTR_IMPL */
112 120
 121#endif /* _MODULE */
 122
113typedef uint8_t ipl_t; 123typedef uint8_t ipl_t;
114typedef struct { 124typedef struct {
115 ipl_t _ipl; 125 ipl_t _ipl;
116} ipl_cookie_t; 126} ipl_cookie_t;
117 127
118static inline ipl_cookie_t 128static inline ipl_cookie_t
119makeiplcookie(ipl_t ipl) 129makeiplcookie(ipl_t ipl)
120{ 130{
121 131
122 return (ipl_cookie_t){._ipl = ipl}; 132 return (ipl_cookie_t){._ipl = ipl};
123} 133}
124 134
125static inline int 135static inline int

cvs diff -r1.10 -r1.11 src/sys/arch/zaurus/include/intr.h (expand / switch to unified diff)

--- src/sys/arch/zaurus/include/intr.h 2020/07/23 19:24:38 1.10
+++ src/sys/arch/zaurus/include/intr.h 2020/07/27 12:32:54 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: intr.h,v 1.10 2020/07/23 19:24:38 skrll Exp $ */ 1/* $NetBSD: intr.h,v 1.11 2020/07/27 12:32:54 skrll Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -58,26 +58,34 @@ @@ -58,26 +58,34 @@
58#define IST_EDGE 2 /* edge-triggered */ 58#define IST_EDGE 2 /* edge-triggered */
59#define IST_LEVEL 3 /* level-triggered */ 59#define IST_LEVEL 3 /* level-triggered */
60 60
61#define IST_LEVEL_LOW IST_LEVEL 61#define IST_LEVEL_LOW IST_LEVEL
62#define IST_LEVEL_HIGH 4 62#define IST_LEVEL_HIGH 4
63#define IST_EDGE_FALLING IST_EDGE 63#define IST_EDGE_FALLING IST_EDGE
64#define IST_EDGE_RISING 5 64#define IST_EDGE_RISING 5
65#define IST_EDGE_BOTH 6 65#define IST_EDGE_BOTH 6
66 66
67#ifndef _LOCORE 67#ifndef _LOCORE
68 68
69#include <sys/queue.h> 69#include <sys/queue.h>
70 70
 71#if defined(_MODULE)
 72
 73int _splraise(int);
 74int _spllower(int);
 75void splx(int);
 76
 77#else /* _MODULE */
 78
71#include "opt_arm_intr_impl.h" 79#include "opt_arm_intr_impl.h"
72 80
73#if defined(ARM_INTR_IMPL) 81#if defined(ARM_INTR_IMPL)
74 82
75/* 83/*
76 * Each board needs to define the following functions: 84 * Each board needs to define the following functions:
77 * 85 *
78 * int _splraise(int); 86 * int _splraise(int);
79 * int _spllower(int); 87 * int _spllower(int);
80 * void splx(int); 88 * void splx(int);
81 * 89 *
82 * These may be defined as functions, static inline functions, or macros, 90 * These may be defined as functions, static inline functions, or macros,
83 * but there must be a _spllower() and splx() defined as functions callable 91 * but there must be a _spllower() and splx() defined as functions callable
@@ -103,26 +111,28 @@ @@ -103,26 +111,28 @@
103 * } 111 * }
104 */ 112 */
105 113
106#include ARM_INTR_IMPL 114#include ARM_INTR_IMPL
107 115
108#else /* ARM_INTR_IMPL */ 116#else /* ARM_INTR_IMPL */
109 117
110#error ARM_INTR_IMPL not defined. 118#error ARM_INTR_IMPL not defined.
111 119
112#endif /* ARM_INTR_IMPL */ 120#endif /* ARM_INTR_IMPL */
113 121
114#define splsoft() _splraise(IPL_SOFT) 122#define splsoft() _splraise(IPL_SOFT)
115 123
 124#endif /* _MODULE */
 125
116typedef uint8_t ipl_t; 126typedef uint8_t ipl_t;
117typedef struct { 127typedef struct {
118 ipl_t _ipl; 128 ipl_t _ipl;
119} ipl_cookie_t; 129} ipl_cookie_t;
120 130
121static inline ipl_cookie_t 131static inline ipl_cookie_t
122makeiplcookie(ipl_t ipl) 132makeiplcookie(ipl_t ipl)
123{ 133{
124 134
125 return (ipl_cookie_t){._ipl = ipl}; 135 return (ipl_cookie_t){._ipl = ipl};
126} 136}
127 137
128static inline int 138static inline int