Skip to content

Commit

Permalink
core: move hypercall interface to global include directory
Browse files Browse the repository at this point in the history
Keep dual-licensed code and/or headers shared between components at one
single place.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Cc: Antonios Motakis <antonios.motakis@huawei.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
[Jan: updated also header_check with new include paths]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
rralf authored and jan-kiszka committed Dec 13, 2017
1 parent 64913f7 commit dfe694d
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 6 deletions.
7 changes: 4 additions & 3 deletions configs/Makefile
Expand Up @@ -13,11 +13,12 @@
subdir-y := dts

LINUXINCLUDE := -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
-I$(src)/../hypervisor/include
-I$(src)/../hypervisor/include \
-I$(src)/../include
KBUILD_CFLAGS := -Wextra

ifneq ($(wildcard $(obj)/../hypervisor/include/jailhouse/config.h),)
KBUILD_CFLAGS += -include $(obj)/../hypervisor/include/jailhouse/config.h
ifneq ($(wildcard $(obj)/../include/jailhouse/config.h),)
KBUILD_CFLAGS += -include $(obj)/../include/jailhouse/config.h
endif

OBJCOPYFLAGS := -O binary
Expand Down
4 changes: 3 additions & 1 deletion driver/Makefile
Expand Up @@ -14,7 +14,9 @@
obj-m := jailhouse.o

ccflags-y := -I$(src)/../hypervisor/arch/$(SRCARCH)/include \
-I$(src)/../hypervisor/include
-I$(src)/../hypervisor/include \
-I$(src)/../include/arch/$(SRCARCH) \
-I$(src)/../include

jailhouse-y := cell.o main.o sysfs.o
jailhouse-$(CONFIG_PCI) += pci.o
Expand Down
4 changes: 3 additions & 1 deletion hypervisor/Makefile
Expand Up @@ -20,7 +20,9 @@

LINUXINCLUDE := -I$(src)/arch/$(SRCARCH)/include \
-I$(src)/arch/$(SRCARCH)/include/generated \
-I$(src)/include
-I$(src)/include \
-I$(src)/../include/arch/$(SRCARCH) \
-I$(src)/../include
KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \
-Wmissing-declarations -Wmissing-prototypes \
-fno-strict-aliasing -fno-pic -fno-common \
Expand Down
File renamed without changes.
Expand Up @@ -8,6 +8,32 @@
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Alternatively, you can use or redistribute this file under the following
* BSD license:
*
* 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.
*
* 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.
*/

#define JAILHOUSE_CALL_INS "hvc #0x4a48"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion inmates/Makefile
Expand Up @@ -17,7 +17,9 @@ export INMATES_LIB

INCLUDES := -I$(INMATES_LIB) \
-I$(src)/../hypervisor/arch/$(SRCARCH)/include \
-I$(src)/../hypervisor/include
-I$(src)/../hypervisor/include \
-I$(src)/../include/arch/$(SRCARCH) \
-I$(src)/../include

ifeq ($(subst arm64,arm,$(SRCARCH)),arm)
INCLUDES += -I$(src)/../hypervisor/arch/arm-common/include
Expand Down
1 change: 1 addition & 0 deletions scripts/header_check
Expand Up @@ -23,6 +23,7 @@ fi
CFLAGS="-fno-builtin-ffsl -Wall -Wstrict-prototypes -Wtype-limits \
-Wmissing-declarations -Wmissing-prototypes \
-Ihypervisor/arch/$ARCH/include -Ihypervisor/include \
-Iinclude/arch/$ARCH -Iinclude \
$INCLUDE_ARM_COMMON $EXTRA_CFLAGS"

test_compile()
Expand Down

0 comments on commit dfe694d

Please sign in to comment.