OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-213
/
arch
/
arm
/
include
/
asm
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 07:14:12 AM
rwxr-xr-x
📄
Kbuild
568 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
arch_gicv3.h
9.05 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
arch_timer.h
2.48 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
arm-cci.h
1.05 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
asm-offsets.h
35 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
assembler.h
10.46 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
atomic.h
13.22 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
auxvec.h
29 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bL_switcher.h
2.28 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
barrier.h
2.84 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
bitops.h
8.62 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bitrev.h
451 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
bug.h
2.46 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bugs.h
546 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
cache.h
813 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cacheflush.h
15.54 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cachetype.h
2.71 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
checksum.h
3.71 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
clocksource.h
153 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cmpxchg.h
6.14 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
compiler.h
978 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cp15.h
3.84 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
cpu.h
533 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
cpufeature.h
1.4 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cpuidle.h
1.33 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cputype.h
8.42 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
cti.h
3.62 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dcc.h
1.01 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
delay.h
2.83 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
device.h
771 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
div64.h
3.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-contiguous.h
265 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-iommu.h
1.01 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-mapping.h
7.44 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma.h
4.18 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dmi.h
528 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
domain.h
3.65 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ecard.h
5.98 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
edac.h
1.51 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
efi.h
3.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
elf.h
4.52 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
entry-macro-multi.S
726 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
exception.h
571 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fb.h
375 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fiq.h
1.36 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
firmware.h
1.82 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
fixmap.h
1.84 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
flat.h
915 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
floppy.h
3.61 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
fncpy.h
3.08 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
fpstate.h
1.73 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ftrace.h
1.92 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
futex.h
4.24 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
glue-cache.h
3.51 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
glue-df.h
2.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
glue-pf.h
1.12 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
glue-proc.h
4.46 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
glue.h
759 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
gpio.h
693 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
hardirq.h
803 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📁
hardware
-
05/09/2024 07:14:16 AM
rwxr-xr-x
📄
highmem.h
2.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hugetlb-3level.h
2.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hugetlb.h
1.78 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hw_breakpoint.h
3.53 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hw_irq.h
349 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
hwcap.h
378 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
hypervisor.h
140 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ide.h
566 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
idmap.h
355 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
insn.h
636 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
io.h
15.96 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irq.h
1015 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
irq_work.h
234 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags.h
3.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
jump_label.h
1009 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kexec-internal.h
272 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
kexec.h
2.3 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kgdb.h
2.72 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kmap_types.h
190 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kprobes.h
2.65 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kvm_arm.h
7.6 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kvm_asm.h
2.84 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kvm_coproc.h
1.99 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kvm_emulate.h
7.84 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kvm_host.h
10.31 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kvm_hyp.h
4.49 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kvm_mmio.h
1.34 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
kvm_mmu.h
7.27 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
limits.h
166 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
linkage.h
216 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📁
mach
-
05/09/2024 07:14:16 AM
rwxr-xr-x
📄
mc146818rtc.h
720 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mcpm.h
11.92 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mcs_spinlock.h
570 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
memblock.h
248 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
memory.h
9.95 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
mmu.h
953 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu_context.h
3.94 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
module.h
1.57 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
mpu.h
2.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mtd-xip.h
666 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
neon.h
1.16 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
nwflash.h
252 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
opcodes-sec.h
742 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
opcodes-virt.h
1.32 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
opcodes.h
8.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
outercache.h
3.78 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
page-nommu.h
957 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page.h
3.61 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
paravirt.h
454 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
patch.h
438 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pci.h
956 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
percpu.h
1.56 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
perf_event.h
857 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
pgalloc.h
3.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-2level-hwdef.h
3.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-2level-types.h
1.84 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-2level.h
8.51 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
pgtable-3level-hwdef.h
3.95 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-3level-types.h
1.89 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-3level.h
9.54 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
pgtable-hwdef.h
467 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable-nommu.h
2.51 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
pgtable.h
11.71 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
probes.h
1.73 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
proc-fns.h
4.79 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
processor.h
3.4 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
procinfo.h
1.27 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
prom.h
715 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
psci.h
771 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
ptrace.h
4.89 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
sections.h
189 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
set_memory.h
1.04 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
setup.h
934 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
shmparam.h
419 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
signal.h
500 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp.h
3.1 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp_plat.h
2.48 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp_scu.h
1.32 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp_twd.h
908 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
sparsemem.h
716 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
spectre.h
906 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
spinlock.h
5.49 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock_types.h
541 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
stackprotector.h
1.09 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
stacktrace.h
742 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
stage2_pgtable.h
2.12 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
string.h
1.43 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
suspend.h
369 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
swab.h
1005 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
switch_to.h
1.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
sync_bitops.h
1.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscall.h
2.48 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
system_info.h
763 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
system_misc.h
1.14 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
tcm.h
937 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
therm.h
655 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
thread_info.h
5.2 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
thread_notify.h
1.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
timex.h
577 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
tlb.h
7.37 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
tlbflush.h
17.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tls.h
3.09 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
topology.h
1.18 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
traps.h
1.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
trusted_foundations.h
2.29 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
uaccess-asm.h
2.83 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
uaccess.h
16.22 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
ucontext.h
2.98 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
unaligned.h
846 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
unified.h
1.61 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
unistd.h
1.68 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
unwind.h
1.71 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
uprobes.h
1.07 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
user.h
4.2 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
v7m.h
2.93 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
vdso.h
507 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
vdso_datapage.h
1.69 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
vfp.h
2.86 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
vfpmacros.h
2.1 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
vga.h
305 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
virt.h
2.9 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
word-at-a-time.h
2.08 KB
01/28/2018 09:20:33 PM
rw-r--r--
📁
xen
-
05/09/2024 07:14:16 AM
rwxr-xr-x
📄
xor.h
5.22 KB
01/28/2018 09:20:33 PM
rw-r--r--
Editing: assembler.h
Close
/* * arch/arm/include/asm/assembler.h * * Copyright (C) 1996-2000 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This file contains arm architecture specific defines * for the different processors. * * Do not include any C declarations in this file - it is included by * assembler source. */ #ifndef __ASM_ASSEMBLER_H__ #define __ASM_ASSEMBLER_H__ #ifndef __ASSEMBLY__ #error "Only include this from assembly code" #endif #include <asm/ptrace.h> #include <asm/opcodes-virt.h> #include <asm/asm-offsets.h> #include <asm/page.h> #include <asm/thread_info.h> #include <asm/uaccess-asm.h> #define IOMEM(x) (x) /* * Endian independent macros for shifting bytes within registers. */ #ifndef __ARMEB__ #define lspull lsr #define lspush lsl #define get_byte_0 lsl #0 #define get_byte_1 lsr #8 #define get_byte_2 lsr #16 #define get_byte_3 lsr #24 #define put_byte_0 lsl #0 #define put_byte_1 lsl #8 #define put_byte_2 lsl #16 #define put_byte_3 lsl #24 #else #define lspull lsl #define lspush lsr #define get_byte_0 lsr #24 #define get_byte_1 lsr #16 #define get_byte_2 lsr #8 #define get_byte_3 lsl #0 #define put_byte_0 lsl #24 #define put_byte_1 lsl #16 #define put_byte_2 lsl #8 #define put_byte_3 lsl #0 #endif /* Select code for any configuration running in BE8 mode */ #ifdef CONFIG_CPU_ENDIAN_BE8 #define ARM_BE8(code...) code #else #define ARM_BE8(code...) #endif /* * Data preload for architectures that support it */ #if __LINUX_ARM_ARCH__ >= 5 #define PLD(code...) code #else #define PLD(code...) #endif /* * This can be used to enable code to cacheline align the destination * pointer when bulk writing to memory. Experiments on StrongARM and * XScale didn't show this a worthwhile thing to do when the cache is not * set to write-allocate (this would need further testing on XScale when WA * is used). * * On Feroceon there is much to gain however, regardless of cache mode. */ #ifdef CONFIG_CPU_FEROCEON #define CALGN(code...) code #else #define CALGN(code...) #endif #define IMM12_MASK 0xfff /* * Enable and disable interrupts */ #if __LINUX_ARM_ARCH__ >= 6 .macro disable_irq_notrace cpsid i .endm .macro enable_irq_notrace cpsie i .endm #else .macro disable_irq_notrace msr cpsr_c, #PSR_I_BIT | SVC_MODE .endm .macro enable_irq_notrace msr cpsr_c, #SVC_MODE .endm #endif #if __LINUX_ARM_ARCH__ < 7 .macro dsb, args mcr p15, 0, r0, c7, c10, 4 .endm .macro isb, args mcr p15, 0, r0, c7, c5, 4 .endm #endif .macro asm_trace_hardirqs_off, save=1 #if defined(CONFIG_TRACE_IRQFLAGS) .if \save stmdb sp!, {r0-r3, ip, lr} .endif bl trace_hardirqs_off .if \save ldmia sp!, {r0-r3, ip, lr} .endif #endif .endm .macro asm_trace_hardirqs_on, cond=al, save=1 #if defined(CONFIG_TRACE_IRQFLAGS) /* * actually the registers should be pushed and pop'd conditionally, but * after bl the flags are certainly clobbered */ .if \save stmdb sp!, {r0-r3, ip, lr} .endif bl\cond trace_hardirqs_on .if \save ldmia sp!, {r0-r3, ip, lr} .endif #endif .endm .macro disable_irq, save=1 disable_irq_notrace asm_trace_hardirqs_off \save .endm .macro enable_irq asm_trace_hardirqs_on enable_irq_notrace .endm /* * Save the current IRQ state and disable IRQs. Note that this macro * assumes FIQs are enabled, and that the processor is in SVC mode. */ .macro save_and_disable_irqs, oldcpsr #ifdef CONFIG_CPU_V7M mrs \oldcpsr, primask #else mrs \oldcpsr, cpsr #endif disable_irq .endm .macro save_and_disable_irqs_notrace, oldcpsr #ifdef CONFIG_CPU_V7M mrs \oldcpsr, primask #else mrs \oldcpsr, cpsr #endif disable_irq_notrace .endm /* * Restore interrupt state previously stored in a register. We don't * guarantee that this will preserve the flags. */ .macro restore_irqs_notrace, oldcpsr #ifdef CONFIG_CPU_V7M msr primask, \oldcpsr #else msr cpsr_c, \oldcpsr #endif .endm .macro restore_irqs, oldcpsr tst \oldcpsr, #PSR_I_BIT asm_trace_hardirqs_on cond=eq restore_irqs_notrace \oldcpsr .endm /* * Assembly version of "adr rd, BSYM(sym)". This should only be used to * reference local symbols in the same assembly file which are to be * resolved by the assembler. Other usage is undefined. */ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo .macro badr\c, rd, sym #ifdef CONFIG_THUMB2_KERNEL adr\c \rd, \sym + 1 #else adr\c \rd, \sym #endif .endm .endr /* * Get current thread_info. */ .macro get_thread_info, rd ARM( mov \rd, sp, lsr #THREAD_SIZE_ORDER + PAGE_SHIFT ) THUMB( mov \rd, sp ) THUMB( lsr \rd, \rd, #THREAD_SIZE_ORDER + PAGE_SHIFT ) mov \rd, \rd, lsl #THREAD_SIZE_ORDER + PAGE_SHIFT .endm /* * Increment/decrement the preempt count. */ #ifdef CONFIG_PREEMPT_COUNT .macro inc_preempt_count, ti, tmp ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count add \tmp, \tmp, #1 @ increment it str \tmp, [\ti, #TI_PREEMPT] .endm .macro dec_preempt_count, ti, tmp ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count sub \tmp, \tmp, #1 @ decrement it str \tmp, [\ti, #TI_PREEMPT] .endm .macro dec_preempt_count_ti, ti, tmp get_thread_info \ti dec_preempt_count \ti, \tmp .endm #else .macro inc_preempt_count, ti, tmp .endm .macro dec_preempt_count, ti, tmp .endm .macro dec_preempt_count_ti, ti, tmp .endm #endif #define USER(x...) \ 9999: x; \ .pushsection __ex_table,"a"; \ .align 3; \ .long 9999b,9001f; \ .popsection #ifdef CONFIG_SMP #define ALT_SMP(instr...) \ 9998: instr /* * Note: if you get assembler errors from ALT_UP() when building with * CONFIG_THUMB2_KERNEL, you almost certainly need to use * ALT_SMP( W(instr) ... ) */ #define ALT_UP(instr...) \ .pushsection ".alt.smp.init", "a" ;\ .long 9998b ;\ 9997: instr ;\ .if . - 9997b == 2 ;\ nop ;\ .endif ;\ .if . - 9997b != 4 ;\ .error "ALT_UP() content must assemble to exactly 4 bytes";\ .endif ;\ .popsection #define ALT_UP_B(label) \ .equ up_b_offset, label - 9998b ;\ .pushsection ".alt.smp.init", "a" ;\ .long 9998b ;\ W(b) . + up_b_offset ;\ .popsection #else #define ALT_SMP(instr...) #define ALT_UP(instr...) instr #define ALT_UP_B(label) b label #endif /* * Instruction barrier */ .macro instr_sync #if __LINUX_ARM_ARCH__ >= 7 isb #elif __LINUX_ARM_ARCH__ == 6 mcr p15, 0, r0, c7, c5, 4 #endif .endm /* * SMP data memory barrier */ .macro smp_dmb mode #ifdef CONFIG_SMP #if __LINUX_ARM_ARCH__ >= 7 .ifeqs "\mode","arm" ALT_SMP(dmb ish) .else ALT_SMP(W(dmb) ish) .endif #elif __LINUX_ARM_ARCH__ == 6 ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb #else #error Incompatible SMP platform #endif .ifeqs "\mode","arm" ALT_UP(nop) .else ALT_UP(W(nop)) .endif #endif .endm #if defined(CONFIG_CPU_V7M) /* * setmode is used to assert to be in svc mode during boot. For v7-M * this is done in __v7m_setup, so setmode can be empty here. */ .macro setmode, mode, reg .endm #elif defined(CONFIG_THUMB2_KERNEL) .macro setmode, mode, reg mov \reg, #\mode msr cpsr_c, \reg .endm #else .macro setmode, mode, reg msr cpsr_c, #\mode .endm #endif /* * Helper macro to enter SVC mode cleanly and mask interrupts. reg is * a scratch register for the macro to overwrite. * * This macro is intended for forcing the CPU into SVC mode at boot time. * you cannot return to the original mode. */ .macro safe_svcmode_maskall reg:req #if __LINUX_ARM_ARCH__ >= 6 && !defined(CONFIG_CPU_V7M) mrs \reg , cpsr eor \reg, \reg, #HYP_MODE tst \reg, #MODE_MASK bic \reg , \reg , #MODE_MASK orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | SVC_MODE THUMB( orr \reg , \reg , #PSR_T_BIT ) bne 1f orr \reg, \reg, #PSR_A_BIT badr lr, 2f msr spsr_cxsf, \reg __MSR_ELR_HYP(14) __ERET 1: msr cpsr_c, \reg 2: #else /* * workaround for possibly broken pre-v6 hardware * (akita, Sharp Zaurus C-1000, PXA270-based) */ setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, \reg #endif .endm /* * STRT/LDRT access macros with ARM and Thumb-2 variants */ #ifdef CONFIG_THUMB2_KERNEL .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER() 9999: .if \inc == 1 \instr\()b\t\cond\().w \reg, [\ptr, #\off] .elseif \inc == 4 \instr\t\cond\().w \reg, [\ptr, #\off] .else .error "Unsupported inc macro argument" .endif .pushsection __ex_table,"a" .align 3 .long 9999b, \abort .popsection .endm .macro usracc, instr, reg, ptr, inc, cond, rept, abort @ explicit IT instruction needed because of the label @ introduced by the USER macro .ifnc \cond,al .if \rept == 1 itt \cond .elseif \rept == 2 ittt \cond .else .error "Unsupported rept macro argument" .endif .endif @ Slightly optimised to avoid incrementing the pointer twice usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort .if \rept == 2 usraccoff \instr, \reg, \ptr, \inc, \inc, \cond, \abort .endif add\cond \ptr, #\rept * \inc .endm #else /* !CONFIG_THUMB2_KERNEL */ .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=TUSER() .rept \rept 9999: .if \inc == 1 \instr\()b\t\cond \reg, [\ptr], #\inc .elseif \inc == 4 \instr\t\cond \reg, [\ptr], #\inc .else .error "Unsupported inc macro argument" .endif .pushsection __ex_table,"a" .align 3 .long 9999b, \abort .popsection .endr .endm #endif /* CONFIG_THUMB2_KERNEL */ .macro strusr, reg, ptr, inc, cond=al, rept=1, abort=9001f usracc str, \reg, \ptr, \inc, \cond, \rept, \abort .endm .macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort .endm /* Utility macro for declaring string literals */ .macro string name:req, string .type \name , #object \name: .asciz "\string" .size \name , . - \name .endm .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo .macro ret\c, reg #if __LINUX_ARM_ARCH__ < 6 mov\c pc, \reg #else .ifeqs "\reg", "lr" bx\c \reg .else mov\c pc, \reg .endif #endif .endm .endr .macro ret.w, reg ret \reg #ifdef CONFIG_THUMB2_KERNEL nop #endif .endm .macro bug, msg, line #ifdef CONFIG_THUMB2_KERNEL 1: .inst 0xde02 #else 1: .inst 0xe7f001f2 #endif #ifdef CONFIG_DEBUG_BUGVERBOSE .pushsection .rodata.str, "aMS", %progbits, 1 2: .asciz "\msg" .popsection .pushsection __bug_table, "aw" .align 2 .word 1b, 2b .hword \line .popsection #endif .endm #ifdef CONFIG_KPROBES #define _ASM_NOKPROBE(entry) \ .pushsection "_kprobe_blacklist", "aw" ; \ .balign 4 ; \ .long entry; \ .popsection #else #define _ASM_NOKPROBE(entry) #endif #endif /* __ASM_ASSEMBLER_H__ */