.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | 2 | /* |
---|
3 | 3 | * linux/drivers/char/hpilo.h |
---|
4 | 4 | * |
---|
.. | .. |
---|
160 | 160 | #define ILO_START_ALIGN 4096 |
---|
161 | 161 | #define ILO_CACHE_SZ 128 |
---|
162 | 162 | struct fifo { |
---|
163 | | - u64 nrents; /* user requested number of fifo entries */ |
---|
164 | | - u64 imask; /* mask to extract valid fifo index */ |
---|
165 | | - u64 merge; /* O/C bits to merge in during enqueue operation */ |
---|
166 | | - u64 reset; /* set to non-zero when the target device resets */ |
---|
167 | | - u8 pad_0[ILO_CACHE_SZ - (sizeof(u64) * 4)]; |
---|
| 163 | + u64 nrents; /* user requested number of fifo entries */ |
---|
| 164 | + u64 imask; /* mask to extract valid fifo index */ |
---|
| 165 | + u64 merge; /* O/C bits to merge in during enqueue operation */ |
---|
| 166 | + u64 reset; /* set to non-zero when the target device resets */ |
---|
| 167 | + u8 pad_0[ILO_CACHE_SZ - (sizeof(u64) * 4)]; |
---|
168 | 168 | |
---|
169 | | - u64 head; |
---|
170 | | - u8 pad_1[ILO_CACHE_SZ - (sizeof(u64))]; |
---|
| 169 | + u64 head; |
---|
| 170 | + u8 pad_1[ILO_CACHE_SZ - (sizeof(u64))]; |
---|
171 | 171 | |
---|
172 | | - u64 tail; |
---|
173 | | - u8 pad_2[ILO_CACHE_SZ - (sizeof(u64))]; |
---|
| 172 | + u64 tail; |
---|
| 173 | + u8 pad_2[ILO_CACHE_SZ - (sizeof(u64))]; |
---|
174 | 174 | |
---|
175 | | - u64 fifobar[1]; |
---|
| 175 | + u64 fifobar[]; |
---|
176 | 176 | }; |
---|
177 | 177 | |
---|
178 | 178 | /* convert between struct fifo, and the fifobar, which is saved in the ccb */ |
---|
179 | | -#define FIFOHANDLESIZE (sizeof(struct fifo) - sizeof(u64)) |
---|
| 179 | +#define FIFOHANDLESIZE (sizeof(struct fifo)) |
---|
180 | 180 | #define FIFOBARTOHANDLE(_fifo) \ |
---|
181 | 181 | ((struct fifo *)(((char *)(_fifo)) - FIFOHANDLESIZE)) |
---|
182 | 182 | |
---|