Re: [patch 1/2] Intel IOMMU Suspend/Resume Support for DMAR

From: David Woodhouse
Date: Wed Mar 25 2009 - 19:47:39 EST


On Wed, 2009-03-25 at 21:12 +0100, Ingo Molnar wrote:
>
> > +static int iommu_resume(struct sys_device *dev)
> > +{
> > + struct dmar_drhd_unit *drhd;
> > + struct intel_iommu *iommu;
> > + unsigned long flag;
> > + int i = 0;
> > +
> > + if (init_iommu_hw())
> > + panic("IOMMU setup failed, DMAR can not start!\n");
>
> Please dont panic boxes ... insert a WARN() and return.

Well, the box is going to die anyway. If it was using the IOMMU before
suspend, and you fail to re-initialise the IOMMU after resume, then
you're buggered.

But if you panic() immediately during the resume, the message is
unlikely to make it out even to a serial console. If you print a warning
and limp on, I suppose there's at least a _chance_ that it might get
seen.

--
David Woodhouse Open Source Technology Centre
David.Woodhouse@xxxxxxxxx Intel Corporation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/