/
usr
/
src
/
linux-headers-5.15.0-181
/
arch
/
ia64
/
include
/
asm
/
/usr/src/linux-headers-5.15.0-181/arch/ia64/include/asm
mkdir
upload
Name
Size
Mode
Actions
native/
-
0755
rm
sn/
-
0755
rm
uv/
-
0755
rm
acenv.h
1153
0644
edit
dl
rm
acpi-ext.h
444
0644
edit
dl
rm
acpi.h
2772
0644
edit
dl
rm
agp.h
863
0644
edit
dl
rm
asm-offsets.h
35
0644
edit
dl
rm
asm-prototypes.h
892
0644
edit
dl
rm
asmmacro.h
3372
0644
edit
dl
rm
atomic.h
6390
0644
edit
dl
rm
barrier.h
2414
0644
edit
dl
rm
bitops.h
11112
0644
edit
dl
rm
bug.h
404
0644
edit
dl
rm
cache.h
752
0644
edit
dl
rm
cacheflush.h
903
0644
edit
dl
rm
checksum.h
1746
0644
edit
dl
rm
clocksource.h
276
0644
edit
dl
rm
cmpxchg.h
479
0644
edit
dl
rm
cpu.h
456
0644
edit
dl
rm
cputime.h
648
0644
edit
dl
rm
current.h
418
0644
edit
dl
rm
cyclone.h
442
0644
edit
dl
rm
delay.h
1738
0644
edit
dl
rm
device.h
236
0644
edit
dl
rm
div64.h
31
0644
edit
dl
rm
dma-mapping.h
382
0644
edit
dl
rm
dma.h
351
0644
edit
dl
rm
dmi.h
343
0644
edit
dl
rm
early_ioremap.h
428
0644
edit
dl
rm
efi.h
374
0644
edit
dl
rm
elf.h
10025
0644
edit
dl
rm
emergency-restart.h
149
0644
edit
dl
rm
esi.h
887
0644
edit
dl
rm
exception.h
609
0644
edit
dl
rm
export.h
115
0644
edit
dl
rm
extable.h
330
0644
edit
dl
rm
fb.h
569
0644
edit
dl
rm
fpswa.h
1925
0644
edit
dl
rm
ftrace.h
748
0644
edit
dl
rm
futex.h
2616
0644
edit
dl
rm
gcc_intrin.h
368
0644
edit
dl
rm
hardirq.h
561
0644
edit
dl
rm
hugetlb.h
933
0644
edit
dl
rm
hw_irq.h
5776
0644
edit
dl
rm
idle.h
200
0644
edit
dl
rm
intrinsics.h
306
0644
edit
dl
rm
io.h
7527
0644
edit
dl
rm
iommu.h
505
0644
edit
dl
rm
iommu_table.h
175
0644
edit
dl
rm
iosapic.h
2752
0644
edit
dl
rm
irq.h
960
0644
edit
dl
rm
irqflags.h
2096
0644
edit
dl
rm
irq_regs.h
34
0644
edit
dl
rm
irq_remapping.h
142
0644
edit
dl
rm
Kbuild
139
0644
edit
dl
rm
kdebug.h
1011
0644
edit
dl
rm
kexec.h
1606
0644
edit
dl
rm
kprobes.h
3148
0644
edit
dl
rm
kregs.h
6890
0644
edit
dl
rm
libata-portmap.h
225
0644
edit
dl
rm
linkage.h
398
0644
edit
dl
rm
local.h
31
0644
edit
dl
rm
mca.h
6009
0644
edit
dl
rm
mca_asm.h
7356
0644
edit
dl
rm
meminit.h
1751
0644
edit
dl
rm
mman.h
432
0644
edit
dl
rm
mmiowb.h
433
0644
edit
dl
rm
mmu.h
374
0644
edit
dl
rm
mmu_context.h
5304
0644
edit
dl
rm
mmzone.h
869
0644
edit
dl
rm
module.h
1154
0644
edit
dl
rm
module.lds.h
394
0644
edit
dl
rm
msidef.h
1438
0644
edit
dl
rm
nodedata.h
1898
0644
edit
dl
rm
numa.h
2338
0644
edit
dl
rm
page.h
5856
0644
edit
dl
rm
pal.h
54674
0644
edit
dl
rm
param.h
439
0644
edit
dl
rm
parport.h
534
0644
edit
dl
rm
patch.h
1214
0644
edit
dl
rm
pci.h
2007
0644
edit
dl
rm
percpu.h
1354
0644
edit
dl
rm
pgalloc.h
1569
0644
edit
dl
rm
pgtable.h
19846
0644
edit
dl
rm
processor.h
17876
0644
edit
dl
rm
ptrace.h
5258
0644
edit
dl
rm
sal.h
27189
0644
edit
dl
rm
sections.h
1679
0644
edit
dl
rm
serial.h
446
0644
edit
dl
rm
shmparam.h
445
0644
edit
dl
rm
signal.h
749
0644
edit
dl
rm
smp.h
2514
0644
edit
dl
rm
sparsemem.h
785
0644
edit
dl
rm
spinlock.h
7149
0644
edit
dl
rm
spinlock_types.h
475
0644
edit
dl
rm
string.h
659
0644
edit
dl
rm
switch_to.h
2702
0644
edit
dl
rm
syscall.h
1820
0644
edit
dl
rm
termios.h
1923
0644
edit
dl
rm
thread_info.h
4906
0644
edit
dl
rm
timex.h
1502
0644
edit
dl
rm
tlb.h
1577
0644
edit
dl
rm
tlbflush.h
3165
0644
edit
dl
rm
topology.h
1408
0644
edit
dl
rm
types.h
828
0644
edit
dl
rm
uaccess.h
9730
0644
edit
dl
rm
uncached.h
314
0644
edit
dl
rm
unistd.h
987
0644
edit
dl
rm
unwind.h
5873
0644
edit
dl
rm
user.h
2299
0644
edit
dl
rm
ustack.h
403
0644
edit
dl
rm
vermagic.h
341
0644
edit
dl
rm
vga.h
649
0644
edit
dl
rm
vmalloc.h
90
0644
edit
dl
rm
xor.h
743
0644
edit
dl
rm
xtp.h
938
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-181/arch/ia64/include/asm/io.h
(7527B)
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_IA64_IO_H #define _ASM_IA64_IO_H /* * This file contains the definitions for the emulated IO instructions * inb/inw/inl/outb/outw/outl and the "string versions" of the same * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" * versions of the single-IO instructions (inb_p/inw_p/..). * * This file is not meant to be obfuscating: it's just complicated to * (a) handle it all in a way that makes gcc able to optimize it as * well as possible and (b) trying to avoid writing the same thing * over and over again with slight variations and possibly making a * mistake somewhere. * * Copyright (C) 1998-2003 Hewlett-Packard Co * David Mosberger-Tang <davidm@hpl.hp.com> * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com> * Copyright (C) 1999 Don Dugger <don.dugger@intel.com> */ #include <asm/unaligned.h> #include <asm/early_ioremap.h> /* We don't use IO slowdowns on the ia64, but.. */ #define __SLOW_DOWN_IO do { } while (0) #define SLOW_DOWN_IO do { } while (0) #define __IA64_UNCACHED_OFFSET RGN_BASE(RGN_UNCACHED) /* * The legacy I/O space defined by the ia64 architecture supports only 65536 ports, but * large machines may have multiple other I/O spaces so we can't place any a priori limit * on IO_SPACE_LIMIT. These additional spaces are described in ACPI. */ #define IO_SPACE_LIMIT 0xffffffffffffffffUL #define MAX_IO_SPACES_BITS 8 #define MAX_IO_SPACES (1UL << MAX_IO_SPACES_BITS) #define IO_SPACE_BITS 24 #define IO_SPACE_SIZE (1UL << IO_SPACE_BITS) #define IO_SPACE_NR(port) ((port) >> IO_SPACE_BITS) #define IO_SPACE_BASE(space) ((space) << IO_SPACE_BITS) #define IO_SPACE_PORT(port) ((port) & (IO_SPACE_SIZE - 1)) #define IO_SPACE_SPARSE_ENCODING(p) ((((p) >> 2) << 12) | ((p) & 0xfff)) struct io_space { unsigned long mmio_base; /* base in MMIO space */ int sparse; }; extern struct io_space io_space[]; extern unsigned int num_io_spaces; # ifdef __KERNEL__ /* * All MMIO iomem cookies are in region 6; anything less is a PIO cookie: * 0xCxxxxxxxxxxxxxxx MMIO cookie (return from ioremap) * 0x000000001SPPPPPP PIO cookie (S=space number, P..P=port) * * ioread/writeX() uses the leading 1 in PIO cookies (PIO_OFFSET) to catch * code that uses bare port numbers without the prerequisite pci_iomap(). */ #define PIO_OFFSET (1UL << (MAX_IO_SPACES_BITS + IO_SPACE_BITS)) #define PIO_MASK (PIO_OFFSET - 1) #define PIO_RESERVED __IA64_UNCACHED_OFFSET #define HAVE_ARCH_PIO_SIZE #include <asm/intrinsics.h> #include <asm/page.h> #include <asm-generic/iomap.h> /* * Change virtual addresses to physical addresses and vv. */ static inline unsigned long virt_to_phys (volatile void *address) { return (unsigned long) address - PAGE_OFFSET; } #define virt_to_phys virt_to_phys static inline void* phys_to_virt (unsigned long address) { return (void *) (address + PAGE_OFFSET); } #define phys_to_virt phys_to_virt #define ARCH_HAS_VALID_PHYS_ADDR_RANGE extern u64 kern_mem_attribute (unsigned long phys_addr, unsigned long size); extern int valid_phys_addr_range (phys_addr_t addr, size_t count); /* efi.c */ extern int valid_mmap_phys_addr_range (unsigned long pfn, size_t count); /* * The following two macros are deprecated and scheduled for removal. * Please use the PCI-DMA interface defined in <asm/pci.h> instead. */ #define bus_to_virt phys_to_virt #define virt_to_bus virt_to_phys #define page_to_bus page_to_phys # endif /* KERNEL */ /* * Memory fence w/accept. This should never be used in code that is * not IA-64 specific. */ #define __ia64_mf_a() ia64_mfa() static inline void* __ia64_mk_io_addr (unsigned long port) { struct io_space *space; unsigned long offset; space = &io_space[IO_SPACE_NR(port)]; port = IO_SPACE_PORT(port); if (space->sparse) offset = IO_SPACE_SPARSE_ENCODING(port); else offset = port; return (void *) (space->mmio_base | offset); } /* * For the in/out routines, we need to do "mf.a" _after_ doing the I/O access to ensure * that the access has completed before executing other I/O accesses. Since we're doing * the accesses through an uncachable (UC) translation, the CPU will execute them in * program order. However, we still need to tell the compiler not to shuffle them around * during optimization, which is why we use "volatile" pointers. */ #define inb inb static inline unsigned int inb(unsigned long port) { volatile unsigned char *addr = __ia64_mk_io_addr(port); unsigned char ret; ret = *addr; __ia64_mf_a(); return ret; } #define inw inw static inline unsigned int inw(unsigned long port) { volatile unsigned short *addr = __ia64_mk_io_addr(port); unsigned short ret; ret = *addr; __ia64_mf_a(); return ret; } #define inl inl static inline unsigned int inl(unsigned long port) { volatile unsigned int *addr = __ia64_mk_io_addr(port); unsigned int ret; ret = *addr; __ia64_mf_a(); return ret; } #define outb outb static inline void outb(unsigned char val, unsigned long port) { volatile unsigned char *addr = __ia64_mk_io_addr(port); *addr = val; __ia64_mf_a(); } #define outw outw static inline void outw(unsigned short val, unsigned long port) { volatile unsigned short *addr = __ia64_mk_io_addr(port); *addr = val; __ia64_mf_a(); } #define outl outl static inline void outl(unsigned int val, unsigned long port) { volatile unsigned int *addr = __ia64_mk_io_addr(port); *addr = val; __ia64_mf_a(); } #define insb insb static inline void insb(unsigned long port, void *dst, unsigned long count) { unsigned char *dp = dst; while (count--) *dp++ = inb(port); } #define insw insw static inline void insw(unsigned long port, void *dst, unsigned long count) { unsigned short *dp = dst; while (count--) put_unaligned(inw(port), dp++); } #define insl insl static inline void insl(unsigned long port, void *dst, unsigned long count) { unsigned int *dp = dst; while (count--) put_unaligned(inl(port), dp++); } #define outsb outsb static inline void outsb(unsigned long port, const void *src, unsigned long count) { const unsigned char *sp = src; while (count--) outb(*sp++, port); } #define outsw outsw static inline void outsw(unsigned long port, const void *src, unsigned long count) { const unsigned short *sp = src; while (count--) outw(get_unaligned(sp++), port); } #define outsl outsl static inline void outsl(unsigned long port, const void *src, unsigned long count) { const unsigned int *sp = src; while (count--) outl(get_unaligned(sp++), port); } # ifdef __KERNEL__ extern void __iomem * ioremap(unsigned long offset, unsigned long size); extern void __iomem * ioremap_uc(unsigned long offset, unsigned long size); extern void iounmap (volatile void __iomem *addr); static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size) { return ioremap(phys_addr, size); } #define ioremap ioremap #define ioremap_cache ioremap_cache #define ioremap_uc ioremap_uc #define iounmap iounmap /* * String version of IO memory access ops: */ extern void memcpy_fromio(void *dst, const volatile void __iomem *src, long n); extern void memcpy_toio(volatile void __iomem *dst, const void *src, long n); extern void memset_io(volatile void __iomem *s, int c, long n); #define memcpy_fromio memcpy_fromio #define memcpy_toio memcpy_toio #define memset_io memset_io #define xlate_dev_mem_ptr xlate_dev_mem_ptr #include <asm-generic/io.h> #undef PCI_IOBASE # endif /* __KERNEL__ */ #endif /* _ASM_IA64_IO_H */
Save
cmd:
run