Lines Matching defs:counter
104 * Returns the number of trailing '1' bits in the words of the counter, which is
106 * At the same time, increments the counter by one.
110 * u32 counter[4] = { 0xFFFFFFFF, 0x1, 0x0, 0x0 };
111 * int i = lrw_next_index(&counter);
112 * // i == 33, counter == { 0x0, 0x2, 0x0, 0x0 }
114 static int lrw_next_index(u32 *counter)
119 if (counter[i] + 1 != 0)
120 return res + ffz(counter[i]++);
122 counter[i] = 0;
127 * If we get here, then x == 128 and we are incrementing the counter
149 u32 counter[4];
163 counter[0] = be32_to_cpu(iv[3]);
164 counter[1] = be32_to_cpu(iv[2]);
165 counter[2] = be32_to_cpu(iv[1]);
166 counter[3] = be32_to_cpu(iv[0]);
182 &ctx->mulinc[lrw_next_index(counter)]);
186 iv[0] = cpu_to_be32(counter[3]);
187 iv[1] = cpu_to_be32(counter[2]);
188 iv[2] = cpu_to_be32(counter[1]);
189 iv[3] = cpu_to_be32(counter[0]);