From nobody Fri Apr 14 14:01:03 2023 X-Original-To: dev-commits-src-main@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 4PydQR5FP9z45JSn; Fri, 14 Apr 2023 14:01:03 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PydQR2Bv3z3KHS; Fri, 14 Apr 2023 14:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681480863; 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=90+N+TfD5R1yf7QQ7wqrkkF9yitWb5XkhwhrfhmgdMk=; b=SGBTi2g5VWjt0P2lZI64iUYaPzMF3+wCcmKQJmKOio20IWqt3Ry+L2aFQzzNZ9AP/plWt5 djb5/OCUF/waX5N6Kv10vQJuORbxC3/Aym/P03ZfTVYpbQ2d2leBkDRNMwgY/FaSr2csIH L7L3eldbm3vA/8nqEXqvmImPUL4V/9cjcEkHSjLBU5qvZxBBnfKsEuinJerptdd3iM0Co/ zI0gfnKKex6jN1qIHUNrgnd9KSlbSWE+Svg+IoMa6CBNx3MtVHxrcWURuYSHJcdQw3d1wB 0u1LweI2Ca6/+3E5CvuSMcdRafW5uD4scMsNjOMeCh2OYintpdsNxAAs9m0VkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681480863; 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=90+N+TfD5R1yf7QQ7wqrkkF9yitWb5XkhwhrfhmgdMk=; b=I1I9vi/D4tKkquWBYLyQLq3YlXoVorRmjl65hTuu3NksTNyI4hwfZ96GG44Gqug38ZZB7B 1eNvqtB6iGMf2dG5czc/pSeKIjw5aT9t8uvR5ffZdx6zvNkvb23eSxEu0eB01rKeoIrWkf jl/cGah/Xy3/lVNq4JRarfI6aNs2neN6zexTRMju4OsKuCjsdp5B8RDJXiRxMs/oXryONT I5l2L/6Cyv1VqYCsFgAuo7bj6ASpv88uWRfuVFBfczDLKpljtIPwJNHDhOZNX19er9tDjC 2hmRRrVN2+yOQ6+W8y/CUwO9zn1093WVktQcQEiwKNvJczDQxnk6apD94LToJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681480863; a=rsa-sha256; cv=none; b=x37aLL2fczntZlS2j7vXOVIJcz7mp5/Np7c6Q98N1CWrxHUR5dvzqJ8eilxFJmeD9bC67f RLqDpQPlqsfbWfuuWgvIhpaR1Q84boBGl0Obc15/XNQL3y/1E69QX+QzmKOXc6Pfv82CyA CyhzK5dPbDhBtPjnUr8h2fmU+cJXZA9It2LTE5XpR6shtjKYs0NKTgcOM0CHcFyvCweRWy 7R3pB4SbC20troW1fPGg/KiajlsOH9SO9KKwUvSBeupknhfEaium98dfMy2A3/FoDfm8jE udHZLZo/IUa41uveSIhHHFQZpYbIxuuvfqtrZR4AReY+KOGwuB9IKVOh2OjLTw== 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 4PydQR1HQyzQcP; Fri, 14 Apr 2023 14:01:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33EE1327083976; Fri, 14 Apr 2023 14:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33EE13GK083958; Fri, 14 Apr 2023 14:01:03 GMT (envelope-from git) Date: Fri, 14 Apr 2023 14:01:03 GMT Message-Id: <202304141401.33EE13GK083958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Roger=20Pau=20Monn=C3=A9?= Subject: git: 373301019f16 - main - xen/intr: remove type argument from xen_intr_alloc_isrc() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 373301019f16cbd7be7c92df3f62184e96815b63 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=373301019f16cbd7be7c92df3f62184e96815b63 commit 373301019f16cbd7be7c92df3f62184e96815b63 Author: Elliott Mitchell AuthorDate: 2021-07-02 15:07:58 +0000 Commit: Roger Pau Monné CommitDate: 2023-04-14 13:58:55 +0000 xen/intr: remove type argument from xen_intr_alloc_isrc() This value doesn't need to be set in xen_intr_alloc_isrc(). What is needed is simply to ensure the allocated xenisrc won't appear as free, even if xi_type is written non-atomically. Since the type is no longer used to indicate free or not, the calling function should take care of all non-architecture initialization. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D31188 --- sys/x86/xen/xen_intr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index fe4a4b0f4dce..ec5b8b4c6c9b 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -260,7 +260,7 @@ evtchn_cpu_unmask_port(u_int cpu, evtchn_port_t port) * object or NULL. */ static struct xenisrc * -xen_intr_alloc_isrc(enum evtchn_type type) +xen_intr_alloc_isrc(void) { static int warned; struct xenisrc *isrc; @@ -279,7 +279,6 @@ xen_intr_alloc_isrc(enum evtchn_type type) KASSERT(isrc->xi_arch.intsrc.is_handlers == 0, ("Free evtchn still has handlers")); - isrc->xi_type = type; return (isrc); } @@ -302,7 +301,6 @@ xen_intr_alloc_isrc(enum evtchn_type type) isrc = malloc(sizeof(*isrc), M_XENINTR, M_WAITOK | M_ZERO); isrc->xi_arch.intsrc.is_pic = &xen_intr_pic; isrc->xi_arch.vector = vector; - isrc->xi_type = type; error = intr_register_source(&isrc->xi_arch.intsrc); if (error != 0) panic("%s(): failed registering interrupt %u, error=%d\n", @@ -394,11 +392,12 @@ xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port, } *port_handlep = NULL; - isrc = xen_intr_alloc_isrc(type); + isrc = xen_intr_alloc_isrc(); if (isrc == NULL) return (ENOSPC); isrc->xi_cookie = NULL; + isrc->xi_type = type; isrc->xi_port = local_port; isrc->xi_close = false; isrc->xi_cpu = 0;