From 61956e81d7b462879b86e66a2d25563b759009c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20=C3=81ngel=20Pastrana=20Padilla?= Date: Thu, 5 Aug 2021 20:06:05 +0200 Subject: [PATCH] ship ec_sys as a dkms module for debian --- README.md | 5 + debian/changelog | 6 + debian/control | 4 +- debian/isw.dkms | 1 + debian/isw.install | 2 +- debian/{postinst => isw.postinst} | 12 +- debian/isw.prerm | 38 +++++ debian/isw@.service | 1 + debian/rules | 30 ++-- dkms/Makefile | 38 +++++ dkms/dkms.conf | 21 +++ dkms/ec_sys/Makefile | 28 ++++ dkms/ec_sys/ec_sys.c | 144 ++++++++++++++++ dkms/ec_sys/internal.h | 268 ++++++++++++++++++++++++++++++ 14 files changed, 572 insertions(+), 26 deletions(-) create mode 100644 debian/isw.dkms rename debian/{postinst => isw.postinst} (93%) create mode 100644 debian/isw.prerm create mode 100644 debian/isw@.service create mode 100644 dkms/Makefile create mode 100644 dkms/dkms.conf create mode 100644 dkms/ec_sys/Makefile create mode 100644 dkms/ec_sys/ec_sys.c create mode 100644 dkms/ec_sys/internal.h diff --git a/README.md b/README.md index a6da1e1..fde07c1 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ ## How to install ### Package or not package ? - If you are using archlinux or a derivative you can install it from AUR: ```yay -S isw``` +- If you are using debian or a derivate: + - Clone ```git clone https://github.com/YoyPa/isw``` + - Install build tools for packaging ```apt install build-essential devscripts``` + - Build the package ```debuild -us -uc -b``` + - Install it ```apt install ../isw_*.deb``` - If you are on a different distro family: - Clone ```git clone https://github.com/YoyPa/isw``` - Then look at this PKGBUILD to know where to put files. diff --git a/debian/changelog b/debian/changelog index d6e5078..e5c1064 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +isw (1.10-2) unstable; urgency=medium + + * Ship ec_sys as a dkms module + + -- Jose Angel Pastrana Padilla Sun, 08 Aug 2021 10:45:29 +0200 + isw (1.10-1) unstable; urgency=medium * Release 1.10 diff --git a/debian/control b/debian/control index c73319c..4b84fe5 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,8 @@ Source: isw -Section: unknown +Section: admin Priority: optional Maintainer: Hayden Hughes -Build-Depends: debhelper-compat (= 12) +Build-Depends: debhelper-compat (= 13) Standards-Version: 4.4.0 Homepage: https://github.com/YoyPa/isw diff --git a/debian/isw.dkms b/debian/isw.dkms new file mode 100644 index 0000000..23dad36 --- /dev/null +++ b/debian/isw.dkms @@ -0,0 +1 @@ +dkms/dkms.conf diff --git a/debian/isw.install b/debian/isw.install index f65ec20..2f8d967 100644 --- a/debian/isw.install +++ b/debian/isw.install @@ -1,3 +1,3 @@ etc -usr/lib/systemd/system/isw@.service lib/systemd/system isw usr/bin +dkms/* usr/src/isw-${env:DEB_VERSION} diff --git a/debian/postinst b/debian/isw.postinst similarity index 93% rename from debian/postinst rename to debian/isw.postinst index c5f6210..9bce521 100644 --- a/debian/postinst +++ b/debian/isw.postinst @@ -17,10 +17,15 @@ set -e # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# case "$1" in configure) - modprobe ec_sys write_support=1 + rmmod ec_sys 2>/dev/null || true + modprobe -v ec_sys || true ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -32,9 +37,4 @@ case "$1" in ;; esac -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - exit 0 diff --git a/debian/isw.prerm b/debian/isw.prerm new file mode 100644 index 0000000..ca35655 --- /dev/null +++ b/debian/isw.prerm @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for isw +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +case "$1" in + remove|upgrade|deconfigure) + rmmod ec_sys 2>/dev/null || true + ;; + + failed-upgrade) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/isw@.service b/debian/isw@.service new file mode 100644 index 0000000..7146449 --- /dev/null +++ b/debian/isw@.service @@ -0,0 +1 @@ +usr/lib/systemd/system/isw@.service diff --git a/debian/rules b/debian/rules index e1c367c..3408972 100755 --- a/debian/rules +++ b/debian/rules @@ -1,25 +1,21 @@ #!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +#DH_VERBOSE = 1 +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk +export DEB_VERSION +# main packaging script based on dh7 syntax %: - dh $@ - + dh $@ --with dkms -# dh_make generated override targets -# This is example for Cmake (See https://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) +# put upstream version for dkms module +override_dh_dkms: + dh_dkms -V $(DEB_VERSION) +# do not start or enable it on install +override_dh_installsystemd: + dh_installsystemd --no-start --no-enable diff --git a/dkms/Makefile b/dkms/Makefile new file mode 100644 index 0000000..8fe1a37 --- /dev/null +++ b/dkms/Makefile @@ -0,0 +1,38 @@ +#!/usr/bin/make -f + +MODULES := ec_sys + +reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1)) +REVMODS := $(call reverse,$(MODULES)) + +all: $(MODULES) + +$(MODULES): + $(MAKE) -C "$@" + +CLEANMODS := $(addprefix clean-,$(MODULES)) +$(CLEANMODS): + $(MAKE) -C "$(subst clean-,,$@)" clean +clean: $(CLEANMODS) + +LOADMODS := $(addprefix load-,$(MODULES)) +$(LOADMODS): + $(MAKE) -C "$(subst load-,,$@)" load +load: $(LOADMODS) + +UNLOADMODS := $(addprefix unload-,$(REVMODS)) +$(UNLOADMODS): + $(MAKE) -C "$(subst unload-,,$@)" unload +unload: $(UNLOADMODS) + +INSTALLMODS := $(addprefix install-,$(MODULES)) +$(INSTALLMODS): + $(MAKE) -C "$(subst install-,,$@)" install +install: $(INSTALLMODS) + +UNINSTALLMODS := $(addprefix uninstall-,$(REVMODS)) +$(UNINSTALLMODS): + $(MAKE) -C "$(subst uninstall-,,$@)" uninstall +uninstall: $(UNINSTALLMODS) + +.PHONY: all clean $(MODULES) $(CLEANMODS) $(LOADMODS) $(UNLOADMODS) $(INSTALLMODS) $(UNINSTALLMODS) diff --git a/dkms/dkms.conf b/dkms/dkms.conf new file mode 100644 index 0000000..624c013 --- /dev/null +++ b/dkms/dkms.conf @@ -0,0 +1,21 @@ +PACKAGE_NAME="isw" +PACKAGE_VERSION="#MODULE_VERSION#" +MAKE[0]="make KVER=${kernelver} KDIR=${kernel_source_dir} -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" +CLEAN="make KVER=${kernelver} KDIR=${kernel_source_dir} -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" +BUILT_MODULE_NAME[0]="ec_sys" +BUILT_MODULE_LOCATION[0]="ec_sys/" +DEST_MODULE_LOCATION[0]="/extra" +AUTOINSTALL="yes" +REMAKE_INITRD="no" + +# Don't build module when ACPI is disabled +if ! grep -q "^CONFIG_ACPI=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then + echo "ACPI disabled in this kernel, not building module." >&2 + BUILD_EXCLUSIVE_ARCH="^do_not_build$" +fi + +# Don't build module when EC_DEBUGFS is already compiled +if grep -q "^CONFIG_ACPI_EC_DEBUGFS=[ym]$" "$kernel_source_dir/.config" 2>/dev/null ; then + echo "ACPI is present in this kernel, not building module." >&2 + BUILD_EXCLUSIVE_ARCH="^do_not_build$" +fi diff --git a/dkms/ec_sys/Makefile b/dkms/ec_sys/Makefile new file mode 100644 index 0000000..67e2603 --- /dev/null +++ b/dkms/ec_sys/Makefile @@ -0,0 +1,28 @@ +obj-m := ec_sys.o + +ifndef KVER +KVER := $(shell uname -r) +endif +ifndef KDIR +KDIR := /lib/modules/$(KVER)/build +endif + +PWD := $(shell pwd) + +default: + $(MAKE) -C $(KDIR) M=$(PWD) modules + +clean: + $(MAKE) -C $(KDIR) M=$(PWD) clean + +install: + $(MAKE) -C $(KDIR) M=$(PWD) modules_install + +uninstall: + $(MAKE) -C $(KDIR) M=$(PWD) modules_uninstall + +load: + insmod ec_sys.ko + +unload: + -rmmod ec_sys diff --git a/dkms/ec_sys/ec_sys.c b/dkms/ec_sys/ec_sys.c new file mode 100644 index 0000000..fd39c14 --- /dev/null +++ b/dkms/ec_sys/ec_sys.c @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * ec_sys.c + * + * Copyright (C) 2010 SUSE Products GmbH/Novell + * Author: + * Thomas Renninger + */ + +#include +#include +#include +#include +#include +#include "internal.h" + +MODULE_AUTHOR("Thomas Renninger "); +MODULE_DESCRIPTION("ACPI EC sysfs access driver"); +MODULE_LICENSE("GPL"); + +static bool write_support; +module_param(write_support, bool, 0644); +MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may " + "be needed."); + +#define EC_SPACE_SIZE 256 + +static struct dentry *acpi_ec_debugfs_dir; + +static ssize_t acpi_ec_read_io(struct file *f, char __user *buf, + size_t count, loff_t *off) +{ + /* Use this if support reading/writing multiple ECs exists in ec.c: + * struct acpi_ec *ec = ((struct seq_file *)f->private_data)->private; + */ + unsigned int size = EC_SPACE_SIZE; + loff_t init_off = *off; + int err = 0; + + if (*off >= size) + return 0; + if (*off + count >= size) { + size -= *off; + count = size; + } else + size = count; + + while (size) { + u8 byte_read; + err = ec_read(*off, &byte_read); + if (err) + return err; + if (put_user(byte_read, buf + *off - init_off)) { + if (*off - init_off) + return *off - init_off; /* partial read */ + return -EFAULT; + } + *off += 1; + size--; + } + return count; +} + +static ssize_t acpi_ec_write_io(struct file *f, const char __user *buf, + size_t count, loff_t *off) +{ + /* Use this if support reading/writing multiple ECs exists in ec.c: + * struct acpi_ec *ec = ((struct seq_file *)f->private_data)->private; + */ + + unsigned int size = count; + loff_t init_off = *off; + int err = 0; + + if (!write_support) + return -EINVAL; + + if (*off >= EC_SPACE_SIZE) + return 0; + if (*off + count >= EC_SPACE_SIZE) { + size = EC_SPACE_SIZE - *off; + count = size; + } + + while (size) { + u8 byte_write; + if (get_user(byte_write, buf + *off - init_off)) { + if (*off - init_off) + return *off - init_off; /* partial write */ + return -EFAULT; + } + err = ec_write(*off, byte_write); + if (err) + return err; + + *off += 1; + size--; + } + return count; +} + +static const struct file_operations acpi_ec_io_ops = { + .owner = THIS_MODULE, + .open = simple_open, + .read = acpi_ec_read_io, + .write = acpi_ec_write_io, + .llseek = default_llseek, +}; + +static void acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count) +{ + struct dentry *dev_dir; + char name[64]; + umode_t mode = 0400; + + if (ec_device_count == 0) + acpi_ec_debugfs_dir = debugfs_create_dir("ec", NULL); + + sprintf(name, "ec%u", ec_device_count); + dev_dir = debugfs_create_dir(name, acpi_ec_debugfs_dir); + + debugfs_create_x32("gpe", 0444, dev_dir, &first_ec->gpe); + debugfs_create_bool("use_global_lock", 0444, dev_dir, + &first_ec->global_lock); + + if (write_support) + mode = 0600; + debugfs_create_file("io", mode, dev_dir, ec, &acpi_ec_io_ops); +} + +static int __init acpi_ec_sys_init(void) +{ + if (first_ec) + acpi_ec_add_debugfs(first_ec, 0); + return 0; +} + +static void __exit acpi_ec_sys_exit(void) +{ + debugfs_remove_recursive(acpi_ec_debugfs_dir); +} + +module_init(acpi_ec_sys_init); +module_exit(acpi_ec_sys_exit); diff --git a/dkms/ec_sys/internal.h b/dkms/ec_sys/internal.h new file mode 100644 index 0000000..a958ad6 --- /dev/null +++ b/dkms/ec_sys/internal.h @@ -0,0 +1,268 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * acpi/internal.h + * For use by Linux/ACPI infrastructure, not drivers + * + * Copyright (c) 2009, Intel Corporation. + */ + +#ifndef _ACPI_INTERNAL_H_ +#define _ACPI_INTERNAL_H_ + +#include + +#define PREFIX "ACPI: " + +int early_acpi_osi_init(void); +int acpi_osi_init(void); +acpi_status acpi_os_initialize1(void); +int acpi_scan_init(void); +#ifdef CONFIG_PCI +void acpi_pci_root_init(void); +void acpi_pci_link_init(void); +#else +static inline void acpi_pci_root_init(void) {} +static inline void acpi_pci_link_init(void) {} +#endif +void acpi_processor_init(void); +void acpi_platform_init(void); +void acpi_pnp_init(void); +void acpi_int340x_thermal_init(void); +#ifdef CONFIG_ARM_AMBA +void acpi_amba_init(void); +#else +static inline void acpi_amba_init(void) {} +#endif +int acpi_sysfs_init(void); +void acpi_gpe_apply_masked_gpes(void); +void acpi_container_init(void); +void acpi_memory_hotplug_init(void); +#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC +void pci_ioapic_remove(struct acpi_pci_root *root); +int acpi_ioapic_remove(struct acpi_pci_root *root); +#else +static inline void pci_ioapic_remove(struct acpi_pci_root *root) { return; } +static inline int acpi_ioapic_remove(struct acpi_pci_root *root) { return 0; } +#endif +#ifdef CONFIG_ACPI_DOCK +void register_dock_dependent_device(struct acpi_device *adev, + acpi_handle dshandle); +int dock_notify(struct acpi_device *adev, u32 event); +void acpi_dock_add(struct acpi_device *adev); +#else +static inline void register_dock_dependent_device(struct acpi_device *adev, + acpi_handle dshandle) {} +static inline int dock_notify(struct acpi_device *adev, u32 event) { return -ENODEV; } +static inline void acpi_dock_add(struct acpi_device *adev) {} +#endif +#ifdef CONFIG_X86 +void acpi_cmos_rtc_init(void); +#else +static inline void acpi_cmos_rtc_init(void) {} +#endif +int acpi_rev_override_setup(char *str); + +void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, + const char *name); +int acpi_scan_add_handler_with_hotplug(struct acpi_scan_handler *handler, + const char *hotplug_profile_name); +void acpi_scan_hotplug_enabled(struct acpi_hotplug_profile *hotplug, bool val); + +#ifdef CONFIG_DEBUG_FS +extern struct dentry *acpi_debugfs_dir; +void acpi_debugfs_init(void); +#else +static inline void acpi_debugfs_init(void) { return; } +#endif +#ifdef CONFIG_PCI +void acpi_lpss_init(void); +#else +static inline void acpi_lpss_init(void) {} +#endif + +void acpi_apd_init(void); + +acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src); +bool acpi_queue_hotplug_work(struct work_struct *work); +void acpi_device_hotplug(struct acpi_device *adev, u32 src); +bool acpi_scan_is_offline(struct acpi_device *adev, bool uevent); + +acpi_status acpi_sysfs_table_handler(u32 event, void *table, void *context); +void acpi_scan_table_handler(u32 event, void *table, void *context); + +/* -------------------------------------------------------------------------- + Device Node Initialization / Removal + -------------------------------------------------------------------------- */ +#define ACPI_STA_DEFAULT (ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED | \ + ACPI_STA_DEVICE_UI | ACPI_STA_DEVICE_FUNCTIONING) + +extern struct list_head acpi_bus_id_list; + +#define ACPI_MAX_DEVICE_INSTANCES 4096 + +struct acpi_device_bus_id { + const char *bus_id; + struct ida instance_ida; + struct list_head node; +}; + +int acpi_device_add(struct acpi_device *device, + void (*release)(struct device *)); +void acpi_init_device_object(struct acpi_device *device, acpi_handle handle, + int type, unsigned long long sta); +int acpi_device_setup_files(struct acpi_device *dev); +void acpi_device_remove_files(struct acpi_device *dev); +void acpi_device_add_finalize(struct acpi_device *device); +void acpi_free_pnp_ids(struct acpi_device_pnp *pnp); +bool acpi_device_is_present(const struct acpi_device *adev); +bool acpi_device_is_battery(struct acpi_device *adev); +bool acpi_device_is_first_physical_node(struct acpi_device *adev, + const struct device *dev); +int acpi_bus_register_early_device(int type); + +/* -------------------------------------------------------------------------- + Device Matching and Notification + -------------------------------------------------------------------------- */ +struct acpi_device *acpi_companion_match(const struct device *dev); +int __acpi_device_uevent_modalias(struct acpi_device *adev, + struct kobj_uevent_env *env); + +/* -------------------------------------------------------------------------- + Power Resource + -------------------------------------------------------------------------- */ +int acpi_power_init(void); +void acpi_power_resources_list_free(struct list_head *list); +int acpi_extract_power_resources(union acpi_object *package, unsigned int start, + struct list_head *list); +int acpi_add_power_resource(acpi_handle handle); +void acpi_power_add_remove_device(struct acpi_device *adev, bool add); +int acpi_power_wakeup_list_init(struct list_head *list, int *system_level); +int acpi_device_sleep_wake(struct acpi_device *dev, + int enable, int sleep_state, int dev_state); +int acpi_power_get_inferred_state(struct acpi_device *device, int *state); +int acpi_power_on_resources(struct acpi_device *device, int state); +int acpi_power_transition(struct acpi_device *device, int state); + +/* -------------------------------------------------------------------------- + Device Power Management + -------------------------------------------------------------------------- */ +int acpi_device_get_power(struct acpi_device *device, int *state); +int acpi_wakeup_device_init(void); + +/* -------------------------------------------------------------------------- + Processor + -------------------------------------------------------------------------- */ +#ifdef CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC +void acpi_early_processor_set_pdc(void); +#else +static inline void acpi_early_processor_set_pdc(void) {} +#endif + +#ifdef CONFIG_X86 +void acpi_early_processor_osc(void); +#else +static inline void acpi_early_processor_osc(void) {} +#endif + +/* -------------------------------------------------------------------------- + Embedded Controller + -------------------------------------------------------------------------- */ +struct acpi_ec { + acpi_handle handle; + int gpe; + int irq; + unsigned long command_addr; + unsigned long data_addr; + bool global_lock; + unsigned long flags; + unsigned long reference_count; + struct mutex mutex; + wait_queue_head_t wait; + struct list_head list; + struct transaction *curr; + spinlock_t lock; + struct work_struct work; + unsigned long timestamp; + unsigned long nr_pending_queries; + bool busy_polling; + unsigned int polling_guard; +}; + +extern struct acpi_ec *first_ec; + +/* If we find an EC via the ECDT, we need to keep a ptr to its context */ +/* External interfaces use first EC only, so remember */ +typedef int (*acpi_ec_query_func) (void *data); + +void acpi_ec_init(void); +void acpi_ec_ecdt_probe(void); +void acpi_ec_dsdt_probe(void); +void acpi_ec_block_transactions(void); +void acpi_ec_unblock_transactions(void); +int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, + acpi_handle handle, acpi_ec_query_func func, + void *data); +void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); + +#ifdef CONFIG_PM_SLEEP +void acpi_ec_flush_work(void); +bool acpi_ec_dispatch_gpe(void); +#endif + + +/*-------------------------------------------------------------------------- + Suspend/Resume + -------------------------------------------------------------------------- */ +#ifdef CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT +extern bool acpi_s2idle_wakeup(void); +extern int acpi_sleep_init(void); +#else +static inline bool acpi_s2idle_wakeup(void) { return false; } +static inline int acpi_sleep_init(void) { return -ENXIO; } +#endif + +#ifdef CONFIG_ACPI_SLEEP +void acpi_sleep_proc_init(void); +int suspend_nvs_alloc(void); +void suspend_nvs_free(void); +int suspend_nvs_save(void); +void suspend_nvs_restore(void); +#else +static inline void acpi_sleep_proc_init(void) {} +static inline int suspend_nvs_alloc(void) { return 0; } +static inline void suspend_nvs_free(void) {} +static inline int suspend_nvs_save(void) { return 0; } +static inline void suspend_nvs_restore(void) {} +#endif + +/*-------------------------------------------------------------------------- + Device properties + -------------------------------------------------------------------------- */ +#define ACPI_DT_NAMESPACE_HID "PRP0001" + +void acpi_init_properties(struct acpi_device *adev); +void acpi_free_properties(struct acpi_device *adev); + +#ifdef CONFIG_X86 +void acpi_extract_apple_properties(struct acpi_device *adev); +#else +static inline void acpi_extract_apple_properties(struct acpi_device *adev) {} +#endif + +/*-------------------------------------------------------------------------- + Watchdog + -------------------------------------------------------------------------- */ + +#ifdef CONFIG_ACPI_WATCHDOG +void acpi_watchdog_init(void); +#else +static inline void acpi_watchdog_init(void) {} +#endif + +#ifdef CONFIG_ACPI_LPIT +void acpi_init_lpit(void); +#else +static inline void acpi_init_lpit(void) { } +#endif + +#endif /* _ACPI_INTERNAL_H_ */