|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 1/1] plat/io: Access ukplat_virt_to_phys from uk lib
Looks good. I will modify the commit message slightly. Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx> On 28.09.2018 18:20, Sharan Santhanam wrote: The ukplat_virt_to_phys is promoted as a standard platform API and each platform provides it's own function to convert the virtual address to physical address. Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> --- include/uk/plat/io.h | 41 ++++++++++++++++++++++++++++++++ plat/common/include/io.h | 41 -------------------------------- plat/drivers/virtio/virtio_ring.c | 2 +- plat/kvm/io.c | 7 +++++- plat/linuxu/Makefile.uk | 1 + plat/linuxu/io.c | 43 +++++++++++++++++++++++++++++++++ plat/xen/Makefile.uk | 1 + plat/xen/io.c | 50 +++++++++++++++++++++++++++++++++++++++ 8 files changed, 143 insertions(+), 43 deletions(-) create mode 100644 include/uk/plat/io.h delete mode 100644 plat/common/include/io.h create mode 100644 plat/linuxu/io.c create mode 100644 plat/xen/io.c diff --git a/include/uk/plat/io.h b/include/uk/plat/io.h new file mode 100644 index 0000000..6a92186 --- /dev/null +++ b/include/uk/plat/io.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: BSD-3-Clause */ +/* + * + * + * Copyright (c) 2018, NEC Europe Ltd., NEC Corporation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. + */ +#ifndef __UKPLAT_IO_H__ +#define __UKPLAT_IO_H__ + +#include <uk/arch/types.h> + +__phys_addr ukplat_virt_to_phys(const volatile void *address); + +#endif /* __UKPLAT_IO_H__ */ diff --git a/plat/common/include/io.h b/plat/common/include/io.h deleted file mode 100644 index 6a92186..0000000 --- a/plat/common/include/io.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause */ -/* - * - * - * Copyright (c) 2018, NEC Europe Ltd., NEC Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. - */ -#ifndef __UKPLAT_IO_H__ -#define __UKPLAT_IO_H__ - -#include <uk/arch/types.h> - -__phys_addr ukplat_virt_to_phys(const volatile void *address); - -#endif /* __UKPLAT_IO_H__ */ diff --git a/plat/drivers/virtio/virtio_ring.c b/plat/drivers/virtio/virtio_ring.c index 790f0bb..c918248 100644 --- a/plat/drivers/virtio/virtio_ring.c +++ b/plat/drivers/virtio/virtio_ring.c @@ -28,7 +28,7 @@ #include <string.h> #include <uk/print.h> #include <cpu.h> -#include <io.h> +#include <uk/plat/io.h> #include <pci/virtio/virtio_pci.h> #include <pci/virtio/virtio_ring.h> #include <uk/arch/atomic.h> diff --git a/plat/kvm/io.c b/plat/kvm/io.c index ca83e44..fca55fb 100644 --- a/plat/kvm/io.c +++ b/plat/kvm/io.c @@ -32,8 +32,13 @@ * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. */-#include <io.h>+#include <uk/plat/io.h>+/** _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |