debuggers.hg

changeset 20002:3341850938ac

Remove support for out-of-date SLES9 and RHEL4 kernel
ports from build integration

Both distros now include Xen support from their respective upstreams
and these kernels are very out of date wrt both the upstream distro
kernel and the upstream Xen kernel.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 20 15:51:14 2009 +0100 (2009-07-20)
parents 5333e6497af6
children 534d3716bbbe
files buildconfigs/mk.linux-2.6.5-SLES-xen buildconfigs/mk.linux-2.6.9-RHEL-xen unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
line diff
     1.1 --- a/buildconfigs/mk.linux-2.6.5-SLES-xen	Mon Jul 20 15:45:50 2009 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,10 +0,0 @@
     1.4 -XEN_TARGET_ARCH = x86_32
     1.5 -
     1.6 -EXTRAVERSION = -xen
     1.7 -LINUX_VER = 2.6.5-SLES
     1.8 -
     1.9 -XEN_LINUX_SOURCE = hg-clone
    1.10 -XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/sles9x.hg
    1.11 -XEN_LINUX_HGREV  ?= tip
    1.12 -
    1.13 -include buildconfigs/mk.linux-2.6-xen
     2.1 --- a/buildconfigs/mk.linux-2.6.9-RHEL-xen	Mon Jul 20 15:45:50 2009 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,10 +0,0 @@
     2.4 -XEN_TARGET_ARCH = x86_32
     2.5 -
     2.6 -EXTRAVERSION = -xen
     2.7 -LINUX_VER = 2.6.9-RHEL
     2.8 -
     2.9 -XEN_LINUX_SOURCE = hg-clone
    2.10 -XEN_LINUX_HGREPO ?= http://xenbits.xensource.com/kernels/rhel4x.hg
    2.11 -XEN_LINUX_HGREV  ?= tip
    2.12 -
    2.13 -include buildconfigs/mk.linux-2.6-xen
     3.1 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Mon Jul 20 15:45:50 2009 +0100
     3.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Mon Jul 20 15:51:14 2009 +0100
     3.3 @@ -257,6 +257,60 @@ int xen_reboot_init(void);
     3.4  int xen_panic_handler_init(void);
     3.5  int gnttab_init(void);
     3.6  
     3.7 +#define XEN_IOPORT_BASE 0x10
     3.8 +
     3.9 +#define XEN_IOPORT_PLATFLAGS	(XEN_IOPORT_BASE + 0) /* 1 byte access (R/W) */
    3.10 +#define XEN_IOPORT_MAGIC	(XEN_IOPORT_BASE + 0) /* 2 byte access (R) */
    3.11 +#define XEN_IOPORT_UNPLUG	(XEN_IOPORT_BASE + 0) /* 2 byte access (W) */
    3.12 +#define XEN_IOPORT_DRVVER	(XEN_IOPORT_BASE + 0) /* 4 byte access (W) */
    3.13 +
    3.14 +#define XEN_IOPORT_SYSLOG	(XEN_IOPORT_BASE + 2) /* 1 byte access (W) */
    3.15 +#define XEN_IOPORT_PROTOVER	(XEN_IOPORT_BASE + 2) /* 1 byte access (R) */
    3.16 +#define XEN_IOPORT_PRODNUM	(XEN_IOPORT_BASE + 2) /* 2 byte access (W) */
    3.17 +
    3.18 +#define XEN_IOPORT_MAGIC_VAL 0x49d2
    3.19 +#define XEN_IOPORT_LINUX_PRODNUM 0xffff /* NB: register a proper one */
    3.20 +#define XEN_IOPORT_LINUX_DRVVER  ((LINUX_VERSION_CODE << 8) + 0x0)
    3.21 +
    3.22 +static int check_platform_magic(struct device *dev, long ioaddr, long iolen)
    3.23 +{
    3.24 +	short magic;
    3.25 +	char protocol;
    3.26 +
    3.27 +	if (iolen < 0x16)
    3.28 +		return -ENODEV;
    3.29 +
    3.30 +	magic = inw(XEN_IOPORT_MAGIC);
    3.31 +
    3.32 +	if (magic != XEN_IOPORT_MAGIC_VAL) {
    3.33 +		dev_err(dev, "invalid magic %#x", magic);
    3.34 +		return -ENODEV;
    3.35 +	}
    3.36 +
    3.37 +	protocol = inb(XEN_IOPORT_PROTOVER);
    3.38 +
    3.39 +	dev_info(dev, "I/O protocol version %d\n", protocol);
    3.40 +
    3.41 +	switch (protocol) {
    3.42 +	case 1:
    3.43 +		outw(XEN_IOPORT_PRODNUM, 0xbeef);
    3.44 +		outl(XEN_IOPORT_DRVVER, 0xdead);
    3.45 +		if (inw(XEN_IOPORT_MAGIC) != XEN_IOPORT_MAGIC_VAL) {
    3.46 +			dev_err(dev, "blacklisted by host\n");
    3.47 +			return -ENODEV;
    3.48 +		}
    3.49 +		/* Fall through */
    3.50 +	case 0:
    3.51 +		outw(XEN_IOPORT_UNPLUG, 0xf);
    3.52 +		break;
    3.53 +	default:
    3.54 +		dev_err(dev, "unknown qemu version\n");
    3.55 +		return -ENODEV;
    3.56 +	}
    3.57 +
    3.58 +	return 0;
    3.59 +}
    3.60 +
    3.61  static int __devinit platform_pci_init(struct pci_dev *pdev,
    3.62  				       const struct pci_device_id *ent)
    3.63  {
    3.64 @@ -305,6 +359,10 @@ static int __devinit platform_pci_init(s
    3.65  	if (ret < 0)
    3.66  		goto out;
    3.67  
    3.68 +	ret = check_platform_magic(&pdev->dev, ioaddr, iolen);
    3.69 +	if (ret < 0)
    3.70 +		goto out;
    3.71 +
    3.72  	if ((ret = init_xen_info()))
    3.73  		goto out;
    3.74