// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2012 Regents of the University of California * Copyright (C) 2017 SiFive * Copyright (C) 2018 Christoph Hellwig
*/
/** * riscv_get_hart_index() - get hart index for interrupt delivery * @fwnode: interrupt controller node * @logical_index: index within the "interrupts-extended" property * @hart_index: filled with the hart index to use * * RISC-V uses term "hart index" for its interrupt controllers, for the * purpose of the interrupt routing to destination harts. * It may be arbitrary numbers assigned to each destination hart in context * of the particular interrupt domain. * * These numbers encoded in the optional property "riscv,hart-indexes" * that should contain hart index for each interrupt destination in the same * order as in the "interrupts-extended" property. If this property * not exist, it assumed equal to the logical index, i.e. index within the * "interrupts-extended" property. * * Return: error code
*/ int riscv_get_hart_index(struct fwnode_handle *fwnode, u32 logical_index,
u32 *hart_index)
{ staticconstchar *prop_hart_index = "riscv,hart-indexes"; struct device_node *np = to_of_node(fwnode);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.