[hook] disable TCO for the hooked function

This commit is contained in:
Geoffrey McRae 2020-11-15 15:35:41 +11:00
parent d88aecfc00
commit 69ec73efd3
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="vendor-reset"
PACKAGE_VERSION="0.0.16"
PACKAGE_VERSION="0.0.17"
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
MAKE[0]="make KDIR=${kernel_source_dir}"
CLEAN="make KDIR=${kernel_source_dir} clean"

View File

@ -29,6 +29,8 @@ module_param(install_hook, bool, 0);
static bool hook_installed = false;
static int (*orig_pci_dev_specific_reset)(struct pci_dev *dev, int probe);
/* TCO breaks the hook, we must disable it for this function */
__attribute__((optimize("-fno-optimize-sibling-calls")))
static int hooked_pci_dev_specific_reset(struct pci_dev *dev, int probe)
{
int ret;