public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: Atish Patra <atishp@rivosinc.com>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Anup Patel <anup@brainfault.org>,
	Conor Dooley <conor.dooley@microchip.com>,
	Andrew Jones <ajones@ventanamicro.com>,
	Samuel Holland <samuel.holland@sifive.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: drivers/perf: riscv: BUG: using smp_processor_id() in preemptible
Date: Tue, 20 Aug 2024 09:49:25 +0200	[thread overview]
Message-ID: <20240820074925.ReMKUPP3@linutronix.de> (raw)

Hi,

I noticed the following issue on 6.11.0-rc4 with CONFIG_DEBUG_PREEMPT=y.

BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
caller is debug_smp_processor_id+0x1c/0x26
CPU: 2 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.11.0-rc4 #2
Hardware name: StarFive VisionFive 2 v1.3B (DT)
Call Trace:
    dump_backtrace+0x1c/0x24
    show_stack+0x2c/0x38
    dump_stack_lvl+0x5a/0x72
    dump_stack+0x14/0x1c
    check_preemption_disabled+0xb6/0xb8
    debug_smp_processor_id+0x1c/0x26
    pmu_sbi_device_probe+0x474/0x570
    platform_probe+0x52/0x96
    really_probe+0x82/0x202
    __driver_probe_device+0x5c/0xd0
    driver_probe_device+0x2c/0xb0
    __device_attach_driver+0x6e/0x8e
    bus_for_each_drv+0x64/0xb8
    __device_attach+0x82/0x144
    device_initial_probe+0xe/0x16
    bus_probe_device+0x86/0x88
    device_add+0x508/0x6ac
    platform_device_add+0xcc/0x1c8
    platform_device_register_full+0xee/0x142
    pmu_sbi_devinit+0xd4/0x11c
    do_one_initcall+0x58/0x19c
    kernel_init_freeable+0x210/0x27a
    kernel_init+0x1e/0x112
    ret_from_fork+0xe/0x1c

If you fix the issue, please add:
Reported-by: Nam Cao <namcao@linutronix.de>

Best regards,
Nam

                 reply	other threads:[~2024-08-20  7:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240820074925.ReMKUPP3@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=ajones@ventanamicro.com \
    --cc=anup@brainfault.org \
    --cc=atishp@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@rivosinc.com \
    --cc=samuel.holland@sifive.com \
    /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