All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	'iommu@lists.linux-foundation.org',
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Suspend and Resume Support for Intel IOMMU
Date: Wed, 18 Feb 2009 18:19:35 +0100	[thread overview]
Message-ID: <20090218171935.GA14625@elte.hu> (raw)
In-Reply-To: <alpine.LFD.2.00.0902180910160.21686@localhost.localdomain>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Wed, 18 Feb 2009, Fenghua Yu wrote:
> >
> > +static int vtd_enabled;
> ..
> > +static int iommu_resume(struct sys_device *dev)
> > +{
> ..
> > +	if (!vtd_enabled)
> > +		return 0;
> 
> Hmm. Why do this?
> 
> Wouldn't it be much more logical to only register the 
> iommu_sysdev if the thing is enabled, rather than having an 
> odd flag that gets tested at runtime?

The sysdev_class_register() could be done straight in 
intel_iommu_init(), because that gets called by pci_iommu_init() 
which is an fs_initcall() - so all the sysdev facilities should 
be up and running already.

	Ingo

  reply	other threads:[~2009-02-18 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 16:56 [PATCH] Suspend and Resume Support for Intel IOMMU Fenghua Yu
2009-02-18 17:12 ` Linus Torvalds
2009-02-18 17:19   ` Ingo Molnar [this message]
2009-02-18 17:28     ` Yu, Fenghua
2009-03-25 16:06       ` David Woodhouse
2009-02-18 17:44 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090218171935.GA14625@elte.hu \
    --to=mingo@elte.hu \
    --cc='iommu@lists.linux-foundation.org' \
    --cc=dwmw2@infradead.org \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.