From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Thomas Huth <thuth@linux.vnet.ibm.com>,
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH SLOF] pci-properties: Remove redundant call to device-type
Date: Wed, 11 Mar 2015 17:26:32 +1100 [thread overview]
Message-ID: <1426055192-28691-1-git-send-email-aik@ozlabs.ru> (raw)
At the moment SLOF adds a "device_type" property automatically for
every single PCI device based on its class even if there is no SLOF
driver for such a device. OF1275 says that "device_type" is for
implemented interfaces only. A side effect of this is virtio-balloon
getting device_type=="memory" while it should not have.
This removes automatic call to device-type from the common PCI code.
Since now, we rely on existing SLOF PCI drivers to call device-type if
needed. virtio-blk/net, e1000, ohci/ehci/xhci do this. virtio-scsi
does not create the property for itself but disks on its bus do.
virtio-ballon won't get the device_type property as there is no driver
for it.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
I'll wait for a couple of days and push it to github if nobody objects.
Ben suggested that the linux guest must not rely on device_type in the common
case.
---
slof/fs/pci-properties.fs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs
index a19c651..9efa87e 100644
--- a/slof/fs/pci-properties.fs
+++ b/slof/fs/pci-properties.fs
@@ -565,7 +565,7 @@
\ ***************************************************************************************
\ set up common properties for devices and bridges
: pci-common-props ( addr -- )
- dup pci-class-name 2dup device-name device-type
+ dup pci-class-name device-name
dup pci-vendor@ encode-int s" vendor-id" property
dup pci-device@ encode-int s" device-id" property
dup pci-revision@ encode-int s" revision-id" property
--
2.0.0
next reply other threads:[~2015-03-11 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 6:26 Alexey Kardashevskiy [this message]
2015-03-11 7:50 ` [PATCH SLOF] pci-properties: Remove redundant call to device-type Thomas Huth
2015-03-11 8:21 ` Benjamin Herrenschmidt
2015-03-11 8:30 ` Thomas Huth
2015-03-11 9:13 ` Alexey Kardashevskiy
2015-03-11 8:34 ` Nikunj A Dadhania
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=1426055192-28691-1-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nikunj@linux.vnet.ibm.com \
--cc=thuth@linux.vnet.ibm.com \
/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).