linux/drivers/irqchip/irq-sifive-plic.c
/*
 * Walk up the DT tree until we find an active RISC-V core (HART) node and
 * extract the cpuid from it.
 */
Walk up the DT tree until we find an active RISC-V core (HART) node and
extract the cpuid from it.
Walk up the DT tree until we find an active RISC - V core ( HART ) node and extract the cpuid from it .
static int plic_find_hart_id(struct device_node *node)
{
	for (; node; node = node->parent) {
		if (of_device_is_compatible(node, "riscv"))
			return riscv_of_processor_hart(node);
	}
	return -1;
}
static int plic_find_hart_id ( struct device_node * node ) { for ( ; node ; node = node -> parent ) { if ( of_device_is_compatible ( node , " " ) ) return riscv_of_processor_hart ( node ) ; } return -1 ; }
Walk up the DT tree until we find an active RISC-V core (HART) node and
 extract the cpuid from it.
Walk up the DT tree until we find an active RISC - V core ( HART ) node and extract the cpuid from it .