Skip to contentSkip to conversation

x86: Add PCI IDs for AMD Barcelona PCI devices

PATCH In review Robert Richter 5 participants 8 messages Jun 27, 2008 – Jul 14, 2008 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Add PCI IDs for AMD Barcelona PCI devices

---
 include/linux/pci_ids.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/pci_ids.h +5 -0
index eafc9d6..4a2557c 100644
@@ -497,6 +497,11 @@
 #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP	0x1101
 #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL	0x1102
 #define PCI_DEVICE_ID_AMD_K8_NB_MISC	0x1103
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
 #define PCI_DEVICE_ID_AMD_SCSI		0x2020
Signature · 1 line
1.5.5.4
#1 lore raw
Quoted 10 lines · Robert Richter
---
 include/linux/pci_ids.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/pci_ids.h +0 -0
index eafc9d6..4a2557c 100644

include/linux/pci_ids.h line 506

Quoted 10 lines
include/linux/pci_ids.h +5 -0
@@ -497,6 +497,11 @@
 #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP	0x1101
 #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL	0x1102
 #define PCI_DEVICE_ID_AMD_K8_NB_MISC	0x1103
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001

Are these constants going to be used in future kernels?

We don't necessarily want to create constants for each PCI ID in existence. A more comprehensive database is kept at http://pciids.sourceforge.net/

Jeff

#2 lore raw
Quoted 11 lines · Jeff Garzik

include/linux/pci_ids.h line 506

Quoted 7 lines · Robert Richter
include/linux/pci_ids.h +5 -0
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001

Are these constants going to be used in future kernels?

Quoted 2 lines

We don't necessarily want to create constants for each PCI ID in existence.
A more comprehensive database is kept at http://pciids.sourceforge.net/

All constants will be used. There are already hardcoded values that will be replaced in follow on patches.

-Robert

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#3 lore raw
In reply to Robert Richter

Ingo, what about this patch. Could you apply it somewhere to the tip tree? I will then fix all hardcoded device entries in the code.

Thanks,

-Robert

Quoted 28 lines · Robert Richter
---
 include/linux/pci_ids.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/pci_ids.h +5 -0
index eafc9d6..4a2557c 100644
@@ -497,6 +497,11 @@
 #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP	0x1101
 #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL	0x1102
 #define PCI_DEVICE_ID_AMD_K8_NB_MISC	0x1103
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
 #define PCI_DEVICE_ID_AMD_SCSI		0x2020
Signature · 6 lines
1.5.5.4

_______________________________________________
osrc-patches mailing list
[email protected]
https://ddcwww.amd.com/mailman/listinfo/osrc-patches
Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#4 lore raw
Quoted 2 lines · Robert Richter

Ingo, what about this patch. Could you apply it somewhere to the tip tree? I will then fix all hardcoded device entries in the code.

i suspect we could do it if the include/linux/pci_ids.h modification is fine with Jesse - it appears the maintenance policy right now is for everyone to add to include/linux/pci_ids.h on an as-needed basis:

$ git-log-line linus..linux-next include/linux/pci_ids.h

# 1126de5: Merge commit 'mmc/next'
# bd3b052: Merge commit 'galak/powerpc-next'
# edf0e24: powerpc/85xx: Add support for MPC8536DS
# 34f80b0: bnx2x: Add support for BCM57711 HW
# d3bca0e: sdhci: support JMicron secondary interface
# 4ae127d: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ # da65b53e4: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ # da57e6983: tg3: Add 5785 ASIC revision

Which would normally go fine and not create conflicts because the modifications are distributed randomly over that file.

I'd suggest for you to send it together with the clean up patches, so that the context is clear.

Ingo

Quoted 34 lines · Robert Richter
Quoted 28 lines
---
 include/linux/pci_ids.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/pci_ids.h +5 -0
index eafc9d6..4a2557c 100644
@@ -497,6 +497,11 @@
 #define PCI_DEVICE_ID_AMD_K8_NB_ADDRMAP	0x1101
 #define PCI_DEVICE_ID_AMD_K8_NB_MEMCTL	0x1102
 #define PCI_DEVICE_ID_AMD_K8_NB_MISC	0x1103
+#define PCI_DEVICE_ID_AMD_10H_NB_HT	0x1200
+#define PCI_DEVICE_ID_AMD_10H_NB_MAP	0x1201
+#define PCI_DEVICE_ID_AMD_10H_NB_DRAM	0x1202
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC	0x1203
+#define PCI_DEVICE_ID_AMD_10H_NB_LINK	0x1204
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
 #define PCI_DEVICE_ID_AMD_SCSI		0x2020
Signature · 6 lines
1.5.5.4

_______________________________________________
osrc-patches mailing list
[email protected]
https://ddcwww.amd.com/mailman/listinfo/osrc-patches
Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#5 lore raw
Quoted 22 lines · On Sat, 12 Jul 2008 06:56:15 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 2 lines · Robert Richter

