Commit 6fcfeff9face289aa69a037e73a76c1a7b8c7411

Authored by Blue Swirl
1 parent c433bedf

Fix compilation when x86_64 is defined

hw/xen_blkif.h
... ... @@ -59,8 +59,8 @@ DEFINE_RING_TYPES(blkif_x86_64, struct blkif_x86_64_request, struct blkif_x86_64
59 59 union blkif_back_rings {
60 60 blkif_back_ring_t native;
61 61 blkif_common_back_ring_t common;
62   - blkif_x86_32_back_ring_t x86_32;
63   - blkif_x86_64_back_ring_t x86_64;
  62 + blkif_x86_32_back_ring_t x86_32_part;
  63 + blkif_x86_64_back_ring_t x86_64_part;
64 64 };
65 65 typedef union blkif_back_rings blkif_back_rings_t;
66 66  
... ...
hw/xen_disk.c
... ... @@ -440,10 +440,12 @@ static int blk_send_response_one(struct ioreq *ioreq)
440 440 dst = RING_GET_RESPONSE(&blkdev->rings.native, blkdev->rings.native.rsp_prod_pvt);
441 441 break;
442 442 case BLKIF_PROTOCOL_X86_32:
443   - dst = RING_GET_RESPONSE(&blkdev->rings.x86_32, blkdev->rings.x86_32.rsp_prod_pvt);
  443 + dst = RING_GET_RESPONSE(&blkdev->rings.x86_32_part,
  444 + blkdev->rings.x86_32_part.rsp_prod_pvt);
444 445 break;
445 446 case BLKIF_PROTOCOL_X86_64:
446   - dst = RING_GET_RESPONSE(&blkdev->rings.x86_64, blkdev->rings.x86_64.rsp_prod_pvt);
  447 + dst = RING_GET_RESPONSE(&blkdev->rings.x86_64_part,
  448 + blkdev->rings.x86_64_part.rsp_prod_pvt);
447 449 break;
448 450 default:
449 451 dst = NULL;
... ... @@ -491,10 +493,12 @@ static int blk_get_request(struct XenBlkDev *blkdev, struct ioreq *ioreq, RING_I
491 493 sizeof(ioreq->req));
492 494 break;
493 495 case BLKIF_PROTOCOL_X86_32:
494   - blkif_get_x86_32_req(&ioreq->req, RING_GET_REQUEST(&blkdev->rings.x86_32, rc));
  496 + blkif_get_x86_32_req(&ioreq->req,
  497 + RING_GET_REQUEST(&blkdev->rings.x86_32_part, rc));
495 498 break;
496 499 case BLKIF_PROTOCOL_X86_64:
497   - blkif_get_x86_64_req(&ioreq->req, RING_GET_REQUEST(&blkdev->rings.x86_64, rc));
  500 + blkif_get_x86_64_req(&ioreq->req,
  501 + RING_GET_REQUEST(&blkdev->rings.x86_64_part, rc));
498 502 break;
499 503 }
500 504 return 0;
... ... @@ -698,13 +702,15 @@ static int blk_connect(struct XenDevice *xendev)
698 702 case BLKIF_PROTOCOL_X86_32:
699 703 {
700 704 blkif_x86_32_sring_t *sring_x86_32 = blkdev->sring;
701   - BACK_RING_INIT(&blkdev->rings.x86_32, sring_x86_32, XC_PAGE_SIZE);
  705 +
  706 + BACK_RING_INIT(&blkdev->rings.x86_32_part, sring_x86_32, XC_PAGE_SIZE);
702 707 break;
703 708 }
704 709 case BLKIF_PROTOCOL_X86_64:
705 710 {
706 711 blkif_x86_64_sring_t *sring_x86_64 = blkdev->sring;
707   - BACK_RING_INIT(&blkdev->rings.x86_64, sring_x86_64, XC_PAGE_SIZE);
  712 +
  713 + BACK_RING_INIT(&blkdev->rings.x86_64_part, sring_x86_64, XC_PAGE_SIZE);
708 714 break;
709 715 }
710 716 }
... ...