2007-06-08 16:43:50

by dougthompson

[permalink] [raw]
Subject: [PATCH 4/6] include linux pci_id-h add amd northbridge defines

From: Douglas Thompson <[email protected]>

pci_ids.h needs two of the AMD NB device-ids namely,
Addressmap and the Memory Controller devices

This patch adds those to the pci_id.h include file

Signed-off-by: Douglas Thompson <[email protected]>
Cc: [email protected]
---
pci_ids.h | 2 ++
1 file changed, 2 insertions(+)


Index: linux-2.6.22-rc4-mm1/include/linux/pci_ids.h
===================================================================
--- linux-2.6.22-rc4-mm1.orig/include/linux/pci_ids.h
+++ linux-2.6.22-rc4-mm1/include/linux/pci_ids.h
@@ -489,6 +489,8 @@

#define PCI_VENDOR_ID_AMD 0x1022
#define PCI_DEVICE_ID_AMD_K8_NB 0x1100
+#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_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001


2007-06-09 00:08:35

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines

On Fri, Jun 08, 2007 at 10:45:10AM -0600, [email protected] wrote:
> From: Douglas Thompson <[email protected]>
>
> pci_ids.h needs two of the AMD NB device-ids namely,
> Addressmap and the Memory Controller devices

Does any kernel driver need this? We're trying to only include things
in the pci_ids.h file that are needed in more than one file to cut down
on the churn here for unnecessary ids.

thanks,

greg k-h

2007-06-11 23:30:24

by Doug Thompson

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines


--- Greg KH <[email protected]> wrote:

> On Fri, Jun 08, 2007 at 10:45:10AM -0600, [email protected] wrote:
> > From: Douglas Thompson <[email protected]>
> >
> > pci_ids.h needs two of the AMD NB device-ids namely,
> > Addressmap and the Memory Controller devices
>
> Does any kernel driver need this? We're trying to only include things
> in the pci_ids.h file that are needed in more than one file to cut down
> on the churn here for unnecessary ids.

not at the moment, but I have the k8_edac.c EDAC driver in my queue, which was in the -mm tree but
I had to pull it back once.

I am working with the k8 driver and its dealing with a race with the mcelog device as both access
the K8 NB. The K8 driver does use these regs and it currently has #ifndef s in it for both of
them.

I guess I could have submitted the patch when the K8 driver was submitted.

thanks

doug t

>
> thanks,
>
> greg k-h
>

2007-06-11 23:49:48

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines

On Mon, Jun 11, 2007 at 04:30:11PM -0700, Doug Thompson wrote:
>
> --- Greg KH <[email protected]> wrote:
>
> > On Fri, Jun 08, 2007 at 10:45:10AM -0600, [email protected] wrote:
> > > From: Douglas Thompson <[email protected]>
> > >
> > > pci_ids.h needs two of the AMD NB device-ids namely,
> > > Addressmap and the Memory Controller devices
> >
> > Does any kernel driver need this? We're trying to only include things
> > in the pci_ids.h file that are needed in more than one file to cut down
> > on the churn here for unnecessary ids.
>
> not at the moment, but I have the k8_edac.c EDAC driver in my queue, which was in the -mm tree but
> I had to pull it back once.
>
> I am working with the k8 driver and its dealing with a race with the mcelog device as both access
> the K8 NB. The K8 driver does use these regs and it currently has #ifndef s in it for both of
> them.
>
> I guess I could have submitted the patch when the K8 driver was submitted.

That would be preferable, thanks.

greg k-h

2007-06-12 03:26:16

by Dave Jones

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines

On Mon, Jun 11, 2007 at 04:49:47PM -0700, Greg Kroah-Hartman wrote:
> On Mon, Jun 11, 2007 at 04:30:11PM -0700, Doug Thompson wrote:
> > I am working with the k8 driver and its dealing with a race with the mcelog device as both access
> > the K8 NB. The K8 driver does use these regs and it currently has #ifndef s in it for both of
> > them.
> >
> > I guess I could have submitted the patch when the K8 driver was submitted.
>
> That would be preferable, thanks.

Even better (IMO), if they're not used by any other driver (which seems
to be the case), keep the defines local to the driver.

Dave

--
http://www.codemonkey.org.uk

2007-06-13 05:11:12

by Doug Thompson

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines


--- Dave Jones <[email protected]> wrote:

> On Mon, Jun 11, 2007 at 04:49:47PM -0700, Greg Kroah-Hartman wrote:
> > On Mon, Jun 11, 2007 at 04:30:11PM -0700, Doug Thompson wrote:
> > > I am working with the k8 driver and its dealing with a race with the mcelog device as both
> access
> > > the K8 NB. The K8 driver does use these regs and it currently has #ifndef s in it for both
> of
> > > them.
> > >
> > > I guess I could have submitted the patch when the K8 driver was submitted.
> >
> > That would be preferable, thanks.
>
> Even better (IMO), if they're not used by any other driver (which seems
> to be the case), keep the defines local to the driver.
>
> Dave

There are 4 K8 Memory Controller registers, 2 of which are already in pci_ids.h (and are used by
others) and 2 more that I need. I define the 2 I need now in the file, but was worried when
someone else might add them to the pci_ids.h file. Just figured that it would be better to keep
all 4 together.

So is the model of such placement to locate the #define near to the sole consumer of that item?

And if used by others, to move it to the pci_ids.h file?

thanks

doug t

2007-06-13 12:42:40

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 4/6] include linux pci_id-h add amd northbridge defines

On Tue, Jun 12, 2007 at 10:10:58PM -0700, Doug Thompson wrote:
> So is the model of such placement to locate the #define near to the
> sole consumer of that item?

Yes.

> And if used by others, to move it to the pci_ids.h file?

Yes.

thanks,

greg k-h