Ingo, what about this patch. Could you apply it somewhere to the tip tree? I will then fix all hardcoded device entries in the code.

i suspect we could do it if the include/linux/pci_ids.h modification is fine with Jesse - it appears the maintenance policy right now is for everyone to add to include/linux/pci_ids.h on an as-needed basis:

$ git-log-line linus..linux-next include/linux/pci_ids.h

# 1126de5: Merge commit 'mmc/next'
# bd3b052: Merge commit 'galak/powerpc-next'
# edf0e24: powerpc/85xx: Add support for MPC8536DS
# 34f80b0: bnx2x: Add support for BCM57711 HW
# d3bca0e: sdhci: support JMicron secondary interface
# 4ae127d: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ # da65b53e4: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ #
da57e6983: tg3: Add 5785 ASIC revision

Quoted 5 lines

Which would normally go fine and not create conflicts because the modifications are distributed randomly over that file.

I'd suggest for you to send it together with the clean up patches, so that the context is clear.

actually lately for most cases it seems the plan isn't to add to pci_ids.h, but just do the PCI ID directly. It's not like a #define adds any kind of information.
Vendor ID's otoh still happen (but obviously AMD is there since forever.)

Signature · 3 lines
If you want to reach me at my work email, use [email protected]
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#6 lore raw
Quoted 25 lines · Arjan van de Ven
Quoted 22 lines · On Sat, 12 Jul 2008 06:56:15 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 2 lines · Robert Richter

Ingo, what about this patch. Could you apply it somewhere to the tip tree? I will then fix all hardcoded device entries in the code.

i suspect we could do it if the include/linux/pci_ids.h modification is fine with Jesse - it appears the maintenance policy right now is for everyone to add to include/linux/pci_ids.h on an as-needed basis:

$ git-log-line linus..linux-next include/linux/pci_ids.h

# 1126de5: Merge commit 'mmc/next'
# bd3b052: Merge commit 'galak/powerpc-next'
# edf0e24: powerpc/85xx: Add support for MPC8536DS
# 34f80b0: bnx2x: Add support for BCM57711 HW
# d3bca0e: sdhci: support JMicron secondary interface
# 4ae127d: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ # da65b53e4: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ #
da57e6983: tg3: Add 5785 ASIC revision

Quoted 5 lines
Quoted 5 lines

Which would normally go fine and not create conflicts because the modifications are distributed randomly over that file.

I'd suggest for you to send it together with the clean up patches, so that the context is clear.

Ok. Will do it that way.

Quoted 6 lines

actually lately for most cases it seems the plan isn't to add to pci_ids.h, but just do the PCI ID directly. It's not like a #define adds any kind of information.
Vendor ID's otoh still happen (but obviously AMD is there since forever.)

Since the usage of these CPU device ids is spread over the whole kernel it makes sence to define it at a single point in pci_ids.h. This differs to device drivers that use only a single file with all the code, and thus, global defines are not necessary.

-Robert

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#7 lore raw
Quoted 38 lines · Robert Richter
Quoted 28 lines · Arjan van de Ven

On Sat, 12 Jul 2008 06:56:15 +0200

Quoted 25 lines · Ingo Molnar
Quoted 2 lines · Robert Richter

Ingo, what about this patch. Could you apply it somewhere to the tip tree? I will then fix all hardcoded device entries in the code.

i suspect we could do it if the include/linux/pci_ids.h modification is fine with Jesse - it appears the maintenance policy right now is for everyone to add to include/linux/pci_ids.h on an as-needed basis:

$ git-log-line linus..linux-next include/linux/pci_ids.h

# 1126de5: Merge commit 'mmc/next'
# bd3b052: Merge commit 'galak/powerpc-next'
# edf0e24: powerpc/85xx: Add support for MPC8536DS
# 34f80b0: bnx2x: Add support for BCM57711 HW
# d3bca0e: sdhci: support JMicron secondary interface
# 4ae127d: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ # da65b53e4: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/ #
da57e6983: tg3: Add 5785 ASIC revision

Which would normally go fine and not create conflicts because the modifications are distributed randomly over that file.

I'd suggest for you to send it together with the clean up patches, so that the context is clear.

Ok. Will do it that way.

Quoted 5 lines

actually lately for most cases it seems the plan isn't to add to pci_ids.h, but just do the PCI ID directly. It's not like a #define adds any kind of information.
Vendor ID's otoh still happen (but obviously AMD is there since forever.)

Quoted 4 lines

Since the usage of these CPU device ids is spread over the whole kernel it makes sence to define it at a single point in pci_ids.h. This differs to device drivers that use only a single file with all the code, and thus, global defines are not necessary.

That's the rule I've been following too. If a ID is just used in one place, like a driver, just keep the ID definition there (if you define it at all). But if it's used in multiple places around the tree, add a #define to pci_ids.h.

Thanks,
Jesse