Lines Matching +full:linear +full:- +full:mapping +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-or-later
61 #include <asm/code-patching.h>
66 #include <asm/feature-fixups.h>
99 * If we boot via kdump on a non-primary thread, in setup_tlb_core_data()
106 paca_ptrs[cpu]->tcd_ptr = &paca_ptrs[first]->tcd; in setup_tlb_core_data()
110 * or e6500 tablewalk mode, or else TLB handlers in setup_tlb_core_data()
126 /* Look for ibm,smt-enabled OF option */
153 smt_option = of_get_property(dn, "ibm,smt-enabled", in check_smt_enabled()
168 /* Look for smt-enabled= cmdline option */
174 early_param("smt-enabled", early_smt_enabled);
182 get_paca()->cpu_start = 1; in fixup_boot_paca()
184 get_paca()->data_offset = 0; in fixup_boot_paca()
202 cur_cpu_spec->cpu_user_features2 &= ~PPC_FEATURE2_SCV; in configure_exceptions()
207 * be taken in little endian mode. in configure_exceptions()
217 /* Set endian mode using OPAL */ in configure_exceptions()
228 * Enable AIL if supported, and we are in hypervisor mode. This in cpu_ready_for_interrupts()
231 * If we are not in hypervisor mode the job is done once for in cpu_ready_for_interrupts()
243 * told TM is off via the dt-ftrs but told to (partially) use in cpu_ready_for_interrupts()
245 * will be off from dt-ftrs but we need to turn it on for the in cpu_ready_for_interrupts()
256 get_paca()->kernel_msr = MSR_KERNEL; in cpu_ready_for_interrupts()
271 * mode so we can access kernel globals normally provided we
273 * some early parsing of the device-tree to setup out MEMBLOCK
283 * device-tree is not accessible via normal means at this point.
290 /* -------- printk is _NOT_ safe to use here ! ------- */ in early_setup()
315 /* -------- printk is now safe to use ------- */ in early_setup()
325 udbg_printf(" -> %s(), dt_ptr: 0x%lx\n", __func__, dt_ptr); in early_setup()
344 * if needed, setting exception endian mode, etc... in early_setup()
371 * At this point, we can let interrupts switch to virtual mode in early_setup()
384 udbg_printf(" <- %s()\n", __func__); in early_setup()
391 * which means the real-mode access trick that btext does will in early_setup()
393 * mapping. This call will ensure that it does in early_setup()
408 /* Perform any KUP setup that is per-cpu */ in early_setup_secondary()
412 * At this point, we can let interrupts switch to virtual mode in early_setup_secondary()
434 * See comments in head_64.S -- not all platforms insert in use_spinloop()
447 return of_property_read_bool(of_chosen, "linux,booted-from-kexec"); in use_spinloop()
465 - PHYSICAL_START); in smp_release_cpus()
491 info->size = size; in init_cache_info()
492 info->sets = sets; in init_cache_info()
493 info->line_size = lsize; in init_cache_info()
494 info->block_size = bsize; in init_cache_info()
495 info->log_block_size = __ilog2(bsize); in init_cache_info()
497 info->blocks_per_page = PAGE_SIZE / bsize; in init_cache_info()
499 info->blocks_per_page = 0; in init_cache_info()
502 info->assoc = 0xffff; in init_cache_info()
504 info->assoc = size / (sets * lsize); in init_cache_info()
512 "i-cache-size", in parse_cache_info()
513 "i-cache-sets", in parse_cache_info()
514 "i-cache-block-size", in parse_cache_info()
515 "i-cache-line-size", in parse_cache_info()
518 "d-cache-size", in parse_cache_info()
519 "d-cache-sets", in parse_cache_info()
520 "d-cache-block-size", in parse_cache_info()
521 "d-cache-line-size", in parse_cache_info()
529 sets = -1u; in parse_cache_info()
530 lsize = bsize = cur_cpu_spec->dcache_bsize; in parse_cache_info()
573 * puts incorrect information in the device-tree. This will in initialize_cache_info()
590 * d-cache and i-cache sizes... -Peter in initialize_cache_info()
601 * unified and use the D-side properties. in initialize_cache_info()
620 cur_cpu_spec->dcache_bsize = dcache_bsize; in initialize_cache_info()
621 cur_cpu_spec->icache_bsize = icache_bsize; in initialize_cache_info()
625 * This returns the limit below which memory accesses to the linear
626 * mapping are guarnateed not to cause an architectural exception (e.g.,
631 * re-entrant interrupts.
636 /* Freescale BookE bolts the entire linear mapping */ in ppc64_bolted_size()
643 /* BookS radix, does not take faults on linear mapping */ in ppc64_bolted_size()
695 paca_ptrs[i]->crit_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
699 paca_ptrs[i]->dbg_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
703 paca_ptrs[i]->mc_kstack = sp + THREAD_SIZE; in exc_lvl_early_init()
723 * SLB misses on them. The ABI also requires them to be 128-byte in emergency_stack_init()
728 * at them in real mode. This means they must also be within the RMO in emergency_stack_init()
747 paca_ptrs[i]->emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
751 paca_ptrs[i]->nmi_emergency_sp = alloc_stack(limit, i) + THREAD_SIZE; in emergency_stack_init()
754 paca_ptrs[i]->mc_emergency_sp = alloc_stack(mce_limit, i) + THREAD_SIZE; in emergency_stack_init()
761 * pcpu_alloc_bootmem - NUMA friendly alloc_bootmem wrapper for percpu
783 pr_info("cpu %d has no node %d or node-local memory\n", in pcpu_alloc_bootmem()
866 int rc = -EINVAL; in setup_per_cpu_areas()
869 * Linear mapping is one of 4K, 1M and 16M. For 4K, no need in setup_per_cpu_areas()
893 delta = (unsigned long)pcpu_base_addr - (unsigned long)__per_cpu_start; in setup_per_cpu_areas()
896 paca_ptrs[cpu]->data_offset = __per_cpu_offset[cpu]; in setup_per_cpu_areas()
925 * disable it by default. Book3S has a soft-nmi hardlockup detector based
958 pr_info("rfi-flush: disabled on command line."); in handle_no_rfi_flush()
966 pr_info("entry-flush: disabled on command line."); in handle_no_entry_flush()
974 pr_info("uaccess-flush: disabled on command line."); in handle_no_uaccess_flush()
986 pr_info("rfi-flush: disabling due to 'nopti' on command line.\n"); in handle_no_pti()
1049 * If there is no d-cache-size property in the device tree, l1d_size in init_fallback_flush()
1051 * 2^64-1, and then walking off the end of the fallback area and in init_fallback_flush()
1075 paca->rfi_flush_fallback_area = l1d_flush_fallback_area; in init_fallback_flush()
1076 paca->l1d_flush_size = l1d_size; in init_fallback_flush()
1083 pr_info("rfi-flush: fallback displacement flush available\n"); in setup_rfi_flush()
1088 pr_info("rfi-flush: ori type flush available\n"); in setup_rfi_flush()
1091 pr_info("rfi-flush: mttrig type flush available\n"); in setup_rfi_flush()
1127 return -EINVAL; in rfi_flush_set()
1153 return -EINVAL; in entry_flush_set()
1179 return -EINVAL; in uaccess_flush_set()