/linux/arch/riscv/kernel/ |
H A D | sbi.c | 30 unsigned long cpuid, hartid; in __sbi_v01_cpumask_to_hartmask() local 41 hartid = cpuid_to_hartid_map(cpuid); in __sbi_v01_cpumask_to_hartmask() 42 if (hartid >= BITS_PER_LONG) { in __sbi_v01_cpumask_to_hartmask() 46 hmask |= BIT(hartid); in __sbi_v01_cpumask_to_hartmask() 261 unsigned long hartid, cpuid, hmask = 0, hbase = 0, htop = 0; in __sbi_rfence_v02() local 268 hartid = cpuid_to_hartid_map(cpuid); in __sbi_rfence_v02() 270 if (hartid + BITS_PER_LONG <= htop || in __sbi_rfence_v02() 271 hbase + BITS_PER_LONG <= hartid) { in __sbi_rfence_v02() 277 } else if (hartid < hbase) { in __sbi_rfence_v02() 279 hmask <<= hbase - hartid; in __sbi_rfence_v02() [all …]
|
H A D | cpu.c | 127 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 D | hibernate.c | 59 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 D | smp.c | 57 int riscv_hartid_to_cpuid(unsigned long hartid) in riscv_hartid_to_cpuid() argument 62 if (cpuid_to_hartid_map(i) == hartid) in riscv_hartid_to_cpuid()
|
/linux/drivers/firmware/efi/libstub/ |
H A D | riscv.c | 16 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/drivers/clocksource/ |
H A D | timer-riscv.c | 204 unsigned long hartid; in riscv_timer_init_dt() local 207 error = riscv_of_processor_hartid(n, &hartid); in riscv_timer_init_dt() 210 n, hartid); in riscv_timer_init_dt() 214 cpuid = riscv_hartid_to_cpuid(hartid); in riscv_timer_init_dt() 216 pr_warn("Invalid cpuid for hartid [%lu]\n", hartid); in riscv_timer_init_dt()
|
/linux/drivers/irqchip/ |
H A D | irq-riscv-aplic-direct.c | 197 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() 229 unsigned long hartid; in aplic_direct_setup() local 246 rc = aplic_direct_parse_parent_hwirq(dev, i, &hwirq, &hartid, priv); in aplic_direct_setup() 259 cpu = riscv_hartid_to_cpuid(hartid); in aplic_direct_setup()
|
H A D | irq-riscv-imsic-state.c | 584 u32 index, unsigned long *hartid) in imsic_get_parent_hartid() argument 590 if (hartid) in imsic_get_parent_hartid() 591 *hartid = acpi_rintc_index_to_hartid(index); in imsic_get_parent_hartid() 593 if (!hartid || (*hartid == INVALID_HARTID)) in imsic_get_parent_hartid() 610 return riscv_of_parent_hartid(parent.np, hartid); in imsic_get_parent_hartid() 628 unsigned long hartid; in imsic_parse_fwnode() local 637 while (!imsic_get_parent_hartid(fwnode, *nr_parent_irqs, &hartid)) in imsic_parse_fwnode() 724 unsigned long reloff, hartid; in imsic_setup_state() local 814 rc = imsic_get_parent_hartid(fwnode, i, &hartid); in imsic_setup_state() 820 cpu = riscv_hartid_to_cpuid(hartid); in imsic_setup_state()
|
H A D | irq-sifive-plic.c | 489 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 D | irq-riscv-intc.c | 213 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/Documentation/translations/zh_CN/arch/riscv/ |
H A D | boot.rst | 31 * ``$a0`` 应包含当前核心的hartid。 93 使用UEFI启动时,EFI stub 需要引导hartid以便将其传递给 ``$a1`` 中的 94 RISC-V内核。EFI stub使用以下方法之一获取引导hartid: 97 - ``boot-hartid`` 设备树子节点(**已弃用**)。
|
/linux/arch/riscv/mm/ |
H A D | cacheflush.c | 108 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/arch/riscv/include/asm/ |
H A D | processor.h | 155 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 D | kexec.h | 52 unsigned long hartid,
|
/linux/Documentation/arch/riscv/ |
H A D | boot.rst | 26 * ``$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/drivers/acpi/ |
H A D | processor_core.c | 115 phys_cpuid_t *hartid) in map_rintc_hartid() argument 129 *hartid = rintc->hart_id; in map_rintc_hartid()
|
/linux/arch/riscv/ |
H A D | Kconfig | 1002 variable. This method cannot support CPU hotplug and sparse hartid
|