mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-17 23:34:24 +00:00
Pull RISC-V updates from Palmer Dabbelt: - Support using Zkr to seed KASLR - Support IPI-triggered CPU backtracing - Support for generic CPU vulnerabilities reporting to userspace - A few cleanups for missing licenses - The size limit on the XIP kernel has been removed - Support for tracing userspace stacks - Support for the Svvptc extension - Various cleanups and fixes throughout the tree * tag 'riscv-for-linus-6.12-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (47 commits) crash: Fix riscv64 crash memory reserve dead loop perf/riscv-sbi: Add platform specific firmware event handling tools: Optimize ring buffer for riscv tools: Add riscv barrier implementation RISC-V: Don't have MAX_PHYSMEM_BITS exceed phys_addr_t ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE riscv: Enable bitops instrumentation riscv: Omit optimized string routines when using KASAN ACPI: RISCV: Make acpi_numa_get_nid() to be static riscv: Randomize lower bits of stack address selftests: riscv: Allow mmap test to compile on 32-bit riscv: Make riscv_isa_vendor_ext_andes array static riscv: Use LIST_HEAD() to simplify code riscv: defconfig: Disable RZ/Five peripheral support RISC-V: Implement kgdb_roundup_cpus() to enable future NMI Roundup riscv: avoid Imbalance in RAS riscv: cacheinfo: Add back init_cache_level() function riscv: Remove unused _TIF_WORK_MASK drivers/perf: riscv: Remove redundant macro check riscv: define ILLEGAL_POINTER_VALUE for 64bit ...
80 lines
2.1 KiB
C
80 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2012 Regents of the University of California
|
|
* Copyright (C) 2017 SiFive
|
|
*/
|
|
|
|
#ifndef _ASM_RISCV_IRQ_H
|
|
#define _ASM_RISCV_IRQ_H
|
|
|
|
#include <linux/interrupt.h>
|
|
#include <linux/linkage.h>
|
|
|
|
#include <asm-generic/irq.h>
|
|
|
|
#define INVALID_CONTEXT UINT_MAX
|
|
|
|
#ifdef CONFIG_SMP
|
|
void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int exclude_cpu);
|
|
#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
|
|
#endif
|
|
|
|
void riscv_set_intc_hwnode_fn(struct fwnode_handle *(*fn)(void));
|
|
|
|
struct fwnode_handle *riscv_get_intc_hwnode(void);
|
|
|
|
#ifdef CONFIG_ACPI
|
|
|
|
enum riscv_irqchip_type {
|
|
ACPI_RISCV_IRQCHIP_INTC = 0x00,
|
|
ACPI_RISCV_IRQCHIP_IMSIC = 0x01,
|
|
ACPI_RISCV_IRQCHIP_PLIC = 0x02,
|
|
ACPI_RISCV_IRQCHIP_APLIC = 0x03,
|
|
};
|
|
|
|
int riscv_acpi_get_gsi_info(struct fwnode_handle *fwnode, u32 *gsi_base,
|
|
u32 *id, u32 *nr_irqs, u32 *nr_idcs);
|
|
struct fwnode_handle *riscv_acpi_get_gsi_domain_id(u32 gsi);
|
|
unsigned long acpi_rintc_index_to_hartid(u32 index);
|
|
unsigned long acpi_rintc_ext_parent_to_hartid(unsigned int plic_id, unsigned int ctxt_idx);
|
|
unsigned int acpi_rintc_get_plic_nr_contexts(unsigned int plic_id);
|
|
unsigned int acpi_rintc_get_plic_context(unsigned int plic_id, unsigned int ctxt_idx);
|
|
int __init acpi_rintc_get_imsic_mmio_info(u32 index, struct resource *res);
|
|
|
|
#else
|
|
static inline int riscv_acpi_get_gsi_info(struct fwnode_handle *fwnode, u32 *gsi_base,
|
|
u32 *id, u32 *nr_irqs, u32 *nr_idcs)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline unsigned long acpi_rintc_index_to_hartid(u32 index)
|
|
{
|
|
return INVALID_HARTID;
|
|
}
|
|
|
|
static inline unsigned long acpi_rintc_ext_parent_to_hartid(unsigned int plic_id,
|
|
unsigned int ctxt_idx)
|
|
{
|
|
return INVALID_HARTID;
|
|
}
|
|
|
|
static inline unsigned int acpi_rintc_get_plic_nr_contexts(unsigned int plic_id)
|
|
{
|
|
return INVALID_CONTEXT;
|
|
}
|
|
|
|
static inline unsigned int acpi_rintc_get_plic_context(unsigned int plic_id, unsigned int ctxt_idx)
|
|
{
|
|
return INVALID_CONTEXT;
|
|
}
|
|
|
|
static inline int __init acpi_rintc_get_imsic_mmio_info(u32 index, struct resource *res)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif /* CONFIG_ACPI */
|
|
|
|
#endif /* _ASM_RISCV_IRQ_H */
|