Skip to contentSkip to conversation

pv-on-hvm: Correct the order of the argument of out*()

PATCH New KUWAMURA Shin'ya 1 participant 1 message Jan 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pv-on-hvm: Correct the order of the argument of out*()

Hi,

The order of the argument of outl() is wrong in platform-pci.c. The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

Signature · 1 line
  KUWAMURA Shin'ya

# HG changeset patch
# User KUWAMURA Shin'ya <[email protected]> # Date 1264659597 -32400
# Node ID 36f6f2647701484325b3cfefaced8a1213ae5cd2 # Parent 2636e561970898517def148c19e04581b12dc860
pv-on-hvm: Correct the order of the argument of out*()

The order of the argument of outl() is wrong.
The correct order is outl(value, port). This causes kernel panic.

And outw() is also similar.

unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +3 -3
diff -r 2636e5619708 -r 36f6f2647701 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
@@ -324,15 +324,15 @@ static int check_platform_magic(struct d
 
 	switch (protocol) {
 	case 1:
-		outw(XEN_IOPORT_PRODNUM, XEN_IOPORT_LINUX_PRODNUM);
-		outl(XEN_IOPORT_DRVVER, XEN_IOPORT_LINUX_DRVVER);
+		outw(XEN_IOPORT_LINUX_PRODNUM, XEN_IOPORT_PRODNUM);
+		outl(XEN_IOPORT_LINUX_DRVVER, XEN_IOPORT_DRVVER);
 		if (inw(XEN_IOPORT_MAGIC) != XEN_IOPORT_MAGIC_VAL) {
 			dev_err(dev, "blacklisted by host\n");
 			return -ENODEV;
 		}
 		/* Fall through */
 	case 0:
-		outw(XEN_IOPORT_UNPLUG, 0xf);
+		outw(0xf, XEN_IOPORT_UNPLUG);
 		break;
 	default:
 		err = "unknown I/O protocol version";

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel