From nobody Wed Nov 27 23:48:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XzGNY1p6pz5fy6N; Wed, 27 Nov 2024 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XzGNY1HcQz4dkj; Wed, 27 Nov 2024 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732751309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fw+Ejr+pJnxoYGt5HcZq8y7vfJc9IXI8x0Mw0VG4/rU=; b=Ij4R1qmAoPe9jjCc/Wfn0qt1iQFSGL9i7AtY6cCokc0SQasFcUiz4rbYqva3T2nxIu8X7V gD0SsymxoWSr47FRlE975RvaLW2OdA4p2zuLSUVxnJ8+1hwfMP0hLA5r96v/4IhpjBFNL7 8gz4O7besiGJAiuWs+fe4jJlLK1QU6skB0k2aFrafVyF4yLm3ox5hPYj5BBkwFxaKlaRuK DHwsF+6tC4cLDf4wW1AHJE5UTE0e3JwoUgyzTScF4OuwzYne1mPzLqxB8iY92nTpiFjnqE mpKbBSQ1t5hwCQmOMfJxikkxNnxrP7ZS36MS3aAI2NKSkcKS3ksi5ObUnSMGLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732751309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fw+Ejr+pJnxoYGt5HcZq8y7vfJc9IXI8x0Mw0VG4/rU=; b=lDSkYBVk/dMmjOosxxEOCgM/Ve8GmbBDdKeS8/4MTPZiwwrx0dCYB3oYWwUm8+zalEa6/g tAFcbh0p2SQFufMV639JcxAuGUKoXxFLIZJyMmxQSpKlyrzS6erTVkmNWZuecc4I9gUZWZ NQ91EU7Y2fQrIFTu2G+29z6lsXHe7uFNYr6OpFAGsiZGsSL18cAcASV6gwouitWnWkEuSE uPlSCJKkSR1k+X60suv2YCpm1C4BHAYrFrw1MMwoEUBJt0YuKwvwWPzDnX9eJ2yaOH8T/1 j1nSrOGsP5/kTkzEbby0HK3SY5CjXc1Hwu8YjqB745FVegqw4qa8Yy94icjY5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732751309; a=rsa-sha256; cv=none; b=a9SzLBo4RCeIocUXSOBZSHKKG7USWEvTCXFc38HVS6Dae8oFfE2jt6iPeRuu6URkM2OuyE GPyde3Yp827EDWxNriJmQkjspKxrIa5gNhcEdbtfpcygvAYFWIc/Txu+mgKIElKAtkYoLs 5SqEvsgrROj5Z8pg2REPy4AhkyocyvMV8AQU6zmKndD4sbVZ1rQlVOzSKYX1c/7TDBu/kf k8qFpzCSVXijtKeu9pp2cSgmrQrcSTOKxwdGAKcmxNmVVqLzyB2rHyVGzrVtBziEDMNrL0 dfMR1lwcpSr5+ogePYgJphE5C1fKrDqDPsfghSLtI8dg3oQLiP+VUcYpmHp6aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XzGNY0ttjzFMJ; Wed, 27 Nov 2024 23:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ARNmTcx076040; Wed, 27 Nov 2024 23:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ARNmTZY076037; Wed, 27 Nov 2024 23:48:29 GMT (envelope-from git) Date: Wed, 27 Nov 2024 23:48:29 GMT Message-Id: <202411272348.4ARNmTZY076037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 700f7e793b37 - main - powerpc: Get rid of interrupt subterfuge for IPIs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 700f7e793b3793606fbb9942eda03ac02991c126 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=700f7e793b3793606fbb9942eda03ac02991c126 commit 700f7e793b3793606fbb9942eda03ac02991c126 Author: Justin Hibbits AuthorDate: 2024-11-27 14:13:57 +0000 Commit: Justin Hibbits CommitDate: 2024-11-27 23:36:49 +0000 powerpc: Get rid of interrupt subterfuge for IPIs Instead of playing games with the interrupt event structure after the fact when setting up IPIs, do the work in the interrupt initializer. --- sys/powerpc/powerpc/intr_machdep.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index 9d361c73a240..e0eb06129dd1 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -147,6 +147,10 @@ device_t root_pic; static void *ipi_cookie; #endif +static int powerpc_setup_intr_int(const char *name, u_int irq, driver_filter_t + filter, driver_intr_t handler, void *arg, enum intr_type flags, void + **cookiep, int domain, bool ipi); + static void intrcnt_setname(const char *name, int index) { @@ -464,24 +468,15 @@ powerpc_enable_intr(void) KASSERT(piclist[n].ipis != 0, ("%s: SMP root PIC does not supply any IPIs", __func__)); - error = powerpc_setup_intr("IPI", + error = powerpc_setup_intr_int("IPI", MAP_IRQ(piclist[n].node, piclist[n].irqs), powerpc_ipi_handler, NULL, NULL, INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie, - 0 /* domain XXX */); + 0 /* domain XXX */, true); if (error) { printf("unable to setup IPI handler\n"); return (error); } - - /* - * Some subterfuge: disable late EOI and mark this - * as an IPI to the dispatch layer. - */ - i = intr_lookup(MAP_IRQ(piclist[n].node, - piclist[n].irqs)); - i->event->ie_post_filter = NULL; - i->ipi = 1; } } #endif @@ -514,6 +509,17 @@ powerpc_setup_intr(const char *name, u_int irq, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, int domain) { + + return (powerpc_setup_intr_int(name, irq, filter, handler, arg, flags, + cookiep, domain, false)); +} + + +static int +powerpc_setup_intr_int(const char *name, u_int irq, driver_filter_t filter, + driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep, + int domain, bool ipi) +{ struct powerpc_intr *i; int error, enable = 0; @@ -524,12 +530,14 @@ powerpc_setup_intr(const char *name, u_int irq, driver_filter_t filter, if (i->event == NULL) { error = intr_event_create(&i->event, (void *)i, 0, irq, powerpc_intr_pre_ithread, powerpc_intr_post_ithread, - powerpc_intr_eoi, powerpc_assign_intr_cpu, "irq%u:", irq); + (ipi ? NULL : powerpc_intr_eoi), powerpc_assign_intr_cpu, + "irq%u:", irq); if (error) return (error); enable = 1; } + i->ipi = ipi; error = intr_event_add_handler(i->event, name, filter, handler, arg, intr_priority(flags), flags, cookiep);