From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ashok Raj <ashok.raj@intel.com>,
greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add hook for PCI resource deallocation
Date: Fri, 01 Oct 2004 11:11:36 +0900 [thread overview]
Message-ID: <415CBCD8.4040206@jp.fujitsu.com> (raw)
In-Reply-To: <20040930160318.3cebcb89.akpm@osdl.org>
Andrew Morton wrote:
> Ashok Raj <ashok.raj@intel.com> wrote:
>>
>> On Thu, Sep 30, 2004 at 02:50:14PM -0700, Andrew Morton wrote:
>> > Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> wrote:
>> > >
>> > > I'm attaching updated patches for adding pcibiod_disable_device()
>> > > hook based on the feedback from Ashok (Thank you, Ashok!).
>> >
>> > This appears to be a patch-reversed version of the patch which is already
>> > in -mm:
>> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc2/2.6.9-rc2-mm4/broken-out/add-hook-for-pci-resource-deallocation.patch
>> >
>> > So I'm not sure what you're trying to do here.
>>
>>
>> In the original patch, Kenji added a dummy function in several source files. Instead now
>> the new patch should have a single default implementation with a __attribute__((weak))
>>
>> As a result its removing all the old additions and now keeping just a single default function.
>
> Oh. You may as well send a (chagelogged, signed off) new patch against
> current -linus in that case.
>
I'm sorry about that.
Please use the following patch.
Thanks,
Kenji Kaneshige
Name: add_pcibios_disable_device_hook.patch
Kernel Version: 2.6.9-rc2-mm1
Depends: none
Change Log:
- Chaged to use __attrubute__ ((weak)) instead of modifying all
arch specific code.
Description:
This patch adds a hook 'pcibios_disable_device()' into
pci_disable_device() to call architecture specific PCI resource
deallocation code. It's a opposite part of pcibios_enable_device().
We need this hook to deallocate architecture specific PCI resource
such as IRQ resource, etc.. This patch is just for adding the hook, so
'pcibios_disable_device()' is defined as a null function on all
architecture so far.
I tested this patch on i386, x86_64 and ia64. But it has not been
tested on other architectures because I don't have these machines.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
---
linux-2.6.9-rc2-mm1-kanesige/drivers/pci/pci.c | 12 ++++++++++++
1 files changed, 12 insertions(+)
diff -puN drivers/pci/pci.c~add_pcibios_disable_device_hook drivers/pci/pci.c
--- linux-2.6.9-rc2-mm1/drivers/pci/pci.c~add_pcibios_disable_device_hook 2004-09-27 11:10:54.000000000 +0900
+++ linux-2.6.9-rc2-mm1-kanesige/drivers/pci/pci.c 2004-09-27 16:24:43.944414436 +0900
@@ -392,6 +392,16 @@ pci_enable_device(struct pci_dev *dev)
}
/**
+ * pcibios_disable_device - disable arch specific PCI resources for device dev
+ * @dev: the PCI device to disable
+ *
+ * Disables architecture specific PCI resources for the device. This
+ * is the default implementation. Architecture implementations can
+ * override this.
+ */
+void __attribute__ ((weak)) pcibios_disable_device (struct pci_dev *dev) {}
+
+/**
* pci_disable_device - Disable PCI device after use
* @dev: PCI device to be disabled
*
@@ -411,6 +421,8 @@ pci_disable_device(struct pci_dev *dev)
pci_command &= ~PCI_COMMAND_MASTER;
pci_write_config_word(dev, PCI_COMMAND, pci_command);
}
+
+ pcibios_disable_device(dev);
}
/**
_
prev parent reply other threads:[~2004-10-01 2:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 12:54 [PATCH] add hook for PCI resource deallocation Kenji Kaneshige
2004-09-17 21:49 ` Greg KH
2004-09-21 1:35 ` Kenji Kaneshige
2004-09-24 0:49 ` Kenji Kaneshige
2004-09-24 20:02 ` Ashok Raj
2004-09-24 21:22 ` Greg KH
2004-09-27 8:06 ` Kenji Kaneshige
2004-09-28 22:00 ` Greg KH
2004-09-29 0:55 ` Kenji Kaneshige
2004-09-30 21:50 ` Andrew Morton
2004-09-30 22:21 ` Ashok Raj
2004-09-30 23:03 ` Andrew Morton
2004-10-01 2:11 ` Kenji Kaneshige [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=415CBCD8.4040206@jp.fujitsu.com \
--to=kaneshige.kenji@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=ashok.raj@intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@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 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.