Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
a5a19c6
Documentation
arch
block
crypto
drivers
fs
include
acpi
asm-alpha
asm-arm
asm-avr32
asm-blackfin
asm-cris
asm-frv
asm-generic
asm-h8300
asm-ia64
asm-m32r
asm-m68k
asm-m68knommu
asm-mips
asm-parisc
asm-powerpc
asm-ppc
asm-s390
asm-sh
asm-sparc
asm-sparc64
asm-um
asm-v850
asm-x86
mach-bigsmp
mach-default
mach-es7000
mach-generic
mach-numaq
mach-rdc321x
mach-summit
mach-visws
mach-voyager
xen
Kbuild
a.out.h
acpi.h
agp.h
alternative-asm.h
alternative.h
apic.h
apicdef.h
arch_hooks.h
asm.h
atomic.h
atomic_32.h
atomic_64.h
auxvec.h
bitops.h
bitops_32.h
bitops_64.h
boot.h
bootparam.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
calgary.h
calling.h
checksum.h
checksum_32.h
checksum_64.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
cpu.h
cpufeature.h
cputime.h
current.h
current_32.h
current_64.h
debugreg.h
delay.h
desc.h
desc_64.h
desc_defs.h
device.h
div64.h
dma-mapping.h
dma-mapping_32.h
dma-mapping_64.h
dma.h
dmi.h
ds.h
dwarf2.h
dwarf2_32.h
dwarf2_64.h
e820.h
e820_32.h
e820_64.h
edac.h
efi.h
elf.h
emergency-restart.h
errno.h
fb.h
fcntl.h
fixmap.h
fixmap_32.h
fixmap_64.h
floppy.h
frame.h
futex.h
gart.h
genapic.h
genapic_32.h
genapic_64.h
geode.h
gpio.h
hardirq.h
hardirq_32.h
hardirq_64.h
highmem.h
hpet.h
hw_irq.h
hw_irq_32.h
hw_irq_64.h
hypertransport.h
i387.h
i8253.h
i8259.h
ia32.h
ia32_unistd.h
ide.h
idle.h
intel_arch_perfmon.h
io.h
io_32.h
io_64.h
io_apic.h
ioctl.h
ioctls.h
iommu.h
ipcbuf.h
ipi.h
irq.h
irq_32.h
irq_64.h
irq_regs.h
irq_regs_32.h
irq_regs_64.h
irqflags.h
ist.h
k8.h
kdebug.h
kexec.h
kmap_types.h
kprobes.h
ldt.h
lguest.h
lguest_hcall.h
linkage.h
local.h
mach_apic.h
math_emu.h
mc146818rtc.h
mca.h
mca_dma.h
mce.h
mman.h
mmu.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h
mpspec.h
mpspec_def.h
msgbuf.h
msidef.h
msr-index.h
msr.h
mtrr.h
mutex.h
mutex_32.h
mutex_64.h
namei.h
nmi.h
nmi_32.h
nmi_64.h
nops.h
numa.h
numa_32.h
numa_64.h
numaq.h
page.h
page_32.h
page_64.h
param.h
paravirt.h
parport.h
pci-direct.h
pci.h
pci_32.h
pci_64.h
pda.h
percpu.h
pgalloc.h
pgalloc_32.h
pgalloc_64.h
pgtable-2level-defs.h
pgtable-2level.h
pgtable-3level-defs.h
pgtable-3level.h
pgtable.h
pgtable_32.h
pgtable_64.h
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h
proto.h
ptrace-abi.h
ptrace.h
reboot.h
reboot_fixups.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp.h
seccomp_32.h
seccomp_64.h
sections.h
segment.h
semaphore.h
semaphore_32.h
semaphore_64.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
sigcontext32.h
siginfo.h
signal.h
smp.h
smp_32.h
smp_64.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
srat.h
stacktrace.h
stat.h
statfs.h
string.h
string_32.h
string_64.h
suspend.h
suspend_32.h
suspend_64.h
swiotlb.h
sync_bitops.h
system.h
system_64.h
tce.h
termbits.h
termios.h
therm_throt.h
thread_info.h
thread_info_32.h
thread_info_64.h
time.h
timer.h
timex.h
tlb.h
tlbflush.h
topology.h
tsc.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
ucontext.h
unaligned.h
unistd.h
unistd_32.h
unistd_64.h
unwind.h
user.h
user32.h
user_32.h
user_64.h
vdso.h
vga.h
vgtod.h
vic.h
vm86.h
vmi.h
vmi_time.h
voyager.h
vsyscall.h
xor.h
xor_32.h
xor_64.h
asm-xtensa
crypto
keys
linux
math-emu
media
mtd
net
pcmcia
rdma
rxrpc
scsi
sound
video
xen
Kbuild
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
include
/
asm-x86
/
pgalloc_32.h
Copy path
Blame
Blame
Latest commit
History
History
84 lines (68 loc) · 1.92 KB
Breadcrumbs
linux
/
include
/
asm-x86
/
pgalloc_32.h
Top
File metadata and controls
Code
Blame
84 lines (68 loc) · 1.92 KB
Raw
#ifndef _I386_PGALLOC_H #define _I386_PGALLOC_H #include <linux/threads.h> #include <linux/mm.h> /* for struct page */ #include <asm/tlb.h> #include <asm-generic/tlb.h> #ifdef CONFIG_PARAVIRT #include <asm/paravirt.h> #else #define paravirt_alloc_pt(mm, pfn) do { } while (0) #define paravirt_alloc_pd(mm, pfn) do { } while (0) #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0) #define paravirt_release_pt(pfn) do { } while (0) #define paravirt_release_pd(pfn) do { } while (0) #endif static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) { paravirt_alloc_pt(mm, __pa(pte) >> PAGE_SHIFT); set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE)); } static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte) { unsigned long pfn = page_to_pfn(pte); paravirt_alloc_pt(mm, pfn); set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); } /* * Allocate and free page tables. */ extern pgd_t *pgd_alloc(struct mm_struct *); extern void pgd_free(pgd_t *pgd); extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); static inline void pte_free_kernel(pte_t *pte) { free_page((unsigned long)pte); } static inline void pte_free(struct page *pte) { __free_page(pte); } static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) { paravirt_release_pt(page_to_pfn(pte)); tlb_remove_page(tlb, pte); } #ifdef CONFIG_X86_PAE /* * In the PAE case we free the pmds as part of the pgd. */ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) { BUG(); return (pmd_t *)2; } static inline void pmd_free(pmd_t *pmd) { } static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd) { } static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) { BUG(); } #endif /* CONFIG_X86_PAE */ #endif /* _I386_PGALLOC_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
You can’t perform that action at this time.