summaryrefslogtreecommitdiff
path: root/sysutils/xenkernel46
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-05-07 21:21:01 +0000
committerjoerg <joerg@pkgsrc.org>2017-05-07 21:21:01 +0000
commit717010c2d7faa96d035f0c981f183bb10e361205 (patch)
tree85a025e6f5701a75018a6c0ef8332e9af86c48b7 /sysutils/xenkernel46
parentab86d6b879edd1bc7115df26833ec57545b0be45 (diff)
downloadpkgsrc-717010c2d7faa96d035f0c981f183bb10e361205.tar.gz
Merge upstream patches for fixing the build with clang.
Diffstat (limited to 'sysutils/xenkernel46')
-rw-r--r--sysutils/xenkernel46/distinfo6
-rw-r--r--sysutils/xenkernel46/patches/patch-xen_arch_arm_xen.lds.S12
-rw-r--r--sysutils/xenkernel46/patches/patch-xen_arch_x86_alternative.c22
-rw-r--r--sysutils/xenkernel46/patches/patch-xen_common_efi_boot.c77
-rw-r--r--sysutils/xenkernel46/patches/patch-xen_include_xen_init.h12
5 files changed, 128 insertions, 1 deletions
diff --git a/sysutils/xenkernel46/distinfo b/sysutils/xenkernel46/distinfo
index a5c5fde18ee..6603faad7db 100644
--- a/sysutils/xenkernel46/distinfo
+++ b/sysutils/xenkernel46/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2017/04/08 12:17:58 spz Exp $
+$NetBSD: distinfo,v 1.9 2017/05/07 21:21:01 joerg Exp $
SHA1 (xen-4.6.5.tar.gz) = af371af662211ee1480167b6c9e35142156f3a8d
RMD160 (xen-4.6.5.tar.gz) = 3f2468d7d3715d14842ac57b2180118ef48e93fa
@@ -8,11 +8,15 @@ SHA1 (patch-Config.mk) = a2a104d023cea4e551a3ad40927d4884d6c610bf
SHA1 (patch-XSA-212) = 4637d51bcbb3b11fb0e22940f824ebacdaa15b4f
SHA1 (patch-tools_xentrace_xenalyze.c) = ab973cb7090dc90867dcddf9ab8965f8f2f36c46
SHA1 (patch-xen_Makefile) = be3f4577a205b23187b91319f91c50720919f70b
+SHA1 (patch-xen_arch_arm_xen.lds.S) = df0e4a13b9b3ae863448172bea28b1b92296327b
SHA1 (patch-xen_arch_x86_Rules.mk) = 7b0894ba7311edb02118a021671f304cf3872154
+SHA1 (patch-xen_arch_x86_alternative.c) = d86b414989b794202adf91735536cde96673439e
SHA1 (patch-xen_arch_x86_mm.c) = 3c1435fa5db6a0f542e5efe726997f262fa04041
SHA1 (patch-xen_arch_x86_xen.lds.S) = 58a890c404ca4f86ccfb58cf5a83b07e235034fc
+SHA1 (patch-xen_common_efi_boot.c) = 38e959b686c1d8c2b2dc173edda1a6d40607c63e
SHA1 (patch-xen_common_page__alloc.c) = c4d606de1cada8cf89b5abd16efada3d58c68a03
SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = f72fd4bb2aeeaeb0b167031dfd5498e73666aa4e
SHA1 (patch-xen_include_asm-x86_current.h) = 8a21577be06383c0c7f53c15ba828f77fb6314ad
SHA1 (patch-xen_include_asm-x86_spinlock.h) = a78fe84c87632f0524af255f173676732418a75e
+SHA1 (patch-xen_include_xen_init.h) = 40d28d422687eac0c8224508619985f7337edddd
SHA1 (patch-xen_include_xen_lib.h) = 82a219b7d9c5deaa2b8e0adc774f60395adc4815
diff --git a/sysutils/xenkernel46/patches/patch-xen_arch_arm_xen.lds.S b/sysutils/xenkernel46/patches/patch-xen_arch_arm_xen.lds.S
new file mode 100644
index 00000000000..4321f4d28a6
--- /dev/null
+++ b/sysutils/xenkernel46/patches/patch-xen_arch_arm_xen.lds.S
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_arch_arm_xen.lds.S,v 1.1 2017/05/07 21:21:01 joerg Exp $
+
+--- xen/arch/arm/xen.lds.S.orig 2016-06-20 12:08:22.000000000 +0000
++++ xen/arch/arm/xen.lds.S
+@@ -110,6 +110,7 @@ SECTIONS
+ . = ALIGN(PAGE_SIZE);
+ .init.data : {
+ *(.init.rodata)
++ *(.init.rodata.rel)
+ *(.init.rodata.str*)
+ *(.init.data)
+ *(.init.data.rel)
diff --git a/sysutils/xenkernel46/patches/patch-xen_arch_x86_alternative.c b/sysutils/xenkernel46/patches/patch-xen_arch_x86_alternative.c
new file mode 100644
index 00000000000..12cc1621345
--- /dev/null
+++ b/sysutils/xenkernel46/patches/patch-xen_arch_x86_alternative.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-xen_arch_x86_alternative.c,v 1.1 2017/05/07 21:21:01 joerg Exp $
+
+--- xen/arch/x86/alternative.c.orig 2016-06-20 12:08:22.000000000 +0000
++++ xen/arch/x86/alternative.c
+@@ -38,7 +38,7 @@ static const unsigned char k8nops[] __in
+ K8_NOP7,
+ K8_NOP8
+ };
+-static const unsigned char * const k8_nops[ASM_NOP_MAX+1] = {
++static const unsigned char * const k8_nops[ASM_NOP_MAX+1] __initconstrel = {
+ NULL,
+ k8nops,
+ k8nops + 1,
+@@ -62,7 +62,7 @@ static const unsigned char p6nops[] __in
+ P6_NOP7,
+ P6_NOP8
+ };
+-static const unsigned char * const p6_nops[ASM_NOP_MAX+1] = {
++static const unsigned char * const p6_nops[ASM_NOP_MAX+1] __initconstrel = {
+ NULL,
+ p6nops,
+ p6nops + 1,
diff --git a/sysutils/xenkernel46/patches/patch-xen_common_efi_boot.c b/sysutils/xenkernel46/patches/patch-xen_common_efi_boot.c
new file mode 100644
index 00000000000..53698fa8bee
--- /dev/null
+++ b/sysutils/xenkernel46/patches/patch-xen_common_efi_boot.c
@@ -0,0 +1,77 @@
+$NetBSD: patch-xen_common_efi_boot.c,v 1.1 2017/05/07 21:21:01 joerg Exp $
+
+--- xen/common/efi/boot.c.orig 2016-06-20 12:08:22.000000000 +0000
++++ xen/common/efi/boot.c
+@@ -241,53 +241,33 @@ static void __init noreturn blexit(const
+ /* generic routine for printing error messages */
+ static void __init PrintErrMesg(const CHAR16 *mesg, EFI_STATUS ErrCode)
+ {
++ static const CHAR16* const ErrCodeToStr[] __initconstrel = {
++ [~EFI_ERROR_MASK & EFI_NOT_FOUND] = L"Not found",
++ [~EFI_ERROR_MASK & EFI_NO_MEDIA] = L"The device has no media",
++ [~EFI_ERROR_MASK & EFI_MEDIA_CHANGED] = L"Media changed",
++ [~EFI_ERROR_MASK & EFI_DEVICE_ERROR] = L"Device error",
++ [~EFI_ERROR_MASK & EFI_VOLUME_CORRUPTED] = L"Volume corrupted",
++ [~EFI_ERROR_MASK & EFI_ACCESS_DENIED] = L"Access denied",
++ [~EFI_ERROR_MASK & EFI_OUT_OF_RESOURCES] = L"Out of resources",
++ [~EFI_ERROR_MASK & EFI_VOLUME_FULL] = L"Volume is full",
++ [~EFI_ERROR_MASK & EFI_SECURITY_VIOLATION] = L"Security violation",
++ [~EFI_ERROR_MASK & EFI_CRC_ERROR] = L"CRC error",
++ [~EFI_ERROR_MASK & EFI_COMPROMISED_DATA] = L"Compromised data",
++ [~EFI_ERROR_MASK & EFI_BUFFER_TOO_SMALL] = L"Buffer too small",
++ };
++ EFI_STATUS ErrIdx = ErrCode & ~EFI_ERROR_MASK;
++
+ StdOut = StdErr;
+ PrintErr((CHAR16 *)mesg);
+ PrintErr(L": ");
+
+- switch (ErrCode)
++ if( (ErrIdx < ARRAY_SIZE(ErrCodeToStr)) && ErrCodeToStr[ErrIdx] )
++ mesg = ErrCodeToStr[ErrIdx];
++ else
+ {
+- case EFI_NOT_FOUND:
+- mesg = L"Not found";
+- break;
+- case EFI_NO_MEDIA:
+- mesg = L"The device has no media";
+- break;
+- case EFI_MEDIA_CHANGED:
+- mesg = L"Media changed";
+- break;
+- case EFI_DEVICE_ERROR:
+- mesg = L"Device error";
+- break;
+- case EFI_VOLUME_CORRUPTED:
+- mesg = L"Volume corrupted";
+- break;
+- case EFI_ACCESS_DENIED:
+- mesg = L"Access denied";
+- break;
+- case EFI_OUT_OF_RESOURCES:
+- mesg = L"Out of resources";
+- break;
+- case EFI_VOLUME_FULL:
+- mesg = L"Volume is full";
+- break;
+- case EFI_SECURITY_VIOLATION:
+- mesg = L"Security violation";
+- break;
+- case EFI_CRC_ERROR:
+- mesg = L"CRC error";
+- break;
+- case EFI_COMPROMISED_DATA:
+- mesg = L"Compromised data";
+- break;
+- case EFI_BUFFER_TOO_SMALL:
+- mesg = L"Buffer too small";
+- break;
+- default:
+ PrintErr(L"ErrCode: ");
+ DisplayUint(ErrCode, 0);
+ mesg = NULL;
+- break;
+ }
+ blexit(mesg);
+ }
diff --git a/sysutils/xenkernel46/patches/patch-xen_include_xen_init.h b/sysutils/xenkernel46/patches/patch-xen_include_xen_init.h
new file mode 100644
index 00000000000..30fcf53f355
--- /dev/null
+++ b/sysutils/xenkernel46/patches/patch-xen_include_xen_init.h
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_include_xen_init.h,v 1.1 2017/05/07 21:21:01 joerg Exp $
+
+--- xen/include/xen/init.h.orig 2016-06-20 12:08:22.000000000 +0000
++++ xen/include/xen/init.h
+@@ -11,6 +11,7 @@
+ #define __exit __text_section(".exit.text")
+ #define __initdata __section(".init.data")
+ #define __initconst __section(".init.rodata")
++#define __initconstrel __section(".init.rodata.rel")
+ #define __exitdata __used_section(".exit.data")
+ #define __initsetup __used_section(".init.setup")
+ #define __init_call(lvl) __used_section(".initcall" lvl ".init")