]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.9.13/acpica-linuxize-restore-and-fix-intel-compiler-build.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.13 / acpica-linuxize-restore-and-fix-intel-compiler-build.patch
1 From ffab9188e444854882dbc291500d576d6bad7b7b Mon Sep 17 00:00:00 2001
2 From: Lv Zheng <lv.zheng@intel.com>
3 Date: Wed, 8 Feb 2017 11:00:01 +0800
4 Subject: ACPICA: Linuxize: Restore and fix Intel compiler build
5
6 From: Lv Zheng <lv.zheng@intel.com>
7
8 commit ffab9188e444854882dbc291500d576d6bad7b7b upstream.
9
10 ACPICA commit b59347d0b8b676cb555fe8da5cad08fcd4eeb0d3
11
12 The following commit cleans up compiler specific inclusions:
13
14 Commit: 9fa1cebdbfff3db8953cebca8ee327d75edefc40
15 Subject: ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers
16
17 But breaks one thing due to the following old issue:
18
19 Buidling Linux kernel with Intel compiler originally depends on acgcc.h
20 not acintel.h.
21
22 So after making Intel compiler build working in ACPICA upstream by
23 correctly using acintel.h, it becomes unable to build Linux kernel using
24 Intel compiler as there is no acintel.h in the kernel source tree.
25
26 This patch releases acintel.h to Linux kernel and fixes its inclusion in
27 acenv.h.
28
29 Fixes: 9fa1cebdbfff (ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers)
30 Link: https://github.com/acpica/acpica/commit/b59347d0
31 Tested-by: Stepan M Mishura <stepan.m.mishura@intel.com>
32 Signed-off-by: Lv Zheng <lv.zheng@intel.com>
33 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
34 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35
36 ---
37 include/acpi/platform/acenv.h | 2
38 include/acpi/platform/acintel.h | 87 ++++++++++++++++++++++++++++++++++++++++
39 2 files changed, 88 insertions(+), 1 deletion(-)
40
41 --- a/include/acpi/platform/acenv.h
42 +++ b/include/acpi/platform/acenv.h
43 @@ -177,7 +177,7 @@
44 #include "acmsvc.h"
45
46 #elif defined(__INTEL_COMPILER)
47 -#include "acintel.h"
48 +#include <acpi/platform/acintel.h>
49
50 #endif
51
52 --- /dev/null
53 +++ b/include/acpi/platform/acintel.h
54 @@ -0,0 +1,87 @@
55 +/******************************************************************************
56 + *
57 + * Name: acintel.h - VC specific defines, etc.
58 + *
59 + *****************************************************************************/
60 +
61 +/*
62 + * Copyright (C) 2000 - 2017, Intel Corp.
63 + * All rights reserved.
64 + *
65 + * Redistribution and use in source and binary forms, with or without
66 + * modification, are permitted provided that the following conditions
67 + * are met:
68 + * 1. Redistributions of source code must retain the above copyright
69 + * notice, this list of conditions, and the following disclaimer,
70 + * without modification.
71 + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
72 + * substantially similar to the "NO WARRANTY" disclaimer below
73 + * ("Disclaimer") and any redistribution must be conditioned upon
74 + * including a substantially similar Disclaimer requirement for further
75 + * binary redistribution.
76 + * 3. Neither the names of the above-listed copyright holders nor the names
77 + * of any contributors may be used to endorse or promote products derived
78 + * from this software without specific prior written permission.
79 + *
80 + * Alternatively, this software may be distributed under the terms of the
81 + * GNU General Public License ("GPL") version 2 as published by the Free
82 + * Software Foundation.
83 + *
84 + * NO WARRANTY
85 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
87 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
88 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
89 + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
90 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
91 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
92 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
93 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
94 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
95 + * POSSIBILITY OF SUCH DAMAGES.
96 + */
97 +
98 +#ifndef __ACINTEL_H__
99 +#define __ACINTEL_H__
100 +
101 +/*
102 + * Use compiler specific <stdarg.h> is a good practice for even when
103 + * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
104 + */
105 +#include <stdarg.h>
106 +
107 +/* Configuration specific to Intel 64-bit C compiler */
108 +
109 +#define COMPILER_DEPENDENT_INT64 __int64
110 +#define COMPILER_DEPENDENT_UINT64 unsigned __int64
111 +#define ACPI_INLINE __inline
112 +
113 +/*
114 + * Calling conventions:
115 + *
116 + * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
117 + * ACPI_EXTERNAL_XFACE - External ACPI interfaces
118 + * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
119 + * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
120 + */
121 +#define ACPI_SYSTEM_XFACE
122 +#define ACPI_EXTERNAL_XFACE
123 +#define ACPI_INTERNAL_XFACE
124 +#define ACPI_INTERNAL_VAR_XFACE
125 +
126 +/* remark 981 - operands evaluated in no particular order */
127 +#pragma warning(disable:981)
128 +
129 +/* warn C4100: unreferenced formal parameter */
130 +#pragma warning(disable:4100)
131 +
132 +/* warn C4127: conditional expression is constant */
133 +#pragma warning(disable:4127)
134 +
135 +/* warn C4706: assignment within conditional expression */
136 +#pragma warning(disable:4706)
137 +
138 +/* warn C4214: bit field types other than int */
139 +#pragma warning(disable:4214)
140 +
141 +#endif /* __ACINTEL_H__ */