Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2023 22:42:44 -0500
From:      Kyle Evans <kevans@FreeBSD.org>
To:        "freebsd-arm@FreeBSD.org" <freebsd-arm@FreeBSD.org>
Cc:        freebsd-riscv@FreeBSD.org
Subject:   [RFC] INTRNG support for FIQs
Message-ID:  <0250e15b-6703-ecaf-0f54-4e48317af5b0@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hi,

As part of the efforts for supporting Apple Silicon hardware, we need to 
be able to route FIQs to our root interrupt controller. The initial 
patch we had for this just added an `intr_pic_claim_fiq` that was 
specific to aarch64, and effectively mirrored intr_pic_claim_root() 
except recording the root filter/arg off separately. It also enforced 
that the device handling FIQs is the same that claimed root status.

The second iteration patch can again be found here: 
https://reviews.freebsd.org/D40161 -- there's a small set of unrelated 
changes specific to aarch64 that will get split out, but I'd like to 
solicit feedback on the larger INTRNG part of this.

This second version instead adds a uint32_t mask of types that can be 
handled by the root controller. It adds an additional KPI to break that 
out, and makes the existing `intr_pic_claim_root` call the new KPI with 
the one reserved (highest) bit that indicates a normal IRQ to preserve 
source-level compatibility to some extent. `intr_irq_handler` received 
identical treatment. The high bit was chosen for the reserved type 
global to all platforms so that platform-specific additions have a 
harder time getting it wrong -- they just start at the low bit and work 
their way up.

The main problem I think it causes is that `intr_irq_filter_t` is no 
longer compatible with `driver_filter_t` and they can't be used 
interchangeably anymore, but I don't really see a way to avoid that. I'm 
also not sure how much we care.

Any feedback would be appreciated; I'd really like to be able to push
Apple support further in-tree over the coming months.

Thanks,

Kyle Evans



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0250e15b-6703-ecaf-0f54-4e48317af5b0>