Lines Matching +full:linear +full:- +full:mapping +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-or-later
37 #include <asm/asm-prototypes.h>
63 #include <asm/text-patching.h>
68 #include <asm/feature-fixups.h>
101 * If we boot via kdump on a non-primary thread, 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()
217 * AIL mode interrupts. 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()
221 * all CPUs of the host are set to AIL=0 mode. 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()
248 * be taken in little endian mode. in configure_exceptions()
258 /* Set endian mode using OPAL */ in configure_exceptions()
269 * Enable AIL if supported, and we are in hypervisor mode. This in cpu_ready_for_interrupts()
272 * If we are not in hypervisor mode the job is done once for in cpu_ready_for_interrupts()
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()
325 * mode so we can access kernel globals normally provided we
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()
406 * if needed, setting exception endian mode, etc... in early_setup()
433 * At this point, we can let interrupts switch to virtual mode 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()
455 * mapping. This call will ensure that it does in early_setup()
470 /* Perform any KUP setup that is per-cpu */ in early_setup_secondary()
474 * At this point, we can let interrupts switch to virtual mode 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()
527 - PHYSICAL_START); in smp_release_cpus()
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()
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()
591 sets = -1u; in parse_cache_info()
592 lsize = bsize = cur_cpu_spec->dcache_bsize; in parse_cache_info()
635 * puts incorrect information in the device-tree. This will 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()
687 * This returns the limit below which memory accesses to the linear
688 * mapping are guarnateed not to cause an architectural exception (e.g.,
693 * re-entrant interrupts.
698 /* Freescale BookE bolts the entire linear mapping */ in ppc64_bolted_size()
701 /* BookS radix, does not take faults on linear mapping */ in ppc64_bolted_size()
753 paca_ptrs[i]->crit_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
757 paca_ptrs[i]->dbg_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
761 paca_ptrs[i]->mc_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
781 * SLB misses on them. The ABI also requires them to be 128-byte in emergency_stack_init()
786 * at them in real mode. This means they must also be within the RMO 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()
852 * Linear mapping is one of 4K, 1M and 16M. For 4K, no need 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.