Lines Matching +full:i +full:- +full:tlb +full:- +full:sets
1 // SPDX-License-Identifier: GPL-2.0-or-later
61 #include <asm/code-patching.h>
66 #include <asm/feature-fixups.h>
70 #include <asm/asm-prototypes.h>
100 * If we boot via kdump on a non-primary thread, in setup_tlb_core_data()
102 * set up this TLB. in setup_tlb_core_data()
107 paca_ptrs[cpu]->tcd_ptr = &paca_ptrs[first]->tcd; in setup_tlb_core_data()
111 * or e6500 tablewalk mode, or else TLB handlers in setup_tlb_core_data()
127 /* Look for ibm,smt-enabled OF option */
154 smt_option = of_get_property(dn, "ibm,smt-enabled", in check_smt_enabled()
169 /* Look for smt-enabled= cmdline option */
175 early_param("smt-enabled", early_smt_enabled);
183 get_paca()->cpu_start = 1; in fixup_boot_paca()
185 get_paca()->data_offset = 0; in fixup_boot_paca()
203 cur_cpu_spec->cpu_user_features2 &= ~PPC_FEATURE2_SCV; in configure_exceptions()
257 * told TM is off via the dt-ftrs but told to (partially) use in cpu_ready_for_interrupts()
259 * will be off from dt-ftrs but we need to turn it on for the in cpu_ready_for_interrupts()
270 get_paca()->kernel_msr = MSR_KERNEL; in cpu_ready_for_interrupts()
287 * some early parsing of the device-tree to setup out MEMBLOCK
297 * device-tree is not accessible via normal means at this point.
304 /* -------- printk is _NOT_ safe to use here ! ------- */ in early_setup()
329 /* -------- printk is now safe to use ------- */ in early_setup()
339 udbg_printf(" -> %s(), dt_ptr: 0x%lx\n", __func__, dt_ptr); in early_setup()
372 /* Initialize the hash table or TLB handling */ in early_setup()
398 udbg_printf(" <- %s()\n", __func__); in early_setup()
405 * which means the real-mode access trick that btext does will in early_setup()
419 /* Initialize the hash table or TLB handling */ in early_setup_secondary()
422 /* Perform any KUP setup that is per-cpu */ in early_setup_secondary()
448 * See comments in head_64.S -- not all platforms insert in use_spinloop()
461 return of_property_read_bool(of_chosen, "linux,booted-from-kexec"); in use_spinloop()
467 int i; in smp_release_cpus() local
479 - PHYSICAL_START); in smp_release_cpus()
483 for (i = 0; i < 100000; i++) { in smp_release_cpus()
503 u32 bsize, u32 sets) in init_cache_info() argument
505 info->size = size; in init_cache_info()
506 info->sets = sets; in init_cache_info()
507 info->line_size = lsize; in init_cache_info()
508 info->block_size = bsize; in init_cache_info()
509 info->log_block_size = __ilog2(bsize); in init_cache_info()
511 info->blocks_per_page = PAGE_SIZE / bsize; in init_cache_info()
513 info->blocks_per_page = 0; in init_cache_info()
515 if (sets == 0) in init_cache_info()
516 info->assoc = 0xffff; in init_cache_info()
518 info->assoc = size / (sets * lsize); in init_cache_info()
526 "i-cache-size", in parse_cache_info()
527 "i-cache-sets", in parse_cache_info()
528 "i-cache-block-size", in parse_cache_info()
529 "i-cache-line-size", in parse_cache_info()
532 "d-cache-size", in parse_cache_info()
533 "d-cache-sets", in parse_cache_info()
534 "d-cache-block-size", in parse_cache_info()
535 "d-cache-line-size", in parse_cache_info()
539 u32 size, lsize, bsize, sets; in parse_cache_info() local
543 sets = -1u; in parse_cache_info()
544 lsize = bsize = cur_cpu_spec->dcache_bsize; in parse_cache_info()
550 sets = be32_to_cpu(*setsp); in parse_cache_info()
570 if (sets == 1) in parse_cache_info()
571 sets = 0; in parse_cache_info()
572 else if (sets == 0) in parse_cache_info()
573 sets = 1; in parse_cache_info()
575 init_cache_info(info, size, lsize, bsize, sets); in parse_cache_info()
587 * puts incorrect information in the device-tree. This will in initialize_cache_info()
594 /* size lsize blk sets */ in initialize_cache_info()
604 * d-cache and i-cache sizes... -Peter in initialize_cache_info()
615 * unified and use the D-side properties. in initialize_cache_info()
634 cur_cpu_spec->dcache_bsize = dcache_bsize; in initialize_cache_info()
635 cur_cpu_spec->icache_bsize = icache_bsize; in initialize_cache_info()
641 * TLB or SLB miss fault).
645 * re-entrant interrupts.
686 unsigned int i; in irqstack_early_init() local
693 for_each_possible_cpu(i) { in irqstack_early_init()
694 softirq_ctx[i] = alloc_stack(limit, i); in irqstack_early_init()
695 hardirq_ctx[i] = alloc_stack(limit, i); in irqstack_early_init()
702 unsigned int i; in exc_lvl_early_init() local
704 for_each_possible_cpu(i) { in exc_lvl_early_init()
707 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
708 critirq_ctx[i] = sp; in exc_lvl_early_init()
709 paca_ptrs[i]->crit_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
711 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
712 dbgirq_ctx[i] = sp; in exc_lvl_early_init()
713 paca_ptrs[i]->dbg_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
715 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
716 mcheckirq_ctx[i] = sp; in exc_lvl_early_init()
717 paca_ptrs[i]->mc_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
733 unsigned int i; in emergency_stack_init() local
737 * SLB misses on them. The ABI also requires them to be 128-byte in emergency_stack_init()
760 for_each_possible_cpu(i) { in emergency_stack_init()
761 paca_ptrs[i]->emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
765 paca_ptrs[i]->nmi_emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
768 paca_ptrs[i]->mc_emergency_sp = alloc_stack(mce_limit, i) + THREAD_SIZE; in emergency_stack_init()
775 * pcpu_alloc_bootmem - NUMA friendly alloc_bootmem wrapper for percpu
797 pr_info("cpu %d has no node %d or node-local memory\n", in pcpu_alloc_bootmem()
880 int rc = -EINVAL; in setup_per_cpu_areas()
907 delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; in setup_per_cpu_areas()
910 paca_ptrs[cpu]->data_offset = __per_cpu_offset[cpu]; in setup_per_cpu_areas()
939 * disable it by default. Book3S has a soft-nmi hardlockup detector based
945 * the detector for non-KVM guests, assume PowerVM.