From nobody Fri Jun 10 14:07:38 2022 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 A2FB6836D71; Fri, 10 Jun 2022 14:07:38 +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 4LKN8B4C3Sz3P9P; Fri, 10 Jun 2022 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654870058; 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=FSNQb4DivQgzPZ2RUGgqZx3bUIp4YMHUqG50pQgyArs=; b=RMnzhuM4wfbw1GUwQlc7TSqyMhOei5AgYW/FKo9K+eQZyA8fWdV8q81KvhqLxWn8KntalZ JlGERLd0Cq3jCQ+3yH9EzSLAxu1qEXvEb/YIaWgiSSZ4ug77wXdimVon9fsB5y/aKyKe6d CA787PM69eoqGigb2IFEU9lpwVNMKiM8KRwuk3quKzDNcOKoNp5FPjCn/8wAacXsTzkC49 wfoZyopMAV1/TL6jc86a76HZNMBRAThx/l/r3ByuYs+moUgSILx+dYpYra7r2ziHPLmhnA oWskRUVR+eYZw6nIsnE/XwYxpTC1DCsE2qNJ54txxQleHpqQghS6HxOJA8Ma3Q== 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 7011019F37; Fri, 10 Jun 2022 14:07:38 +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 25AE7cMZ047836; Fri, 10 Jun 2022 14:07:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25AE7cx9047835; Fri, 10 Jun 2022 14:07:38 GMT (envelope-from git) Date: Fri, 10 Jun 2022 14:07:38 GMT Message-Id: <202206101407.25AE7cx9047835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0e981d79b19d - main - LinuxKPI: move pm_message_t from kernel.h to pm.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e981d79b19da8fc550ea0dbe46e8658be988db4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654870058; 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=FSNQb4DivQgzPZ2RUGgqZx3bUIp4YMHUqG50pQgyArs=; b=tV/QR3rX1HQ2/UopO0dcofwkNSpUbX9/zsge3RfAy1EhQZoFxVXYsRUwZR0+y2RbPl+2w3 LM+tPJUJaxZGSeC875gubXZ9e0w5hDNtxCRpiI3ZBsK8WK6c7iWEZAEW7n5rIug4VsxPMh G50O2UGBksG/rbxz+/aB1l+JZ0MZzYaa5qPPHRZXloXxNIKVMbPkputxI0CmzYrPIgZ6C4 vpI1eMBJyEHWPUape+FI1v6n+3mj2zfT3I0G+GMeshrRnvkGthGiH9R/SqqiCof2xUxQrq OqlntxmkkR+IeeOZZnS6WzZMA158N4vZcKQp9RtsNi4kJUzshbWA9/301v4vYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654870058; a=rsa-sha256; cv=none; b=mu2ZsfB6Ihik7paDWuNLCkUSJoIO3Z/SBiHrprlSsuufpwBZgn6PLrR8nrA4uKJqQwAHzM Gxw7ckGqswZlQAWYUH5UaelisTFVEJ3JpZLMyvchHuyKI/uInLS8zpsjA4Yz2+IV0fG1Xx 2ZF2MVigMG/DS5LCD+UeSoL+StBkhmfvntr15kOFvZ+7gQaFzb2K/obhoxOfWN2PyZAeZK +YW7aGYNgCFgy/o0VmMYqVLp70Rev+o64qe27nMn6n/xy6EB50UNCu/Dobu8EBMsAZoBPD eFQieopJ7xJ2gxLnjC3j7RJKixALqrFKrtQrCQo0Y2RYQ7X49RbASSOA8I9GNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0e981d79b19da8fc550ea0dbe46e8658be988db4 commit 0e981d79b19da8fc550ea0dbe46e8658be988db4 Author: Bjoern A. Zeeb AuthorDate: 2022-05-20 21:50:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-06-10 14:05:12 +0000 LinuxKPI: move pm_message_t from kernel.h to pm.h Move pm_message_t from kernel.h to pm.h and remove a private define in usb.h as well as adjust the implementation in linux_usb.c. This cleans up what I believe to be a historic shortcut and is needed for future wireless driver updates. Leave a note in UPDATING that drm-kmod users need to update to the latest version before re-compiling a new kernel to avoid errors (see PR). Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 264449 (drm-kmod port update, thanks wulf) Obtained from: bz_git_iwlwifi (Dec 2020) (partly) Reviewed by: hselasky, imp Differential Revision: https://reviews.freebsd.org/D35276 --- UPDATING | 4 ++++ sys/compat/linuxkpi/common/include/linux/kernel.h | 4 ---- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + sys/compat/linuxkpi/common/include/linux/pm.h | 4 ++++ sys/compat/linuxkpi/common/include/linux/usb.h | 3 ++- sys/compat/linuxkpi/common/src/linux_usb.c | 7 +++++-- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/UPDATING b/UPDATING index 2c4013a669b2..7d9f9aa05a64 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20220610: + LinuxKPI pm.h changes require an update to the latest drm-kmod version + before re-compiling to avoid errors. + 20211230: The macros provided for the manipulation of CPU sets (e.g. CPU_AND) have been modified to take 2 source arguments instead of only 1. diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 51f2ffe01e15..4987c582f0f3 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -597,10 +597,6 @@ extern bool linux_cpu_has_clflush; #define cpu_has_clflush linux_cpu_has_clflush #endif -typedef struct pm_message { - int event; -} pm_message_t; - /* Swap values of a and b */ #define swap(a, b) do { \ typeof(a) _swap_tmp = a; \ diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index d87cf51cf173..695965673050 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -59,6 +59,7 @@ #include #include #include +#include struct pci_device_id { uint32_t vendor; diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 6b8a7e768a8c..255c9bf0ea8b 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -33,6 +33,10 @@ #ifndef _LINUXKPI_LINUX_PM_H #define _LINUXKPI_LINUX_PM_H +typedef struct pm_message { + int event; +} pm_message_t; + #ifdef CONFIG_PM_SLEEP #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ diff --git a/sys/compat/linuxkpi/common/include/linux/usb.h b/sys/compat/linuxkpi/common/include/linux/usb.h index 032c1e53a015..3b7c8a2cde78 100644 --- a/sys/compat/linuxkpi/common/include/linux/usb.h +++ b/sys/compat/linuxkpi/common/include/linux/usb.h @@ -37,12 +37,13 @@ #include #include +#include + struct usb_device; struct usb_interface; struct usb_driver; struct urb; -typedef void *pm_message_t; typedef void (usb_complete_t)(struct urb *); #define USB_MAX_FULL_SPEED_ISOC_FRAMES (60 * 1) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index dd1cb5bed9c3..ed46acc4020f 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -339,11 +339,14 @@ usb_linux_suspend(device_t dev) { struct usb_linux_softc *sc = device_get_softc(dev); struct usb_driver *udrv = usb_linux_get_usb_driver(sc); + pm_message_t pm_msg; int err; err = 0; - if (udrv && udrv->suspend) - err = (udrv->suspend) (sc->sc_ui, 0); + if (udrv && udrv->suspend) { + pm_msg.event = 0; /* XXX */ + err = (udrv->suspend) (sc->sc_ui, pm_msg); + } return (-err); }