public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pciehp:  Handle interrupts that happen during initialization.
Date: Fri, 13 Feb 2009 20:06:49 -0800	[thread overview]
Message-ID: <m11vu1wtk6.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <200902131129.09523.jbarnes@virtuousgeek.org> (Jesse Barnes's message of "Fri\, 13 Feb 2009 11\:29\:08 -0800")

Jesse Barnes <jbarnes@virtuousgeek.org> writes:

> Any update here, Eric?  Sounds like you're using hotplug in real environments 
> with complex topologies (based on your earlier messages), so we're interested 
> in what you're seeing here...

Yes.

Currently I have a test system that is a subset of what I'm worried
about and will shortly have the real hardware, so my immediate goal is
to get things working well enough so my internal users won't get
blocked by bugs.  Currently I only have the pcie hotplug and pcie
hotplug surprise case.  My basic topology is 16 hotplug slots into
which I will be plugging in pci express switches with a couple of
additional hotplug slots.  As for the firmware, I will have it reserving
bus numbers and mmio space on each of the first 16 slots and the rest
is going to be up to the linux kernel.  This is an embedded design
so no ACPI is appears more pain than it is worth to implement.

I am also looking at the case of pcie switches with two upstream
ports, and switching which cpu they are connected to at runtime.  So
in some cases I will have devices whose presence is detected but will
not get link for hours or days, as opposed to the 20ms time limit in
the pci express specification.  Call it a necessary extension.

I need to revisit the pciehp driver but my first pass through it
looked like every corner case appeared to get something wrong. So I
have written myself a little 430 line replaces that handles the case
that I currently care about.  Part of what I was seeing before is that
we don't clear pending events in the pciehp driver before we enable
interrupts.  So if booting the system has left some pending and you
have CONFIG_DEBUG_SHIRQ enabled you get a nice oops because p_slot has
not been initialized and so the interrupts can't be handled.

My little driver is at least good enough to let me start looking at
other things.  I have just found yesterday that if you mmap a resource
in sysfs hot-remove doesn't complete.  Sysfs issues seem to be the
bane of my existence and I am currently working on a patch for that.

Currently the pcie port driver calls the remove methods of child
drivers twice if it removed (say because you have hot unplugged a
bridge).  Which is one of the truly nasty bugs I saw when I was trying
to bring up my test system, as things start access freed memory and
all kinds of silly things happen.

After I get the worst of the problems handled I intend to do a
thorough review and fix everything that I can see.

Eric

  reply	other threads:[~2009-02-14  4:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29  3:31 [PATCH] pciehp: Handle interrupts that happen during initialization Eric W. Biederman
2009-01-29  7:34 ` Kenji Kaneshige
2009-02-13 19:29   ` Jesse Barnes
2009-02-14  4:06     ` Eric W. Biederman [this message]
2009-02-14 12:53       ` Eric W. Biederman
2009-02-14 14:56         ` Eric W. Biederman
2009-02-16  8:02           ` Kenji Kaneshige
2009-02-17 23:17             ` Eric W. Biederman
2009-02-18  5:48               ` Kenji Kaneshige
2009-02-23 11:08                 ` Eric W. Biederman
2009-02-24 17:05                   ` Jesse Barnes
2009-02-24 17:08                   ` Jesse Barnes
2009-02-16  8:00       ` Kenji Kaneshige
2009-02-18  0:40         ` Eric W. Biederman
2009-02-18  7:12           ` Kenji Kaneshige
2009-02-18  8:47             ` Eric W. Biederman
2009-02-20  6:18               ` Kenji Kaneshige
2009-02-23 11:17               ` Eric W. Biederman
2009-02-24 17:38 ` Jesse Barnes

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=m11vu1wtk6.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox