[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools/ocaml: libxc bindings: Correct PCI terminology


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 16 Jan 2013 08:22:21 +0000
  • Delivery-date: Wed, 16 Jan 2013 08:22:26 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1357906950 0
# Node ID c3c683a439aee86b3de38ea54205a6faee6b6429
# Parent  56daf05bcf69db56476bb7b97600292e791253c3
tools/ocaml: libxc bindings: Correct PCI terminology

Some renaming to correct the PCI and SBDF terminology.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 56daf05bcf69 -r c3c683a439ae tools/ocaml/libs/xc/xenctrl_stubs.c
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c       Fri Jan 11 12:22:29 2013 +0000
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c       Fri Jan 11 12:22:30 2013 +0000
@@ -1083,11 +1083,11 @@ CAMLprim value stub_xc_domain_irq_permis
        CAMLreturn(Val_unit);
 }
 
-static uint32_t pci_dev_to_bdf(int domain, int bus, int slot, int func)
+static uint32_t encode_sbdf(int domain, int bus, int dev, int func)
 {
        return  ((uint32_t)domain & 0xffff) << 16 |
                ((uint32_t)bus    &   0xff) << 8  |
-               ((uint32_t)slot   &   0x1f) << 3  |
+               ((uint32_t)dev    &   0x1f) << 3  |
                ((uint32_t)func   &    0x7);
 }
 
@@ -1095,16 +1095,16 @@ CAMLprim value stub_xc_domain_test_assig
 {
        CAMLparam3(xch, domid, desc);
        int ret;
-       int domain, bus, slot, func;
-       uint32_t bdf;
+       int domain, bus, dev, func;
+       uint32_t sbdf;
 
        domain = Int_val(Field(desc, 0));
        bus = Int_val(Field(desc, 1));
-       slot = Int_val(Field(desc, 2));
+       dev = Int_val(Field(desc, 2));
        func = Int_val(Field(desc, 3));
-       bdf = pci_dev_to_bdf(domain, bus, slot, func);
+       sbdf = encode_sbdf(domain, bus, dev, func);
 
-       ret = xc_test_assign_device(_H(xch), _D(domid), bdf);
+       ret = xc_test_assign_device(_H(xch), _D(domid), sbdf);
 
        CAMLreturn(Val_bool(ret == 0));
 }
@@ -1113,16 +1113,16 @@ CAMLprim value stub_xc_domain_assign_dev
 {
        CAMLparam3(xch, domid, desc);
        int ret;
-       int domain, bus, slot, func;
-       uint32_t bdf;
+       int domain, bus, dev, func;
+       uint32_t sbdf;
 
        domain = Int_val(Field(desc, 0));
        bus = Int_val(Field(desc, 1));
-       slot = Int_val(Field(desc, 2));
+       dev = Int_val(Field(desc, 2));
        func = Int_val(Field(desc, 3));
-       bdf = pci_dev_to_bdf(domain, bus, slot, func);
+       sbdf = encode_sbdf(domain, bus, dev, func);
 
-       ret = xc_assign_device(_H(xch), _D(domid), bdf);
+       ret = xc_assign_device(_H(xch), _D(domid), sbdf);
 
        if (ret < 0)
                failwith_xc(_H(xch));
@@ -1133,16 +1133,16 @@ CAMLprim value stub_xc_domain_deassign_d
 {
        CAMLparam3(xch, domid, desc);
        int ret;
-       int domain, bus, slot, func;
-       uint32_t bdf;
+       int domain, bus, dev, func;
+       uint32_t sbdf;
 
        domain = Int_val(Field(desc, 0));
        bus = Int_val(Field(desc, 1));
-       slot = Int_val(Field(desc, 2));
+       dev = Int_val(Field(desc, 2));
        func = Int_val(Field(desc, 3));
-       bdf = pci_dev_to_bdf(domain, bus, slot, func);
+       sbdf = encode_sbdf(domain, bus, dev, func);
 
-       ret = xc_deassign_device(_H(xch), _D(domid), bdf);
+       ret = xc_deassign_device(_H(xch), _D(domid), sbdf);
 
        if (ret < 0)
                failwith_xc(_H(xch));

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.