diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-19 19:37:43 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-02 18:50:32 -0400 |
commit | 3142692a5e94a45a50abd78b4ae1c52f75eae41e (patch) | |
tree | 0de51cc301c64d24993803ba208dde61ae27c1d5 | |
parent | 5943cf4a59c831944474803223d5febec58deaad (diff) |
x86, calgary: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 5286a4a92cf7..35c461f21815 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -898,10 +898,9 @@ static void calioc2_dump_error_regs(struct iommu_table *tbl) | |||
898 | PHB_ROOT_COMPLEX_STATUS); | 898 | PHB_ROOT_COMPLEX_STATUS); |
899 | } | 899 | } |
900 | 900 | ||
901 | static void calgary_watchdog(unsigned long data) | 901 | static void calgary_watchdog(struct timer_list *t) |
902 | { | 902 | { |
903 | struct pci_dev *dev = (struct pci_dev *)data; | 903 | struct iommu_table *tbl = from_timer(tbl, t, watchdog_timer); |
904 | struct iommu_table *tbl = pci_iommu(dev->bus); | ||
905 | void __iomem *bbar = tbl->bbar; | 904 | void __iomem *bbar = tbl->bbar; |
906 | u32 val32; | 905 | u32 val32; |
907 | void __iomem *target; | 906 | void __iomem *target; |
@@ -1016,8 +1015,7 @@ static void __init calgary_enable_translation(struct pci_dev *dev) | |||
1016 | writel(cpu_to_be32(val32), target); | 1015 | writel(cpu_to_be32(val32), target); |
1017 | readl(target); /* flush */ | 1016 | readl(target); /* flush */ |
1018 | 1017 | ||
1019 | setup_timer(&tbl->watchdog_timer, &calgary_watchdog, | 1018 | timer_setup(&tbl->watchdog_timer, calgary_watchdog, 0); |
1020 | (unsigned long)dev); | ||
1021 | mod_timer(&tbl->watchdog_timer, jiffies); | 1019 | mod_timer(&tbl->watchdog_timer, jiffies); |
1022 | } | 1020 | } |
1023 | 1021 | ||