From: Jiang Liu <liuj97@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jiang Liu <jiang.liu@huawei.com>, Yinghai Lu <yinghai@kernel.org>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Yijing Wang <wangyijing@huawei.com>,
Keping Chen <chenkeping@huawei.com>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v1] PCI,IA64: free associated resources when removing host bridges
Date: Mon, 20 Aug 2012 23:43:54 +0800 [thread overview]
Message-ID: <50325B3A.9090007@gmail.com> (raw)
In-Reply-To: <CAErSpo4Ya4TXns664jXHqDSLfPGnE-v5GD0fTpjxU7q45WQ02w@mail.gmail.com>
On 08/16/2012 04:06 AM, Bjorn Helgaas wrote:
>> ---
>>
>> This patch applies to
>> git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/next-3.5
>
> x86 does the exact same thing in arch/x86/pci/acpi.c (some of the data
> structures are slightly different and ia64 does have the extra
> memory-mapped I/O port space regions, but they are essentially
> similar). Can you rework this a bit so it looks more like the x86
> code, e.g., use the same function names and code when possible?
>
> Someday the x86 and ia64 code should be converged, and if the code
> looks more similar, that's more likely to happen.
Hi Bjorn,
My original plan was to follow x86 implementation, but found there's
a race condition with current "pci_set_host_bridge_release()" design.
So the IA64 version is implemented in the way to fix the design flaw
related to pci_set_host_bridge_release(). I will send out another patches to
fix the design flaw and to enhance x86 version to follow IA64.
>> +static void shutdown_pci_controller(struct pci_host_bridge *bridge)
>> +{
>> + unsigned int i;
>> + struct resource *resource;
>> + struct iospace_resource *iospace;
>> + struct pci_controller *controller = bridge->release_data;
>> +
>> + if (!controller)
>> + return;
>
> I'd remove this test because controller will be NULL only if there's a
> programming error, and having the test here would cover up such
> errors.
Over defensive, will remove it.
Regards!
Gerry
prev parent reply other threads:[~2012-08-20 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 7:23 [PATCH v1] PCI,IA64: free associated resources when removing host bridges Jiang Liu
2012-08-15 20:06 ` Bjorn Helgaas
2012-08-20 15:43 ` Jiang Liu [this message]
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=50325B3A.9090007@gmail.com \
--to=liuj97@gmail.com \
--cc=bhelgaas@google.com \
--cc=chenkeping@huawei.com \
--cc=fenghua.yu@intel.com \
--cc=jiang.liu@huawei.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=wangyijing@huawei.com \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).