linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Hanjun Guo <guohanjun@huawei.com>,
	dann frazier <dann.frazier@canonical.com>,
	Fu Wei <wefu@redhat.com>, Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH 2/2] ACPI: irq: Prevent unregistering of GIC SGIs
Date: Wed, 21 Apr 2021 18:56:07 +0100	[thread overview]
Message-ID: <87tunzsers.wl-maz@kernel.org> (raw)
In-Reply-To: <20210421171516.hg3ex7jqigqjqa6i@bogus>

On Wed, 21 Apr 2021 18:15:16 +0100,
Sudeep Holla <sudeep.holla@arm.com> wrote:
> 
> On Wed, Apr 21, 2021 at 05:43:17PM +0100, Marc Zyngier wrote:
> > When using ACPI on arm64, which implies the GIC IRQ model, no
> > table should ever provide a GSI number in the range [0:15],
> > as these are reserved for IPIs.
> >
> > However, drivers tend to call acpi_unregister_gsi() with any
> > random GSI number provided by half baked tables, which results
> > in an exploding kernel when its IPIs have been unconfigured.
> >
> > In order to catch this, check for the silly case early, warn
> > that something is going wrong and avoid the above disaster.
> >
> 
> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> 
> Just curious if this is just precaution or do we have a platform doing
> something stupid like this ?

Without this, it could be really hard to pinpoint which driver messes
with IPIs. Having this in place would have caught the GTDT bug much
earlier (several years ago actually).

The only reason I managed to track it down in a short amount of time
is that the driver actually printed an error message before the kernel
exploded while probing a completely unrelated driver. Without this
message, I'd still be scratching my head.

The WARN_ON() would definitely point at the guilty party, and keep the
kernel running.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-21 17:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 16:43 [PATCH 0/2] arm64: ACPI GTDT watchdog fixes Marc Zyngier
2021-04-21 16:43 ` [PATCH 1/2] ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure Marc Zyngier
2021-04-21 17:14   ` Sudeep Holla
2021-04-21 17:20   ` Sudeep Holla
2021-04-21 17:57     ` Marc Zyngier
2021-04-21 16:43 ` [PATCH 2/2] ACPI: irq: Prevent unregistering of GIC SGIs Marc Zyngier
2021-04-21 17:15   ` Sudeep Holla
2021-04-21 17:56     ` Marc Zyngier [this message]
2021-04-21 18:09 ` [PATCH 0/2] arm64: ACPI GTDT watchdog fixes dann frazier
2021-04-22 13:42 ` Hanjun Guo
2021-04-22 14:23 ` Lorenzo Pieralisi
2021-04-23 13:43   ` Catalin Marinas
2021-04-23 17:11 ` Catalin Marinas

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=87tunzsers.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=dann.frazier@canonical.com \
    --cc=guohanjun@huawei.com \
    --cc=kernel-team@android.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    --cc=wefu@redhat.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;
as well as URLs for NNTP newsgroup(s).