@@ -434,6 +434,8 @@ dummy := $(call unnest-vars,, \
audio-obj-m \
trace-obj-y)
+RECURSIVE_TARGETS := all clean install
+
include $(SRC_PATH)/tests/Makefile.include
all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
@@ -454,7 +456,7 @@ config-host.h-timestamp: config-host.mak
qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
-TARGET_DIRS_RULES := $(foreach t, all clean install, $(addsuffix /$(t), $(TARGET_DIRS)))
+TARGET_DIRS_RULES:=$(foreach t, $(RECURSIVE_TARGETS), $(addsuffix /$(t), $(TARGET_DIRS)))
SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
$(SOFTMMU_ALL_RULES): $(authz-obj-y)
@@ -41,6 +41,7 @@ STPFILES=
# Makefile Tests
include $(SRC_PATH)/tests/tcg/Makefile.include
+include $(SRC_PATH)/tests/check-headers.mak
config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
@@ -220,6 +221,23 @@ hmp-commands.h: $(SRC_PATH)/hmp-commands.hx $(SRC_PATH)/scripts/hxtool
hmp-commands-info.h: $(SRC_PATH)/hmp-commands-info.hx $(SRC_PATH)/scripts/hxtool
$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$(TARGET_DIR)$@")
+.PHONY: check-headers
+ifeq ($(wildcard $(SRC_PATH)/.git),)
+check-headers check-bad-headers:
+ @echo " SKIP $@ (requires a git tree)"
+else
+check-headers: CFLAGS += -g0 # save disk space
+check-headers: $(check-target-header-tests:.c=.o)
+
+# Expected to fail:
+check-bad-headers: $(check-bad-target-header-tests:.c=.o)
+
+.SECONDARY: $(check-target-header-tests) $(check-bad-target-header-tests)
+$(check-target-header-tests) $(check-bad-target-header-tests): tests/header-test-template.c
+ @mkdir -p $(dir $@)
+ @sed 's,@header@,$(subst tests/headers-tgt/,,$(@:.c=.h)),' <$< >$@
+endif
+
clean: clean-target
rm -f *.a *~ $(PROGS)
rm -f $(shell find . -name '*.[od]')
@@ -258,3 +276,5 @@ Makefile: $(generated-files-y)
.PHONY: coverage-report
coverage-report: $(CURDIR)/reports/coverage/coverage-report.html
+
+-include $(check-target-header-tests:.c=.d) $(check-bad-target-header-tests:.c=.d)
@@ -12,6 +12,9 @@
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_RAW_AIO_H
#define QEMU_RAW_AIO_H
@@ -9,6 +9,9 @@
* This work is licensed under the terms of the GNU LGPL, version 2 or later.
* See the COPYING.LIB file in the top-level directory.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef BLOCK_WRITE_THRESHOLD_H
#define BLOCK_WRITE_THRESHOLD_H
@@ -21,6 +21,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
+/* FIXME Does not pass make check-headers without CONFIG_WIN32, yet! */
+
#ifndef CHAR_WIN_H
#define CHAR_WIN_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers without CONFIG_SPICE, yet! */
+
#ifndef CHARDEV_SPICE_H
#define CHARDEV_SPICE_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_DISAS_H
#define QEMU_DISAS_H
@@ -16,6 +16,10 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CPU_ALL_H
#define CPU_ALL_H
@@ -16,6 +16,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+/* NOTE: May only be included into target-dependent code */
+
#ifndef CPU_DEFS_H
#define CPU_DEFS_H
@@ -44,6 +44,10 @@
* (for softmmu configs) a target-specific MMU mode suffix as defined
* in target cpu.h.
*/
+
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CPU_LDST_H
#define CPU_LDST_H
@@ -24,6 +24,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#if !defined(SOFTMMU_CODE_ACCESS)
#include "trace-root.h"
#endif
@@ -23,6 +23,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#if !defined(CODE_ACCESS)
#include "trace-root.h"
#endif
@@ -16,6 +16,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CPUTLB_H
#define CPUTLB_H
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef EXEC_ALL_H
#define EXEC_ALL_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef GEN_ICOUNT_H
#define GEN_ICOUNT_H
@@ -1,6 +1,8 @@
/* Helper file for declaring TCG helper functions.
This one expands generation functions for tcg opcodes. */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HELPER_GEN_H
#define HELPER_GEN_H
@@ -1,6 +1,8 @@
/* Helper file for declaring TCG helper functions.
This one expands prototypes for the helper functions. */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HELPER_PROTO_H
#define HELPER_PROTO_H
@@ -1,6 +1,8 @@
/* Helper file for declaring TCG helper functions.
This one defines data structures private to tcg.c. */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HELPER_TCG_H
#define HELPER_TCG_H
@@ -21,6 +21,8 @@
* IO ports API
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef IOPORT_H
#define IOPORT_H
@@ -17,6 +17,8 @@
* internals and the TCG TLB code. Do not include it from elsewhere.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MEMORY_INTERNAL_H
#define MEMORY_INTERNAL_H
@@ -19,6 +19,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifdef TARGET_ENDIANNESS
extern uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#define ADDRESS_SPACE_LD_CACHED(size) \
glue(glue(address_space_ld, size), glue(ENDIANNESS, _cached))
#define ADDRESS_SPACE_LD_CACHED_SLOW(size) \
@@ -19,6 +19,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifdef TARGET_ENDIANNESS
static inline uint32_t glue(ldl_phys, SUFFIX)(ARG1_DECL, hwaddr addr)
{
@@ -16,6 +16,9 @@
* The functions declared here will be removed soon.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef RAM_ADDR_H
#define RAM_ADDR_H
@@ -7,6 +7,9 @@
* This code is licensed under the GPL
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef SOFTMMU_SEMI_H
#define SOFTMMU_SEMI_H
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef EXEC_TB_HASH_H
#define EXEC_TB_HASH_H
@@ -4,6 +4,9 @@
* License: GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
+
+/* NOTE: May only be included into target-dependent code */
+
#ifndef EXEC_TB_LOOKUP_H
#define EXEC_TB_LOOKUP_H
@@ -7,6 +7,9 @@
* See the COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef EXEC__TRANSLATOR_H
#define EXEC__TRANSLATOR_H
@@ -1,3 +1,5 @@
+/* NOTE: May only be included into target-dependent code */
+
#ifndef EXEC_USER_ABITYPES_H
#define EXEC_USER_ABITYPES_H
@@ -16,6 +16,10 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef THUNK_H
#define THUNK_H
@@ -79,6 +79,8 @@ this code that are retained.
* version 2 or later. See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FPU_SOFTFLOAT_MACROS_H
#define FPU_SOFTFLOAT_MACROS_H
@@ -79,6 +79,8 @@ this code that are retained.
* version 2 or later. See the COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+
#ifndef SOFTFLOAT_H
#define SOFTFLOAT_H
@@ -22,6 +22,9 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ACPI_PCI_H
#define HW_ACPI_PCI_H
@@ -6,6 +6,9 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ACPI_TCO_H
#define HW_ACPI_TCO_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_STM32F2XX_ADC_H
#define HW_STM32F2XX_ADC_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_ALLWINNER_A10_H
#define HW_ARM_ALLWINNER_A10_H
@@ -86,6 +86,9 @@
* + named GPIO outputs mscexp_ns[0..15]
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ARMSSE_H
#define ARMSSE_H
@@ -7,6 +7,9 @@
* This code is licensed under the GPL version 2 or later.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_ARMV7M_H
#define HW_ARM_ARMV7M_H
@@ -9,6 +9,8 @@
* the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ASPEED_SOC_H
#define ASPEED_SOC_H
@@ -8,6 +8,8 @@
* This code is licensed under the GNU GPLv2 and later.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef BCM2835_PERIPHERALS_H
#define BCM2835_PERIPHERALS_H
@@ -8,6 +8,8 @@
* This code is licensed under the GNU GPLv2 and later.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef BCM2836_H
#define BCM2836_H
@@ -15,6 +15,9 @@
*
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_DIGIC_H
#define HW_ARM_DIGIC_H
@@ -19,9 +19,10 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
- *
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef EXYNOS4210_H
#define EXYNOS4210_H
@@ -14,6 +14,8 @@
* for more details.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FSL_IMX25_H
#define FSL_IMX25_H
@@ -14,6 +14,8 @@
* for more details.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FSL_IMX31_H
#define FSL_IMX31_H
@@ -14,6 +14,9 @@
* for more details.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FSL_IMX6_H
#define FSL_IMX6_H
@@ -14,6 +14,9 @@
* GNU General Public License for more details.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FSL_IMX6UL_H
#define FSL_IMX6UL_H
@@ -16,6 +16,9 @@
* GNU General Public License for more details.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef FSL_IMX7_H
#define FSL_IMX7_H
@@ -22,6 +22,9 @@
* THE SOFTWARE.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_MSF2_SOC_H
#define HW_ARM_MSF2_SOC_H
@@ -7,6 +7,9 @@
* the COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef NRF51_SOC_H
#define NRF51_SOC_H
@@ -17,6 +17,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_ARM_OMAP_H
#define HW_ARM_OMAP_H
@@ -3,6 +3,9 @@
*
* This file is licensed under the GNU GPL.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_SHARPSL_H
#define QEMU_SHARPSL_H
@@ -22,6 +22,9 @@
* THE SOFTWARE.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_STM32F205_SOC_H
#define HW_ARM_STM32F205_SOC_H
@@ -15,6 +15,8 @@
* for more details.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef XLNX_ZYNQMP_H
#define XLNX_ZYNQMP_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_FDC_H
#define HW_FDC_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_FLASH_H
#define HW_FLASH_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ESCC_H
#define HW_ESCC_H
@@ -12,6 +12,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef XILINX_UARTLITE_H
#define XILINX_UARTLITE_H
@@ -15,6 +15,8 @@
* for more details.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef GENERIC_LOADER_H
#define GENERIC_LOADER_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ETRAXFS_H
#define HW_ETRAXFS_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ETRAXFS_DMA_H
#define HW_ETRAXFS_DMA_H
@@ -8,6 +8,8 @@
* This code is licensed under the GNU GPLv2 and later.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef BCM2835_FB_H
#define BCM2835_FB_H
@@ -16,6 +16,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef I2C_DDC_H
#define I2C_DDC_H
@@ -21,6 +21,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef XLNX_DP_H
#define XLNX_DP_H
@@ -22,6 +22,8 @@
*
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef XLNX_DPDMA_H
#define XLNX_DPDMA_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
static void glue(bswap_ehdr, SZ)(struct elfhdr *ehdr)
{
bswap16s(&ehdr->e_type); /* Object file type */
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_EMPTY_SLOT_H
#define HW_EMPTY_SLOT_H
@@ -11,6 +11,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef BCM2835_GPIO_H
#define BCM2835_GPIO_H
@@ -7,6 +7,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_HYPERV_HYPERV_H
#define HW_HYPERV_HYPERV_H
@@ -17,6 +17,9 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ASPEED_I2C_H
#define ASPEED_I2C_H
@@ -18,6 +18,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_APIC_INTERNAL_H
#define QEMU_APIC_INTERNAL_H
@@ -19,6 +19,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_IOAPIC_INTERNAL_H
#define QEMU_IOAPIC_INTERNAL_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_HID_H
#define QEMU_HID_H
@@ -8,6 +8,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_INPUT_TSC2XXX_H
#define HW_INPUT_TSC2XXX_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ALLWINNER_A10_PIC_H
#define ALLWINNER_A10_PIC_H
@@ -7,6 +7,9 @@
* This code is licensed under the GPL version 2 or later.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_ARM_ARMV7M_NVIC_H
#define HW_ARM_ARMV7M_NVIC_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_INTC_HEATHROW_PIC_H
#define HW_INTC_HEATHROW_PIC_H
@@ -8,6 +8,9 @@
*
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MIPS_GIC_H
#define MIPS_GIC_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_VT82C686_H
#define HW_VT82C686_H
@@ -10,6 +10,8 @@
* See the COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+
#ifndef HW_KVM_CLOCK_H
#define HW_KVM_CLOCK_H
@@ -1,3 +1,5 @@
+/* NOTE: May only be included into target-dependent code */
+
#ifndef HW_MIPS_BIOS_H
#define HW_MIPS_BIOS_H
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MIPS_CPS_H
#define MIPS_CPS_H
@@ -1,3 +1,5 @@
+/* NOTE: May only be included into target-dependent code */
+
#ifndef HW_MIPS_CPUDEVS_H
#define HW_MIPS_CPUDEVS_H
@@ -3,6 +3,8 @@
* This code is licensed under the GNU GPLv2 and later.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef BCM2835_PROPERTY_H
#define BCM2835_PROPERTY_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CUDA_H
#define CUDA_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MACIO_GPIO_H
#define MACIO_GPIO_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MACIO_H
#define MACIO_H
@@ -7,6 +7,8 @@
* Copyright (C) 2016 Ben Herrenschmidt
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PMU_H
#define PMU_H
@@ -7,6 +7,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MIPS_CMGCR_H
#define MIPS_CMGCR_H
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MIPS_CPC_H
#define MIPS_CPC_H
@@ -11,6 +11,9 @@
* See the COPYING file in the top-level directory.
*
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_MISC_PVPANIC_H
#define HW_MISC_PVPANIC_H
@@ -20,6 +20,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ALLWINNER_EMAC_H
#define ALLWINNER_EMAC_H
@@ -26,6 +26,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef LANCE_H
#define LANCE_H
@@ -15,6 +15,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CHRP_NVRAM_H
#define CHRP_NVRAM_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_PCI_HOST_SABRE_H
#define HW_PCI_HOST_SABRE_H
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PCI_HOST_SPAPR_H
#define PCI_HOST_SPAPR_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef UNINORTH_H
#define UNINORTH_H
@@ -18,6 +18,8 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_PCIE_AER_H
#define QEMU_PCIE_AER_H
@@ -7,6 +7,8 @@
* COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+
#ifndef PPC_FDT_H
#define PPC_FDT_H
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC_PNV_H
#define PPC_PNV_H
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC_PNV_CORE_H
#define PPC_PNV_CORE_H
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC_PNV_XSCOM_H
#define PPC_PNV_XSCOM_H
@@ -1,3 +1,5 @@
+/* NOTE: May only be included into target-dependent code */
+
#ifndef HW_PPC_H
#define HW_PPC_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC4XX_H
#define PPC4XX_H
@@ -1,3 +1,6 @@
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SPAPR_H
#define HW_SPAPR_H
@@ -6,6 +6,10 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
+
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SPAPR_CPU_CORE_H
#define HW_SPAPR_CPU_CORE_H
@@ -7,6 +7,8 @@
* COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SPAPR_IRQ_H
#define HW_SPAPR_IRQ_H
@@ -34,6 +34,8 @@
* See the COPYING file in the top-level directory.
*/
+/* NOTE: May only be included into target-dependent code */
+
#ifndef SPAPR_OVEC_H
#define SPAPR_OVEC_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SPAPR_VIO_H
#define HW_SPAPR_VIO_H
@@ -7,6 +7,8 @@
* COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC_SPAPR_XIVE_H
#define PPC_SPAPR_XIVE_H
@@ -24,6 +24,9 @@
* THE SOFTWARE.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef XICS_SPAPR_H
#define XICS_SPAPR_H
@@ -13,6 +13,8 @@
* COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef PPC_XIVE_REGS_H
#define PPC_XIVE_REGS_H
@@ -17,6 +17,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef RISCV_BOOT_H
#define RISCV_BOOT_H
@@ -18,6 +18,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_RISCV_HART_H
#define HW_RISCV_HART_H
@@ -17,6 +17,9 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_RISCV_HTIF_H
#define HW_RISCV_HTIF_H
@@ -17,6 +17,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_CLINT_H
#define HW_SIFIVE_CLINT_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_E_H
#define HW_SIFIVE_E_H
@@ -18,6 +18,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_PLIC_H
#define HW_SIFIVE_PLIC_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_PRCI_H
#define HW_SIFIVE_PRCI_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_TEST_H
#define HW_SIFIVE_TEST_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_U_H
#define HW_SIFIVE_U_H
@@ -17,6 +17,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SIFIVE_UART_H
#define HW_SIFIVE_UART_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_RISCV_SPIKE_H
#define HW_RISCV_SPIKE_H
@@ -16,6 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_RISCV_VIRT_H
#define HW_RISCV_VIRT_H
@@ -10,6 +10,9 @@
* directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_S390X_3270_CCW_H
#define HW_S390X_3270_CCW_H
@@ -7,6 +7,9 @@
* your option) any later version. See the COPYING file in the top-level
* directory.
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_S390X_AP_DEVICE_H
#define HW_S390X_AP_DEVICE_H
@@ -10,6 +10,8 @@
* directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_S390X_CSS_BRIDGE_H
#define HW_S390X_CSS_BRIDGE_H
#include "qom/object.h"
@@ -9,6 +9,9 @@
* directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CSS_H
#define CSS_H
@@ -10,6 +10,9 @@
* directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_S390_CCW_H
#define HW_S390_CCW_H
@@ -9,6 +9,9 @@
* directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef S390_STORAGE_ATTRIBUTES_H
#define S390_STORAGE_ATTRIBUTES_H
@@ -8,6 +8,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_S390_TOD_H
#define HW_S390_TOD_H
@@ -11,6 +11,9 @@
* directory.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_VFIO_CCW_H
#define HW_VFIO_CCW_H
@@ -6,6 +6,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef SEMIHOST_CONSOLE_H
#define SEMIHOST_CONSOLE_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_SH_H
#define QEMU_SH_H
/* Definitions for SH board emulation. */
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef SH_INTC_H
#define SH_INTC_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_SPARC_SPARC64_H
#define HW_SPARC_SPARC64_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ASPEED_SMC_H
#define ASPEED_SMC_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef XILINX_SPIPS_H
#define XILINX_SPIPS_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef ALLWINNER_A10_PIT_H
#define ALLWINNER_A10_PIT_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_I8254_INTERNAL_H
#define QEMU_I8254_INTERNAL_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_M48T59_H
#define HW_M48T59_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MC146818RTC_H
#define MC146818RTC_H
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MC146818RTC_REGS_H
#define MC146818RTC_REGS_H
@@ -1 +1,3 @@
+/* FIXME Does not pass make check-headers, yet! */
+
void sun4v_rtc_init(hwaddr addr);
@@ -24,6 +24,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_TIMER_XLNX_ZYNQMP_RTC_H
#define HW_TIMER_XLNX_ZYNQMP_RTC_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VFIO_VFIO_AMD_XGBE_H
#define HW_VFIO_VFIO_AMD_XGBE_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VFIO_VFIO_CALXEDA_XGMAC_H
#define HW_VFIO_VFIO_CALXEDA_XGMAC_H
@@ -18,6 +18,8 @@
* Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VFIO_VFIO_COMMON_H
#define HW_VFIO_VFIO_COMMON_H
@@ -13,6 +13,8 @@
* Copyright Red Hat, Inc. 2012
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VFIO_VFIO_PLATFORM_H
#define HW_VFIO_VFIO_PLATFORM_H
@@ -13,6 +13,9 @@
*
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_VIRTIO_ACCESS_H
#define QEMU_VIRTIO_ACCESS_H
@@ -11,6 +11,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HW_VIRTIO_GPU_BSWAP_H
#define HW_VIRTIO_GPU_BSWAP_H
@@ -11,6 +11,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VIRTIO_GPU_PCI_H
#define HW_VIRTIO_GPU_PCI_H
@@ -11,6 +11,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VIRTIO_GPU_PIXMAN_H
#define HW_VIRTIO_GPU_PIXMAN_H
@@ -11,6 +11,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef HW_VIRTIO_GPU_H
#define HW_VIRTIO_GPU_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_VIRTIO_INPUT_H
#define QEMU_VIRTIO_INPUT_H
@@ -9,6 +9,8 @@
* top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_VIRTIO_RNG_H
#define QEMU_VIRTIO_RNG_H
@@ -7,6 +7,8 @@
* COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef WDT_ASPEED_H
#define WDT_ASPEED_H
@@ -5,6 +5,9 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef HW_XEN_BACKEND_H
#define HW_XEN_BACKEND_H
@@ -5,6 +5,9 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef HW_XEN_BLOCK_H
#define HW_XEN_BLOCK_H
@@ -5,6 +5,9 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef HW_XEN_BUS_HELPER_H
#define HW_XEN_BUS_HELPER_H
@@ -5,6 +5,9 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef HW_XEN_BUS_H
#define HW_XEN_BUS_H
@@ -1,3 +1,6 @@
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef HW_XEN_LEGACY_BACKEND_H
#define HW_XEN_LEGACY_BACKEND_H
@@ -1,3 +1,6 @@
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef QEMU_HW_XEN_COMMON_H
#define QEMU_HW_XEN_COMMON_H
@@ -1,3 +1,6 @@
+/* FIXME Does not pass make check-headers without CONFIG_XEN, yet! */
+/* FIXME Does not pass make check-headers without system emulation, yet! */
+
#ifndef QEMU_HW_XEN_PVDEV_H
#define QEMU_HW_XEN_PVDEV_H
@@ -37,6 +37,8 @@
/* decNumber.h or one of decDouble (etc.) must be included first. */
/* ------------------------------------------------------------------ */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef DECNUMBERLOCAL_H
#define DECNUMBERLOCAL_H
@@ -1,4 +1,8 @@
/* Declarations for use for CPU state serialization. */
+
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MIGRATION_CPU_H
#define MIGRATION_CPU_H
@@ -22,6 +22,9 @@
* THE SOFTWARE.
*/
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MONITOR_HMP_TARGET_H
#define MONITOR_HMP_TARGET_H
@@ -10,6 +10,8 @@
* atomic primitive is meant to provide.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_ATOMIC128_H
#define QEMU_ATOMIC128_H
@@ -4,6 +4,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without CONFIG_CPUID_H, yet! */
+
#ifndef QEMU_CPUID_H
#define QEMU_CPUID_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers without CONFIG_LINUX, yet! */
+
#ifndef QEMU_FUTEX_H
#define QEMU_FUTEX_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_RATELIMIT_H
#define QEMU_RATELIMIT_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_THREAD_WIN32_H
#define QEMU_THREAD_WIN32_H
@@ -10,6 +10,9 @@
* later version. See the COPYING file in the top-level directory.
*
*/
+
+/* FIXME Does not pass make check-headers without CONFIG_LINUX, yet! */
+
#ifndef QEMU_XATTR_H
#define QEMU_XATTR_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_BALLOON_H
#define QEMU_BALLOON_H
@@ -20,6 +20,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
*/
+
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef CRYPTODEV_VHOST_USER_H
#define CRYPTODEV_VHOST_USER_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef DUMP_H
#define DUMP_H
@@ -10,6 +10,9 @@
/* header to be included in non-HVF-specific code */
+/* NOTE: May only be included into target-dependent code */
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef HVF_H
#define HVF_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef IOTHREAD_H
#define IOTHREAD_H
@@ -6,6 +6,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef QEMU_KVM_INT_H
#define QEMU_KVM_INT_H
@@ -11,6 +11,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef MEMORY_MAPPING_H
#define MEMORY_MAPPING_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers without CONFIG_POSIX, yet! */
+
#ifndef QEMU_OS_POSIX_H
#define QEMU_OS_POSIX_H
@@ -23,6 +23,8 @@
* THE SOFTWARE.
*/
+/* FIXME Does not pass make check-headers without CONFIG_WIN32, yet! */
+
#ifndef QEMU_OS_WIN32_H
#define QEMU_OS_WIN32_H
@@ -6,6 +6,8 @@
*
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef XEN_MAPCACHE_H
#define XEN_MAPCACHE_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef TRACE_TCG_H
#define TRACE_TCG_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef CONSOLE_H
#define CONSOLE_H
@@ -1,3 +1,6 @@
+/* FIXME Does not pass make check-headers without pixman, yet! */
+/* FIXME Does not pass make check-headers without CONFIG_OPENGL, yet! */
+
#ifndef EGL_CONTEXT_H
#define EGL_CONTEXT_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef EGL_HELPERS_H
#define EGL_HELPERS_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef UI_GTK_H
#define UI_GTK_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef INPUT_H
#define INPUT_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g,
unsigned int b)
{
@@ -3,6 +3,8 @@
* See the COPYING file in the top-level directory.
*/
+/* FIXME Does not pass make check-headers without pixman, yet! */
+
#ifndef QEMU_PIXMAN_H
#define QEMU_PIXMAN_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef SDL2_H
#define SDL2_H
@@ -1,3 +1,5 @@
+/* FIXME Does not pass make check-headers without CONFIG_OPENGL, yet! */
+
#ifndef QEMU_SHADER_H
#define QEMU_SHADER_H
@@ -15,6 +15,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+/* FIXME Does not pass make check-headers, yet! */
+
#ifndef UI_SPICE_DISPLAY_H
#define UI_SPICE_DISPLAY_H
@@ -15,6 +15,7 @@ check-help:
@echo " $(MAKE) check-tcg Run TCG tests"
@echo " $(MAKE) check-softfloat Run FPU emulation tests"
@echo " $(MAKE) check-acceptance Run all acceptance (functional) tests"
+ @echo " $(MAKE) check-source Run source code tests"
@echo
@echo " $(MAKE) check-report.html Generates an HTML test report"
@echo " $(MAKE) check-venv Creates a Python venv for tests"
@@ -493,6 +494,7 @@ generated-files-y += tests/test-qapi-introspect.h
QEMU_CFLAGS += -I$(SRC_PATH)/tests
+include $(SRC_PATH)/tests/check-headers.mak
# Deps that are common to various different sets of tests below
test-util-obj-y = libqemuutil.a
@@ -1159,13 +1161,39 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
--failfast=on $(SRC_PATH)/tests/acceptance, \
"AVOCADO", "tests/acceptance")
+# Header sanity checking
+
+RECURSIVE_TARGETS += check-headers check-bad-headers
+
+.PHONY: check-headers check-bad-headers
+ifeq ($(wildcard $(SRC_PATH)/.git),)
+check-headers check-bad-headers:
+ @echo " SKIP $@ (requires a git tree)"
+else
+check-headers: CFLAGS += -g0 # save disk space
+check-headers: $(check-header-tests:.c=.o)
+check-headers: $(addsuffix /check-headers, $(TARGET_DIRS))
+
+# Expected to fail:
+check-bad-headers: $(check-bad-header-tests:.c=.o)
+check-bad-headers: $(addsuffix /check-bad-headers, $(TARGET_DIRS))
+
+.SECONDARY: $(check-header-tests) $(check-bad-header-tests)
+$(check-header-tests) $(check-bad-header-tests): tests/header-test-template.c
+ @mkdir -p $(dir $@)
+ @sed 's,@header@,$(subst tests/headers/,,$(@:.c=.h)),' <$< >$@
+endif
+
# Consolidated targets
-.PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean
+.PHONY: check-block check-qapi-schema check-qtest check-unit check-source
+.PHONY: check check-clean
check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi
check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
check-block: $(patsubst %,check-%, $(check-block-y))
-check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check-source: check-headers
+check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree check-source
+
check-clean:
rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
@@ -1180,5 +1208,6 @@ all: $(QEMU_IOTESTS_HELPERS-y)
-include $(wildcard tests/*.d)
-include $(wildcard tests/libqos/*.d)
+-include $(check-header-tests:.c=.d) $(check-bad-header-tests:.c=.d)
endif
new file mode 100644
@@ -0,0 +1,92 @@
+# -*- Mode: makefile -*-
+
+ifneq ($(wildcard $(SRC_PATH)/.git),)
+
+# All headers:
+src-headers := $(filter %.h, $(shell cd $(SRC_PATH) && git ls-files))
+
+# Headers we don't want to test
+# Third party headers we don't want to mess with
+excluded-headers := $(filter disas/libvixl/vixl/% include/hw/xen/interface/% include/standard-headers/% linux-headers/% pc-bios/% slirp/%, $(src-headers))
+# Funny stuff we don't want to mess with
+excluded-headers += $(filter tests/multiboot/% tests/tcg/% tests/uefi-test-tools/%, $(src-headers))
+excluded-headers += scripts/cocci-macro-file.h
+# Exclude all but include/ for now:
+excluded-headers += $(filter-out include/%, $(src-headers))
+
+# Headers for target-dependent code only (require -DNEED_CPU_H etc.)
+target-header-regexp := NOTE: May only be included into target-dependent code
+target-headers := $(shell cd $(SRC_PATH) && egrep -l '$(target-header-regexp)' $(src-headers))
+
+# Headers for target-independent code only
+untarget-headers := include/exec/poison.h
+
+# Headers carrying a FIXME about this test
+# Extended regular expression matching the FIXME comment in headers
+# not expected to pass the test in this build's configuration:
+bad-header-regexp := FIXME Does not pass make check-headers(
+# Require <cpuid.h>:
+ifneq ($(CONFIG_CPUID_H),y)
+bad-header-regexp += without CONFIG_CPUID_H|
+endif
+# Require Linux:
+ifneq ($(CONFIG_LINUX),y)
+bad-header-regexp += without CONFIG_LINUX|
+endif
+# Require OpenGL:
+ifneq ($(CONFIG_OPENGL),y)
+bad-header-regexp += without CONFIG_OPENGL|
+endif
+# Require Pixman:
+# since there's no easy, precise way to detect "have pixman",
+# approximate with CONFIG_SOFTMMU
+ifneq ($(CONFIG_SOFTMMU),y)
+bad-header-regexp += without pixman|
+endif
+# Require POSIX:
+ifneq ($(CONFIG_POSIX),y)
+bad-header-regexp += without CONFIG_POSIX|
+endif
+# Require SPICE:
+ifneq ($(CONFIG_SPICE),y)
+bad-header-regexp += without CONFIG_SPICE|
+endif
+# Require any system emulator being built
+# can't use CONFIG_SOFTMMU, it's off in TARGET_DIR=%-user; check
+# TARGET_DIRS instead
+ifeq ($(filter %-softmmu, $(TARGET_DIRS)),)
+bad-header-regexp += without system emulation|
+endif
+# Require Windows:
+ifneq ($(CONFIG_WIN32),y)
+bad-header-regexp += without CONFIG_WIN32|
+endif
+# Require Xen:
+ifneq ($(CONFIG_XEN),y)
+bad-header-regexp += without CONFIG_XEN|
+endif
+bad-header-regexp += D06F00D to avoid empty RE)?, yet!
+# The headers not expected to pass the test in this build's configuration:
+bad-headers := $(shell cd $(SRC_PATH) && egrep -l '$(bad-header-regexp)' $(src-headers))
+
+# Checked headers (all less excluded and bad):
+# to be checked target-independently: all less excluded, bad, and target
+checked-headers := $(filter-out $(excluded-headers) $(bad-headers) $(target-headers), $(src-headers))
+check-header-tests := $(patsubst %.h, tests/headers/%.c, $(checked-headers))
+# to be checked for each target: all less excluded, bad, and untarget
+checked-target-headers := $(filter-out $(excluded-headers) $(bad-headers) $(untarget-headers), $(src-headers))
+# Testing target-independent headers for each target is massive
+# overkill, limit to target-dependent headers for now. This leaves
+# gaps in testing. TODO accept the overkill or pick something in between
+checked-target-headers := $(filter $(target-headers), $(checked-target-headers))
+check-target-header-tests := $(patsubst %.h, tests/headers-tgt/%.c, $(checked-target-headers))
+
+# Bad headers (all less excluded and checked):
+# to be checked target-independently: bad less excluded and target
+unchecked-headers := $(filter-out $(excluded-headers) $(target-headers), $(bad-headers))
+check-bad-header-tests := $(patsubst %.h, tests/headers/%.c, $(unchecked-headers))
+# to be checked for each target: bad less excluded and untarget
+unchecked-target-headers := $(filter-out $(excluded-headers) $(untarget-headers), $(bad-headers))
+check-bad-target-header-tests := $(patsubst %.h, tests/headers-tgt/%.c, $(unchecked-target-headers))
+
+endif
new file mode 100644
@@ -0,0 +1,23 @@
+/*
+ * Template for make check-headers
+ *
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Authors:
+ * Markus Armbruster <armbru@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+
+/*
+ * Some headers define static functions that real includers all use,
+ * but this one of course doesn't. Suppress the resulting warning:
+ */
+#pragma GCC diagnostic ignored "-Wunused-function"
+
+#include "@header@"
+/* Include a second time to catch missing header guard */
+#include "@header@"
Make target check-source is for checking the source code itself. For now, there's just one such check, make target check-headers. It checks basic header sanity: for each header "FOO.h", test whether #include "qemu/osdep.h" #include "FOO.h" #include "FOO.h" compiles. The test works only in a git tree, with git installed. It is skipped unless $(SRC_PATH)/.git exists. Third-party headers we don't intend to clean up are excluded from this test. So are a few "funny" headers. See make variable excluded-headers. Numerous headers don't pass this test, by design or by accident. To keep things more manageable, exclude all headers outside include/ for now. Headers known to fail the test are marked with /* FIXME Does not pass make check-headers, yet! */ Headers known to work only in certain configurations are marked like /* FIXME Does not pass make check-headers without CONFIG_WIN32, yet! */ I tried to find and mark all of them by testing various configurations. Still, "make check" might fail for configurations I didn't test. Known issue: some of these don't actually need fixing; they're *meant* to work only in certain configurations. We'll want to invent a suitable marker that doesn't claim FIXME. Some headers may only be included into target-dependent code: they use identifiers poisoned by exec/poison.h, or include cpu.h. These headers are marked with a comment /* NOTE: May only be included into target-dependent code */ The test treats them specially. Known issue: some of these are intended for specific targets. The test should skip them for other targets, but doesn't. They're marked FIXME instead, which is wrong. New make target check-bad-headers runs the test for headers expected to fail it. This helps with examining the failures. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- Makefile | 4 +- Makefile.target | 20 +++++ include/block/raw-aio.h | 3 + include/block/write-threshold.h | 3 + include/chardev/char-win.h | 3 + include/chardev/spice.h | 2 + include/disas/disas.h | 2 + include/exec/cpu-all.h | 4 + include/exec/cpu-defs.h | 3 + include/exec/cpu_ldst.h | 4 + include/exec/cpu_ldst_template.h | 3 + include/exec/cpu_ldst_useronly_template.h | 3 + include/exec/cputlb.h | 3 + include/exec/exec-all.h | 3 + include/exec/gen-icount.h | 2 + include/exec/helper-gen.h | 2 + include/exec/helper-proto.h | 2 + include/exec/helper-tcg.h | 2 + include/exec/ioport.h | 2 + include/exec/memory-internal.h | 2 + include/exec/memory_ldst.inc.h | 2 + include/exec/memory_ldst_cached.inc.h | 2 + include/exec/memory_ldst_phys.inc.h | 2 + include/exec/ram_addr.h | 3 + include/exec/softmmu-semi.h | 3 + include/exec/tb-hash.h | 3 + include/exec/tb-lookup.h | 3 + include/exec/translator.h | 3 + include/exec/user/abitypes.h | 2 + include/exec/user/thunk.h | 4 + include/fpu/softfloat-macros.h | 2 + include/fpu/softfloat.h | 2 + include/hw/acpi/pci.h | 3 + include/hw/acpi/tco.h | 3 + include/hw/adc/stm32f2xx_adc.h | 2 + include/hw/arm/allwinner-a10.h | 2 + include/hw/arm/armsse.h | 3 + include/hw/arm/armv7m.h | 3 + include/hw/arm/aspeed_soc.h | 2 + include/hw/arm/bcm2835_peripherals.h | 2 + include/hw/arm/bcm2836.h | 2 + include/hw/arm/digic.h | 3 + include/hw/arm/exynos4210.h | 3 +- include/hw/arm/fsl-imx25.h | 2 + include/hw/arm/fsl-imx31.h | 2 + include/hw/arm/fsl-imx6.h | 3 + include/hw/arm/fsl-imx6ul.h | 3 + include/hw/arm/fsl-imx7.h | 3 + include/hw/arm/msf2-soc.h | 3 + include/hw/arm/nrf51_soc.h | 3 + include/hw/arm/omap.h | 2 + include/hw/arm/sharpsl.h | 3 + include/hw/arm/stm32f205_soc.h | 3 + include/hw/arm/xlnx-zynqmp.h | 2 + include/hw/block/fdc.h | 2 + include/hw/block/flash.h | 2 + include/hw/char/escc.h | 2 + include/hw/char/xilinx_uartlite.h | 2 + include/hw/core/generic-loader.h | 2 + include/hw/cris/etraxfs.h | 2 + include/hw/cris/etraxfs_dma.h | 2 + include/hw/display/bcm2835_fb.h | 2 + include/hw/display/i2c-ddc.h | 2 + include/hw/display/xlnx_dp.h | 2 + include/hw/dma/xlnx_dpdma.h | 2 + include/hw/elf_ops.h | 2 + include/hw/empty_slot.h | 2 + include/hw/gpio/bcm2835_gpio.h | 2 + include/hw/hyperv/hyperv.h | 2 + include/hw/i2c/aspeed_i2c.h | 3 + include/hw/i386/apic_internal.h | 3 + include/hw/i386/ioapic_internal.h | 2 + include/hw/input/hid.h | 2 + include/hw/input/tsc2xxx.h | 2 + include/hw/intc/allwinner-a10-pic.h | 2 + include/hw/intc/armv7m_nvic.h | 3 + include/hw/intc/heathrow_pic.h | 2 + include/hw/intc/mips_gic.h | 3 + include/hw/isa/vt82c686.h | 2 + include/hw/kvm/clock.h | 2 + include/hw/mips/bios.h | 2 + include/hw/mips/cps.h | 3 + include/hw/mips/cpudevs.h | 2 + include/hw/misc/bcm2835_property.h | 2 + include/hw/misc/macio/cuda.h | 2 + include/hw/misc/macio/gpio.h | 2 + include/hw/misc/macio/macio.h | 2 + include/hw/misc/macio/pmu.h | 2 + include/hw/misc/mips_cmgcr.h | 2 + include/hw/misc/mips_cpc.h | 2 + include/hw/misc/pvpanic.h | 3 + include/hw/net/allwinner_emac.h | 2 + include/hw/net/lance.h | 2 + include/hw/nvram/chrp_nvram.h | 2 + include/hw/pci-host/sabre.h | 2 + include/hw/pci-host/spapr.h | 3 + include/hw/pci-host/uninorth.h | 2 + include/hw/pci/pcie_aer.h | 2 + include/hw/ppc/fdt.h | 2 + include/hw/ppc/pnv.h | 2 + include/hw/ppc/pnv_core.h | 2 + include/hw/ppc/pnv_xscom.h | 2 + include/hw/ppc/ppc.h | 2 + include/hw/ppc/ppc4xx.h | 2 + include/hw/ppc/spapr.h | 3 + include/hw/ppc/spapr_cpu_core.h | 4 + include/hw/ppc/spapr_irq.h | 2 + include/hw/ppc/spapr_ovec.h | 2 + include/hw/ppc/spapr_vio.h | 2 + include/hw/ppc/spapr_xive.h | 2 + include/hw/ppc/xics_spapr.h | 3 + include/hw/ppc/xive_regs.h | 2 + include/hw/riscv/boot.h | 2 + include/hw/riscv/riscv_hart.h | 2 + include/hw/riscv/riscv_htif.h | 3 + include/hw/riscv/sifive_clint.h | 2 + include/hw/riscv/sifive_e.h | 2 + include/hw/riscv/sifive_plic.h | 2 + include/hw/riscv/sifive_prci.h | 2 + include/hw/riscv/sifive_test.h | 2 + include/hw/riscv/sifive_u.h | 2 + include/hw/riscv/sifive_uart.h | 2 + include/hw/riscv/spike.h | 2 + include/hw/riscv/virt.h | 2 + include/hw/s390x/3270-ccw.h | 3 + include/hw/s390x/ap-device.h | 3 + include/hw/s390x/css-bridge.h | 2 + include/hw/s390x/css.h | 3 + include/hw/s390x/s390-ccw.h | 3 + include/hw/s390x/storage-attributes.h | 3 + include/hw/s390x/tod.h | 2 + include/hw/s390x/vfio-ccw.h | 3 + include/hw/semihosting/console.h | 3 + include/hw/sh4/sh.h | 2 + include/hw/sh4/sh_intc.h | 2 + include/hw/sparc/sparc64.h | 2 + include/hw/ssi/aspeed_smc.h | 2 + include/hw/ssi/xilinx_spips.h | 2 + include/hw/timer/allwinner-a10-pit.h | 2 + include/hw/timer/i8254_internal.h | 2 + include/hw/timer/m48t59.h | 2 + include/hw/timer/mc146818rtc.h | 2 + include/hw/timer/mc146818rtc_regs.h | 2 + include/hw/timer/sun4v-rtc.h | 2 + include/hw/timer/xlnx-zynqmp-rtc.h | 2 + include/hw/vfio/vfio-amd-xgbe.h | 2 + include/hw/vfio/vfio-calxeda-xgmac.h | 2 + include/hw/vfio/vfio-common.h | 2 + include/hw/vfio/vfio-platform.h | 2 + include/hw/virtio/virtio-access.h | 3 + include/hw/virtio/virtio-gpu-bswap.h | 2 + include/hw/virtio/virtio-gpu-pci.h | 2 + include/hw/virtio/virtio-gpu-pixman.h | 2 + include/hw/virtio/virtio-gpu.h | 2 + include/hw/virtio/virtio-input.h | 2 + include/hw/virtio/virtio-rng.h | 2 + include/hw/watchdog/wdt_aspeed.h | 2 + include/hw/xen/xen-backend.h | 3 + include/hw/xen/xen-block.h | 3 + include/hw/xen/xen-bus-helper.h | 3 + include/hw/xen/xen-bus.h | 3 + include/hw/xen/xen-legacy-backend.h | 3 + include/hw/xen/xen_common.h | 3 + include/hw/xen/xen_pvdev.h | 3 + include/libdecnumber/decNumberLocal.h | 2 + include/migration/cpu.h | 4 + include/monitor/hmp-target.h | 3 + include/qemu/atomic128.h | 2 + include/qemu/cpuid.h | 2 + include/qemu/futex.h | 2 + include/qemu/ratelimit.h | 2 + include/qemu/thread-win32.h | 2 + include/qemu/xattr.h | 3 + include/sysemu/balloon.h | 2 + include/sysemu/cryptodev-vhost-user.h | 3 + include/sysemu/dump.h | 2 + include/sysemu/hvf.h | 3 + include/sysemu/iothread.h | 2 + include/sysemu/kvm_int.h | 2 + include/sysemu/memory_mapping.h | 2 + include/sysemu/os-posix.h | 2 + include/sysemu/os-win32.h | 2 + include/sysemu/xen-mapcache.h | 2 + include/trace-tcg.h | 2 + include/ui/console.h | 2 + include/ui/egl-context.h | 3 + include/ui/egl-helpers.h | 2 + include/ui/gtk.h | 2 + include/ui/input.h | 2 + include/ui/pixel_ops.h | 2 + include/ui/qemu-pixman.h | 2 + include/ui/sdl2.h | 2 + include/ui/shader.h | 2 + include/ui/spice-display.h | 2 + tests/Makefile.include | 33 +++++++- tests/check-headers.mak | 92 +++++++++++++++++++++++ tests/header-test-template.c | 23 ++++++ 197 files changed, 618 insertions(+), 4 deletions(-) create mode 100644 tests/check-headers.mak create mode 100644 tests/header-test-template.c