Home
last modified time | relevance | path

Searched refs:hartid (Results 1 – 23 of 23) sorted by relevance

/linux-6.15/arch/riscv/kernel/
H A Dcpu_ops_sbi.c26 static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr, in sbi_hsm_hart_start() argument
32 hartid, saddr, priv, 0, 0, 0); in sbi_hsm_hart_start()
52 static int sbi_hsm_hart_get_status(unsigned long hartid) in sbi_hsm_hart_get_status() argument
57 hartid, 0, 0, 0, 0, 0); in sbi_hsm_hart_get_status()
68 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_start() local
79 return sbi_hsm_hart_start(hartid, boot_addr, hsm_data); in sbi_cpu_start()
94 unsigned long hartid = cpuid_to_hartid_map(cpuid); in sbi_cpu_is_stopped() local
96 rc = sbi_hsm_hart_get_status(hartid); in sbi_cpu_is_stopped()
H A Dcpu_ops_spinwait.c23 unsigned long hartid = cpuid_to_hartid_map(cpuid); in cpu_update_secondary_bootdata() local
32 if (hartid == INVALID_HARTID || hartid >= (unsigned long) NR_CPUS) in cpu_update_secondary_bootdata()
37 WRITE_ONCE(__cpu_spinwait_stack_pointer[hartid], task_pt_regs(tidle)); in cpu_update_secondary_bootdata()
38 WRITE_ONCE(__cpu_spinwait_task_pointer[hartid], tidle); in cpu_update_secondary_bootdata()
H A Dsbi.c30 unsigned long cpuid, hartid; in __sbi_v01_cpumask_to_hartmask() local
42 if (hartid >= BITS_PER_LONG) { in __sbi_v01_cpumask_to_hartmask()
46 hmask |= BIT(hartid); in __sbi_v01_cpumask_to_hartmask()
277 } else if (hartid < hbase) { in __sbi_rfence_v02()
279 hmask <<= hbase - hartid; in __sbi_rfence_v02()
280 hbase = hartid; in __sbi_rfence_v02()
284 hbase = hartid; in __sbi_rfence_v02()
285 htop = hartid; in __sbi_rfence_v02()
286 } else if (hartid > htop) { in __sbi_rfence_v02()
287 htop = hartid; in __sbi_rfence_v02()
[all …]
H A Dcpu.c127 int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid) in riscv_of_parent_hartid() argument
131 *hartid = (unsigned long)of_get_cpu_hwid(node, 0); in riscv_of_parent_hartid()
132 if (*hartid == ~0UL) { in riscv_of_parent_hartid()
H A Dhibernate.c59 unsigned long hartid; member
101 hdr->hartid = cpuid_to_hartid_map(sleep_cpu); in arch_hibernation_header_save()
125 sleep_cpu = riscv_hartid_to_cpuid(hdr->hartid); in arch_hibernation_header_restore()
H A Dsmp.c60 int riscv_hartid_to_cpuid(unsigned long hartid) in riscv_hartid_to_cpuid() argument
65 if (cpuid_to_hartid_map(i) == hartid) in riscv_hartid_to_cpuid()
/linux-6.15/drivers/mailbox/
H A Dmailbox-mchp-ipc-sbi.c177 unsigned long hartid; in mchp_ipc_cluster_aggr_isr() local
182 hartid = cpuid_to_hartid_map(i); in mchp_ipc_cluster_aggr_isr()
183 if (irq == ipc->cluster_cfg[hartid].irq) in mchp_ipc_cluster_aggr_isr()
187 status_msg.cluster = hartid; in mchp_ipc_cluster_aggr_isr()
378 unsigned long hartid; in mchp_ipc_get_cluster_aggr_irq() local
382 hartid = cpuid_to_hartid_map(cpuid); in mchp_ipc_get_cluster_aggr_irq()
388 ipc->cluster_cfg[hartid].irq = ret; in mchp_ipc_get_cluster_aggr_irq()
389 ret = devm_request_irq(ipc->dev, ipc->cluster_cfg[hartid].irq, in mchp_ipc_get_cluster_aggr_irq()
395 ipc->cluster_cfg[hartid].buf_base = devm_kmalloc(ipc->dev, in mchp_ipc_get_cluster_aggr_irq()
399 if (!ipc->cluster_cfg[hartid].buf_base) in mchp_ipc_get_cluster_aggr_irq()
[all …]
/linux-6.15/drivers/firmware/efi/libstub/
H A Driscv.c16 static unsigned long hartid; variable
37 hartid = (unsigned long) fdt32_to_cpu(*(fdt32_t *)prop); in get_boot_hartid_from_fdt()
39 hartid = (unsigned long) fdt64_to_cpu(__get_unaligned_t(fdt64_t, prop)); in get_boot_hartid_from_fdt()
56 return efi_call_proto(boot_protocol, get_boot_hartid, &hartid); in get_boot_hartid_from_efi()
97 jump_kernel(hartid, fdt); in efi_enter_kernel()
/linux-6.15/drivers/clocksource/
H A Dtimer-riscv.c210 unsigned long hartid; in riscv_timer_init_dt() local
213 error = riscv_of_processor_hartid(n, &hartid); in riscv_timer_init_dt()
216 n, hartid); in riscv_timer_init_dt()
220 cpuid = riscv_hartid_to_cpuid(hartid); in riscv_timer_init_dt()
222 pr_warn("Invalid cpuid for hartid [%lu]\n", hartid); in riscv_timer_init_dt()
/linux-6.15/arch/riscv/include/asm/
H A Dsmp.h40 int riscv_hartid_to_cpuid(unsigned long hartid);
77 static inline int riscv_hartid_to_cpuid(unsigned long hartid) in riscv_hartid_to_cpuid() argument
79 if (hartid == boot_cpu_hartid) in riscv_hartid_to_cpuid()
H A Dprocessor.h155 int riscv_of_processor_hartid(struct device_node *node, unsigned long *hartid);
156 int riscv_early_of_processor_hartid(struct device_node *node, unsigned long *hartid);
157 int riscv_of_parent_hartid(struct device_node *node, unsigned long *hartid);
H A Dsuspend.h43 int __cpu_resume_enter(unsigned long hartid, unsigned long context);
H A Dkexec.h52 unsigned long hartid,
/linux-6.15/Documentation/translations/zh_CN/arch/riscv/
H A Dboot.rst31 * ``$a0`` 应包含当前核心的hartid
93 使用UEFI启动时,EFI stub 需要引导hartid以便将其传递给 ``$a1`` 中的
94 RISC-V内核。EFI stub使用以下方法之一获取引导hartid
97 - ``boot-hartid`` 设备树子节点(**已弃用**)。
/linux-6.15/drivers/irqchip/
H A Dirq-riscv-aplic-direct.c197 unsigned long hartid; in aplic_direct_parse_parent_hwirq() local
201 hartid = acpi_rintc_ext_parent_to_hartid(priv->acpi_aplic_id, index); in aplic_direct_parse_parent_hwirq()
202 if (hartid == INVALID_HARTID) in aplic_direct_parse_parent_hwirq()
205 *parent_hartid = hartid; in aplic_direct_parse_parent_hwirq()
243 unsigned long hartid; in aplic_direct_setup() local
260 rc = aplic_direct_parse_parent_hwirq(dev, i, &hwirq, &hartid, priv); in aplic_direct_setup()
273 cpu = riscv_hartid_to_cpuid(hartid); in aplic_direct_setup()
H A Dirq-thead-c900-aclint-sswi.c76 unsigned long hartid; in thead_aclint_sswi_parse_irq() local
91 rc = riscv_of_parent_hartid(parent.np, &hartid); in thead_aclint_sswi_parse_irq()
98 cpu = riscv_hartid_to_cpuid(hartid); in thead_aclint_sswi_parse_irq()
H A Dirq-riscv-imsic-state.c661 u32 index, unsigned long *hartid) in imsic_get_parent_hartid() argument
667 if (hartid) in imsic_get_parent_hartid()
668 *hartid = acpi_rintc_index_to_hartid(index); in imsic_get_parent_hartid()
670 if (!hartid || (*hartid == INVALID_HARTID)) in imsic_get_parent_hartid()
687 return riscv_of_parent_hartid(parent.np, hartid); in imsic_get_parent_hartid()
705 unsigned long hartid; in imsic_parse_fwnode() local
714 while (!imsic_get_parent_hartid(fwnode, *nr_parent_irqs, &hartid)) in imsic_parse_fwnode()
801 unsigned long reloff, hartid; in imsic_setup_state() local
891 rc = imsic_get_parent_hartid(fwnode, i, &hartid); in imsic_setup_state()
897 cpu = riscv_hartid_to_cpuid(hartid); in imsic_setup_state()
H A Dirq-sifive-plic.c489 unsigned long hartid; in plic_parse_context_parent() local
493 hartid = acpi_rintc_ext_parent_to_hartid(id, context); in plic_parse_context_parent()
494 if (hartid == INVALID_HARTID) in plic_parse_context_parent()
497 *parent_cpu = riscv_hartid_to_cpuid(hartid); in plic_parse_context_parent()
506 rc = riscv_of_parent_hartid(parent.np, &hartid); in plic_parse_context_parent()
511 *parent_cpu = riscv_hartid_to_cpuid(hartid); in plic_parse_context_parent()
H A Dirq-riscv-intc.c213 unsigned long hartid; in riscv_intc_init() local
216 rc = riscv_of_parent_hartid(node, &hartid); in riscv_intc_init()
228 if (riscv_hartid_to_cpuid(hartid) != smp_processor_id()) { in riscv_intc_init()
/linux-6.15/arch/riscv/mm/
H A Dcacheflush.c108 unsigned long hartid; in cbo_get_block_size() local
111 if (riscv_of_processor_hartid(node, &hartid)) in cbo_get_block_size()
119 *first_hartid = hartid; in cbo_get_block_size()
122 name, *first_hartid, hartid); in cbo_get_block_size()
/linux-6.15/Documentation/arch/riscv/
H A Dboot.rst26 * ``$a0`` to contain the hartid of the current core.
95 When booting with UEFI, the EFI stub requires the boot hartid in order to pass
96 it to the RISC-V kernel in ``$a1``. The EFI stub retrieves the boot hartid using
100 - ``boot-hartid`` devicetree subnode (**deprecated**).
/linux-6.15/drivers/acpi/
H A Dprocessor_core.c115 phys_cpuid_t *hartid) in map_rintc_hartid() argument
129 *hartid = rintc->hart_id; in map_rintc_hartid()
/linux-6.15/arch/riscv/
H A DKconfig1035 variable. This method cannot support CPU hotplug and sparse hartid