From nobody Mon Apr 08 19:04:26 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 4VCz6L49lvz5HYDT; Mon, 8 Apr 2024 19:04:26 +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 4VCz6L2mhsz4gHC; Mon, 8 Apr 2024 19:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712603066; 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=6N5FhMmeKp6SZ/oVeXButwxcwAtCzuOKJlxmOkrff44=; b=pvhSTJLU0Wqn2lq3B0Io5MzQhKCzDQwQkDk+tqtf+p55FHRXQ60VHLou4ATw7oyipLaeUB 5D6rdd8hWhHYB5ccyAXEzBL3dT9YDLsu0jw5X3DOoT88P7aRcvErNlkVS0ZvHcC47fONOA A4165a6+lvT/fKn0oPTtBP1K5rerXBwGDswwCt1AckWgev16DvwkTAtIT9PmJbw/b5p237 TirhnXjoAhIcR1YEAszOM3/+EM65K7F5sjJRTk+li1JhtJ8oGhV9d1Hf8Lk8dTOYZJA46H owHMQFdv7+WmfCHMyp+GN+NGXWyRWZTIV9AJERZLlNGyW3DzrUiAzgStqc1+aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712603066; a=rsa-sha256; cv=none; b=Tiu9Cs5TscaU3JUvjeGAG7j1J1eyQzZBPCYdzpxNCWnbGs+/dl0GTDVoQzFO4uibUCydPh BmXFnqZnlUZTx5C0UWpRfCd3HXBe3KxT097CDadtahqVSUPG9JSdGgUDP9iNaitN4tmj9D Mr9waoUod5sad9qkTCxOaZXRjYjaoxI2BHDzJpRarLXmcxy02Eo9dTb6mZWdTas1inOnWu x4+uqarVwNcbYkJZPvzguemLqBuuJ/R5EZ/ODfbSB0NSCTv5rKys/S2HKRaFdJEa0To4md 9ZbHnx0JiRLpgTCwjDrAXIUMZgekvrzN0UJnM+f7Ld2gA/8DUJkKMojmeSD71A== 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=1712603066; 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=6N5FhMmeKp6SZ/oVeXButwxcwAtCzuOKJlxmOkrff44=; b=rNe8rKW3tIduobRFTrLdpeJgI4cQtxFNVFf3UQhxrlkLsc0BT2XKMd6yrQM7V5yjAjRB6R O3NWdJp19dQmCGmqHnbM64lXELmAjvBv/slETABfClWXetYUbPnBjN4XiHX26D+IXCDQwC j0NhUSVOUzet5TYam/po3XVPW3Ps0MdcTCZySVDF3f7EVlXxxvwZ/89cIPAFBWWZr6UIan jccrYGmR5C7GtpUshL0vpduVtqCkPf8z4/JoQ9Hv7D2OA03DglJELmvAWlsXA2kFwkAZ8Y 24e8rAjBjdskt0soCxOyDv4k/qEtR3vq5IuJf5SQJNBXOR2VPSoxeT2grg4TDQ== 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 4VCz6L2KCkzNQC; Mon, 8 Apr 2024 19:04:26 +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 438J4QEP094118; Mon, 8 Apr 2024 19:04:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 438J4Q4a094115; Mon, 8 Apr 2024 19:04:26 GMT (envelope-from git) Date: Mon, 8 Apr 2024 19:04:26 GMT Message-Id: <202404081904.438J4Q4a094115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: cbc47b31cc66 - stable/14 - acpi: Use kobj typedefs for new-bus method prototypes 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cbc47b31cc66c73104ac8420c8428f2fd8be8d59 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc47b31cc66c73104ac8420c8428f2fd8be8d59 commit cbc47b31cc66c73104ac8420c8428f2fd8be8d59 Author: John Baldwin AuthorDate: 2024-02-09 18:27:44 +0000 Commit: John Baldwin CommitDate: 2024-04-08 17:51:56 +0000 acpi: Use kobj typedefs for new-bus method prototypes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43685 (cherry picked from commit 0e72b8d36562cb7ecf610dbd7357af830820e4b4) --- sys/dev/acpica/acpi.c | 80 ++++++++++++++++++++---------------------------- sys/dev/acpica/acpivar.h | 8 ++--- 2 files changed, 36 insertions(+), 52 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 61df797c7393..d6d1f825f63a 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -111,52 +111,46 @@ static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); -static int acpi_probe(device_t dev); -static int acpi_attach(device_t dev); -static int acpi_suspend(device_t dev); -static int acpi_resume(device_t dev); -static int acpi_shutdown(device_t dev); -static device_t acpi_add_child(device_t bus, u_int order, const char *name, - int unit); -static int acpi_print_child(device_t bus, device_t child); -static void acpi_probe_nomatch(device_t bus, device_t child); -static void acpi_driver_added(device_t dev, driver_t *driver); -static void acpi_child_deleted(device_t dev, device_t child); -static int acpi_read_ivar(device_t dev, device_t child, int index, - uintptr_t *result); -static int acpi_write_ivar(device_t dev, device_t child, int index, - uintptr_t value); -static struct resource_list *acpi_get_rlist(device_t dev, device_t child); + +static device_probe_t acpi_probe; +static device_attach_t acpi_attach; +static device_suspend_t acpi_suspend; +static device_resume_t acpi_resume; +static device_shutdown_t acpi_shutdown; + +static bus_add_child_t acpi_add_child; +static bus_print_child_t acpi_print_child; +static bus_probe_nomatch_t acpi_probe_nomatch; +static bus_driver_added_t acpi_driver_added; +static bus_child_deleted_t acpi_child_deleted; +static bus_read_ivar_t acpi_read_ivar; +static bus_write_ivar_t acpi_write_ivar; +static bus_get_resource_list_t acpi_get_rlist; +static bus_set_resource_t acpi_set_resource; +static bus_alloc_resource_t acpi_alloc_resource; +static bus_adjust_resource_t acpi_adjust_resource; +static bus_release_resource_t acpi_release_resource; +static bus_delete_resource_t acpi_delete_resource; +static bus_child_pnpinfo_t acpi_child_pnpinfo_method; +static bus_child_location_t acpi_child_location_method; +static bus_hint_device_unit_t acpi_hint_device_unit; +static bus_get_property_t acpi_bus_get_prop; +static bus_get_device_path_t acpi_get_device_path; + +static acpi_id_probe_t acpi_device_id_probe; +static acpi_evaluate_object_t acpi_device_eval_obj; +static acpi_get_property_t acpi_device_get_prop; +static acpi_scan_children_t acpi_device_scan_children; + +static isa_pnp_probe_t acpi_isa_pnp_probe; + static void acpi_reserve_resources(device_t dev); static int acpi_sysres_alloc(device_t dev); -static int acpi_set_resource(device_t dev, device_t child, int type, - int rid, rman_res_t start, rman_res_t count); -static struct resource *acpi_alloc_resource(device_t bus, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags); -static int acpi_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, rman_res_t start, rman_res_t end); -static int acpi_release_resource(device_t bus, device_t child, int type, - int rid, struct resource *r); -static void acpi_delete_resource(device_t bus, device_t child, int type, - int rid); static uint32_t acpi_isa_get_logicalid(device_t dev); static int acpi_isa_get_compatid(device_t dev, uint32_t *cids, int count); -static ssize_t acpi_bus_get_prop(device_t bus, device_t child, const char *propname, - void *propvalue, size_t size, device_property_type_t type); -static int acpi_device_id_probe(device_t bus, device_t dev, char **ids, char **match); -static ACPI_STATUS acpi_device_eval_obj(device_t bus, device_t dev, - ACPI_STRING pathname, ACPI_OBJECT_LIST *parameters, - ACPI_BUFFER *ret); -static ACPI_STATUS acpi_device_get_prop(device_t bus, device_t dev, - ACPI_STRING propname, const ACPI_OBJECT **value); static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level, void *context, void **retval); -static ACPI_STATUS acpi_device_scan_children(device_t bus, device_t dev, - int max_depth, acpi_scan_cb_t user_fn, void *arg); static ACPI_STATUS acpi_find_dsd(struct acpi_device *ad); -static int acpi_isa_pnp_probe(device_t bus, device_t child, - struct isa_pnp_id *ids); static void acpi_platform_osc(device_t dev); static void acpi_probe_children(device_t bus); static void acpi_probe_order(ACPI_HANDLE handle, int *order); @@ -181,15 +175,7 @@ static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_pm_func(u_long cmd, void *arg, ...); -static int acpi_child_location_method(device_t acdev, device_t child, - struct sbuf *sb); -static int acpi_child_pnpinfo_method(device_t acdev, device_t child, - struct sbuf *sb); -static int acpi_get_device_path(device_t bus, device_t child, - const char *locator, struct sbuf *sb); static void acpi_enable_pcie(void); -static void acpi_hint_device_unit(device_t acdev, device_t child, - const char *name, int *unitp); static void acpi_reset_interfaces(device_t dev); static device_method_t acpi_methods[] = { diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4d76a77cdbf8..bb969821b945 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -462,8 +462,7 @@ EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t); /* Device power control. */ ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable); ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state); -int acpi_device_pwr_for_sleep(device_t bus, device_t dev, - int *dstate); +acpi_pwr_for_sleep_t acpi_device_pwr_for_sleep; int acpi_set_powerstate(device_t child, int state); /* APM emulation */ @@ -578,9 +577,8 @@ int acpi_pxm_get_cpu_locality(int apic_id); * Returns the VM domain ID if found, or -1 if not found / invalid. */ int acpi_map_pxm_to_vm_domainid(int pxm); -int acpi_get_cpus(device_t dev, device_t child, enum cpu_sets op, - size_t setsize, cpuset_t *cpuset); -int acpi_get_domain(device_t dev, device_t child, int *domain); +bus_get_cpus_t acpi_get_cpus; +bus_get_domain_t acpi_get_domain; #ifdef __aarch64__ /*