All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 4/4] serial: Expand the PCI serial quirks for OXPCIe200 and OXPCIe952 1 Native UART
Date: Fri, 7 Mar 2014 10:55:14 -0500	[thread overview]
Message-ID: <20140307155514.GA10959@phenom.dumpdata.com> (raw)
In-Reply-To: <53185A0F02000078001216F0@nat28.tlf.novell.com>

On Thu, Mar 06, 2014 at 10:20:47AM +0000, Jan Beulich wrote:
> >>> On 05.03.14 at 18:25, Konrad Rzeszutek Wilk <konrad@kernel.org> wrote:
> > This covers all of the OXPCIe952 1 Native UART and
> > OXPCIe200 1 Native UART chipsets.
> 
> With this I can certainly see why you didn't give the single ID a
> name in the previous patch. But let's be consistent then and have
> - for now at least - only vendor IDs have (global, as Andrew
> validly suggested) manifest constants.

Do you want that just for the serial driver or for all?

This is what I had ready:


commit c3dbcc6a0c2c9415201863a9422b550270f2ee03
Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date:   Wed Mar 5 15:24:04 2014 -0500

    pci: Put all PCI device vendor and models in one file.
    
    Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

diff --git a/xen/arch/x86/oprofile/op_model_athlon.c b/xen/arch/x86/oprofile/op_model_athlon.c
index e784018..81e0858 100644
--- a/xen/arch/x86/oprofile/op_model_athlon.c
+++ b/xen/arch/x86/oprofile/op_model_athlon.c
@@ -20,7 +20,8 @@
 #include <asm/current.h>
 #include <asm/hvm/support.h>
 #include <xen/pci_regs.h>
- 
+#include <xen/pci_devs.h>
+
 #include "op_x86_model.h"
 #include "op_counter.h"
 
@@ -445,8 +446,6 @@ static inline void __init init_ibs_nmi_per_cpu(void *arg)
 	apic_write(reg, APIC_EILVT_MSG_NMI << 8);
 }
 
-#define PCI_VENDOR_ID_AMD               0x1022
-#define PCI_DEVICE_ID_AMD_10H_NB_MISC   0x1203
 #define IBSCTL                          0x1cc
 static int __init init_ibs_nmi(void)
 {
diff --git a/xen/arch/x86/x86_64/mmconf-fam10h.c b/xen/arch/x86/x86_64/mmconf-fam10h.c
index 1373acb..07668b3 100644
--- a/xen/arch/x86/x86_64/mmconf-fam10h.c
+++ b/xen/arch/x86/x86_64/mmconf-fam10h.c
@@ -6,6 +6,7 @@
 #include <xen/acpi.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_devs.h>
 #include <xen/init.h>
 #include <xen/dmi.h>
 #include <asm/amd.h>
diff --git a/xen/arch/x86/x86_64/mmconfig-shared.c b/xen/arch/x86/x86_64/mmconfig-shared.c
index 7589b64..75757b4 100644
--- a/xen/arch/x86/x86_64/mmconfig-shared.c
+++ b/xen/arch/x86/x86_64/mmconfig-shared.c
@@ -19,6 +19,7 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_devs.h>
 #include <asm/e820.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
diff --git a/xen/arch/x86/x86_64/mmconfig.h b/xen/arch/x86/x86_64/mmconfig.h
index 36e0448..5125997 100644
--- a/xen/arch/x86/x86_64/mmconfig.h
+++ b/xen/arch/x86/x86_64/mmconfig.h
@@ -17,10 +17,6 @@
  * Author: Allen Kay <allen.m.kay@intel.com> - adapted from linux
  */
 
-#define PCI_VENDOR_ID_INTEL        0x8086
-#define PCI_DEVICE_ID_INTEL_E7520_MCH    0x3590
-#define PCI_DEVICE_ID_INTEL_82945G_HB    0x2770
-
 /* ioport ends */
 #define PCI_PROBE_BIOS        0x0001
 #define PCI_PROBE_CONF1        0x0002
@@ -29,11 +25,8 @@
 #define PCI_PROBE_MASK        0x000f
 #define PCI_PROBE_NOEARLY    0x0010
 
-#define PCI_VENDOR_ID_AMD             0x1022
 #define PCI_CHECK_ENABLE_AMD_MMCONF     0x20000
 
-#define PCI_VENDOR_ID_NVIDIA       0x10de
-
 extern unsigned int pci_probe;
 
 /*
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 9f87018..48ee010 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -19,6 +19,7 @@
 #ifdef HAS_PCI
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_devs.h>
 #endif
 #include <xen/8250-uart.h>
 #include <xen/vmap.h>
@@ -132,9 +133,6 @@ static struct ns16550_config_quirk __initdata uart_quirk[] = {
     }
 };
 
-#define PCI_VENDOR_ID_BROADCOM           0x14e4
-#define PCI_VENDOR_ID_OXSEMI             0x1415
 static struct ns16550_config_mmio __initdata uart_config[] =
 {
     /* Broadcom TruManage device */
diff --git a/xen/include/xen/pci_devs.h b/xen/include/xen/pci_devs.h
new file mode 100644
index 0000000..ad573df
--- /dev/null
+++ b/xen/include/xen/pci_devs.h
@@ -0,0 +1,17 @@
+#ifndef XEN_PCI_DEVS_H_
+#define XEN_PCI_DEVS_H
+
+#define PCI_VENDOR_ID_AMD                0x1022
+#define PCI_DEVICE_ID_AMD_10H_NB_MISC    0x1203
+
+#define PCI_VENDOR_ID_BROADCOM           0x14e4
+
+#define PCI_VENDOR_ID_INTEL              0x8086
+#define PCI_DEVICE_ID_INTEL_E7520_MCH    0x3590
+#define PCI_DEVICE_ID_INTEL_82945G_HB    0x2770
+
+#define PCI_VENDOR_ID_NVIDIA             0x10de
+
+#define PCI_VENDOR_ID_OXSEMI             0x1415
+#endif /* XEN_PCI_DEVS_H */
> 
> Jan
> 

  reply	other threads:[~2014-03-07 15:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 17:25 [PATCH v1] Enable serial output for Oxford Semiconductor PCIe cards Konrad Rzeszutek Wilk
2014-03-05 17:25 ` [PATCH v1 1/4] serial: Support OXPCIe952 aka Oxford Semiconductor Ltd Device c138 (1415:c138) Konrad Rzeszutek Wilk
2014-03-06 10:15   ` Jan Beulich
2014-03-06 18:47     ` Konrad Rzeszutek Wilk
2014-03-05 17:25 ` [PATCH v1 2/4] serial: Seperate the PCI device ids and quirks Konrad Rzeszutek Wilk
2014-03-06 10:17   ` Jan Beulich
2014-03-06 18:48     ` Konrad Rzeszutek Wilk
2014-03-05 17:25 ` [PATCH v1 3/4] serial: Use #defines for PCI vendor and models Konrad Rzeszutek Wilk
2014-03-05 17:34   ` Andrew Cooper
2014-03-06 10:18   ` Jan Beulich
2014-03-05 17:25 ` [PATCH v1 4/4] serial: Expand the PCI serial quirks for OXPCIe200 and OXPCIe952 1 Native UART Konrad Rzeszutek Wilk
2014-03-06 10:20   ` Jan Beulich
2014-03-07 15:55     ` Konrad Rzeszutek Wilk [this message]
2014-03-07 16:30       ` Jan Beulich

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=20140307155514.GA10959@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=konrad@kernel.org \
    --cc=xen-devel@lists.xenproject.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.