Lines Matching +full:light +full:- +full:weight
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 1998-2003 Hewlett-Packard Co
6 * David Mosberger-Tang <davidm@hpl.hp.com>
11 #include <linux/dma-map-ops.h>
58 if (test_bit(PG_arch_1, &folio->flags)) in __ia64_sync_icache_dcache()
59 return; /* i-cache is already coherent with d-cache */ in __ia64_sync_icache_dcache()
62 set_bit(PG_arch_1, &folio->flags); /* mark page as clean */ in __ia64_sync_icache_dcache()
66 * Since DMA is i-cache coherent, any (complete) folios that were written via
68 * flush them when they get mapped into an executable vm-area.
78 left -= folio_size(folio) - offset; in arch_dma_mark_clean()
85 left -= folio_size(folio); in arch_dma_mark_clean()
86 set_bit(PG_arch_1, &pfn_to_page(pfn)->flags); in arch_dma_mark_clean()
96 unsigned long stack_size = rlimit_max(RLIMIT_STACK) & -16; in ia64_set_rbs_bot()
100 current->thread.rbs_bot = PAGE_ALIGN(current->mm->start_stack - stack_size); in ia64_set_rbs_bot()
104 * This performs some platform-dependent address space initialization.
105 * On IA-64, we want to setup the VM area for the register backing
121 vma = vm_area_alloc(current->mm); in ia64_init_addr_space()
124 vma->vm_start = current->thread.rbs_bot & PAGE_MASK; in ia64_init_addr_space()
125 vma->vm_end = vma->vm_start + PAGE_SIZE; in ia64_init_addr_space()
127 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); in ia64_init_addr_space()
128 mmap_write_lock(current->mm); in ia64_init_addr_space()
129 if (insert_vm_struct(current->mm, vma)) { in ia64_init_addr_space()
130 mmap_write_unlock(current->mm); in ia64_init_addr_space()
134 mmap_write_unlock(current->mm); in ia64_init_addr_space()
137 /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */ in ia64_init_addr_space()
138 if (!(current->personality & MMAP_PAGE_ZERO)) { in ia64_init_addr_space()
139 vma = vm_area_alloc(current->mm); in ia64_init_addr_space()
142 vma->vm_end = PAGE_SIZE; in ia64_init_addr_space()
143 vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT); in ia64_init_addr_space()
146 mmap_write_lock(current->mm); in ia64_init_addr_space()
147 if (insert_vm_struct(current->mm, vma)) { in ia64_init_addr_space()
148 mmap_write_unlock(current->mm); in ia64_init_addr_space()
152 mmap_write_unlock(current->mm); in ia64_init_addr_space()
161 -1, "unused kernel"); in free_initmem()
174 * - align up the beginning of initrd in free_initrd_mem()
175 * - align down the end of initrd in free_initrd_mem()
202 printk(KERN_INFO "Freeing initrd memory: %ldkB freed\n", (end - start) >> 10); in free_initrd_mem()
253 * Map the gate page twice: once read-only to export the ELF in setup_gate()
254 * headers etc. and once execute-only page to enable in setup_gate()
255 * privilege-promotion via "epc": in setup_gate()
264 /* Fill in the holes (if any) with read-only zero pages: */ in setup_gate()
326 * address space. The IA-64 architecture guarantees that at least 50 bits of in ia64_mmu_init()
333 * --davidm 00/12/06 in ia64_mmu_init()
336 # define mapped_space_bits (3*(PAGE_SHIFT - pte_bits) + PAGE_SHIFT) in ia64_mmu_init()
341 * non-speculative accesses to the virtual page table, so the address range of the in ia64_mmu_init()
344 # define vmlpt_bits (impl_va_bits - PAGE_SHIFT + pte_bits) in ia64_mmu_init()
347 impl_va_bits = ffz(~(local_cpu_data->unimpl_va_mask | (7UL << 61))); in ia64_mmu_init()
350 panic("CPU has bogus IMPL_VA_MSB value of %lu!\n", impl_va_bits - 1); in ia64_mmu_init()
352 * mapped_space_bits - PAGE_SHIFT is the total number of ptes we need, in ia64_mmu_init()
353 * which must fit into "vmlpt_bits - pte_bits" slots. Second half of in ia64_mmu_init()
357 if ((mapped_space_bits - PAGE_SHIFT > vmlpt_bits - pte_bits) || in ia64_mmu_init()
358 (mapped_space_bits > impl_va_bits - 1)) in ia64_mmu_init()
359 panic("Cannot build a big enough virtual-linear page table" in ia64_mmu_init()
364 /* place the VMLPT at the end of each page-table mapped region: */ in ia64_mmu_init()
365 pta = POW2(61) - POW2(vmlpt_bits); in ia64_mmu_init()
369 * 8 selects between the short and long format, bits 2-7 the in ia64_mmu_init()
395 memblock_add_node(__pa(start), end - start, nid, MEMBLOCK_NONE); in register_active_ranges()
405 pfn_end = (PAGE_ALIGN(__pa(end - 1))) >> PAGE_SHIFT; in find_max_min_low_pfn()
408 pfn_end = GRANULEROUNDUP(__pa(end - 1)) >> PAGE_SHIFT; in find_max_min_low_pfn()
416 * Boot command-line option "nolwsys" can be used to disable the use of any light-weight
418 * down into the kernel and calling the normal (heavy-weight) syscall handler. This is
466 * For fsyscall entrypoints with no light-weight handler, use the ordinary in mem_init()
467 * (heavy-weight) handler, but mark it by setting bit 0, so the fsyscall entry in mem_init()
488 if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot)) in arch_add_memory()
489 return -EINVAL; in arch_add_memory()