From nobody Thu Dec 07 00:24:41 2023 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 4Slw556whjz53FQZ; Thu, 7 Dec 2023 00:24:41 +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 4Slw556Mplz4Lpf; Thu, 7 Dec 2023 00:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701908681; 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=zDjvHvWTpLg7sZX3cUGVkPy1sGpXWfWx32om4LN2pi4=; b=E1Yhzzhqp0fdVnEhJkLIdgNKUP2YpVoN2vPZ5hwTQrohBwxNd6TRZU//IOUbblqzwQWB0n ujRLEod3zUBEp/gRJ9yOXyQFlg6rZ7VVs4vidJMLhQ/WovMgVnUNG9zlr2sHER9rYQmT4e TycOVXLeZnXn3BY4l8VanOeuSLBsj/+VxYKghMJdmhrODBZUzfwoLcp16j2/ji32R3MeVL dzOG5K5vwJSZ2k4VBJGdMfGJtzuadrFpzTtoIzJU1ql8QepvdPhDGIIV9Xx3mhw51EOaNz ip42zdoIdfkWX+AScL7uerXDSdDW0Ii5mP6xOnCbYZOmxe7G37jg3+TZj8Fj1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701908681; a=rsa-sha256; cv=none; b=QVOnpmKHcl6hVJZ1r3jOyro0yl5Ro+8rkZbkv7vJtTbP9Y4GKfqVTPJbAsE0kNpV61gwM/ +6DWub0k5sNhfDV7VlEMmRiycI6n86joymBUJSZC0QWy6BGSVmSigKrA0hNfM/fJKuIo7/ UlXFeB11j7FciYwNi03FQylUfs3RQ//uYdixaWS+Ld/A+nZUKpE2tMZ7P9gL0kc8QcEJoP Ml4r6U1T++uemElVxNztx5doy6YOXpGivQ6G6yXFflAzQzkUgQMRpN38qul8c3ygu4drMx PKGfDq4iOctGucymKFGH443IA8uPjrVEk6vdu0UeVgjOgWL1TyMuK/ZHoGa3MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701908681; 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=zDjvHvWTpLg7sZX3cUGVkPy1sGpXWfWx32om4LN2pi4=; b=uQug7P3/L8Sb/bDIrGTYaFnA3B5Ci3bltfAb3TzCagIkrDjbtTd23MSYJZT0dia57kpFsD kGEAN8ZfbBiGeVtCprUPCdrLI6Y67X4/8tNv5hTiAVLiNdvj038G7BhaZd8V9W9q1uJxln flwW8e9bkCqfMLjlcQfWQdT6HITaD6TwZQVUm6b7P89ZtNLZlU67xtw2gId4QYnaME71eI lsyjQuiSPzILqf+DQhcZ0XMVHqEwTTzqE30iBpVFwQ3UNQr+yP8ILREdI/ihYIVHneHBcN Ub+8wo2df2N9bdqbWzN8nijYKJGZ8y2/KcDLFVUMAw4fR3DnsHMH00TLmz8fPw== 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 4Slw555QdqzcV; Thu, 7 Dec 2023 00:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B70Of26022749; Thu, 7 Dec 2023 00:24:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B70Ofmx022746; Thu, 7 Dec 2023 00:24:41 GMT (envelope-from git) Date: Thu, 7 Dec 2023 00:24:41 GMT Message-Id: <202312070024.3B70Ofmx022746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 7fd0973775aa - stable/13 - busdma: emit a warning for use of filters 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7fd0973775aa9a293739afa0c5068f77ba88cb17 Auto-Submitted: auto-generated The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7fd0973775aa9a293739afa0c5068f77ba88cb17 commit 7fd0973775aa9a293739afa0c5068f77ba88cb17 Author: Mitchell Horne AuthorDate: 2023-12-04 15:46:48 +0000 Commit: Mitchell Horne CommitDate: 2023-12-07 00:22:19 +0000 busdma: emit a warning for use of filters Filter functions are deprecated, and unused in the tree. If either of the filter or filterarg arguments to bus_dma_tag_create() are non-NULL, print a warning. This is a direct commit to stable/13. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42897 --- sys/arm/arm/busdma_machdep.c | 4 ++++ sys/arm64/arm64/busdma_machdep.c | 4 ++++ sys/powerpc/powerpc/busdma_machdep.c | 4 ++++ sys/riscv/riscv/busdma_machdep.c | 4 ++++ sys/x86/x86/busdma_machdep.c | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index 747bf4e7b5bd..9a3378141207 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -474,6 +474,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, /* Return a NULL tag on failure */ *dmat = NULL; + /* Filters are deprecated, emit a warning. */ + if (filter != NULL || filterarg != NULL) + printf("Warning: use of filters is deprecated; see busdma(9)\n"); + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA, M_ZERO | M_NOWAIT); if (newtag == NULL) { diff --git a/sys/arm64/arm64/busdma_machdep.c b/sys/arm64/arm64/busdma_machdep.c index 44f186adb014..cd3864bf5d18 100644 --- a/sys/arm64/arm64/busdma_machdep.c +++ b/sys/arm64/arm64/busdma_machdep.c @@ -196,6 +196,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, struct bus_dma_tag_common *tc; int error; + /* Filters are deprecated, emit a warning. */ + if (filter != NULL || filterarg != NULL) + printf("Warning: use of filters is deprecated; see busdma(9)\n"); + if (parent == NULL) { error = bus_dma_bounce_impl.tag_create(parent, alignment, boundary, lowaddr, highaddr, filter, filterarg, maxsize, diff --git a/sys/powerpc/powerpc/busdma_machdep.c b/sys/powerpc/powerpc/busdma_machdep.c index 6b7463ad5aa0..710a90f1f1d8 100644 --- a/sys/powerpc/powerpc/busdma_machdep.c +++ b/sys/powerpc/powerpc/busdma_machdep.c @@ -239,6 +239,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, return (EINVAL); } + /* Filters are deprecated, emit a warning. */ + if (filter != NULL || filterarg != NULL) + printf("Warning: use of filters is deprecated; see busdma(9)\n"); + /* Return a NULL tag on failure */ *dmat = NULL; diff --git a/sys/riscv/riscv/busdma_machdep.c b/sys/riscv/riscv/busdma_machdep.c index 433f55f082a7..509a000d655d 100644 --- a/sys/riscv/riscv/busdma_machdep.c +++ b/sys/riscv/riscv/busdma_machdep.c @@ -197,6 +197,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, struct bus_dma_tag_common *tc; int error; + /* Filters are deprecated, emit a warning. */ + if (filter != NULL || filterarg != NULL) + printf("Warning: use of filters is deprecated; see busdma(9)\n"); + if (parent == NULL) { error = bus_dma_bounce_impl.tag_create(parent, alignment, boundary, lowaddr, highaddr, filter, filterarg, maxsize, diff --git a/sys/x86/x86/busdma_machdep.c b/sys/x86/x86/busdma_machdep.c index 62e57022acf8..36b1894b9615 100644 --- a/sys/x86/x86/busdma_machdep.c +++ b/sys/x86/x86/busdma_machdep.c @@ -219,6 +219,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, struct bus_dma_tag_common *tc; int error; + /* Filters are deprecated, emit a warning. */ + if (filter != NULL || filterarg != NULL) + printf("Warning: use of filters is deprecated; see busdma(9)\n"); + if (parent == NULL) { error = bus_dma_bounce_impl.tag_create(parent, alignment, boundary, lowaddr, highaddr, filter, filterarg, maxsize,