From 0102c8c7fdfc4bd700971daff2b94470f4eafae4 Mon Sep 17 00:00:00 2001 From: Dapeng Mi Date: Thu, 17 Sep 2026 09:52:33 +0800 Subject: perf/x86/intel: Rename DMR offcore_rsp attribute to offmodule_rsp DMR introduces Offmodule Response events in place of the legacy Offcore Response events, but it still exposes the inherited offcore_rsp PMU attribute for programming the corresponding MSR data. Rename the DMR PMU attribute to offmodule_rsp so the sysfs interface matches the underlying event name and avoids user & tooling confusion. Signed-off-by: Dapeng Mi Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://patch.msgid.link/20260917015234.981153-12-dapeng1.mi@linux.intel.com --- arch/m68k/mac/baboon.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 arch/m68k/mac/baboon.c (limited to 'arch/m68k/mac/baboon.c') diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c new file mode 100644 index 000000000..5c97a7058 --- /dev/null +++ b/arch/m68k/mac/baboon.c @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Baboon Custom IC Management + * + * The Baboon custom IC controls the IDE, PCMCIA and media bay on the + * PowerBook 190. It multiplexes multiple interrupt sources onto the + * Nubus slot $C interrupt. + */ + +#include +#include +#include + +#include +#include +#include + +#include "mac.h" + +int baboon_present; +static volatile struct baboon *baboon; + +/* + * Baboon initialization. + */ + +void __init baboon_init(void) +{ + if (macintosh_config->ident != MAC_MODEL_PB190) { + baboon = NULL; + baboon_present = 0; + return; + } + + baboon = (struct baboon *) BABOON_BASE; + baboon_present = 1; + + pr_debug("Baboon detected at %p\n", baboon); +} + +/* + * Baboon interrupt handler. + * XXX how do you clear a pending IRQ? is it even necessary? + */ + +static void baboon_irq(struct irq_desc *desc) +{ + short events, irq_bit; + int irq_num; + + events = baboon->mb_ifr & 0x07; + irq_num = IRQ_BABOON_0; + irq_bit = 1; + do { + if (events & irq_bit) { + events &= ~irq_bit; + generic_handle_irq(irq_num); + } + ++irq_num; + irq_bit <<= 1; + } while (events); +} + +/* + * Register the Baboon interrupt dispatcher on nubus slot $C. + */ + +void __init baboon_register_interrupts(void) +{ + irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq); +} + +/* + * The means for masking individual Baboon interrupts remains a mystery. + * However, since we only use the IDE IRQ, we can just enable/disable all + * Baboon interrupts. If/when we handle more than one Baboon IRQ, we must + * either figure out how to mask them individually or else implement the + * same workaround that's used for NuBus slots (see nubus_disabled and + * via_nubus_irq_shutdown). + */ + +void baboon_irq_enable(int irq) +{ + mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C)); +} + +void baboon_irq_disable(int irq) +{ + mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C)); +} -- cgit v1.3.1