From patchwork Wed Oct 31 18:12:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 149859 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7127106ljp; Wed, 31 Oct 2018 11:16:04 -0700 (PDT) X-Google-Smtp-Source: AJdET5e+Fyx3CJyFMfcO+BlMuEtVe3j2I4lS6fdZlwo+yR8PvMon7AZUa41MtaAFCQcWpljB1zDe X-Received: by 2002:a81:430e:: with SMTP id q14-v6mr4260443ywa.227.1541009764824; Wed, 31 Oct 2018 11:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541009764; cv=none; d=google.com; s=arc-20160816; b=cVeXiOvkCJySEouKbVEeKp4L81BwpnYPGrlbX8sq1NsfnVxWdIvnjPjYuB+aWDL7ih H3mPHiQ1d5JRo1Ch2NblOoDghCatownLX5ycCIwgSbku1ONz5/WIIaEzVoglVD241ESy 2DR9uX7iNUQql4hoMnBwCJ7eqWTG8zWRWqP4N1vKBG6J5nwskwSxGaJkygPGMZxEmQjj G5AaA+jdyhuD6oyCtPz+gcYEY5ZZ/R5S72MVev9jUYz6B5VXyF4q924Mh7xi5DLFxpqM e8MFJ8/3QSQaJbZYIFz7d2owBuBUSV4XSxAqy/adA4hgcPnESuqxHlt6POOe61aQ8215 6taA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=s99kAo6YX9LsFHB7wATX4iEsL+qjqc33KkaraOWPsjY=; b=kQObFJov32zT4veGqqe1NHPe9/vwSIf6mYz51ytXzUSPFic9eXGQw/FjAObm96f/kw SpUHeay8bndBIhsYFiW9c+NkuDyjIsj8R4BVLQ48wCkLg0JP9MwyWv1mxl9KJojpjXD5 Zo1H0Nr+omR7EXFOnUbQM1Bxe02hvUyYyI51rRJU3Q+yqQwlNvhDLZoswFm85ftq4aFQ GvoGVv3xTEIOV53ZxBmzS5HxPMLhGvufrBBBP2PCtGpa5izS7tHYiVclOpEG2LXEGQZL EJK1dUZmgXO8a0+cTdBLvOBQWqm2WK1U4r6SdiCvfAwrIF/uW1gDbgIJn/eYGUOsfOBO q3bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id g198-v6si7488230yba.382.2018.10.31.11.16.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 11:16:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuze-0004NY-I2; Wed, 31 Oct 2018 18:13:26 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gHuzd-0004N7-85 for xen-devel@lists.xen.org; Wed, 31 Oct 2018 18:13:25 +0000 X-Inumbo-ID: a7c78288-dd38-11e8-87d6-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id a7c78288-dd38-11e8-87d6-bc764e045a96; Wed, 31 Oct 2018 18:13:23 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D3C31596; Wed, 31 Oct 2018 11:13:23 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6EFE33F73F; Wed, 31 Oct 2018 11:13:22 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 31 Oct 2018 18:12:55 +0000 Message-Id: <20181031181313.8028-4-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181031181313.8028-1-julien.grall@arm.com> References: <20181031181313.8028-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH v2 03/21] xen/arm: Remove __init from prototype X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org, andrii_anisov@epam.com MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" In Xen, it is common to add __init to the declaration and not the prototype. Remove the few __init on some prototypes which allows to avoid the inclusion of init.h in headers. With these changes, init.h is now required to be included on some c files. Also, add __init where it was missing in declaration. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- Changes in v2: - Remove __init in asm-arm/iommu.h prototypes --- xen/arch/arm/acpi/lib.c | 1 + xen/arch/arm/bootfdt.c | 2 +- xen/arch/arm/cpuerrata.c | 1 + xen/arch/arm/device.c | 1 + xen/arch/arm/psci.c | 1 + xen/include/asm-arm/acpi.h | 7 +++---- xen/include/asm-arm/alternative.h | 3 +-- xen/include/asm-arm/device.h | 10 ++++------ xen/include/asm-arm/iommu.h | 4 ++-- xen/include/asm-arm/platform.h | 7 +++---- xen/include/asm-arm/setup.h | 6 +++--- xen/include/xen/device_tree.h | 5 ++--- 12 files changed, 23 insertions(+), 25 deletions(-) diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c index ada5298a38..4fc6e17322 100644 --- a/xen/arch/arm/acpi/lib.c +++ b/xen/arch/arm/acpi/lib.c @@ -22,6 +22,7 @@ */ #include +#include #include char *__acpi_map_table(paddr_t phys, unsigned long size) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 8eba42c7b9..44af11c0fd 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -349,7 +349,7 @@ size_t __init boot_fdt_info(const void *fdt, paddr_t paddr) return fdt_totalsize(fdt); } -const char *boot_fdt_cmdline(const void *fdt) +const __init char *boot_fdt_cmdline(const void *fdt) { int node; const struct fdt_property *prop; diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 97a118293b..adf88e7bdc 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index a0072c1563..70cd6c1a19 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -19,6 +19,7 @@ #include #include +#include #include extern const struct device_desc _sdevice[], _edevice[]; diff --git a/xen/arch/arm/psci.c b/xen/arch/arm/psci.c index a93121f43b..d23cb8e76e 100644 --- a/xen/arch/arm/psci.c +++ b/xen/arch/arm/psci.c @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h index c183b6bb6e..feec4fb0ac 100644 --- a/xen/include/asm-arm/acpi.h +++ b/xen/include/asm-arm/acpi.h @@ -23,7 +23,6 @@ #ifndef _ASM_ARM_ACPI_H #define _ASM_ARM_ACPI_H -#include #include #include @@ -43,9 +42,9 @@ typedef enum { TBL_MMAX, } EFI_MEM_RES; -bool __init acpi_psci_present(void); -bool __init acpi_psci_hvc_present(void); -void __init acpi_smp_init_cpus(void); +bool acpi_psci_present(void); +bool acpi_psci_hvc_present(void); +void acpi_smp_init_cpus(void); /* * This function returns the offset of a given ACPI/EFI table in the allocated diff --git a/xen/include/asm-arm/alternative.h b/xen/include/asm-arm/alternative.h index 9b4b02811b..dedb6dd001 100644 --- a/xen/include/asm-arm/alternative.h +++ b/xen/include/asm-arm/alternative.h @@ -7,7 +7,6 @@ #ifndef __ASSEMBLY__ -#include #include #include @@ -28,7 +27,7 @@ typedef void (*alternative_cb_t)(const struct alt_instr *alt, const uint32_t *origptr, uint32_t *updptr, int nr_inst); -void __init apply_alternatives_all(void); +void apply_alternatives_all(void); int apply_alternatives(const struct alt_instr *start, const struct alt_instr *end); #define ALTINSTR_ENTRY(feature, cb) \ diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h index 6734ae8efd..63a0f3631d 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -1,8 +1,6 @@ #ifndef __ASM_ARM_DEVICE_H #define __ASM_ARM_DEVICE_H -#include - enum device_type { DEV_DT, @@ -68,8 +66,8 @@ struct acpi_device_desc { * * Return 0 on success. */ -int __init acpi_device_init(enum device_class class, - const void *data, int class_type); +int acpi_device_init(enum device_class class, + const void *data, int class_type); /** * device_init - Initialize a device @@ -79,8 +77,8 @@ int __init acpi_device_init(enum device_class class, * * Return 0 on success. */ -int __init device_init(struct dt_device_node *dev, enum device_class class, - const void *data); +int device_init(struct dt_device_node *dev, enum device_class class, + const void *data); /** * device_get_type - Get the type of the device diff --git a/xen/include/asm-arm/iommu.h b/xen/include/asm-arm/iommu.h index f6df32f860..90cd011d35 100644 --- a/xen/include/asm-arm/iommu.h +++ b/xen/include/asm-arm/iommu.h @@ -24,9 +24,9 @@ struct arch_iommu #define iommu_use_hap_pt(d) (has_iommu_pt(d)) const struct iommu_ops *iommu_get_ops(void); -void __init iommu_set_ops(const struct iommu_ops *ops); +void iommu_set_ops(const struct iommu_ops *ops); -int __init iommu_hardware_setup(void); +int iommu_hardware_setup(void); #endif /* __ARCH_ARM_IOMMU_H__ */ diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h index 2591d7bb03..bf9258156c 100644 --- a/xen/include/asm-arm/platform.h +++ b/xen/include/asm-arm/platform.h @@ -1,7 +1,6 @@ #ifndef __ASM_ARM_PLATFORM_H #define __ASM_ARM_PLATFORM_H -#include #include #include #include @@ -46,9 +45,9 @@ struct platform_desc { */ #define PLATFORM_QUIRK_GIC_64K_STRIDE (1 << 0) -void __init platform_init(void); -int __init platform_init_time(void); -int __init platform_specific_mapping(struct domain *d); +void platform_init(void); +int platform_init_time(void); +int platform_specific_mapping(struct domain *d); #ifdef CONFIG_ARM_32 int platform_smp_init(void); int platform_cpu_up(int cpu); diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h index 0cc3330807..5f41ba0cba 100644 --- a/xen/include/asm-arm/setup.h +++ b/xen/include/asm-arm/setup.h @@ -74,14 +74,14 @@ void discard_initial_modules(void); void dt_unreserved_regions(paddr_t s, paddr_t e, void (*cb)(paddr_t, paddr_t), int first); -size_t __init boot_fdt_info(const void *fdt, paddr_t paddr); -const char __init *boot_fdt_cmdline(const void *fdt); +size_t boot_fdt_info(const void *fdt, paddr_t paddr); +const char *boot_fdt_cmdline(const void *fdt); struct bootmodule *add_boot_module(bootmodule_kind kind, paddr_t start, paddr_t size, const char *cmdline); struct bootmodule *boot_module_find_by_kind(bootmodule_kind kind); -const char * __init boot_module_kind_as_string(bootmodule_kind kind); +const char *boot_module_kind_as_string(bootmodule_kind kind); #endif /* diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index 91fa0b6f61..7408a6c48c 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -169,7 +168,7 @@ int device_tree_for_each_node(const void *fdt, * Create a hierarchical device tree for the host DTB to be able * to retrieve parents. */ -void __init dt_unflatten_host_device_tree(void); +void dt_unflatten_host_device_tree(void); /** * IRQ translation callback @@ -204,7 +203,7 @@ extern const struct dt_device_node *dt_interrupt_controller; * * If found, return the interrupt controller device node. */ -struct dt_device_node * __init +struct dt_device_node * dt_find_interrupt_controller(const struct dt_device_match *matches); #define dt_prop_cmp(s1, s2) strcmp((s1), (s2))