提交 3142692a 编写于 作者: K Kees Cook

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: NKees Cook <keescook@chromium.org>
上级 5943cf4a
...@@ -898,10 +898,9 @@ static void calioc2_dump_error_regs(struct iommu_table *tbl) ...@@ -898,10 +898,9 @@ static void calioc2_dump_error_regs(struct iommu_table *tbl)
PHB_ROOT_COMPLEX_STATUS); PHB_ROOT_COMPLEX_STATUS);
} }
static void calgary_watchdog(unsigned long data) static void calgary_watchdog(struct timer_list *t)
{ {
struct pci_dev *dev = (struct pci_dev *)data; struct iommu_table *tbl = from_timer(tbl, t, watchdog_timer);
struct iommu_table *tbl = pci_iommu(dev->bus);
void __iomem *bbar = tbl->bbar; void __iomem *bbar = tbl->bbar;
u32 val32; u32 val32;
void __iomem *target; void __iomem *target;
...@@ -1016,8 +1015,7 @@ static void __init calgary_enable_translation(struct pci_dev *dev) ...@@ -1016,8 +1015,7 @@ static void __init calgary_enable_translation(struct pci_dev *dev)
writel(cpu_to_be32(val32), target); writel(cpu_to_be32(val32), target);
readl(target); /* flush */ readl(target); /* flush */
setup_timer(&tbl->watchdog_timer, &calgary_watchdog, timer_setup(&tbl->watchdog_timer, calgary_watchdog, 0);
(unsigned long)dev);
mod_timer(&tbl->watchdog_timer, jiffies); mod_timer(&tbl->watchdog_timer, jiffies);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册