__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 1995, Russell King.
* Various bits and pieces copyrights include:
* Linus Torvalds (test_bit).
* Big endian support: Copyright 2001, Nicolas Pitre
* reworked by rmk.
*
* bit 0 is the LSB of an "unsigned long" quantity.
*
* Please note that the code in this file should never be included
* from user space. Many of these are not implemented in assembler
* since they would be too costly. Also, they require privileged
* instructions (which are not available from user mode) to ensure
* that they are atomic.
*/
#ifndef __ASM_ARM_BITOPS_H
#define __ASM_ARM_BITOPS_H
#ifdef __KERNEL__
#ifndef _LINUX_BITOPS_H
#error only <linux/bitops.h> can be included directly
#endif
#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <asm/barrier.h>
/*
* These functions are the basis of our bit ops.
*
* First, the atomic bitops. These use native endian.
*/
static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
*p |= mask;
raw_local_irq_restore(flags);
}
static inline void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
*p &= ~mask;
raw_local_irq_restore(flags);
}
static inline void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
*p ^= mask;
raw_local_irq_restore(flags);
}
static inline int
____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
res = *p;
*p = res | mask;
raw_local_irq_restore(flags);
return (res & mask) != 0;
}
static inline int
____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
res = *p;
*p = res & ~mask;
raw_local_irq_restore(flags);
return (res & mask) != 0;
}
static inline int
____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = BIT_MASK(bit);
p += BIT_WORD(bit);
raw_local_irq_save(flags);
res = *p;
*p = res ^ mask;
raw_local_irq_restore(flags);
return (res & mask) != 0;
}
#include <asm-generic/bitops/non-atomic.h>
/*
* A note about Endian-ness.
* -------------------------
*
* When the ARM is put into big endian mode via CR15, the processor
* merely swaps the order of bytes within words, thus:
*
* ------------ physical data bus bits -----------
* D31 ... D24 D23 ... D16 D15 ... D8 D7 ... D0
* little byte 3 byte 2 byte 1 byte 0
* big byte 0 byte 1 byte 2 byte 3
*
* This means that reading a 32-bit word at address 0 returns the same
* value irrespective of the endian mode bit.
*
* Peripheral devices should be connected with the data bus reversed in
* "Big Endian" mode. ARM Application Note 61 is applicable, and is
* available from http://www.arm.com/.
*
* The following assumes that the data bus connectivity for big endian
* mode has been followed.
*
* Note that bit 0 is defined to be 32-bit word bit 0, not byte 0 bit 0.
*/
/*
* Native endian assembly bitops. nr = 0 -> word 0 bit 0.
*/
extern void _set_bit(int nr, volatile unsigned long * p);
extern void _clear_bit(int nr, volatile unsigned long * p);
extern void _change_bit(int nr, volatile unsigned long * p);
extern int _test_and_set_bit(int nr, volatile unsigned long * p);
extern int _test_and_clear_bit(int nr, volatile unsigned long * p);
extern int _test_and_change_bit(int nr, volatile unsigned long * p);
/*
* Little endian assembly bitops. nr = 0 -> byte 0 bit 0.
*/
unsigned long _find_first_zero_bit_le(const unsigned long *p, unsigned long size);
unsigned long _find_next_zero_bit_le(const unsigned long *p,
unsigned long size, unsigned long offset);
unsigned long _find_first_bit_le(const unsigned long *p, unsigned long size);
unsigned long _find_next_bit_le(const unsigned long *p, unsigned long size, unsigned long offset);
/*
* Big endian assembly bitops. nr = 0 -> byte 3 bit 0.
*/
unsigned long _find_first_zero_bit_be(const unsigned long *p, unsigned long size);
unsigned long _find_next_zero_bit_be(const unsigned long *p,
unsigned long size, unsigned long offset);
unsigned long _find_first_bit_be(const unsigned long *p, unsigned long size);
unsigned long _find_next_bit_be(const unsigned long *p, unsigned long size, unsigned long offset);
#ifndef CONFIG_SMP
/*
* The __* form of bitops are non-atomic and may be reordered.
*/
#define ATOMIC_BITOP(name,nr,p) \
(__builtin_constant_p(nr) ? ____atomic_##name(nr, p) : _##name(nr,p))
#else
#define ATOMIC_BITOP(name,nr,p) _##name(nr,p)
#endif
/*
* Native endian atomic definitions.
*/
#define set_bit(nr,p) ATOMIC_BITOP(set_bit,nr,p)
#define clear_bit(nr,p) ATOMIC_BITOP(clear_bit,nr,p)
#define change_bit(nr,p) ATOMIC_BITOP(change_bit,nr,p)
#define test_and_set_bit(nr,p) ATOMIC_BITOP(test_and_set_bit,nr,p)
#define test_and_clear_bit(nr,p) ATOMIC_BITOP(test_and_clear_bit,nr,p)
#define test_and_change_bit(nr,p) ATOMIC_BITOP(test_and_change_bit,nr,p)
#ifndef __ARMEB__
/*
* These are the little endian, atomic definitions.
*/
#define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
#define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off)
#define find_first_bit(p,sz) _find_first_bit_le(p,sz)
#define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
#else
/*
* These are the big endian, atomic definitions.
*/
#define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz)
#define find_next_zero_bit(p,sz,off) _find_next_zero_bit_be(p,sz,off)
#define find_first_bit(p,sz) _find_first_bit_be(p,sz)
#define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off)
#endif
#if __LINUX_ARM_ARCH__ < 5
#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/fls.h>
#include <asm-generic/bitops/ffs.h>
#else
/*
* On ARMv5 and above, the gcc built-ins may rely on the clz instruction
* and produce optimal inlined code in all cases. On ARMv7 it is even
* better by also using the rbit instruction.
*/
#include <asm-generic/bitops/builtin-__fls.h>
#include <asm-generic/bitops/builtin-__ffs.h>
#include <asm-generic/bitops/builtin-fls.h>
#include <asm-generic/bitops/builtin-ffs.h>
#endif
#include <asm-generic/bitops/ffz.h>
#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h>
#ifdef __ARMEB__
static inline int find_first_zero_bit_le(const void *p, unsigned size)
{
return _find_first_zero_bit_le(p, size);
}
#define find_first_zero_bit_le find_first_zero_bit_le
static inline int find_next_zero_bit_le(const void *p, int size, int offset)
{
return _find_next_zero_bit_le(p, size, offset);
}
#define find_next_zero_bit_le find_next_zero_bit_le
static inline int find_next_bit_le(const void *p, int size, int offset)
{
return _find_next_bit_le(p, size, offset);
}
#define find_next_bit_le find_next_bit_le
#endif
#include <asm-generic/bitops/le.h>
/*
* Ext2 is defined to use little-endian byte ordering.
*/
#include <asm-generic/bitops/ext2-atomic-setbit.h>
#endif /* __KERNEL__ */
#endif /* _ARM_BITOPS_H */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| hardware | Folder | 0755 |
|
|
| mach | Folder | 0755 |
|
|
| vdso | Folder | 0755 |
|
|
| xen | Folder | 0755 |
|
|
| Kbuild | File | 186 B | 0644 |
|
| arch_gicv3.h | File | 6.25 KB | 0644 |
|
| arch_timer.h | File | 3.05 KB | 0644 |
|
| archrandom.h | File | 229 B | 0644 |
|
| arm-cci.h | File | 535 B | 0644 |
|
| arm_pmuv3.h | File | 7.38 KB | 0644 |
|
| asm-offsets.h | File | 35 B | 0644 |
|
| assembler.h | File | 16.77 KB | 0644 |
|
| atomic.h | File | 12.59 KB | 0644 |
|
| auxvec.h | File | 29 B | 0644 |
|
| bL_switcher.h | File | 2.13 KB | 0644 |
|
| barrier.h | File | 2.84 KB | 0644 |
|
| bitops.h | File | 7.55 KB | 0644 |
|
| bitrev.h | File | 451 B | 0644 |
|
| bug.h | File | 2.56 KB | 0644 |
|
| bugs.h | File | 297 B | 0644 |
|
| cache.h | File | 896 B | 0644 |
|
| cacheflush.h | File | 15.14 KB | 0644 |
|
| cachetype.h | File | 3.02 KB | 0644 |
|
| checksum.h | File | 3.96 KB | 0644 |
|
| clocksource.h | File | 161 B | 0644 |
|
| cmpxchg.h | File | 6.31 KB | 0644 |
|
| compiler.h | File | 978 B | 0644 |
|
| cp15.h | File | 3.22 KB | 0644 |
|
| cpu.h | File | 370 B | 0644 |
|
| cpufeature.h | File | 1.26 KB | 0644 |
|
| cpuidle.h | File | 1.59 KB | 0644 |
|
| cputype.h | File | 8.68 KB | 0644 |
|
| cti.h | File | 3.62 KB | 0644 |
|
| current.h | File | 1.8 KB | 0644 |
|
| dcc.h | File | 623 B | 0644 |
|
| delay.h | File | 2.83 KB | 0644 |
|
| device.h | File | 533 B | 0644 |
|
| div64.h | File | 2.69 KB | 0644 |
|
| dma-iommu.h | File | 906 B | 0644 |
|
| dma.h | File | 4.17 KB | 0644 |
|
| dmi.h | File | 378 B | 0644 |
|
| domain.h | File | 3.35 KB | 0644 |
|
| ecard.h | File | 5.98 KB | 0644 |
|
| edac.h | File | 995 B | 0644 |
|
| efi.h | File | 2.62 KB | 0644 |
|
| elf.h | File | 4.58 KB | 0644 |
|
| exception.h | File | 416 B | 0644 |
|
| fiq.h | File | 1.36 KB | 0644 |
|
| firmware.h | File | 1.69 KB | 0644 |
|
| fixmap.h | File | 1.84 KB | 0644 |
|
| floppy.h | File | 2.26 KB | 0644 |
|
| fncpy.h | File | 2.49 KB | 0644 |
|
| fpstate.h | File | 1.34 KB | 0644 |
|
| fpu.h | File | 309 B | 0644 |
|
| ftrace.h | File | 1.96 KB | 0644 |
|
| futex.h | File | 4.25 KB | 0644 |
|
| glue-cache.h | File | 2.88 KB | 0644 |
|
| glue-df.h | File | 2.06 KB | 0644 |
|
| glue-pf.h | File | 1005 B | 0644 |
|
| glue-proc.h | File | 4.32 KB | 0644 |
|
| glue.h | File | 613 B | 0644 |
|
| hardirq.h | File | 246 B | 0644 |
|
| highmem.h | File | 2.32 KB | 0644 |
|
| hugetlb-3level.h | File | 740 B | 0644 |
|
| hugetlb.h | File | 541 B | 0644 |
|
| hw_breakpoint.h | File | 3.76 KB | 0644 |
|
| hw_irq.h | File | 349 B | 0644 |
|
| hwcap.h | File | 378 B | 0644 |
|
| hypervisor.h | File | 282 B | 0644 |
|
| idmap.h | File | 359 B | 0644 |
|
| insn.h | File | 1.29 KB | 0644 |
|
| io.h | File | 13.81 KB | 0644 |
|
| irq.h | File | 808 B | 0644 |
|
| irq_work.h | File | 234 B | 0644 |
|
| irqflags.h | File | 3.88 KB | 0644 |
|
| jump_label.h | File | 1.12 KB | 0644 |
|
| kasan.h | File | 708 B | 0644 |
|
| kasan_def.h | File | 2.66 KB | 0644 |
|
| kexec-internal.h | File | 272 B | 0644 |
|
| kexec.h | File | 2.16 KB | 0644 |
|
| kfence.h | File | 1.03 KB | 0644 |
|
| kgdb.h | File | 2.72 KB | 0644 |
|
| kprobes.h | File | 2.1 KB | 0644 |
|
| krait-l2-accessors.h | File | 231 B | 0644 |
|
| linkage.h | File | 216 B | 0644 |
|
| mc146818rtc.h | File | 720 B | 0644 |
|
| mcpm.h | File | 11.78 KB | 0644 |
|
| mcs_spinlock.h | File | 570 B | 0644 |
|
| memblock.h | File | 248 B | 0644 |
|
| memory.h | File | 10.24 KB | 0644 |
|
| mman.h | File | 369 B | 0644 |
|
| mmu.h | File | 949 B | 0644 |
|
| mmu_context.h | File | 3.76 KB | 0644 |
|
| module.h | File | 1.26 KB | 0644 |
|
| module.lds.h | File | 134 B | 0644 |
|
| mpu.h | File | 3.22 KB | 0644 |
|
| mtd-xip.h | File | 520 B | 0644 |
|
| neon.h | File | 1.02 KB | 0644 |
|
| nwflash.h | File | 195 B | 0644 |
|
| opcodes-sec.h | File | 350 B | 0644 |
|
| opcodes-virt.h | File | 684 B | 0644 |
|
| opcodes.h | File | 8.06 KB | 0644 |
|
| outercache.h | File | 3.19 KB | 0644 |
|
| page-nommu.h | File | 811 B | 0644 |
|
| page.h | File | 4.69 KB | 0644 |
|
| paravirt.h | File | 477 B | 0644 |
|
| paravirt_api_clock.h | File | 26 B | 0644 |
|
| pci.h | File | 687 B | 0644 |
|
| percpu.h | File | 1.7 KB | 0644 |
|
| perf_event.h | File | 477 B | 0644 |
|
| pgalloc.h | File | 3.29 KB | 0644 |
|
| pgtable-2level-hwdef.h | File | 3.31 KB | 0644 |
|
| pgtable-2level-types.h | File | 1.25 KB | 0644 |
|
| pgtable-2level.h | File | 8.54 KB | 0644 |
|
| pgtable-3level-hwdef.h | File | 4.34 KB | 0644 |
|
| pgtable-3level-types.h | File | 1.3 KB | 0644 |
|
| pgtable-3level.h | File | 8 KB | 0644 |
|
| pgtable-hwdef.h | File | 321 B | 0644 |
|
| pgtable-nommu.h | File | 1.89 KB | 0644 |
|
| pgtable.h | File | 10.16 KB | 0644 |
|
| probes.h | File | 1.3 KB | 0644 |
|
| proc-fns.h | File | 4.88 KB | 0644 |
|
| processor.h | File | 3 KB | 0644 |
|
| procinfo.h | File | 1.13 KB | 0644 |
|
| prom.h | File | 552 B | 0644 |
|
| psci.h | File | 379 B | 0644 |
|
| ptdump.h | File | 969 B | 0644 |
|
| ptrace.h | File | 4.93 KB | 0644 |
|
| seccomp.h | File | 281 B | 0644 |
|
| sections.h | File | 622 B | 0644 |
|
| secure_cntvoff.h | File | 152 B | 0644 |
|
| semihost.h | File | 643 B | 0644 |
|
| set_memory.h | File | 788 B | 0644 |
|
| setup.h | File | 1.13 KB | 0644 |
|
| shmparam.h | File | 419 B | 0644 |
|
| signal.h | File | 694 B | 0644 |
|
| simd.h | File | 185 B | 0644 |
|
| smp.h | File | 2.83 KB | 0644 |
|
| smp_plat.h | File | 2.48 KB | 0644 |
|
| smp_scu.h | File | 1.32 KB | 0644 |
|
| smp_twd.h | File | 590 B | 0644 |
|
| sparsemem.h | File | 714 B | 0644 |
|
| spectre.h | File | 991 B | 0644 |
|
| spinlock.h | File | 5.51 KB | 0644 |
|
| spinlock_types.h | File | 547 B | 0644 |
|
| stackprotector.h | File | 1.11 KB | 0644 |
|
| stacktrace.h | File | 1.47 KB | 0644 |
|
| string.h | File | 2.11 KB | 0644 |
|
| suspend.h | File | 445 B | 0644 |
|
| swab.h | File | 1005 B | 0644 |
|
| switch_to.h | File | 1.17 KB | 0644 |
|
| sync_bitops.h | File | 1.48 KB | 0644 |
|
| syscall.h | File | 2.07 KB | 0644 |
|
| syscalls.h | File | 1.96 KB | 0644 |
|
| system_info.h | File | 763 B | 0644 |
|
| system_misc.h | File | 1005 B | 0644 |
|
| tcm.h | File | 991 B | 0644 |
|
| text-patching.h | File | 438 B | 0644 |
|
| therm.h | File | 655 B | 0644 |
|
| thread_info.h | File | 5.07 KB | 0644 |
|
| thread_notify.h | File | 1.06 KB | 0644 |
|
| timex.h | File | 431 B | 0644 |
|
| tlb.h | File | 1.28 KB | 0644 |
|
| tlbflush.h | File | 17.66 KB | 0644 |
|
| tls.h | File | 3.31 KB | 0644 |
|
| topology.h | File | 1.14 KB | 0644 |
|
| traps.h | File | 1.38 KB | 0644 |
|
| uaccess-asm.h | File | 3.72 KB | 0644 |
|
| uaccess.h | File | 16.99 KB | 0644 |
|
| ucontext.h | File | 2.68 KB | 0644 |
|
| unified.h | File | 979 B | 0644 |
|
| unistd.h | File | 1.51 KB | 0644 |
|
| unwind.h | File | 1.28 KB | 0644 |
|
| uprobes.h | File | 948 B | 0644 |
|
| user.h | File | 4.06 KB | 0644 |
|
| v7m.h | File | 3.21 KB | 0644 |
|
| vdso.h | File | 507 B | 0644 |
|
| vermagic.h | File | 800 B | 0644 |
|
| vfp.h | File | 2.89 KB | 0644 |
|
| vfpmacros.h | File | 1.72 KB | 0644 |
|
| vga.h | File | 351 B | 0644 |
|
| virt.h | File | 1.81 KB | 0644 |
|
| vmalloc.h | File | 87 B | 0644 |
|
| vmlinux.lds.h | File | 4.52 KB | 0644 |
|
| word-at-a-time.h | File | 2.11 KB | 0644 |
|
| xor.h | File | 5.63 KB | 0644 |
|