bitops.h (5b45fe6b39e1d01c45de7b8e6d3ff72585eee6cf) bitops.h (0ade34c37012ea5c516d9aa4d19a56e9f40a55ed)
1#ifndef _M68K_BITOPS_H
2#define _M68K_BITOPS_H
3/*
4 * Copyright 1992, Linus Torvalds.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.

--- 297 unchanged lines hidden (view full) ---

306
307/*
308 * The true 68020 and more advanced processors support the "bfffo"
309 * instruction for finding bits. ColdFire and simple 68000 parts
310 * (including CPU32) do not support this. They simply use the generic
311 * functions.
312 */
313#if defined(CONFIG_CPU_HAS_NO_BITFIELDS)
1#ifndef _M68K_BITOPS_H
2#define _M68K_BITOPS_H
3/*
4 * Copyright 1992, Linus Torvalds.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
8 * for more details.

--- 297 unchanged lines hidden (view full) ---

306
307/*
308 * The true 68020 and more advanced processors support the "bfffo"
309 * instruction for finding bits. ColdFire and simple 68000 parts
310 * (including CPU32) do not support this. They simply use the generic
311 * functions.
312 */
313#if defined(CONFIG_CPU_HAS_NO_BITFIELDS)
314#include <asm-generic/bitops/find.h>
315#include <asm-generic/bitops/ffz.h>
316#else
317
318static inline int find_first_zero_bit(const unsigned long *vaddr,
319 unsigned size)
320{
321 const unsigned long *p = vaddr;
322 int res = 32;

--- 113 unchanged lines hidden (view full) ---

436
437 __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
438 : "=d" (res) : "d" (~word & -~word));
439 return res ^ 31;
440}
441
442#endif
443
314#include <asm-generic/bitops/ffz.h>
315#else
316
317static inline int find_first_zero_bit(const unsigned long *vaddr,
318 unsigned size)
319{
320 const unsigned long *p = vaddr;
321 int res = 32;

--- 113 unchanged lines hidden (view full) ---

435
436 __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
437 : "=d" (res) : "d" (~word & -~word));
438 return res ^ 31;
439}
440
441#endif
442
443#include <asm-generic/bitops/find.h>
444
444#ifdef __KERNEL__
445
446#if defined(CONFIG_CPU_HAS_NO_BITFIELDS)
447
448/*
449 * The newer ColdFire family members support a "bitrev" instruction
450 * and we can use that to implement a fast ffs. Older Coldfire parts,
451 * and normal 68000 parts don't have anything special, so we use the

--- 74 unchanged lines hidden ---
445#ifdef __KERNEL__
446
447#if defined(CONFIG_CPU_HAS_NO_BITFIELDS)
448
449/*
450 * The newer ColdFire family members support a "bitrev" instruction
451 * and we can use that to implement a fast ffs. Older Coldfire parts,
452 * and normal 68000 parts don't have anything special, so we use the

--- 74 unchanged lines hidden ---