BITS
#define MAJOR_OPCODE(word) (BITS((word), 27, 31))
#define MINOR_OPCODE(word) (BITS((word), 16, 21))
#define FIELD_A(word) (BITS((word), 0, 5))
#define FIELD_B(word) ((BITS((word), 12, 14)<<3) | \
(BITS((word), 24, 26)))
#define FIELD_C(word) (BITS((word), 6, 11))
#define FIELD_s12(word) sign_extend(((BITS((word), 0, 5) << 6) | \
BITS((word), 6, 11)), 12)
#define FIELD_s9(word) sign_extend(((BITS(word, 15, 15) << 8) | \
BITS(word, 16, 23)), 9)
#define FIELD_s21(word) sign_extend(((BITS(word, 6, 15) << 11) | \
(BITS(word, 17, 26) << 1)), 12)
#define FIELD_s25(word) sign_extend(((BITS(word, 0, 3) << 21) | \
(BITS(word, 6, 15) << 11) | \
(BITS(word, 17, 26) << 1)), 12)
#define FIELD_S_A(word) ((BITS((word), 2, 2)<<3) | BITS((word), 0, 2))
#define FIELD_S_B(word) ((BITS((word), 10, 10)<<3) | \
BITS((word), 8, 10))
#define FIELD_S_C(word) ((BITS((word), 7, 7)<<3) | BITS((word), 5, 7))
#define FIELD_S_H(word) ((BITS((word), 0, 2)<<3) | BITS((word), 5, 8))
#define FIELD_S_u5(word) (BITS((word), 0, 4))
#define FIELD_S_u6(word) (BITS((word), 0, 4) << 1)
#define FIELD_S_u7(word) (BITS((word), 0, 4) << 2)
#define FIELD_S_u10(word) (BITS((word), 0, 7) << 2)
#define FIELD_S_s7(word) sign_extend(BITS((word), 0, 5) << 1, 9)
#define FIELD_S_s8(word) sign_extend(BITS((word), 0, 7) << 1, 9)
#define FIELD_S_s9(word) sign_extend(BITS((word), 0, 8), 9)
#define FIELD_S_s10(word) sign_extend(BITS((word), 0, 8) << 1, 10)
#define FIELD_S_s11(word) sign_extend(BITS((word), 0, 8) << 2, 11)
#define FIELD_S_s13(word) sign_extend(BITS((word), 0, 10) << 2, 13)
state->di = BITS(state->words[0], 11, 11);
state->x = BITS(state->words[0], 6, 6);
state->zz = BITS(state->words[0], 7, 8);
state->aa = BITS(state->words[0], 9, 10);
state->di = BITS(state->words[0], 5, 5);
state->aa = BITS(state->words[0], 3, 4);
state->zz = BITS(state->words[0], 1, 2);
op_format = BITS(state->words[0], 22, 23);
if (BITS(state->words[0], 22, 23) == 3) {
state->di = BITS(state->words[0], 15, 15);
state->x = BITS(state->words[0], 16, 16);
state->zz = BITS(state->words[0], 17, 18);
state->aa = BITS(state->words[0], 22, 23);
switch (BITS(state->words[0], 22, 23)) {
switch (BITS(state->words[0], 22, 23)) {
state->zz = BITS(state->words[0], 3, 4);
if ((BITS(state->words[0], 3, 4) < 3) &&
subopcode = BITS(state->words[0], 5, 7);
switch (BITS(state->words[0], 8, 10)) {
state->write = BITS(state->words[0], 6, 6);
state->zz = BITS(state->words[0], 5, 5);
state->zz = BITS(state->words[0], 9, 10);
fieldA = (BITS(state->words[0], 9, 10) == 3) ?
asyh->dither.bits = NVVAL_GET(mode, NV507D, HEAD_SET_DITHER_CONTROL, BITS);
NVVAL(NV507D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
NVVAL(NV907D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
NVVAL(NV917D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
NVVAL(NVC37D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
NVVAL(NVCA7D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, BITS, DITHER_TO_6_BITS),
NVDEF(NV507D, HEAD_SET_DITHER_CONTROL, BITS, DITHER_TO_8_BITS),
#define CHECK_LED(LK, VAR_ON, VAR_OFF, LED, BITS) do { \
VAR_ON |= BITS; \
VAR_OFF |= BITS; \
#define MDP_COLORFMT_PACK(VIDEO, PLANE, COPLANE, HF, VF, BITS, GROUP, SWAP, ID)\
((HF) << 20) | ((VF) << 18) | ((BITS) << 8) | ((GROUP) << 6) |\
#define MDP_COLOR(COMPRESS, PACKED, LOOSE, VIDEO, PLANE, HF, VF, BITS, GROUP, SWAP, ID)\
((PLANE) << 21) | ((HF) << 19) | ((VF) << 18) | ((BITS) << 8) |\
#define MPT_CHECK_LOGGING(IOC, CMD, BITS) \
if (IOC->debug_level & BITS) \
#define MPT_CHECK_LOGGING(IOC, CMD, BITS) \
#define PRCM_PLL_FREQ_D_MASK BITS(0, 7)
#define PRCM_PLL_FREQ_N_MASK BITS(8, 13)
#define PRCM_PLL_FREQ_R_MASK BITS(16, 18)
#define PRCM_DSI_PLLOUT_SEL_DSI0_PLLOUT_DIVSEL_MASK BITS(0, 2)
#define PRCM_DSI_PLLOUT_SEL_DSI1_PLLOUT_DIVSEL_MASK BITS(8, 10)
#define PRCM_DSITVCLK_DIV_DSI0_ESC_CLK_DIV_MASK BITS(0, 7)
#define PRCM_DSITVCLK_DIV_DSI1_ESC_CLK_DIV_MASK BITS(8, 15)
#define PRCM_DSITVCLK_DIV_DSI2_ESC_CLK_DIV_MASK BITS(16, 23)
#define PRCM_CLKOCR_CLKOUT0_MASK BITS(0, 13)
#define PRCM_CLKOCR_CLKOUT1_MASK BITS(16, 29)
#define PRCM_TCR_TENSEL_MASK BITS(0, 7)
#define PRCM_CLKOCR_CLKODIV0_MASK BITS(0, 5)
#define PRCM_CLKOCR_CLKOSEL0_MASK BITS(6, 8)
#define PRCM_CLKOCR_CLKODIV1_MASK BITS(16, 21)
#define PRCM_CLKOCR_CLKOSEL1_MASK BITS(22, 24)
#define PRCM_CLK_MGT_CLKPLLDIV_MASK BITS(0, 4)
#define PRCM_CLK_MGT_CLKPLLSW_MASK BITS(5, 7)
#define niu_set_and_wait_clear_mac(NP, REG, BITS, LIMIT, DELAY, REG_NAME) \
__niu_set_and_wait_clear_mac(NP, REG, BITS, LIMIT, DELAY, REG_NAME); \
#define niu_set_and_wait_clear_ipp(NP, REG, BITS, LIMIT, DELAY, REG_NAME) \
__niu_set_and_wait_clear_ipp(NP, REG, BITS, LIMIT, DELAY, REG_NAME); \
#define niu_wait_bits_clear(NP, REG, BITS, LIMIT, DELAY) \
__niu_wait_bits_clear(NP, REG, BITS, LIMIT, DELAY); \
#define niu_set_and_wait_clear(NP, REG, BITS, LIMIT, DELAY, REG_NAME) \
__niu_set_and_wait_clear(NP, REG, BITS, LIMIT, DELAY, REG_NAME); \
#define SETBITS(PORT, BITS) outb( (inb(PORT) | (BITS)), (PORT) )
#define CLRBITS(PORT, BITS) outb( (inb(PORT) & ~(BITS)), (PORT) )
#define TESTHI(PORT, BITS) ((inb(PORT) & (BITS)) == (BITS))
#define TESTLO(PORT, BITS) ((inb(PORT) & (BITS)) == 0)
#define MPT_CHECK_LOGGING(IOC, CMD, BITS) \
if (IOC->logging_level & BITS) \
#define SCSI_LOG_LEVEL(SHIFT, BITS) \
((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1))
#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) \
if (unlikely((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))) \
#define SCSI_LOG_LEVEL(SHIFT, BITS) 0
#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) do { } while (0)
csr = SPI_BF(BITS, bits - 8);
set &= BITS(fds, n);
set = BITS(fds, n);
((BITS(8) << 8) + (hold >> 8)) % 31) {
if (BITS(4) != Z_DEFLATED) {
len = BITS(4) + 8;
state->last = BITS(1);
switch (BITS(2)) {
state->nlen = BITS(5) + 257;
state->ndist = BITS(5) + 1;
state->ncode = BITS(4) + 4;
state->lens[order[state->have++]] = (unsigned short)BITS(3);
this = state->lencode[BITS(state->lenbits)];
copy = 3 + BITS(2);
copy = 3 + BITS(3);
copy = 11 + BITS(7);
this = state->lencode[BITS(state->lenbits)];
(BITS(last.bits + last.op) >> last.bits)];
state->length += BITS(state->extra);
this = state->distcode[BITS(state->distbits)];
(BITS(last.bits + last.op) >> last.bits)];
state->offset += BITS(state->extra);
#define R_MASK (BITS-1)
val = S1 + ((S2 - S1) * (signed int)pos) / BITS;
res = (((frames * data->pitch) + (BITS/2)) >> SHIFT);
res = (((frames * data->pitch) + (BITS/2)) >> SHIFT);
val = S1 + ((S2 - S1) * (signed int)pos) / BITS;
#define TABLESZ (1 << BITS)