Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c |
void hash__tlbiel_all(unsigned int action) {
unsigned int is;
switch (action) {
case TLB_INVAL_SCOPE_GLOBAL:
is = 3;
break;
case TLB_INVAL_SCOPE_LPID:
is = 2;
break;
default:
BUG();
}
if (early_cpu_has_feature(CPU_FTR_ARCH_300))
tlbiel_all_isa300(POWER9_TLB_SETS_HASH, is);
els... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | static int __init htab_dt_scan_seg_sizes(unsigned long node, const char *uname,
int depth, void *data) {
const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
const __be32 *prop;
int size = 0;
if (type == NULL || strcmp(type, "cpu") != 0)
return 0;
p... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | static bool __init might_have_hea(void) {
#ifdef CONFIG_IBMEBUS
return !cpu_has_feature(CPU_FTR_ARCH_207S) &&
firmware_has_feature(FW_FEATURE_SPLPAR);
#else
return false;
#endif
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | static void __init htab_scan_page_sizes(void) {
int rc;
mmu_psize_set_default_penc();
/* Default to 4K pages only */
memcpy(mmu_psize_defs, mmu_psize_defaults, sizeof(mmu_psize_defaults));
/*
* Try to find the available page sizes in the device-tree
*/
rc = of_scan_flat_dt(htab_dt_scan_page_sizes, ... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | unsigned htab_shift_for_mem_size(unsigned long mem_size) {
unsigned memshift = __ilog2(mem_size);
unsigned pshift = mmu_psize_defs[mmu_virtual_psize].shift;
unsigned pteg_shift;
if ((1UL << memshift) < mem_size)
memshift += 1;
/* aim for 2 pages / pteg */
pteg_shift = memshift - (pshift + 1);
/*
... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | static void __init hash_init_partition_table(phys_addr_t hash_table,
unsigned long htab_size) {
mmu_partition_table_init();
htab_size = __ilog2(htab_size) - 18;
mmu_partition_table_set_entry(0, hash_table | htab_size, 0, false);
pr_info("Partition table %p\n", parti... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | void hash__early_init_mmu_secondary(void) {
if (!firmware_has_feature(FW_FEATURE_LPAR)) {
if (!cpu_has_feature(CPU_FTR_ARCH_300))
mtspr(SPRN_SDR1, _SDR1);
else
set_ptcr_when_no_uv(__pa(partition_tb) | (PATB_SIZE_SHIFT - 12));
}
/* Initialize SLB */
slb_initialize();
if (cpu_has_feature(... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap) {
struct page *page;
if (!pfn_valid(pte_pfn(pte)))
return pp;
page = pte_page(pte);
if (!test_bit(PG_dcache_clean, &page->flags) && !PageReserved(page)) {
if (trap == INTERRUPT_INST_STORAGE) {
flush_dcache_icache_page(p... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | void demote_segment_4k(struct mm_struct *mm, unsigned long addr) {
if (get_slice_psize(mm, addr) == MMU_PAGE_4K)
return;
slice_set_range_psize(mm, addr, 1, MMU_PAGE_4K);
copro_flush_all_slbs(mm);
if ((get_paca_psize(addr) != MMU_PAGE_4K) && (current->mm == mm)) {
copy_mm_to_paca(mm);
slb_flush_and_... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c |
void hash_failure_debug(unsigned long ea, unsigned long access,
unsigned long vsid, unsigned long trap, int ssize,
int psize, int lpsize, unsigned long pte) {
if (!printk_ratelimit())
return;
pr_info("mm: Hashing failure ! EA=0x%lx access=0x%lx current=%s\n", ea,... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | void __update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
pte_t *ptep) {
unsigned long trap;
bool is_exec;
/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
if (!pte_young(*ptep) || address >= TASK_SIZE)
return;
/*
* We try to figure out if... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c | static inline void tm_flush_hash_page(int local) {
if (local && cpu_has_feature(CPU_FTR_TM) && current->thread.regs &&
MSR_TM_ACTIVE(current->thread.regs->msr)) {
tm_enable();
tm_abort(TM_CAUSE_TLBI);
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hash_utils.c |
static int __init hash64_debugfs(void) {
debugfs_create_file("hpt_order", 0600, arch_debugfs_dir, NULL,
&fops_hpt_order);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hugetlbpage.c |
void huge_ptep_modify_prot_commit(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t old_pte, pte_t pte) {
if (radix_enabled())
return radix__huge_ptep_modify_prot_commit(vma, addr, ptep, old_pte, pte);
set_huge_pte_at(vma->vm... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/hugetlbpage.c | void __init hugetlbpage_init_defaultsize(void) {
if (mmu_psize_defs[MMU_PAGE_16M].shift)
hpage_shift = mmu_psize_defs[MMU_PAGE_16M].shift;
else if (mmu_psize_defs[MMU_PAGE_1M].shift)
hpage_shift = mmu_psize_defs[MMU_PAGE_1M].shift;
else if (mmu_psize_defs[MMU_PAGE_2M].shift)
hpage_shift = mmu_psize_d... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/iommu_api.c |
static void mm_iommu_do_free(struct mm_iommu_table_group_mem_t *mem) {
mm_iommu_unpin(mem);
vfree(mem->hpas);
kfree(mem);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/mmu_context.c |
int hash__alloc_context_id(void) {
unsigned long max;
if (mmu_has_feature(MMU_FTR_68_BIT_VA))
max = MAX_USER_CONTEXT;
else
max = MAX_USER_CONTEXT_65BIT_VA;
return alloc_context_id(MIN_USER_CONTEXT, max);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/mmu_context.c |
void hash__setup_new_exec(void) {
slice_setup_new_exec();
slb_setup_new_exec();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/mmu_context.c | void destroy_context(struct mm_struct *mm) {
#ifdef CONFIG_SPAPR_TCE_IOMMU
WARN_ON_ONCE(!list_empty(&mm->context.iommu_group_mem_list));
#endif
if (radix_enabled())
process_tb[mm->context.id].prtb0 = 0;
else
subpage_prot_free(mm);
destroy_contexts(&mm->context);
mm->context.id = MMU_NO_CONTEXT;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/mmu_context.c | void arch_exit_mmap(struct mm_struct *mm) {
destroy_pagetable_cache(mm);
if (radix_enabled()) {
process_tb[mm->context.id].prtb0 = 0;
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
pmd_t pmd) {
#ifdef CONFIG_DEBUG_VM
WARN_ON(pte_hw_valid(pmd_pte(*pmdp)) && !pte_protnone(pmd_pte(*pmdp)));
assert_spin_locked(pmd_lockptr(mm, pmdp));
WARN_ON(!(pmd_large(pmd)));
#endif
trace_hugepage_set_pmd(addr, pmd_val(p... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | void serialize_against_pte_lookup(struct mm_struct *mm) {
smp_mb();
smp_call_function_many(mm_cpumask(mm), do_serialize, mm, 1);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | pmd_t pmdp_huge_get_and_clear_full(struct vm_area_struct *vma,
unsigned long addr, pmd_t *pmdp, int full) {
pmd_t pmd;
VM_BUG_ON(addr & ~HPAGE_PMD_MASK);
VM_BUG_ON(
(pmd_present(*pmdp) && !pmd_trans_huge(*pmdp) && !pmd_devmap(*pmdp)) ||
!pmd_present(*pmdp));
pmd = ... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | notrace void mmu_cleanup_all(void) {
if (radix_enabled())
radix__mmu_cleanup_all();
else if (mmu_hash_ops.hpte_clear_all)
mmu_hash_ops.hpte_clear_all();
reset_sprs();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | int __meminit create_section_mapping(unsigned long start, unsigned long end,
int nid, pgprot_t prot) {
if (radix_enabled())
return radix__create_section_mapping(start, end, nid, prot);
return hash__create_section_mapping(start, end, nid, prot);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | static pmd_t *get_pmd_from_cache(struct mm_struct *mm) {
void *pmd_frag, *ret;
if (PMD_FRAG_NR == 1)
return NULL;
spin_lock(&mm->page_table_lock);
ret = mm->context.pmd_frag;
if (ret) {
pmd_frag = ret + PMD_FRAG_SIZE;
if (((unsigned long)pmd_frag & ~PAGE_MASK) == 0)
pmd_frag = NULL;
m... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c | static inline void pgtable_free(void *table, int index) {
switch (index) {
case PTE_INDEX:
pte_fragment_free(table, 0);
break;
case PMD_INDEX:
pmd_fragment_free(table);
break;
case PUD_INDEX:
__pud_free(table);
break;
#if defined(CONFIG_PPC_4K_PAGES) && defined(CONFIG_HUGETLB_PAGE)
ca... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c |
void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int index) {
unsigned long pgf = (unsigned long)table;
BUG_ON(index > MAX_PGTABLE_INDEX_SIZE);
pgf |= index;
tlb_remove_table(tlb, (void *)pgf);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c |
void __tlb_remove_table(void *_table) {
void *table = (void *)((unsigned long)_table & ~MAX_PGTABLE_INDEX_SIZE);
unsigned int index = (unsigned long)_table & MAX_PGTABLE_INDEX_SIZE;
return pgtable_free(table, index);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pgtable.c |
static int __init setup_disable_tlbie(char *str) {
if (!radix_enabled()) {
pr_err("disable_tlbie: Unable to disable TLBIE with Hash MMU.\n");
return 1;
}
tlbie_capable = false;
tlbie_enabled = false;
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c | static int __init dt_scan_storage_keys(unsigned long node, const char *uname,
int depth, void *data) {
const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
const __be32 *prop;
int *pkeys_total = (int *)data;
if (type == NULL || strcmp(type, "cpu") != 0)
... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c |
static inline void init_amr(int pkey, u8 init_bits) {
u64 new_amr_bits = (((u64)init_bits & 0x3UL) << pkeyshift(pkey));
u64 old_amr = current_thread_amr() & ~((u64)(0x3ul) << pkeyshift(pkey));
current->thread.regs->amr = old_amr | new_amr_bits;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c |
static inline void init_iamr(int pkey, u8 init_bits) {
u64 new_iamr_bits = (((u64)init_bits & 0x1UL) << pkeyshift(pkey));
u64 old_iamr = current_thread_iamr() & ~((u64)(0x1ul) << pkeyshift(pkey));
if (!likely(pkey_execute_disable_supported))
return;
current->thread.regs->iamr = old_iamr | new_iamr_bits;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c | int __arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
unsigned long init_val) {
u64 new_amr_bits = 0x0ul;
u64 new_iamr_bits = 0x0ul;
u64 pkey_bits, uamor_pkey_bits;
pkey_bits = 0x3ul << pkeyshift(pkey);
uamor_pkey_bits = (default_uamor & pkey_bits);
/*
* Bot... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c | static inline bool vma_is_pkey_exec_only(struct vm_area_struct *vma) {
if ((vma->vm_flags & VM_ACCESS_FLAGS) != VM_EXEC)
return false;
return (vma_pkey(vma) == vma->vm_mm->context.execute_only_pkey);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c | int __arch_override_mprotect_pkey(struct vm_area_struct *vma, int prot,
int pkey) {
if (vma_is_pkey_exec_only(vma) && (prot != PROT_EXEC))
return 0;
/*
* The requested protection is execute-only. Hence let's use an
* execute-only pkey.
*/
if (prot == PROT_EXEC) {
... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c |
static bool pkey_access_permitted(int pkey, bool write, bool execute) {
int pkey_shift;
u64 amr;
pkey_shift = pkeyshift(pkey);
if (execute)
return !(current_thread_iamr() & (IAMR_EX_BIT << pkey_shift));
amr = current_thread_amr();
if (write)
return !(amr & (AMR_WR_BIT << pkey_shift));
return !... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/pkeys.c |
bool arch_pte_access_permitted(u64 pte, bool write, bool execute) {
if (!mmu_has_feature(MMU_FTR_PKEY))
return true;
return pkey_access_permitted(pte_to_pkey_bits(pte), write, execute);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_hugetlbpage.c |
void radix__local_flush_hugetlb_page(struct vm_area_struct *vma,
unsigned long vmaddr) {
int psize;
struct hstate *hstate = hstate_file(vma->vm_file);
psize = hstate_get_psize(hstate);
radix__local_flush_tlb_page_psize(vma->vm_mm, vmaddr, psize);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_hugetlbpage.c | void radix__huge_ptep_modify_prot_commit(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
pte_t old_pte, pte_t pte) {
struct mm_struct *mm = vma->vm_mm;
if (!cpu_has_feature(CPU_FTR_ARCH_31) &&
is_pte_rw_upgrade(pte... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | static int early_map_kernel_page(unsigned long ea, unsigned long pa,
pgprot_t flags, unsigned int map_page_size,
int nid, unsigned long region_start,
unsigned long region_end) {
unsigned long pfn = pa >> PAGE_SHIFT;
p... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
void radix__mark_rodata_ro(void) {
unsigned long start, end;
start = (unsigned long)_stext;
end = (unsigned long)__end_rodata;
radix__change_memory_range(start, end, _PAGE_WRITE);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
static inline void __meminit print_mapping(unsigned long start,
unsigned long end,
unsigned long size, bool exec) {
char buf[10];
if (end <= start)
return;
string_get_size(size, 1, STRING_UNITS_2, buf, sizeof(buf));
pr... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | void __init radix__early_init_devtree(void) {
int rc;
rc = of_scan_flat_dt(radix_dt_scan_page_sizes, NULL);
if (!rc) {
/*
* No page size details found in device tree.
* Let's assume we have page 4k and 64k support
*/
mmu_psize_defs[MMU_PAGE_4K].shift = 12;
mmu_psize_defs[MMU_PAGE_4K].a... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
static void __meminit remove_pmd_table(pmd_t *pmd_start, unsigned long addr,
unsigned long end) {
unsigned long next;
pte_t *pte_base;
pmd_t *pmd;
pmd = pmd_start + pmd_index(addr);
for (; addr < end; addr = next, pmd++) {
next = pmd_addr_end(addr, end);
if (!... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
static void __meminit remove_pud_table(pud_t *pud_start, unsigned long addr,
unsigned long end) {
unsigned long next;
pmd_t *pmd_base;
pud_t *pud;
pud = pud_start + pud_index(addr);
for (; addr < end; addr = next, pud++) {
next = pud_addr_end(addr, end);
if (!... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
int __meminit radix__create_section_mapping(unsigned long start,
unsigned long end, int nid,
pgprot_t prot) {
if (end >= RADIX_VMALLOC_START) {
pr_warn("Outside the supported range\n");
return -1;
}
return create_phy... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | int __meminit radix__vmemmap_create_mapping(unsigned long start,
unsigned long page_size,
unsigned long phys) {
unsigned long flags = _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_KERNEL_RW;
int nid = early_pfn_to_nid(phys >> PAGE_SHI... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | void radix__kernel_map_pages(struct page *page, int numpages, int enable) {
unsigned long addr;
addr = (unsigned long)page_address(page);
if (enable)
set_memory_p(addr, numpages);
else
set_memory_np(addr, numpages);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
unsigned long radix__pmd_hugepage_update(struct mm_struct *mm,
unsigned long addr, pmd_t *pmdp,
unsigned long clr, unsigned long set) {
unsigned long old;
#ifdef CONFIG_DEBUG_VM
WARN_ON(!radix__pmd_trans_huge(*pmdp) && !pmd_devmap(*... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | pgtable_t radix__pgtable_trans_huge_withdraw(struct mm_struct *mm,
pmd_t *pmdp) {
pte_t *ptep;
pgtable_t pgtable;
struct list_head *lh;
assert_spin_locked(pmd_lockptr(mm, pmdp));
pgtable = pmd_huge_pte(mm, pmdp);
lh = (struct list_head *)pgtable;
if (list_emp... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c | void radix__ptep_set_access_flags(struct vm_area_struct *vma, pte_t *ptep,
pte_t entry, unsigned long address,
int psize) {
struct mm_struct *mm = vma->vm_mm;
unsigned long set =
pte_val(entry) & (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PA... | [
1,
1
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
int pud_clear_huge(pud_t *pud) {
if (pud_is_leaf(*pud)) {
pud_clear(pud);
return 1;
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_pgtable.c |
int pmd_clear_huge(pmd_t *pmd) {
if (pmd_is_leaf(*pmd)) {
pmd_clear(pmd);
return 1;
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static void tlbiel_all_isa300(unsigned int num_sets, unsigned int is) {
unsigned int set;
asm volatile("ptesync" : : : "memory");
if (early_cpu_has_feature(CPU_FTR_HVMODE)) {
/* MSR[HV] should flush partition scope translations first. */
tlbiel_radix_set_isa300(0, is, 0, RIC_FLUSH_ALL, 0);
if (!ear... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
void radix__tlbiel_all(unsigned int action) {
unsigned int is;
switch (action) {
case TLB_INVAL_SCOPE_GLOBAL:
is = 3;
break;
case TLB_INVAL_SCOPE_LPID:
is = 2;
break;
default:
BUG();
}
if (early_cpu_has_feature(CPU_FTR_ARCH_300))
tlbiel_all_isa300(POWER9_TLB_SETS_RADIX, is);
e... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static __always_inline void __tlbie_lpid_guest(unsigned long lpid,
unsigned long ric) {
unsigned long rb, rs, prs, r;
rb = PPC_BIT(52);
rs = lpid;
prs = 1; /* process scoped */
r = 1; /* radix format */
asm volatile(PPC_TLBIE_5(% 0, % 4, % 3, % 2, % 1)
... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static __always_inline void __tlbiel_va(unsigned long va, unsigned long pid,
unsigned long ap, unsigned long ric) {
unsigned long rb, rs, prs, r;
rb = va & ~(PPC_BITMASK(52, 63));
rb |= ap << PPC_BITLSHIFT(58);
rs = pid << PPC_BITLSHIFT(31);
prs = 1;
r = 1; /* radix ... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
static inline void fixup_tlbie_va_range(unsigned long va, unsigned long pid,
unsigned long ap) {
if (cpu_has_feature(CPU_FTR_P9_TLBIE_ERAT_BUG)) {
asm volatile("ptesync" : : : "memory");
__tlbie_pid(0, RIC_FLUSH_TLB);
}
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static inline void fixup_tlbie_pid_lpid(unsigned long pid, unsigned long lpid) {
unsigned long va = ((1UL << 52) - 1);
if (cpu_has_feature(CPU_FTR_P9_TLBIE_ERAT_BUG)) {
asm volatile("ptesync" : : : "memory");
__tlbie_pid_lpid(0, lpid, RIC_FLUSH_TLB);
}
if (cpu_has_feature(CPU_FTR_P9_TLBIE_STQ_BUG)) {... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static inline void _tlbie_pid(unsigned long pid, unsigned long ric) {
asm volatile("ptesync" : : : "memory");
switch (ric) {
case RIC_FLUSH_TLB:
__tlbie_pid(pid, RIC_FLUSH_TLB);
fixup_tlbie_pid(pid);
break;
case RIC_FLUSH_PWC:
__tlbie_pid(pid, RIC_FLUSH_PWC);
break;
case RIC_FLUSH_ALL:
... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static inline void _tlbiel_pid_multicast(struct mm_struct *mm,
unsigned long pid, unsigned long ric) {
struct cpumask *cpus = mm_cpumask(mm);
struct tlbiel_pid t = {.pid = pid, .ric = ric};
on_each_cpu_mask(cpus, do_tlbiel_pid, &t, 1);
if (atomic_read(&mm->context.copr... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static __always_inline void _tlbie_lpid_guest(unsigned long lpid,
unsigned long ric) {
switch (ric) {
case RIC_FLUSH_TLB:
__tlbie_lpid_guest(lpid, RIC_FLUSH_TLB);
break;
case RIC_FLUSH_PWC:
__tlbie_lpid_guest(lpid, RIC_FLUSH_PWC);
break;
case RIC_FL... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
static inline void __tlbie_va_range_lpid(unsigned long start, unsigned long end,
unsigned long pid, unsigned long lpid,
unsigned long page_size,
unsigned long psize) {
unsigned long addr;
unsi... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static bool mm_needs_flush_escalation(struct mm_struct *mm) {
if (cpu_has_feature(CPU_FTR_ARCH_31))
return false;
if (atomic_read(&mm->context.copros) > 0)
return true;
return false;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static void do_exit_flush_lazy_tlb(void *arg) {
struct mm_struct *mm = arg;
exit_lazy_flush_tlb(mm, true);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | static inline void _tlbiel_kernel_broadcast(void) {
on_each_cpu(do_tlbiel_kernel, NULL, 1);
if (tlbie_capable) {
_tlbie_pid(0, RIC_FLUSH_ALL);
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | void radix__flush_tlb_kernel_range(unsigned long start, unsigned long end) {
if (!mmu_has_feature(MMU_FTR_GTSE)) {
unsigned long tgt = H_RPTI_TARGET_CMMU | H_RPTI_TARGET_NMMU;
unsigned long type = H_RPTI_TYPE_TLB | H_RPTI_TYPE_PWC | H_RPTI_TYPE_PRT;
pseries_rpt_invalidate(0, tgt, type, H_RPTI_PAGE_ALL, s... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
void radix__flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end)
{
#ifdef CONFIG_HUGETLB_PAGE
if (is_vm_hugetlb_page(vma))
return radix__flush_hugetlb_tlb_range(vma, start, end);
#endif
__radix__flush_tlb_range(vma->vm_mm, start, end);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | void radix__flush_all_lpid(unsigned int lpid) {
_tlbie_lpid(lpid, RIC_FLUSH_ALL);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c | void radix__flush_all_lpid_guest(unsigned int lpid) {
_tlbie_lpid_guest(lpid, RIC_FLUSH_ALL);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
void radix__flush_tlb_pwc_range_psize(struct mm_struct *mm, unsigned long start,
unsigned long end, int psize) {
__radix__flush_tlb_range_psize(mm, start, end, psize, true);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/radix_tlb.c |
static int __init create_tlb_single_page_flush_ceiling(void) {
debugfs_create_u32("tlb_single_page_flush_ceiling", 0600, arch_debugfs_dir,
&tlb_single_page_flush_ceiling);
debugfs_create_u32("tlb_local_single_page_flush_ceiling", 0600,
arch_debugfs_dir, &tlb_local_single_p... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slb.c | static void assert_slb_presence(bool present, unsigned long ea) {
#ifdef CONFIG_DEBUG_VM
unsigned long tmp;
WARN_ON_ONCE(mfmsr() & MSR_EE);
if (!cpu_has_feature(CPU_FTR_ARCH_206))
return;
ea &= ~((1UL << SID_SHIFT) - 1);
asm volatile(__PPC_SLBFEE_DOT(% 0, % 1) : "=r"(tmp) : "r"(ea) : "cr0");
WARN_ON... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slb.c | void slb_restore_bolted_realmode(void) {
__slb_restore_bolted_realmode();
get_paca()->slb_cache_ptr = 0;
get_paca()->slb_kern_bitmap = (1U << SLB_NUM_BOLTED) - 1;
get_paca()->slb_used_bitmap = get_paca()->slb_kern_bitmap;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slb.c | static bool preload_add(struct thread_info *ti, unsigned long ea) {
unsigned char idx;
unsigned long esid;
if (mmu_has_feature(MMU_FTR_1T_SEGMENT)) {
if (ea & ESID_MASK_1T)
ea &= ESID_MASK_1T;
}
esid = ea >> SID_SHIFT;
if (preload_hit(ti, esid))
return false;
idx = (ti->slb_preload_tail... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slb.c |
static void preload_age(struct thread_info *ti) {
if (!ti->slb_preload_nr)
return;
ti->slb_preload_nr--;
ti->slb_preload_tail = (ti->slb_preload_tail + 1) % SLB_PRELOAD_NR;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slb.c |
void slb_set_size(u16 size) { mmu_slb_size = size; } | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c |
static void slice_print_mask(const char *label, const struct slice_mask *mask) {
}
#define slice_dbg(fmt...)
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c |
static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
unsigned long len) {
struct vm_area_struct *vma;
if ((mm_ctx_slb_addr_limit(&mm->context) - len) < addr)
return 0;
vma = find_vma(mm, addr);
return (!vma || (addr + len) <= vm_start_gap(vma));
} | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c | static int slice_high_has_vma(struct mm_struct *mm, unsigned long slice) {
unsigned long start = slice << SLICE_HIGH_SHIFT;
unsigned long end = start + (1ul << SLICE_HIGH_SHIFT);
/* Hack, so that each addresses is controlled by exactly one
* of the high or low area bitmaps, the first high area starts
* at ... | [
1,
1
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c |
static void slice_flush_segments(void *parm) {
#ifdef CONFIG_PPC64
struct mm_struct *mm = parm;
unsigned long flags;
if (mm != current->active_mm)
return;
copy_mm_to_paca(current->active_mm);
local_irq_save(flags);
slb_flush_and_restore_bolted();
local_irq_restore(flags);
#endif
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c | static unsigned long
slice_find_area_bottomup(struct mm_struct *mm, unsigned long addr,
unsigned long len, const struct slice_mask *available,
int psize, unsigned long high_limit) {
int pshift = max_t(int, mmu_psize_defs[psize].shift, PAGE_SHIFT);
unsigned long foun... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c | static unsigned long
slice_find_area_topdown(struct mm_struct *mm, unsigned long addr,
unsigned long len, const struct slice_mask *available,
int psize, unsigned long high_limit) {
int pshift = max_t(int, mmu_psize_defs[psize].shift, PAGE_SHIFT);
unsigned long found, ... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c |
unsigned int notrace get_slice_psize(struct mm_struct *mm, unsigned long addr) {
unsigned char *psizes;
int index, mask_index;
VM_BUG_ON(radix_enabled());
if (slice_addr_is_low(addr)) {
psizes = mm_ctx_low_slices(&mm->context);
index = GET_LOW_SLICE_INDEX(addr);
} else {
psizes = mm_ctx_high_sl... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/slice.c | unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) {
if (radix_enabled())
return vma_kernel_pagesize(vma);
return 1UL << mmu_psize_to_shift(get_slice_psize(vma->vm_mm, vma->vm_start));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/book3s64/subpage_prot.c | static void subpage_prot_clear(unsigned long addr, unsigned long len) {
struct mm_struct *mm = current->mm;
struct subpage_prot_table *spt;
u32 **spm, *spp;
unsigned long i;
size_t nw;
unsigned long next, limit;
mmap_write_lock(mm);
spt = mm_ctx_subpage_prot(&mm->context);
if (!spt)
goto err_out... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/cacheflush.c | static void flush_dcache_icache_phys(unsigned long physaddr) {} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/copro_fault.c |
void copro_flush_all_slbs(struct mm_struct *mm) {
#ifdef CONFIG_SPU_BASE
spu_flush_all_slbs(mm);
#endif
cxl_slbia(mm);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/dma-noncoherent.c | static void __dma_sync(void *vaddr, size_t size, int direction) {
unsigned long start = (unsigned long)vaddr;
unsigned long end = start + size;
switch (direction) {
case DMA_NONE:
BUG();
case DMA_FROM_DEVICE:
if ((start | end) & (L1_CACHE_BYTES - 1))
flush_dcache_range(start, end);
else
... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c |
u64 drmem_lmb_memory_max(void) {
struct drmem_lmb *last_lmb;
last_lmb = &drmem_info->lmbs[drmem_info->n_lmbs - 1];
return last_lmb->base_addr + drmem_lmb_size();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c | static u32 drmem_lmb_flags(struct drmem_lmb *lmb) {
return lmb->flags & ~DRMEM_LMB_RESERVED;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c |
static void init_drconf_v2_cell(struct of_drconf_cell_v2 *dr_cell,
struct drmem_lmb *lmb) {
dr_cell->base_addr = cpu_to_be64(lmb->base_addr);
dr_cell->drc_index = cpu_to_be32(lmb->drc_index);
dr_cell->aa_index = cpu_to_be32(lmb->aa_index);
dr_cell->flags = cpu_to_be32(drmem_lmb_... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c | static int update_lmb(struct drmem_lmb *updated_lmb,
__maybe_unused const __be32 **usm,
__maybe_unused void *data) {
struct drmem_lmb *lmb;
for_each_drmem_lmb(lmb) {
if (lmb->drc_index != updated_lmb->drc_index)
continue;
lmb->aa_index = updated_lmb->aa_in... | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c |
static int init_drmem_lmb_size(struct device_node *dn) {
const __be32 *prop;
int len;
if (drmem_info->lmb_size)
return 0;
prop = of_get_property(dn, "ibm,lmb-size", &len);
if (!prop || len < n_root_size_cells * sizeof(__be32)) {
pr_info("Could not determine LMB size\n");
return -1;
}
drmem... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c | static const __be32 *of_get_usable_memory(struct device_node *dn) {
const __be32 *prop;
u32 len;
prop = of_get_property(dn, "linux,drconf-usable-memory", &len);
if (!prop || len < sizeof(unsigned int))
return NULL;
return prop;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/drmem.c |
static void __init init_drmem_v1_lmbs(const __be32 *prop) {
struct drmem_lmb *lmb;
drmem_info->n_lmbs = of_read_number(prop++, 1);
if (drmem_info->n_lmbs == 0)
return;
drmem_info->lmbs = kcalloc(drmem_info->n_lmbs, sizeof(*lmb), GFP_KERNEL);
if (!drmem_info->lmbs)
return;
for_each_drmem_lmb(lmb)... | [
1,
0
] |
Linux Kernel | arch/powerpc/mm/fault.c | static int __bad_area(struct pt_regs *regs, unsigned long address,
int si_code) {
struct mm_struct *mm = current->mm;
mmap_read_unlock(mm);
return __bad_area_nosemaphore(regs, address, si_code);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/fault.c |
static noinline int bad_area(struct pt_regs *regs, unsigned long address) {
return __bad_area(regs, address, SEGV_MAPERR);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/mm/fault.c | static noinline int bad_access_pkey(struct pt_regs *regs, unsigned long address,
struct vm_area_struct *vma) {
struct mm_struct *mm = current->mm;
int pkey;
pkey = vma_pkey(vma);
mmap_read_unlock(mm);
/*
* If we are in kernel mode, bail out with a SEGV, this will
*... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.