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

[Minios-devel] [UNIKRAFT PATCH 1/3] plat/kvm: cleanup - remove setup.h


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Thu, 5 Apr 2018 18:21:16 +0300
  • Cc: simon.kuenzer@xxxxxxxxx
  • Delivery-date: Thu, 05 Apr 2018 15:21:29 +0000
  • Ironport-phdr: 9a23:Tj55CxzlpG/qECvXCy+O+j09IxM/srCxBDY+r6Qd2+oQIJqq85mqBkHD//Il1AaPAd2Araocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HdbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHolikJKjA3/mLQhMNygqJWuw6tqwBlzoLIeoyZKOZyc6XAdt0aX2pBWcNRWjRfD4O7dIsPE+sBPeBFpIf7ulsOtQa+DhSrCezzzT9InWP23aw80+g7FQHGwRQgH88VvXvIt9X5Lr8SUf2uw6XS1zXDaOpb1DHg44bLahAsueyAUL1tfcbLykQiFxnJgkuOpYHnJT+Y2PwBv3WU4uZ9T+6iiG4qpxtvrjWhyMogkJTFi40Lxl3C6C532pw6JceiR05+edOkFZxQuDyEOIZuWcMiRn1ouD49yr0bpZ63ZCgKx4ojxx7Yc/GHbY2I7QjiVOaVOzt3mGlldKinhxav6kes0Pf8Vs6s3FZLqCpKjMXMu2gQ2xHc98SLUPhw80e71TqRyQze6PtILE4smareMZEhw7owlpQJsUTEGy/7gFn5jKiNdkU4++io7f7rYrH7pp+EKo95kR3xMr80lsynHOQ3KRICX3Kc+eikzr3s4VX5QKlWjv0xiqTZtZHaJcIapq6+GA9Zy5ss5AihDzi41NQVhn0HLFNeeBKblIjlIV7PL+7+DfulhFSsijhrzejcPrL9GpXNMmTDkLD5cLZm6k5czQ0zzdZF65JXF7EOPvTzW07vu9zCFRI5NRK7zPrjCNpnzYwSQ3yAArLKeJ/V5FqJ4OMoOKyAaZEYvB75KuM5/Lj+gHl/nkUSLoez2p5CQ3ejAvVga2GEeWek1twGCnsLuEw6UfT3oFaZFyZObTCoWPRvtXkAFIu6ANKbFciWi7ub0XLjEw==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 plat/kvm/include/kvm/setup.h | 48 --------------------------------------------
 plat/kvm/x86/setup.c         | 10 ++++-----
 2 files changed, 5 insertions(+), 53 deletions(-)
 delete mode 100644 plat/kvm/include/kvm/setup.h

diff --git a/plat/kvm/include/kvm/setup.h b/plat/kvm/include/kvm/setup.h
deleted file mode 100644
index d664ee4..0000000
--- a/plat/kvm/include/kvm/setup.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* SPDX-License-Identifier: ISC */
-/*
- * Authors: Dan Williams
- *          Ricardo Koller
- *          Martin Lucina
- *          Wei Chen
- *          Felipe Huici <felipe.huici@xxxxxxxxx>
- *
- * Copyright (c) 2015-2017 IBM
- * Copyright (c) 2016-2017 Docker, Inc.
- * Copyright (c) 2017 ARM Ltd.
- * Copyright (c) 2017 NEC Europe Ltd., NEC Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software
- * for any purpose with or without fee is hereby granted, provided
- * that the above copyright notice and this permission notice appear
- * in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
- * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <inttypes.h>
-#include <uk/assert.h>
-#include <uk/essentials.h>
-
-/* alignment macros */
-#define ALIGN_4K __align(0x1000)
-#define ALIGN_64_BIT __align(0x8)
-
-/* convenient macro stringification */
-#define STR_EXPAND(y) #y
-#define STR(x) STR_EXPAND(x)
-
-#define assert(e) UK_ASSERT(e)
-#define PANIC(s) assert(e) //kludge!
-
-/* platform.c: platform includes */
-void platform_init(void *arg);
-char *platform_cmdline(void);
-uint64_t platform_mem_size(void);
-void platform_exit(void) __attribute__((noreturn));
diff --git a/plat/kvm/x86/setup.c b/plat/kvm/x86/setup.c
index 6895f29..96d80e9 100644
--- a/plat/kvm/x86/setup.c
+++ b/plat/kvm/x86/setup.c
@@ -27,12 +27,12 @@
  */
 
 #include <string.h>
-#include <kvm/setup.h>
 #include <kvm/console.h>
 #include <kvm-x86/multiboot.h>
 #include <kvm-x86/multiboot_defs.h>
 #include <kvm-x86/cpu_x86_64.h>
 #include <uk/arch/limits.h>
+#include <uk/arch/types.h>
 #include <uk/plat/console.h>
 #include <uk/assert.h>
 #include <uk/essentials.h>
@@ -47,7 +47,7 @@ void *_libkvmplat_heap_start;
 void *_libkvmplat_stack_top;
 void *_libkvmplat_mem_end;
 
-extern void _libkvmplat_newstack(uint64_t stack_start, void (*tramp)(void *),
+extern void _libkvmplat_newstack(__u64 stack_start, void (*tramp)(void *),
                                void *arg);
 
 static inline void _mb_get_cmdline(struct multiboot_info *mi, char *cmdline,
@@ -57,7 +57,7 @@ static inline void _mb_get_cmdline(struct multiboot_info *mi, 
char *cmdline,
        char *mi_cmdline;
 
        if (mi->flags & MULTIBOOT_INFO_CMDLINE) {
-               mi_cmdline = (char *)(uint64_t)mi->cmdline;
+               mi_cmdline = (char *)(__u64)mi->cmdline;
                cmdline_len = strlen(mi_cmdline);
 
                if (cmdline_len >= maxlen) {
@@ -87,7 +87,7 @@ static inline void _mb_init_mem(struct multiboot_info *mi)
         */
        for (offset = 0; offset < mi->mmap_length;
             offset += m->size + sizeof(m->size)) {
-               m = (void *)(uintptr_t)(mi->mmap_addr + offset);
+               m = (void *)(__uptr)(mi->mmap_addr + offset);
                if (m->addr == PLATFORM_MEM_START
                    && m->type == MULTIBOOT_MEMORY_AVAILABLE) {
                        break;
@@ -154,6 +154,6 @@ void _libkvmplat_entry(void *arg)
         */
        uk_printd(DLVL_INFO, "Switch from bootstrap stack to stack @%p\n",
                                _libkvmplat_mem_end);
-       _libkvmplat_newstack((uint64_t) _libkvmplat_mem_end,
+       _libkvmplat_newstack((__u64) _libkvmplat_mem_end,
                                _libkvmplat_entry2, 0);
 }
-- 
2.1.4


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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