]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: change config to guest endian.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 3 May 2008 02:50:49 +0000 (21:50 -0500)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 2 May 2008 11:50:50 +0000 (21:50 +1000)
commita48c46f41c6d2cd2bf28c80ab8c5f70edf0bb9c3
tree66a836c7799b21156d4fc87f42e5817d7d95535b
parentb01f36c4d1f019cf11ae1bf0873147d4da5d3fa0
virtio: change config to guest endian.

A recent proposed feature addition to the virtio block driver revealed
some flaws in the API, in particular how easy it is to break big
endian machines.

The virtio config space was originally chosen to be little-endian,
because we thought the config might be part of the PCI config space
for virtio_pci.  It's actually a separate mmio region, so that
argument holds little water; as only x86 is currently using the virtio
mechanism, we can change this (but must do so now, before the
impending s390 merge).

API changes:
- __virtio_config_val() just becomes a striaght vdev->config_get() call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/block/virtio_blk.c
drivers/virtio/virtio_balloon.c
include/linux/virtio_config.h