mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dawei Li <dawei.li@shingroup.cn>
To: apatel@ventanamicro.com
Cc: tglx@linutronix.de, palmer@dabbelt.com, paul.walmsley@sifive.com,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, maz@kernel.org, bjorn@kernel.org,
	atishp@atishpatra.org, ajones@ventanamicro.com,
	sunilvl@ventanamicro.com, saravanak@google.com,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	dawei.li@shingroup.cn
Subject: Re: [PATCH v16 0/9] Linux RISC-V AIA Support
Date: Thu, 14 Mar 2024 13:47:35 +0800	[thread overview]
Message-ID: <343C92ABCFEE9906+ZfKPd/boCT8RAr3f@centos8> (raw)

Hi Anup,

Thanks for the great work on AIA!

Firstly I must apologize for the top posting cuz I miss the series mail for
my inbox. And for the record, I am replying to [1].

After I checkout riscv_aia_v16 branch at https://github.com/avpatel/linux.git,
some call traces about spurious interrupt are screaming:

[    1.244292] irq 11: nobody cared (try booting with the "irqpoll" option)
[    1.244707] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.8.0-rc6-00055-gd7d4d086b79a #14
[    1.244932] Hardware name: riscv-virtio,qemu (DT)
[    1.245130] Call Trace:
[    1.245337] [<ffffffff80005f32>] dump_backtrace+0x1c/0x24
[    1.245559] [<ffffffff809023f4>] show_stack+0x2c/0x38
[    1.245761] [<ffffffff8090ec8c>] dump_stack_lvl+0x3c/0x54
[    1.245979] [<ffffffff8090ecb8>] dump_stack+0x14/0x1c
[    1.246116] [<ffffffff8090368c>] __report_bad_irq+0x3e/0xae
[    1.246276] [<ffffffff8006a938>] note_interrupt+0x1f4/0x23e
[    1.246382] [<ffffffff800679e2>] handle_irq_event_percpu+0x42/0x50
[    1.246508] [<ffffffff80067a2c>] handle_irq_event+0x3c/0x68
[    1.246628] [<ffffffff8006b7a4>] handle_fasteoi_irq+0xac/0x176
[    1.246788] [<ffffffff80066c3c>] generic_handle_domain_irq+0x1c/0x2a
[    1.246928] [<ffffffff80473f0e>] imsic_handle_irq+0x72/0x12a
[    1.247041] [<ffffffff80066c3c>] generic_handle_domain_irq+0x1c/0x2a
[    1.247165] [<ffffffff80472470>] riscv_intc_aia_irq+0x26/0x38
[    1.247291] [<ffffffff8090ed0a>] handle_riscv_irq+0x4a/0x74
[    1.247430] [<ffffffff80918af6>] call_on_irq_stack+0x32/0x40
[    1.247626] handlers:
[    1.247721] [<000000004ebb6fe3>] vm_interrupt
[    1.248314] Disabling IRQ #11
[    1.303510] irq 12: nobody cared (try booting with the "irqpoll" option)
[    1.303700] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.8.0-rc6-00055-gd7d4d086b79a #14
[    1.304768] Hardware name: riscv-virtio,qemu (DT)
[    1.305460] Call Trace:
[    1.305868] [<ffffffff80005f32>] dump_backtrace+0x1c/0x24
[    1.306621] [<ffffffff809023f4>] show_stack+0x2c/0x38
[    1.307295] [<ffffffff8090ec8c>] dump_stack_lvl+0x3c/0x54
[    1.308025] [<ffffffff8090ecb8>] dump_stack+0x14/0x1c
[    1.308698] [<ffffffff8090368c>] __report_bad_irq+0x3e/0xae
[    1.309698] [<ffffffff8006a938>] note_interrupt+0x1f4/0x23e
[    1.310568] [<ffffffff800679e2>] handle_irq_event_percpu+0x42/0x50
[    1.311542] [<ffffffff80067a2c>] handle_irq_event+0x3c/0x68
[    1.312298] [<ffffffff8006b7a4>] handle_fasteoi_irq+0xac/0x176
[    1.313127] [<ffffffff80066c3c>] generic_handle_domain_irq+0x1c/0x2a
[    1.315375] [<ffffffff80473f0e>] imsic_handle_irq+0x72/0x12a
[    1.316163] [<ffffffff80066c3c>] generic_handle_domain_irq+0x1c/0x2a
[    1.317078] [<ffffffff80472470>] riscv_intc_aia_irq+0x26/0x38
[    1.318036] [<ffffffff8090ed0a>] handle_riscv_irq+0x4a/0x74
[    1.318934] [<ffffffff8090f3e6>] do_irq+0x4a/0x4c
[    1.319831] [<ffffffff809189ac>] ret_from_exception+0x0/0x64
[    1.320860] [<ffffffff8091845c>] _raw_spin_unlock_irqrestore+0x1a/0x2e
[    1.321887] [<ffffffff80473d06>] imsic_local_timer_callback+0x50/0x5c
[    1.322957] [<ffffffff8008ade4>] call_timer_fn.isra.0+0x14/0x5e
[    1.323781] [<ffffffff8008b44a>] run_timer_softirq+0x388/0x3a8
[    1.324579] [<ffffffff80918c7e>] __do_softirq+0x100/0x252
[    1.325304] [<ffffffff80018464>] irq_exit_rcu+0x7c/0xa6
[    1.326126] [<ffffffff8090ed24>] handle_riscv_irq+0x64/0x74
[    1.327535] [<ffffffff80918af6>] call_on_irq_stack+0x32/0x40
[    1.328703] handlers:
[    1.330724] [<000000008b6c4f15>] serial8250_interrupt
[    1.331573] Disabling IRQ #12
[    1.350231] Run /sbin/init as init process

