Lines Matching +full:i +full:- +full:tlb +full:- +full:sets

1 // SPDX-License-Identifier: GPL-2.0-or-later
37 #include <asm/asm-prototypes.h>
63 #include <asm/code-patching.h>
68 #include <asm/feature-fixups.h>
101 * If we boot via kdump on a non-primary thread, in setup_tlb_core_data()
103 * set up this TLB. in setup_tlb_core_data()
108 paca_ptrs[cpu]->tcd_ptr = &paca_ptrs[first]->tcd; in setup_tlb_core_data()
112 * 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 boot_paca->cpu_start = 1; in fixup_boot_paca()
191 boot_paca->mc_emergency_sp = (void *)&init_thread_union + in fixup_boot_paca()
195 boot_paca->data_offset = 0; in fixup_boot_paca()
197 boot_paca->irq_soft_mask = IRQS_DISABLED; in fixup_boot_paca()
198 boot_paca->irq_happened = PACA_IRQ_HARD_DIS; in fixup_boot_paca()
213 * - PR KVM does not support AIL mode interrupts in the host in configure_exceptions()
216 * - SCV system call interrupt vectors are only implemented for in configure_exceptions()
219 * - On pseries, AIL mode can only be enabled and disabled in configure_exceptions()
220 * system-wide so when a PR VM is created on a pseries host, in configure_exceptions()
223 * - Therefore host CPUs must not execute scv while a PR VM in configure_exceptions()
226 * - SCV support can not be disabled dynamically because the in configure_exceptions()
231 * - So SCV support is blanket disabled if PR KVM could possibly in configure_exceptions()
237 cur_cpu_spec->cpu_user_features2 &= ~PPC_FEATURE2_SCV; in configure_exceptions()
243 cur_cpu_spec->cpu_user_features2 &= ~PPC_FEATURE2_SCV; in configure_exceptions()
297 * told TM is off via the dt-ftrs but told to (partially) use in cpu_ready_for_interrupts()
299 * will be off from dt-ftrs but we need to turn it on for the in cpu_ready_for_interrupts()
310 get_paca()->kernel_msr = MSR_KERNEL; in cpu_ready_for_interrupts()
327 * some early parsing of the device-tree to setup out MEMBLOCK
337 * device-tree is not accessible via normal means at this point.
344 /* -------- printk is _NOT_ safe to use here ! ------- */ in early_setup()
370 /* -------- printk is now safe to use ------- */ in early_setup()
383 udbg_printf(" -> %s(), dt_ptr: 0x%lx\n", __func__, dt_ptr); in early_setup()
401 task_thread_info(current)->cpu = boot_cpuid; // fix task_cpu(current) in early_setup()
420 /* Initialize the hash table or TLB handling */ in early_setup()
446 udbg_printf(" <- %s()\n", __func__); in early_setup()
453 * which means the real-mode access trick that btext does will in early_setup()
467 /* Initialize the hash table or TLB handling */ in early_setup_secondary()
470 /* Perform any KUP setup that is per-cpu */ in early_setup_secondary()
496 * See comments in head_64.S -- not all platforms insert in use_spinloop()
509 return of_property_read_bool(of_chosen, "linux,booted-from-kexec"); in use_spinloop()
515 int i; in smp_release_cpus() local
527 - PHYSICAL_START); in smp_release_cpus()
531 for (i = 0; i < 100000; i++) { in smp_release_cpus()
551 u32 bsize, u32 sets) in init_cache_info() argument
553 info->size = size; in init_cache_info()
554 info->sets = sets; in init_cache_info()
555 info->line_size = lsize; in init_cache_info()
556 info->block_size = bsize; in init_cache_info()
557 info->log_block_size = __ilog2(bsize); in init_cache_info()
559 info->blocks_per_page = PAGE_SIZE / bsize; in init_cache_info()
561 info->blocks_per_page = 0; in init_cache_info()
563 if (sets == 0) in init_cache_info()
564 info->assoc = 0xffff; in init_cache_info()
566 info->assoc = size / (sets * lsize); in init_cache_info()
574 "i-cache-size", in parse_cache_info()
575 "i-cache-sets", in parse_cache_info()
576 "i-cache-block-size", in parse_cache_info()
577 "i-cache-line-size", in parse_cache_info()
580 "d-cache-size", in parse_cache_info()
581 "d-cache-sets", in parse_cache_info()
582 "d-cache-block-size", in parse_cache_info()
583 "d-cache-line-size", in parse_cache_info()
587 u32 size, lsize, bsize, sets; in parse_cache_info() local
591 sets = -1u; in parse_cache_info()
592 lsize = bsize = cur_cpu_spec->dcache_bsize; in parse_cache_info()
598 sets = be32_to_cpu(*setsp); in parse_cache_info()
618 if (sets == 1) in parse_cache_info()
619 sets = 0; in parse_cache_info()
620 else if (sets == 0) in parse_cache_info()
621 sets = 1; in parse_cache_info()
623 init_cache_info(info, size, lsize, bsize, sets); in parse_cache_info()
635 * puts incorrect information in the device-tree. This will in initialize_cache_info()
642 /* size lsize blk sets */ in initialize_cache_info()
652 * d-cache and i-cache sizes... -Peter in initialize_cache_info()
663 * unified and use the D-side properties. in initialize_cache_info()
682 cur_cpu_spec->dcache_bsize = dcache_bsize; in initialize_cache_info()
683 cur_cpu_spec->icache_bsize = icache_bsize; in initialize_cache_info()
689 * TLB or SLB miss fault).
693 * re-entrant interrupts.
730 unsigned int i; in irqstack_early_init() local
737 for_each_possible_cpu(i) { in irqstack_early_init()
738 softirq_ctx[i] = alloc_stack(limit, i); in irqstack_early_init()
739 hardirq_ctx[i] = alloc_stack(limit, i); in irqstack_early_init()
746 unsigned int i; in exc_lvl_early_init() local
748 for_each_possible_cpu(i) { in exc_lvl_early_init()
751 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
752 critirq_ctx[i] = sp; in exc_lvl_early_init()
753 paca_ptrs[i]->crit_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
755 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
756 dbgirq_ctx[i] = sp; in exc_lvl_early_init()
757 paca_ptrs[i]->dbg_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
759 sp = alloc_stack(ULONG_MAX, i); in exc_lvl_early_init()
760 mcheckirq_ctx[i] = sp; in exc_lvl_early_init()
761 paca_ptrs[i]->mc_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
777 unsigned int i; in emergency_stack_init() local
781 * SLB misses on them. The ABI also requires them to be 128-byte in emergency_stack_init()
804 for_each_possible_cpu(i) { in emergency_stack_init()
805 paca_ptrs[i]->emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
809 paca_ptrs[i]->nmi_emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
812 paca_ptrs[i]->mc_emergency_sp = alloc_stack(mce_limit, i) + THREAD_SIZE; in emergency_stack_init()
841 int rc = -EINVAL; in setup_per_cpu_areas()
877 delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; in setup_per_cpu_areas()
880 paca_ptrs[cpu]->data_offset = __per_cpu_offset[cpu]; in setup_per_cpu_areas()
909 * disable it by default. Book3S has a soft-nmi hardlockup detector based
915 * the detector for non-KVM guests, assume PowerVM.