[PATCH 1/3] riscv: Allow forced irq threading

Kefeng Wang wangkefeng.wang at huawei.com
Wed Jul 7 23:42:45 PDT 2021


On 2021/7/8 13:28, Christoph Hellwig wrote:
> On Thu, Jul 08, 2021 at 09:59:47AM +0800, Kefeng Wang wrote:
>> The timer interrupt and the perf interrupt on riscv are with
>> IRQF_PERCPU, so it's safe to allow forced interrupt threading.
> "Architecture code needs to select CONFIG_IRQ_FORCED_THREADING after
>   marking the interrupts which cant be threaded IRQF_NO_THREAD.
>   All interrupts which have IRQF_TIMER set are implict marked
>   IRQF_NO_THREAD. Also all PER_CPU interrupts are excluded."
>
> Did you do that audit?

Yes, I check the perf and timer on RISCV,

arch/riscv/kernel/perf_event.c

static int reserve_pmc_hardware(void)

{

  err = request_irq(riscv_pmu->irq, riscv_pmu->handle_irq,
                                  IRQF_PERCPU, "riscv-base-perf", NULL);

}

drivers/clocksource/timer-riscv.c

static int __init riscv_timer_init_dt(struct device_node *n)

{

     error = request_percpu_irq(riscv_clock_event_irq,
riscv_timer_interrupt,
                                  "riscv-timer", &riscv_clock_event);

}

Is this enough?
> .
>



More information about the linux-riscv mailing list