And I take a look on /proc/interrupts, spurious interrupts are happening:
~ # cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7       CPU8       CPU9       CPU10      CPU11      CPU12      CPU13      CPU14      CPU15
 10:         83        222        350        163         71        101        193         68         54         60        174         50         51         48         48         46  RISC-V INTC   5 Edge      riscv-timer
 11:     100001          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  APLIC-MSI-d000000.aplic   8 Level   -fasteoi   virtio0
 12:          0     100000          0          0          0          0          0          0          0          0          0          0          0          0          0          0  APLIC-MSI-d000000.aplic  10 Level   -fasteoi   ttyS0
 13:          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  APLIC-MSI-d000000.aplic  11 Level   -fasteoi   101000.rtc
IPI0:         3          8          4          7          7          6          5          4          7          7          7          5          6         10          4          5  Rescheduling interrupts
IPI1:       727        517        431        448        497        456        514        476        488        466        455        456        443        443        439        433  Function call interrupts
IPI2:         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  CPU stop interrupts
IPI3:         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  IRQ work interrupts
IPI5:         0          0          0          0          0          0          0          0          0          0          0          0          0          0          0          0  Timer broadcast interrupts

But when I switched back to V15, everything is fine.

Here are some of info _maybe_ helpful:
kernel: d7d4d086b79a11ad8bbcaf732c7830faa3f3192f
qemu: e1007b6bab5cf97705bf4f2aaec1f607787355b8
qemu cmdline: qemu-system-riscv64 -M virt,aia=aplic-imsic -m 256M -nographic -kernel ~/src/linux/arch/riscv/boot/Image -drive file=rootfs.img,format=raw,id=hd0  -device virtio-blk-device,drive=hd0 -append "root=/dev/vda rw console=ttyS0" -smp 16
config: defconfig(make ARCH=riscv defconfig)

And I am happy to provide any extra info if needed.

After I take a git diff and check your changelog:
[Quoting from [1]]
 - Simplified aplic_msi_irq_eoi() in PATCH7 based on the section "4.9.2 Special
   consideration for level-sensitive interrupt sources"  of the RISC-V AIA
   specification and also provided handler name.

I apologize if I miss something.

[1] https://lore.kernel.org/lkml/20240307140307.646078-1-apatel@ventanamicro.com/

Thanks,

        Dawei


             reply	other threads:[~2024-03-14  5:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  5:47 Dawei Li [this message]
2024-03-14  6:21 ` Anup Patel
2024-03-14  6:59   ` Dawei Li
  -- strict thread matches above, loose matches on Subject: below --
2024-03-07 14:02 Anup Patel
2024-03-07 14:11 ` Anup Patel
2024-03-07 21:03   ` Thomas Gleixner
2024-03-08 11:11 ` Björn Töpel
2024-03-08 11:13   ` Björn Töpel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=343C92ABCFEE9906+ZfKPd/boCT8RAr3f@centos8 \
    --to=dawei.li@shingroup.cn \
    --cc=20240307140307.646078-1-apatel@ventanamicro.com \
    --cc=ajones@ventanamicro.com \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@atishpatra.org \
    --cc=bjorn@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=saravanak@google.com \
    --cc=sunilvl@ventanamicro.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®