Subject: [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

Signed-off-by: Robert Richter <[email protected]>
---
include/linux/pci_ids.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index eafc9d6..4a2557c 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -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
--
1.5.5.4


2008-06-27 22:15:28

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

Robert Richter wrote:
> Signed-off-by: Robert Richter <[email protected]>
> ---
> include/linux/pci_ids.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index eafc9d6..4a2557c 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -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


Subject: Re: [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

On 27.06.08 18:15:06, Jeff Garzik wrote:
> Robert Richter wrote:
>> +#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/

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

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]

Subject: Re: [osrc-patches] [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

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

On 27.06.08 16:04:28, Robert Richter wrote:
> Signed-off-by: Robert Richter <[email protected]>
> ---
> include/linux/pci_ids.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index eafc9d6..4a2557c 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -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
> --
> 1.5.5.4
>
> _______________________________________________
> osrc-patches mailing list
> [email protected]
> https://ddcwww.amd.com/mailman/listinfo/osrc-patches

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]

2008-07-12 04:56:39

by Ingo Molnar

[permalink] [raw]
Subject: Re: [osrc-patches] [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices


* Robert Richter <[email protected]> wrote:

> 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

> On 27.06.08 16:04:28, Robert Richter wrote:
> > Signed-off-by: Robert Richter <[email protected]>
> > ---
> > include/linux/pci_ids.h | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> > index eafc9d6..4a2557c 100644
> > --- a/include/linux/pci_ids.h
> > +++ b/include/linux/pci_ids.h
> > @@ -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
> > --
> > 1.5.5.4
> >
> > _______________________________________________
> > osrc-patches mailing list
> > [email protected]
> > https://ddcwww.amd.com/mailman/listinfo/osrc-patches
>
> --
> Advanced Micro Devices, Inc.
> Operating System Research Center
> email: [email protected]

2008-07-12 05:08:49

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [osrc-patches] [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

On Sat, 12 Jul 2008 06:56:15 +0200
Ingo Molnar <[email protected]> wrote:

>
> * Robert Richter <[email protected]> wrote:
>
> > 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.

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.)



--
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

Subject: Re: [osrc-patches] [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

On 11.07.08 22:08:37, Arjan van de Ven wrote:
> On Sat, 12 Jul 2008 06:56:15 +0200
> Ingo Molnar <[email protected]> wrote:
>
> >
> > * Robert Richter <[email protected]> wrote:
> >
> > > 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.

>
> 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

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]

2008-07-14 15:54:34

by Jesse Barnes

[permalink] [raw]
Subject: Re: [osrc-patches] [PATCH] x86: Add PCI IDs for AMD Barcelona PCI devices

On Monday, July 14, 2008 2:15 am Robert Richter wrote:
> On 11.07.08 22:08:37, Arjan van de Ven wrote:
> > On Sat, 12 Jul 2008 06:56:15 +0200
> >
> > Ingo Molnar <[email protected]> wrote:
> > > * Robert Richter <[email protected]> wrote:
> > > > 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.
>
> > 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.

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