WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] pv-on-hvm: Correct the order of the argument of out*

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] pv-on-hvm: Correct the order of the argument of out*()
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Thu, 28 Jan 2010 15:30:58 +0900 (JST)
Delivery-date: Wed, 27 Jan 2010 22:32:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# 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.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 2636e5619708 -r 36f6f2647701 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Tue Jan 26 
15:54:40 2010 +0000
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Thu Jan 28 
15:19:57 2010 +0900
@@ -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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] pv-on-hvm: Correct the order of the argument of out*(), KUWAMURA Shin'ya <=