* [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code
@ 2017-09-15 9:42 Wei Liu
2017-09-15 9:42 ` [PATCH 01/12] arm/acpi: switch to plain bool Wei Liu
` (11 more replies)
0 siblings, 12 replies; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
After this series, arch arm code is bool_t free.
$ git grep bool_t xen/arch/arm xen/include/asm-arm; echo $?
1
Compile-test only.
Wei Liu (12):
arm/acpi: switch to plain bool
arm/{v,}gic: switch to plain bool
arm/domain_build: switch to plain bool
arm/irq: switch to plain bool
arm/platform: switch to plain bool
arm/alternative.c: switch to plain bool
arm/cpu{errata,feature}.[ch]: switch to plain bool
arm/bootfdt.c: switch to plain bool
arm/decode.c: switch to plain bool
arm/smpboot.c: switch to plain bool
arm/vtimer.c: switch to plain bool
arm: use plain bool in various headers
xen/arch/arm/acpi/boot.c | 6 +++---
xen/arch/arm/acpi/lib.c | 8 ++++----
xen/arch/arm/alternative.c | 8 ++++----
xen/arch/arm/bootfdt.c | 14 +++++++-------
xen/arch/arm/cpuerrata.c | 2 +-
xen/arch/arm/decode.c | 6 +++---
xen/arch/arm/domain_build.c | 25 +++++++++++++------------
xen/arch/arm/gic-v2.c | 4 ++--
xen/arch/arm/gic-v3.c | 10 +++++-----
xen/arch/arm/irq.c | 12 ++++++------
xen/arch/arm/platform.c | 14 +++++++-------
xen/arch/arm/platforms/exynos5.c | 4 ++--
xen/arch/arm/setup.c | 2 +-
xen/arch/arm/smpboot.c | 10 +++++-----
xen/arch/arm/vgic-v2.c | 4 ++--
xen/arch/arm/vgic-v3.c | 4 ++--
xen/arch/arm/vtimer.c | 2 +-
xen/include/asm-arm/acpi.h | 10 +++++-----
xen/include/asm-arm/altp2m.h | 4 ++--
xen/include/asm-arm/arm64/insn.h | 2 +-
xen/include/asm-arm/cpuerrata.h | 8 ++++----
xen/include/asm-arm/cpufeature.h | 6 +++---
xen/include/asm-arm/domain.h | 2 +-
xen/include/asm-arm/gic.h | 2 +-
xen/include/asm-arm/guest_access.h | 2 +-
xen/include/asm-arm/irq.h | 4 ++--
xen/include/asm-arm/p2m.h | 8 ++++----
xen/include/asm-arm/platform.h | 4 ++--
28 files changed, 94 insertions(+), 93 deletions(-)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 01/12] arm/acpi: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 10:40 ` Julien Grall
2017-09-15 9:42 ` [PATCH 02/12] arm/{v,}gic: " Wei Liu
` (10 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/acpi/boot.c | 6 +++---
xen/arch/arm/acpi/lib.c | 8 ++++----
xen/arch/arm/setup.c | 2 +-
xen/include/asm-arm/acpi.h | 10 +++++-----
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c
index 6101bf39c9..9b29769a10 100644
--- a/xen/arch/arm/acpi/boot.c
+++ b/xen/arch/arm/acpi/boot.c
@@ -53,7 +53,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
int i;
int rc;
u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK;
- bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED);
+ bool enabled = processor->flags & ACPI_MADT_ENABLED;
if ( mpidr == MPIDR_INVALID )
{
@@ -190,8 +190,8 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
return -EINVAL;
}
-static bool_t __initdata param_acpi_off;
-static bool_t __initdata param_acpi_force;
+static bool __initdata param_acpi_off;
+static bool __initdata param_acpi_force;
static int __init parse_acpi_param(const char *arg)
{
diff --git a/xen/arch/arm/acpi/lib.c b/xen/arch/arm/acpi/lib.c
index 70131b0736..ada5298a38 100644
--- a/xen/arch/arm/acpi/lib.c
+++ b/xen/arch/arm/acpi/lib.c
@@ -48,14 +48,14 @@ char *__acpi_map_table(paddr_t phys, unsigned long size)
return ((char *) base + offset);
}
-/* 1 to indicate PSCI 0.2+ is implemented */
-bool_t __init acpi_psci_present(void)
+/* True to indicate PSCI 0.2+ is implemented */
+bool __init acpi_psci_present(void)
{
return acpi_gbl_FADT.arm_boot_flags & ACPI_FADT_PSCI_COMPLIANT;
}
-/* 1 to indicate HVC is present instead of SMC as the PSCI conduit */
-bool_t __init acpi_psci_hvc_present(void)
+/* True to indicate HVC is present instead of SMC as the PSCI conduit */
+bool __init acpi_psci_hvc_present(void)
{
return acpi_gbl_FADT.arm_boot_flags & ACPI_FADT_PSCI_USE_HVC;
}
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 92f173be0c..fd3b0981d5 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -55,7 +55,7 @@ struct bootinfo __initdata bootinfo;
struct cpuinfo_arm __read_mostly boot_cpu_data;
#ifdef CONFIG_ACPI
-bool_t __read_mostly acpi_disabled;
+bool __read_mostly acpi_disabled;
#endif
#ifdef CONFIG_ARM_32
diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h
index 9f954d39e1..a62429e7e2 100644
--- a/xen/include/asm-arm/acpi.h
+++ b/xen/include/asm-arm/acpi.h
@@ -43,8 +43,8 @@ typedef enum {
TBL_MMAX,
} EFI_MEM_RES;
-bool_t __init acpi_psci_present(void);
-bool_t __init acpi_psci_hvc_present(void);
+bool __init acpi_psci_present(void);
+bool __init acpi_psci_hvc_present(void);
void __init acpi_smp_init_cpus(void);
/*
@@ -57,16 +57,16 @@ void __init acpi_smp_init_cpus(void);
paddr_t acpi_get_table_offset(struct membank tbl_add[], EFI_MEM_RES index);
#ifdef CONFIG_ACPI
-extern bool_t acpi_disabled;
+extern bool acpi_disabled;
/* Basic configuration for ACPI */
static inline void disable_acpi(void)
{
- acpi_disabled = 1;
+ acpi_disabled = true;
}
static inline void enable_acpi(void)
{
- acpi_disabled = 0;
+ acpi_disabled = false;
}
#else
#define acpi_disabled (1)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 02/12] arm/{v,}gic: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
2017-09-15 9:42 ` [PATCH 01/12] arm/acpi: switch to plain bool Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 10:48 ` Julien Grall
2017-09-15 9:42 ` [PATCH 03/12] arm/domain_build: " Wei Liu
` (9 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/gic-v2.c | 4 ++--
xen/arch/arm/gic-v3.c | 10 +++++-----
xen/arch/arm/vgic-v2.c | 4 ++--
xen/arch/arm/vgic-v3.c | 4 ++--
xen/include/asm-arm/gic.h | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index cbe71a9c18..d54db4c80c 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -483,7 +483,7 @@ static void gicv2_write_lr(int lr, const struct gic_lr *lr_reg)
writel_gich(lrv, GICH_LR + lr * 4);
}
-static void gicv2_hcr_status(uint32_t flag, bool_t status)
+static void gicv2_hcr_status(uint32_t flag, bool status)
{
uint32_t hcr = readl_gich(GICH_HCR);
@@ -815,7 +815,7 @@ static hw_irq_controller gicv2_guest_irq_type = {
.set_affinity = gicv2_irq_set_affinity,
};
-static bool_t gicv2_is_aliased(paddr_t cbase, paddr_t csize)
+static bool gicv2_is_aliased(paddr_t cbase, paddr_t csize)
{
uint32_t val_low, val_high;
diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index f990eae832..0c5ac1d995 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -261,7 +261,7 @@ static void gicv3_enable_sre(void)
static void gicv3_do_wait_for_rwp(void __iomem *base)
{
uint32_t val;
- bool_t timeout = 0;
+ bool timeout = false;
s_time_t deadline = NOW() + MILLISECS(1000);
do {
@@ -270,7 +270,7 @@ static void gicv3_do_wait_for_rwp(void __iomem *base)
break;
if ( NOW() > deadline )
{
- timeout = 1;
+ timeout = true;
break;
}
cpu_relax();
@@ -590,7 +590,7 @@ static void __init gicv3_dist_init(void)
static int gicv3_enable_redist(void)
{
uint32_t val;
- bool_t timeout = 0;
+ bool timeout = false;
s_time_t deadline = NOW() + MILLISECS(1000);
/* Wake up this CPU redistributor */
@@ -604,7 +604,7 @@ static int gicv3_enable_redist(void)
break;
if ( NOW() > deadline )
{
- timeout = 1;
+ timeout = true;
break;
}
cpu_relax();
@@ -1005,7 +1005,7 @@ static void gicv3_write_lr(int lr_reg, const struct gic_lr *lr)
gicv3_ich_write_lr(lr_reg, lrv);
}
-static void gicv3_hcr_status(uint32_t flag, bool_t status)
+static void gicv3_hcr_status(uint32_t flag, bool status)
{
uint32_t hcr;
diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
index cf4ab89f81..2bdb25261a 100644
--- a/xen/arch/arm/vgic-v2.c
+++ b/xen/arch/arm/vgic-v2.c
@@ -33,7 +33,7 @@
#include <asm/vgic-emul.h>
static struct {
- bool_t enabled;
+ bool enabled;
/* Distributor interface address */
paddr_t dbase;
/* CPU interface address & size */
@@ -49,7 +49,7 @@ static struct {
void vgic_v2_setup_hw(paddr_t dbase, paddr_t cbase, paddr_t csize,
paddr_t vbase, uint32_t aliased_offset)
{
- vgic_v2_hw.enabled = 1;
+ vgic_v2_hw.enabled = true;
vgic_v2_hw.dbase = dbase;
vgic_v2_hw.cbase = cbase;
vgic_v2_hw.csize = csize;
diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c
index a0cf993d13..af16dfd005 100644
--- a/xen/arch/arm/vgic-v3.c
+++ b/xen/arch/arm/vgic-v3.c
@@ -52,7 +52,7 @@
#define VGICD_CTLR_DEFAULT (GICD_CTLR_ARE_NS)
static struct {
- bool_t enabled;
+ bool enabled;
/* Distributor interface address */
paddr_t dbase;
/* Re-distributor regions */
@@ -68,7 +68,7 @@ void vgic_v3_setup_hw(paddr_t dbase,
uint32_t rdist_stride,
unsigned int intid_bits)
{
- vgic_v3_hw.enabled = 1;
+ vgic_v3_hw.enabled = true;
vgic_v3_hw.dbase = dbase;
vgic_v3_hw.nr_rdist_regions = nr_rdist_regions;
vgic_v3_hw.regions = regions;
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index 6203dc59f4..977e75b1d2 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -345,7 +345,7 @@ struct gic_hw_operations {
void (*update_lr)(int lr, const struct pending_irq *pending_irq,
unsigned int state);
/* Update HCR status register */
- void (*update_hcr_status)(uint32_t flag, bool_t set);
+ void (*update_hcr_status)(uint32_t flag, bool set);
/* Clear LR register */
void (*clear_lr)(int lr);
/* Read LR register and populate gic_lr structure */
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 03/12] arm/domain_build: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
2017-09-15 9:42 ` [PATCH 01/12] arm/acpi: switch to plain bool Wei Liu
2017-09-15 9:42 ` [PATCH 02/12] arm/{v,}gic: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 11:00 ` Julien Grall
2017-09-15 9:42 ` [PATCH 04/12] arm/irq: " Wei Liu
` (8 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Also fixed a coding style issue.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/domain_build.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index d6f9585503..c34238ec1b 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -98,10 +98,10 @@ static unsigned int get_11_allocation_size(paddr_t size)
* Returns false if the memory would be below bank 0 or we have run
* out of banks. In this case it will free the pages.
*/
-static bool_t insert_11_bank(struct domain *d,
- struct kernel_info *kinfo,
- struct page_info *pg,
- unsigned int order)
+static bool insert_11_bank(struct domain *d,
+ struct kernel_info *kinfo,
+ struct page_info *pg,
+ unsigned int order)
{
int res, i;
paddr_t spfn;
@@ -254,7 +254,7 @@ static void allocate_memory(struct domain *d, struct kernel_info *kinfo)
unsigned int order = get_11_allocation_size(kinfo->unassigned_mem);
int i;
- bool_t lowmem = true;
+ bool lowmem = true;
unsigned int bits;
/*
@@ -678,7 +678,7 @@ static int make_cpus_node(const struct domain *d, void *fdt,
/* Placeholder for cpu@ + a 32-bit number + \0 */
char buf[15];
u32 clock_frequency;
- bool_t clock_valid;
+ bool clock_valid;
uint64_t mpidr_aff;
dt_dprintk("Create cpus node\n");
@@ -756,7 +756,8 @@ static int make_cpus_node(const struct domain *d, void *fdt,
if ( res )
return res;
- if (clock_valid) {
+ if ( clock_valid )
+ {
res = fdt_property_cell(fdt, "clock-frequency", clock_frequency);
if ( res )
return res;
@@ -864,7 +865,7 @@ static int make_timer_node(const struct domain *d, void *fdt,
unsigned int irq;
gic_interrupt_t intrs[3];
u32 clock_frequency;
- bool_t clock_valid;
+ bool clock_valid;
dt_dprintk("Create timer node\n");
@@ -924,7 +925,7 @@ static int make_timer_node(const struct domain *d, void *fdt,
}
static int map_irq_to_domain(struct domain *d, unsigned int irq,
- bool_t need_mapping, const char *devname)
+ bool need_mapping, const char *devname)
{
int res;
@@ -966,7 +967,7 @@ static int map_dt_irq_to_domain(const struct dt_device_node *dev,
struct domain *d = data;
unsigned int irq = dt_irq->irq;
int res;
- bool_t need_mapping = !dt_device_for_passthrough(dev);
+ bool need_mapping = !dt_device_for_passthrough(dev);
if ( irq < NR_LOCAL_IRQS )
{
@@ -996,7 +997,7 @@ static int map_range_to_domain(const struct dt_device_node *dev,
{
struct map_range_data *mr_data = data;
struct domain *d = mr_data->d;
- bool_t need_mapping = !dt_device_for_passthrough(dev);
+ bool need_mapping = !dt_device_for_passthrough(dev);
int res;
res = iomem_permit_access(d, paddr_to_pfn(addr),
@@ -1080,7 +1081,7 @@ static int handle_device(struct domain *d, struct dt_device_node *dev,
int res;
struct dt_raw_irq rirq;
u64 addr, size;
- bool_t need_mapping = !dt_device_for_passthrough(dev);
+ bool need_mapping = !dt_device_for_passthrough(dev);
nirq = dt_number_of_irq(dev);
naddr = dt_number_of_address(dev);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 04/12] arm/irq: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (2 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 03/12] arm/domain_build: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:09 ` Julien Grall
2017-09-15 9:42 ` [PATCH 05/12] arm/platform: " Wei Liu
` (7 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Also removed a redundant pair of brackets.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/irq.c | 12 ++++++------
xen/include/asm-arm/irq.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index f3f20a69c7..cbc7e6ebb8 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -315,7 +315,7 @@ void release_irq(unsigned int irq, const void *dev_id)
static int __setup_irq(struct irq_desc *desc, unsigned int irqflags,
struct irqaction *new)
{
- bool_t shared = !!(irqflags & IRQF_SHARED);
+ bool shared = irqflags & IRQF_SHARED;
ASSERT(new != NULL);
@@ -344,7 +344,7 @@ int setup_irq(unsigned int irq, unsigned int irqflags, struct irqaction *new)
int rc;
unsigned long flags;
struct irq_desc *desc;
- bool_t disabled;
+ bool disabled;
desc = irq_to_desc(irq);
@@ -387,10 +387,10 @@ err:
return rc;
}
-bool_t is_assignable_irq(unsigned int irq)
+bool is_assignable_irq(unsigned int irq)
{
/* For now, we can only route SPIs to the guest */
- return ((irq >= NR_LOCAL_IRQS) && (irq < gic_number_lines()));
+ return (irq >= NR_LOCAL_IRQS) && (irq < gic_number_lines());
}
/*
@@ -399,7 +399,7 @@ bool_t is_assignable_irq(unsigned int irq)
*
* XXX: See whether it is possible to let any domain configure the type.
*/
-bool_t irq_type_set_by_domain(const struct domain *d)
+bool irq_type_set_by_domain(const struct domain *d)
{
return (d == hardware_domain);
}
@@ -602,7 +602,7 @@ void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask)
BUG();
}
-static bool_t irq_validate_new_type(unsigned int curr, unsigned new)
+static bool irq_validate_new_type(unsigned int curr, unsigned new)
{
return (curr == IRQ_TYPE_INVALID || curr == new );
}
diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h
index 7c7662608a..2de76d0f56 100644
--- a/xen/include/asm-arm/irq.h
+++ b/xen/include/asm-arm/irq.h
@@ -51,7 +51,7 @@ static inline bool is_lpi(unsigned int irq)
#define domain_pirq_to_irq(d, pirq) (pirq)
-bool_t is_assignable_irq(unsigned int irq);
+bool is_assignable_irq(unsigned int irq);
void init_IRQ(void);
void init_secondary_IRQ(void);
@@ -77,7 +77,7 @@ void irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_mask);
* Use this helper in places that need to know whether the IRQ type is
* set by the domain.
*/
-bool_t irq_type_set_by_domain(const struct domain *d);
+bool irq_type_set_by_domain(const struct domain *d);
#endif /* _ASM_HW_IRQ_H */
/*
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 05/12] arm/platform: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (3 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 04/12] arm/irq: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:11 ` Julien Grall
2017-09-15 9:42 ` [PATCH 06/12] arm/alternative.c: " Wei Liu
` (6 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/platform.c | 14 +++++++-------
xen/arch/arm/platforms/exynos5.c | 4 ++--
xen/include/asm-arm/platform.h | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c
index 0af6d57bfe..3f2989ef2b 100644
--- a/xen/arch/arm/platform.c
+++ b/xen/arch/arm/platform.c
@@ -28,20 +28,20 @@ extern const struct platform_desc _splatform[], _eplatform[];
static const struct platform_desc *platform;
-static bool_t __init platform_is_compatible(const struct platform_desc *plat)
+static bool __init platform_is_compatible(const struct platform_desc *plat)
{
const char *const *compat;
if ( !plat->compatible )
- return 0;
+ return false;
for ( compat = plat->compatible; *compat; compat++ )
{
if ( dt_machine_is_compatible(*compat) )
- return 1;
+ return true;
}
- return 0;
+ return false;
}
void __init platform_init(void)
@@ -127,17 +127,17 @@ void platform_poweroff(void)
platform->poweroff();
}
-bool_t platform_has_quirk(uint32_t quirk)
+bool platform_has_quirk(uint32_t quirk)
{
uint32_t quirks = 0;
if ( platform && platform->quirks )
quirks = platform->quirks();
- return !!(quirks & quirk);
+ return (quirks & quirk);
}
-bool_t platform_device_is_blacklisted(const struct dt_device_node *node)
+bool platform_device_is_blacklisted(const struct dt_device_node *node)
{
const struct dt_device_match *blacklist = NULL;
diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
index 2ae5fa66e0..01247cb6a5 100644
--- a/xen/arch/arm/platforms/exynos5.c
+++ b/xen/arch/arm/platforms/exynos5.c
@@ -27,7 +27,7 @@
#include <asm/platform.h>
#include <asm/io.h>
-static bool_t secure_firmware;
+static bool secure_firmware;
#define EXYNOS_ARM_CORE0_CONFIG 0x2000
#define EXYNOS_ARM_CORE_CONFIG(_nr) (EXYNOS_ARM_CORE0_CONFIG + (0x80 * (_nr)))
@@ -108,7 +108,7 @@ static int __init exynos5_smp_init(void)
/* Have to use sysram_ns_base_addr + 0x1c for boot address */
compatible = "samsung,exynos4210-sysram-ns";
sysram_offset = 0x1c;
- secure_firmware = 1;
+ secure_firmware = true;
printk("Running under secure firmware.\n");
}
else
diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
index 08010ba09b..2591d7bb03 100644
--- a/xen/include/asm-arm/platform.h
+++ b/xen/include/asm-arm/platform.h
@@ -55,8 +55,8 @@ int platform_cpu_up(int cpu);
#endif
void platform_reset(void);
void platform_poweroff(void);
-bool_t platform_has_quirk(uint32_t quirk);
-bool_t platform_device_is_blacklisted(const struct dt_device_node *node);
+bool platform_has_quirk(uint32_t quirk);
+bool platform_device_is_blacklisted(const struct dt_device_node *node);
#define PLATFORM_START(_name, _namestr) \
static const struct platform_desc __plat_desc_##_name __used \
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 06/12] arm/alternative.c: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (4 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 05/12] arm/platform: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:12 ` Julien Grall
2017-09-15 9:42 ` [PATCH 07/12] arm/cpu{errata, feature}.[ch]: " Wei Liu
` (5 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/alternative.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
index a3bcda3117..9ffdc475d6 100644
--- a/xen/arch/arm/alternative.c
+++ b/xen/arch/arm/alternative.c
@@ -46,17 +46,17 @@ struct alt_region {
/*
* Check if the target PC is within an alternative block.
*/
-static bool_t branch_insn_requires_update(const struct alt_instr *alt,
- unsigned long pc)
+static bool branch_insn_requires_update(const struct alt_instr *alt,
+ unsigned long pc)
{
unsigned long replptr;
if ( is_active_kernel_text(pc) )
- return 1;
+ return true;
replptr = (unsigned long)ALT_REPL_PTR(alt);
if ( pc >= replptr && pc <= (replptr + alt->alt_len) )
- return 0;
+ return false;
/*
* Branching into *another* alternate sequence is doomed, and
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 07/12] arm/cpu{errata, feature}.[ch]: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (5 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 06/12] arm/alternative.c: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:30 ` Julien Grall
2017-09-15 9:42 ` [PATCH 08/12] arm/bootfdt.c: " Wei Liu
` (4 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/cpuerrata.c | 2 +-
xen/include/asm-arm/cpuerrata.h | 8 ++++----
xen/include/asm-arm/cpufeature.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index f89c0abe7e..fe9e9facbe 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -7,7 +7,7 @@
.midr_range_min = min, \
.midr_range_max = max
-static bool_t __maybe_unused
+static bool __maybe_unused
is_affected_midr_range(const struct arm_cpu_capabilities *entry)
{
return MIDR_IS_CPU_MODEL_RANGE(boot_cpu_data.midr.bits, entry->midr_model,
diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/include/asm-arm/cpuerrata.h
index 7b504418da..18a7d495d2 100644
--- a/xen/include/asm-arm/cpuerrata.h
+++ b/xen/include/asm-arm/cpuerrata.h
@@ -9,13 +9,13 @@ void check_local_cpu_errata(void);
#ifdef CONFIG_HAS_ALTERNATIVE
#define CHECK_WORKAROUND_HELPER(erratum, feature, arch) \
-static inline bool_t check_workaround_##erratum(void) \
+static inline bool check_workaround_##erratum(void) \
{ \
if ( !IS_ENABLED(arch) ) \
return 0; \
else \
{ \
- bool_t ret; \
+ bool ret; \
\
asm volatile (ALTERNATIVE("mov %0, #0", \
"mov %0, #1", \
@@ -29,10 +29,10 @@ static inline bool_t check_workaround_##erratum(void) \
#else /* CONFIG_HAS_ALTERNATIVE */
#define CHECK_WORKAROUND_HELPER(erratum, feature, arch) \
-static inline bool_t check_workaround_##erratum(void) \
+static inline bool check_workaround_##erratum(void) \
{ \
if ( !IS_ENABLED(arch) ) \
- return 0; \
+ return false; \
else \
return unlikely(cpus_have_cap(feature)); \
}
diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h
index b3cf706332..f00b6dbd39 100644
--- a/xen/include/asm-arm/cpufeature.h
+++ b/xen/include/asm-arm/cpufeature.h
@@ -53,10 +53,10 @@
extern DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS);
-static inline bool_t cpus_have_cap(unsigned int num)
+static inline bool cpus_have_cap(unsigned int num)
{
if ( num >= ARM_NCAPS )
- return 0;
+ return false;
return test_bit(num, cpu_hwcaps);
}
@@ -73,7 +73,7 @@ static inline void cpus_set_cap(unsigned int num)
struct arm_cpu_capabilities {
const char *desc;
u16 capability;
- bool_t (*matches)(const struct arm_cpu_capabilities *);
+ bool (*matches)(const struct arm_cpu_capabilities *);
union {
struct { /* To be used for eratum handling only */
u32 midr_model;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 08/12] arm/bootfdt.c: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (6 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 07/12] arm/cpu{errata, feature}.[ch]: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:31 ` Julien Grall
2017-09-15 9:42 ` [PATCH 09/12] arm/decode.c: " Wei Liu
` (3 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/bootfdt.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index ea188a08b1..4a687e725d 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -16,8 +16,8 @@
#include <xsm/xsm.h>
#include <asm/setup.h>
-static bool_t __init device_tree_node_matches(const void *fdt, int node,
- const char *match)
+static bool __init device_tree_node_matches(const void *fdt, int node,
+ const char *match)
{
const char *name;
size_t match_len;
@@ -31,8 +31,8 @@ static bool_t __init device_tree_node_matches(const void *fdt, int node,
&& (name[match_len] == '@' || name[match_len] == '\0');
}
-static bool_t __init device_tree_node_compatible(const void *fdt, int node,
- const char *match)
+static bool __init device_tree_node_compatible(const void *fdt, int node,
+ const char *match)
{
int len, l;
int mlen;
@@ -42,17 +42,17 @@ static bool_t __init device_tree_node_compatible(const void *fdt, int node,
prop = fdt_getprop(fdt, node, "compatible", &len);
if ( prop == NULL )
- return 0;
+ return false;
while ( len > 0 ) {
if ( !dt_compat_cmp(prop, match) )
- return 1;
+ return true;
l = strlen(prop) + 1;
prop += l;
len -= l;
}
- return 0;
+ return false;
}
static void __init device_tree_get_reg(const __be32 **cell, u32 address_cells,
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 09/12] arm/decode.c: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (7 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 08/12] arm/bootfdt.c: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:33 ` Julien Grall
2017-09-15 9:42 ` [PATCH 10/12] arm/smpboot.c: " Wei Liu
` (2 subsequent siblings)
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/decode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index 514b7a21a5..795d126f02 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -26,7 +26,7 @@
#include "decode.h"
static void update_dabt(struct hsr_dabt *dabt, int reg,
- uint8_t size, bool_t sign)
+ uint8_t size, bool sign)
{
dabt->reg = reg;
dabt->size = size;
@@ -47,8 +47,8 @@ static int decode_thumb2(register_t pc, struct hsr_dabt *dabt, uint16_t hw1)
{
case 12:
{
- bool_t sign = !!(hw1 & (1 << 8));
- bool_t load = !!(hw1 & (1 << 4));
+ bool sign = (hw1 & (1u << 8));
+ bool load = (hw1 & (1u << 4));
if ( (hw1 & 0x0110) == 0x0100 )
/* NEON instruction */
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 10/12] arm/smpboot.c: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (8 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 09/12] arm/decode.c: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:34 ` Julien Grall
2017-09-15 9:42 ` [PATCH 11/12] arm/vtimer.c: " Wei Liu
2017-09-15 9:42 ` [PATCH 12/12] arm: use plain bool in various headers Wei Liu
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/smpboot.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 32e87221c0..1255185a9c 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -59,7 +59,7 @@ struct init_info __initdata init_data =
/* Shared state for coordinating CPU bringup */
unsigned long smp_up_cpu = MPIDR_INVALID;
/* Shared state for coordinating CPU teardown */
-static bool_t cpu_is_dead = 0;
+static bool cpu_is_dead;
/* ID of the PCPU we're running on */
DEFINE_PER_CPU(unsigned int, cpu_id);
@@ -105,7 +105,7 @@ static void __init dt_smp_init_cpus(void)
{
[0 ... NR_CPUS - 1] = MPIDR_INVALID
};
- bool_t bootcpu_valid = 0;
+ bool bootcpu_valid = false;
int rc;
mpidr = boot_cpu_data.mpidr.bits & MPIDR_HWID_MASK;
@@ -197,7 +197,7 @@ static void __init dt_smp_init_cpus(void)
if ( hwid == mpidr )
{
i = 0;
- bootcpu_valid = 1;
+ bootcpu_valid = true;
}
else
i = cpuidx++;
@@ -352,7 +352,7 @@ void __cpu_disable(void)
void stop_cpu(void)
{
local_irq_disable();
- cpu_is_dead = 1;
+ cpu_is_dead = true;
/* Make sure the write happens before we sleep forever */
dsb(sy);
isb();
@@ -454,7 +454,7 @@ void __cpu_die(unsigned int cpu)
printk(KERN_ERR "CPU %u still not dead...\n", cpu);
smp_mb();
}
- cpu_is_dead = 0;
+ cpu_is_dead = false;
smp_mb();
}
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 11/12] arm/vtimer.c: switch to plain bool
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (9 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 10/12] arm/smpboot.c: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:36 ` Julien Grall
2017-09-15 9:42 ` [PATCH 12/12] arm: use plain bool in various headers Wei Liu
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/arm/vtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 0460962f08..3f84893a74 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -100,7 +100,7 @@ int domain_vtimer_init(struct domain *d, struct xen_arch_domainconfig *config)
int vcpu_vtimer_init(struct vcpu *v)
{
struct vtimer *t = &v->arch.phys_timer;
- bool_t d0 = is_hardware_domain(v->domain);
+ bool d0 = is_hardware_domain(v->domain);
/*
* Hardware domain uses the hardware interrupts, guests get the virtual
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 12/12] arm: use plain bool in various headers
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
` (10 preceding siblings ...)
2017-09-15 9:42 ` [PATCH 11/12] arm/vtimer.c: " Wei Liu
@ 2017-09-15 9:42 ` Wei Liu
2017-09-15 14:41 ` Julien Grall
11 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 9:42 UTC (permalink / raw)
To: Xen-devel; +Cc: Julien Grall, Stefano Stabellini, Wei Liu
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/include/asm-arm/altp2m.h | 4 ++--
xen/include/asm-arm/arm64/insn.h | 2 +-
xen/include/asm-arm/domain.h | 2 +-
xen/include/asm-arm/guest_access.h | 2 +-
xen/include/asm-arm/p2m.h | 8 ++++----
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/xen/include/asm-arm/altp2m.h b/xen/include/asm-arm/altp2m.h
index a87747a291..df50cb2f09 100644
--- a/xen/include/asm-arm/altp2m.h
+++ b/xen/include/asm-arm/altp2m.h
@@ -22,10 +22,10 @@
#include <xen/sched.h>
/* Alternate p2m on/off per domain */
-static inline bool_t altp2m_active(const struct domain *d)
+static inline bool altp2m_active(const struct domain *d)
{
/* Not implemented on ARM. */
- return 0;
+ return false;
}
/* Alternate p2m VCPU */
diff --git a/xen/include/asm-arm/arm64/insn.h b/xen/include/asm-arm/arm64/insn.h
index 2ec4ad7c7f..4e0d364d41 100644
--- a/xen/include/asm-arm/arm64/insn.h
+++ b/xen/include/asm-arm/arm64/insn.h
@@ -55,7 +55,7 @@ enum aarch64_insn_branch_type {
};
#define __AARCH64_INSN_FUNCS(abbr, mask, val) \
-static always_inline bool_t aarch64_insn_is_##abbr(u32 code) \
+static always_inline bool aarch64_insn_is_##abbr(u32 code) \
{ return (code & (mask)) == (val); } \
static always_inline u32 aarch64_insn_get_##abbr##_value(void) \
{ return (val); }
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 8dfc1d1ec2..b174c65080 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -280,7 +280,7 @@ struct arch_vcpu
struct vtimer phys_timer;
struct vtimer virt_timer;
- bool_t vtimer_initialized;
+ bool vtimer_initialized;
} __cacheline_aligned;
void vcpu_show_execution_state(struct vcpu *);
diff --git a/xen/include/asm-arm/guest_access.h b/xen/include/asm-arm/guest_access.h
index cc73ce820f..6796801cfe 100644
--- a/xen/include/asm-arm/guest_access.h
+++ b/xen/include/asm-arm/guest_access.h
@@ -12,7 +12,7 @@ unsigned long raw_copy_from_guest(void *to, const void *from, unsigned len);
unsigned long raw_clear_guest(void *to, unsigned len);
int access_guest_memory_by_ipa(struct domain *d, paddr_t ipa, void *buf,
- uint32_t size, bool_t is_write);
+ uint32_t size, bool is_write);
#define __raw_copy_to_guest raw_copy_to_guest
#define __raw_copy_from_guest raw_copy_from_guest
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index aa0d60ae3a..bc5bbf0db7 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -82,10 +82,10 @@ struct p2m_domain {
* If true, and an access fault comes in and there is no vm_event listener,
* pause domain. Otherwise, remove access restrictions.
*/
- bool_t access_required;
+ bool access_required;
/* Defines if mem_access is in use for the domain. */
- bool_t mem_access_enabled;
+ bool mem_access_enabled;
/*
* Default P2M access type for each page in the the domain: new pages,
@@ -338,9 +338,9 @@ static inline int get_page_and_type(struct page_info *page,
/* get host p2m table */
#define p2m_get_hostp2m(d) (&(d)->arch.p2m)
-static inline bool_t p2m_vm_event_sanity_check(struct domain *d)
+static inline bool p2m_vm_event_sanity_check(struct domain *d)
{
- return 1;
+ return true;
}
/*
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 01/12] arm/acpi: switch to plain bool
2017-09-15 9:42 ` [PATCH 01/12] arm/acpi: switch to plain bool Wei Liu
@ 2017-09-15 10:40 ` Julien Grall
2017-09-15 11:07 ` Wei Liu
0 siblings, 1 reply; 30+ messages in thread
From: Julien Grall @ 2017-09-15 10:40 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h
> index 9f954d39e1..a62429e7e2 100644
> --- a/xen/include/asm-arm/acpi.h
> +++ b/xen/include/asm-arm/acpi.h
> @@ -43,8 +43,8 @@ typedef enum {
> TBL_MMAX,
> } EFI_MEM_RES;
>
> -bool_t __init acpi_psci_present(void);
> -bool_t __init acpi_psci_hvc_present(void);
> +bool __init acpi_psci_present(void);
> +bool __init acpi_psci_hvc_present(void);
> void __init acpi_smp_init_cpus(void);
>
> /*
> @@ -57,16 +57,16 @@ void __init acpi_smp_init_cpus(void);
> paddr_t acpi_get_table_offset(struct membank tbl_add[], EFI_MEM_RES index);
>
> #ifdef CONFIG_ACPI
> -extern bool_t acpi_disabled;
> +extern bool acpi_disabled;
> /* Basic configuration for ACPI */
> static inline void disable_acpi(void)
> {
> - acpi_disabled = 1;
> + acpi_disabled = true;
> }
>
> static inline void enable_acpi(void)
> {
> - acpi_disabled = 0;
> + acpi_disabled = false;
> }
> #else
> #define acpi_disabled (1)
Can you modify the 1 to true, here? This would make the !CONFIG_ACPI
version inlined with the CONFIG_ACPI one.
With that:
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 02/12] arm/{v,}gic: switch to plain bool
2017-09-15 9:42 ` [PATCH 02/12] arm/{v,}gic: " Wei Liu
@ 2017-09-15 10:48 ` Julien Grall
2017-09-15 11:09 ` Wei Liu
0 siblings, 1 reply; 30+ messages in thread
From: Julien Grall @ 2017-09-15 10:48 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
> index 6203dc59f4..977e75b1d2 100644
> --- a/xen/include/asm-arm/gic.h
> +++ b/xen/include/asm-arm/gic.h
> @@ -345,7 +345,7 @@ struct gic_hw_operations {
> void (*update_lr)(int lr, const struct pending_irq *pending_irq,
> unsigned int state);
> /* Update HCR status register */
> - void (*update_hcr_status)(uint32_t flag, bool_t set);
> + void (*update_hcr_status)(uint32_t flag, bool set);
The callers of update_hcr_status are still using 1/0 (see
arch/arm/gic.c). Would you mind to fix it?
I can also send a follow-up patch :).
> /* Clear LR register */
> void (*clear_lr)(int lr);
> /* Read LR register and populate gic_lr structure */
>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] arm/domain_build: switch to plain bool
2017-09-15 9:42 ` [PATCH 03/12] arm/domain_build: " Wei Liu
@ 2017-09-15 11:00 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 11:00 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Also fixed a coding style issue.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 01/12] arm/acpi: switch to plain bool
2017-09-15 10:40 ` Julien Grall
@ 2017-09-15 11:07 ` Wei Liu
0 siblings, 0 replies; 30+ messages in thread
From: Wei Liu @ 2017-09-15 11:07 UTC (permalink / raw)
To: Julien Grall; +Cc: Xen-devel, Stefano Stabellini, Wei Liu
On Fri, Sep 15, 2017 at 11:40:00AM +0100, Julien Grall wrote:
> Hi Wei,
>
> On 09/15/2017 10:42 AM, Wei Liu wrote:
> > diff --git a/xen/include/asm-arm/acpi.h b/xen/include/asm-arm/acpi.h
> > index 9f954d39e1..a62429e7e2 100644
> > --- a/xen/include/asm-arm/acpi.h
> > +++ b/xen/include/asm-arm/acpi.h
> > @@ -43,8 +43,8 @@ typedef enum {
> > TBL_MMAX,
> > } EFI_MEM_RES;
> > -bool_t __init acpi_psci_present(void);
> > -bool_t __init acpi_psci_hvc_present(void);
> > +bool __init acpi_psci_present(void);
> > +bool __init acpi_psci_hvc_present(void);
> > void __init acpi_smp_init_cpus(void);
> > /*
> > @@ -57,16 +57,16 @@ void __init acpi_smp_init_cpus(void);
> > paddr_t acpi_get_table_offset(struct membank tbl_add[], EFI_MEM_RES index);
> > #ifdef CONFIG_ACPI
> > -extern bool_t acpi_disabled;
> > +extern bool acpi_disabled;
> > /* Basic configuration for ACPI */
> > static inline void disable_acpi(void)
> > {
> > - acpi_disabled = 1;
> > + acpi_disabled = true;
> > }
> > static inline void enable_acpi(void)
> > {
> > - acpi_disabled = 0;
> > + acpi_disabled = false;
> > }
> > #else
> > #define acpi_disabled (1)
>
> Can you modify the 1 to true, here? This would make the !CONFIG_ACPI version
> inlined with the CONFIG_ACPI one.
>
Done.
> With that:
>
> Reviewed-by: Julien Grall <julien.grall@arm.com>
>
Thanks
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 02/12] arm/{v,}gic: switch to plain bool
2017-09-15 10:48 ` Julien Grall
@ 2017-09-15 11:09 ` Wei Liu
2017-09-15 14:06 ` Julien Grall
0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 11:09 UTC (permalink / raw)
To: Julien Grall; +Cc: Xen-devel, Stefano Stabellini, Wei Liu
On Fri, Sep 15, 2017 at 11:48:40AM +0100, Julien Grall wrote:
> Hi Wei,
>
> On 09/15/2017 10:42 AM, Wei Liu wrote:
> > diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
> > index 6203dc59f4..977e75b1d2 100644
> > --- a/xen/include/asm-arm/gic.h
> > +++ b/xen/include/asm-arm/gic.h
> > @@ -345,7 +345,7 @@ struct gic_hw_operations {
> > void (*update_lr)(int lr, const struct pending_irq *pending_irq,
> > unsigned int state);
> > /* Update HCR status register */
> > - void (*update_hcr_status)(uint32_t flag, bool_t set);
> > + void (*update_hcr_status)(uint32_t flag, bool set);
>
> The callers of update_hcr_status are still using 1/0 (see arch/arm/gic.c).
> Would you mind to fix it?
I will squash in the following diff:
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 6c803bf09b..f578f3c566 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -606,7 +606,7 @@ void gic_clear_lrs(struct vcpu *v)
if ( is_idle_vcpu(v) )
return;
- gic_hw_ops->update_hcr_status(GICH_HCR_UIE, 0);
+ gic_hw_ops->update_hcr_status(GICH_HCR_UIE, false);
spin_lock_irqsave(&v->arch.vgic.lock, flags);
@@ -731,7 +731,7 @@ void gic_inject(void)
gic_restore_pending_irqs(current);
if ( !list_empty(¤t->arch.vgic.lr_pending) && lr_all_full() )
- gic_hw_ops->update_hcr_status(GICH_HCR_UIE, 1);
+ gic_hw_ops->update_hcr_status(GICH_HCR_UIE, true);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 02/12] arm/{v,}gic: switch to plain bool
2017-09-15 11:09 ` Wei Liu
@ 2017-09-15 14:06 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:06 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Stefano Stabellini
On 09/15/2017 12:09 PM, Wei Liu wrote:
> On Fri, Sep 15, 2017 at 11:48:40AM +0100, Julien Grall wrote:
>> Hi Wei,
>>
>> On 09/15/2017 10:42 AM, Wei Liu wrote:
>>> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
>>> index 6203dc59f4..977e75b1d2 100644
>>> --- a/xen/include/asm-arm/gic.h
>>> +++ b/xen/include/asm-arm/gic.h
>>> @@ -345,7 +345,7 @@ struct gic_hw_operations {
>>> void (*update_lr)(int lr, const struct pending_irq *pending_irq,
>>> unsigned int state);
>>> /* Update HCR status register */
>>> - void (*update_hcr_status)(uint32_t flag, bool_t set);
>>> + void (*update_hcr_status)(uint32_t flag, bool set);
>>
>> The callers of update_hcr_status are still using 1/0 (see arch/arm/gic.c).
>> Would you mind to fix it?
>
> I will squash in the following diff:
With that:
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
>
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index 6c803bf09b..f578f3c566 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -606,7 +606,7 @@ void gic_clear_lrs(struct vcpu *v)
> if ( is_idle_vcpu(v) )
> return;
>
> - gic_hw_ops->update_hcr_status(GICH_HCR_UIE, 0);
> + gic_hw_ops->update_hcr_status(GICH_HCR_UIE, false);
>
> spin_lock_irqsave(&v->arch.vgic.lock, flags);
>
> @@ -731,7 +731,7 @@ void gic_inject(void)
> gic_restore_pending_irqs(current);
>
> if ( !list_empty(¤t->arch.vgic.lr_pending) && lr_all_full() )
> - gic_hw_ops->update_hcr_status(GICH_HCR_UIE, 1);
> + gic_hw_ops->update_hcr_status(GICH_HCR_UIE, true);
> }
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 04/12] arm/irq: switch to plain bool
2017-09-15 9:42 ` [PATCH 04/12] arm/irq: " Wei Liu
@ 2017-09-15 14:09 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:09 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Also removed a redundant pair of brackets.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 05/12] arm/platform: switch to plain bool
2017-09-15 9:42 ` [PATCH 05/12] arm/platform: " Wei Liu
@ 2017-09-15 14:11 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:11 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
> ---
> xen/arch/arm/platform.c | 14 +++++++-------
> xen/arch/arm/platforms/exynos5.c | 4 ++--
> xen/include/asm-arm/platform.h | 4 ++--
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c
> index 0af6d57bfe..3f2989ef2b 100644
> --- a/xen/arch/arm/platform.c
> +++ b/xen/arch/arm/platform.c
> @@ -28,20 +28,20 @@ extern const struct platform_desc _splatform[], _eplatform[];
> static const struct platform_desc *platform;
>
>
> -static bool_t __init platform_is_compatible(const struct platform_desc *plat)
> +static bool __init platform_is_compatible(const struct platform_desc *plat)
> {
> const char *const *compat;
>
> if ( !plat->compatible )
> - return 0;
> + return false;
>
> for ( compat = plat->compatible; *compat; compat++ )
> {
> if ( dt_machine_is_compatible(*compat) )
> - return 1;
> + return true;
> }
>
> - return 0;
> + return false;
> }
>
> void __init platform_init(void)
> @@ -127,17 +127,17 @@ void platform_poweroff(void)
> platform->poweroff();
> }
>
> -bool_t platform_has_quirk(uint32_t quirk)
> +bool platform_has_quirk(uint32_t quirk)
> {
> uint32_t quirks = 0;
>
> if ( platform && platform->quirks )
> quirks = platform->quirks();
>
> - return !!(quirks & quirk);
> + return (quirks & quirk);
> }
>
> -bool_t platform_device_is_blacklisted(const struct dt_device_node *node)
> +bool platform_device_is_blacklisted(const struct dt_device_node *node)
> {
> const struct dt_device_match *blacklist = NULL;
>
> diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
> index 2ae5fa66e0..01247cb6a5 100644
> --- a/xen/arch/arm/platforms/exynos5.c
> +++ b/xen/arch/arm/platforms/exynos5.c
> @@ -27,7 +27,7 @@
> #include <asm/platform.h>
> #include <asm/io.h>
>
> -static bool_t secure_firmware;
> +static bool secure_firmware;
>
> #define EXYNOS_ARM_CORE0_CONFIG 0x2000
> #define EXYNOS_ARM_CORE_CONFIG(_nr) (EXYNOS_ARM_CORE0_CONFIG + (0x80 * (_nr)))
> @@ -108,7 +108,7 @@ static int __init exynos5_smp_init(void)
> /* Have to use sysram_ns_base_addr + 0x1c for boot address */
> compatible = "samsung,exynos4210-sysram-ns";
> sysram_offset = 0x1c;
> - secure_firmware = 1;
> + secure_firmware = true;
> printk("Running under secure firmware.\n");
> }
> else
> diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
> index 08010ba09b..2591d7bb03 100644
> --- a/xen/include/asm-arm/platform.h
> +++ b/xen/include/asm-arm/platform.h
> @@ -55,8 +55,8 @@ int platform_cpu_up(int cpu);
> #endif
> void platform_reset(void);
> void platform_poweroff(void);
> -bool_t platform_has_quirk(uint32_t quirk);
> -bool_t platform_device_is_blacklisted(const struct dt_device_node *node);
> +bool platform_has_quirk(uint32_t quirk);
> +bool platform_device_is_blacklisted(const struct dt_device_node *node);
>
> #define PLATFORM_START(_name, _namestr) \
> static const struct platform_desc __plat_desc_##_name __used \
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 06/12] arm/alternative.c: switch to plain bool
2017-09-15 9:42 ` [PATCH 06/12] arm/alternative.c: " Wei Liu
@ 2017-09-15 14:12 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:12 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
> ---
> xen/arch/arm/alternative.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/xen/arch/arm/alternative.c b/xen/arch/arm/alternative.c
> index a3bcda3117..9ffdc475d6 100644
> --- a/xen/arch/arm/alternative.c
> +++ b/xen/arch/arm/alternative.c
> @@ -46,17 +46,17 @@ struct alt_region {
> /*
> * Check if the target PC is within an alternative block.
> */
> -static bool_t branch_insn_requires_update(const struct alt_instr *alt,
> - unsigned long pc)
> +static bool branch_insn_requires_update(const struct alt_instr *alt,
> + unsigned long pc)
> {
> unsigned long replptr;
>
> if ( is_active_kernel_text(pc) )
> - return 1;
> + return true;
>
> replptr = (unsigned long)ALT_REPL_PTR(alt);
> if ( pc >= replptr && pc <= (replptr + alt->alt_len) )
> - return 0;
> + return false;
>
> /*
> * Branching into *another* alternate sequence is doomed, and
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/12] arm/cpu{errata, feature}.[ch]: switch to plain bool
2017-09-15 9:42 ` [PATCH 07/12] arm/cpu{errata, feature}.[ch]: " Wei Liu
@ 2017-09-15 14:30 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:30 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> xen/arch/arm/cpuerrata.c | 2 +-
> xen/include/asm-arm/cpuerrata.h | 8 ++++----
> xen/include/asm-arm/cpufeature.h | 6 +++---
> 3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
> index f89c0abe7e..fe9e9facbe 100644
> --- a/xen/arch/arm/cpuerrata.c
> +++ b/xen/arch/arm/cpuerrata.c
> @@ -7,7 +7,7 @@
> .midr_range_min = min, \
> .midr_range_max = max
>
> -static bool_t __maybe_unused
> +static bool __maybe_unused
> is_affected_midr_range(const struct arm_cpu_capabilities *entry)
> {
> return MIDR_IS_CPU_MODEL_RANGE(boot_cpu_data.midr.bits, entry->midr_model,
> diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/include/asm-arm/cpuerrata.h
> index 7b504418da..18a7d495d2 100644
> --- a/xen/include/asm-arm/cpuerrata.h
> +++ b/xen/include/asm-arm/cpuerrata.h
> @@ -9,13 +9,13 @@ void check_local_cpu_errata(void);
> #ifdef CONFIG_HAS_ALTERNATIVE
>
> #define CHECK_WORKAROUND_HELPER(erratum, feature, arch) \
> -static inline bool_t check_workaround_##erratum(void) \
> +static inline bool check_workaround_##erratum(void) \
> { \
> if ( !IS_ENABLED(arch) ) \
> return 0; \
return false;
With that:
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 08/12] arm/bootfdt.c: switch to plain bool
2017-09-15 9:42 ` [PATCH 08/12] arm/bootfdt.c: " Wei Liu
@ 2017-09-15 14:31 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:31 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
> ---
> xen/arch/arm/bootfdt.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
> index ea188a08b1..4a687e725d 100644
> --- a/xen/arch/arm/bootfdt.c
> +++ b/xen/arch/arm/bootfdt.c
> @@ -16,8 +16,8 @@
> #include <xsm/xsm.h>
> #include <asm/setup.h>
>
> -static bool_t __init device_tree_node_matches(const void *fdt, int node,
> - const char *match)
> +static bool __init device_tree_node_matches(const void *fdt, int node,
> + const char *match)
> {
> const char *name;
> size_t match_len;
> @@ -31,8 +31,8 @@ static bool_t __init device_tree_node_matches(const void *fdt, int node,
> && (name[match_len] == '@' || name[match_len] == '\0');
> }
>
> -static bool_t __init device_tree_node_compatible(const void *fdt, int node,
> - const char *match)
> +static bool __init device_tree_node_compatible(const void *fdt, int node,
> + const char *match)
> {
> int len, l;
> int mlen;
> @@ -42,17 +42,17 @@ static bool_t __init device_tree_node_compatible(const void *fdt, int node,
>
> prop = fdt_getprop(fdt, node, "compatible", &len);
> if ( prop == NULL )
> - return 0;
> + return false;
>
> while ( len > 0 ) {
> if ( !dt_compat_cmp(prop, match) )
> - return 1;
> + return true;
> l = strlen(prop) + 1;
> prop += l;
> len -= l;
> }
>
> - return 0;
> + return false;
> }
>
> static void __init device_tree_get_reg(const __be32 **cell, u32 address_cells,
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] arm/decode.c: switch to plain bool
2017-09-15 9:42 ` [PATCH 09/12] arm/decode.c: " Wei Liu
@ 2017-09-15 14:33 ` Julien Grall
2017-09-15 14:39 ` Wei Liu
0 siblings, 1 reply; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:33 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> xen/arch/arm/decode.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
> index 514b7a21a5..795d126f02 100644
> --- a/xen/arch/arm/decode.c
> +++ b/xen/arch/arm/decode.c
> @@ -26,7 +26,7 @@
> #include "decode.h"
>
> static void update_dabt(struct hsr_dabt *dabt, int reg,
> - uint8_t size, bool_t sign)
> + uint8_t size, bool sign)
You probably want to switch from 0 to false all the callers of update_dabt.
Regardless that:
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
> {
> dabt->reg = reg;
> dabt->size = size;
> @@ -47,8 +47,8 @@ static int decode_thumb2(register_t pc, struct hsr_dabt *dabt, uint16_t hw1)
> {
> case 12:
> {
> - bool_t sign = !!(hw1 & (1 << 8));
> - bool_t load = !!(hw1 & (1 << 4));
> + bool sign = (hw1 & (1u << 8));
> + bool load = (hw1 & (1u << 4));
>
> if ( (hw1 & 0x0110) == 0x0100 )
> /* NEON instruction */
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] arm/smpboot.c: switch to plain bool
2017-09-15 9:42 ` [PATCH 10/12] arm/smpboot.c: " Wei Liu
@ 2017-09-15 14:34 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:34 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
> ---
> xen/arch/arm/smpboot.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> index 32e87221c0..1255185a9c 100644
> --- a/xen/arch/arm/smpboot.c
> +++ b/xen/arch/arm/smpboot.c
> @@ -59,7 +59,7 @@ struct init_info __initdata init_data =
> /* Shared state for coordinating CPU bringup */
> unsigned long smp_up_cpu = MPIDR_INVALID;
> /* Shared state for coordinating CPU teardown */
> -static bool_t cpu_is_dead = 0;
> +static bool cpu_is_dead;
>
> /* ID of the PCPU we're running on */
> DEFINE_PER_CPU(unsigned int, cpu_id);
> @@ -105,7 +105,7 @@ static void __init dt_smp_init_cpus(void)
> {
> [0 ... NR_CPUS - 1] = MPIDR_INVALID
> };
> - bool_t bootcpu_valid = 0;
> + bool bootcpu_valid = false;
> int rc;
>
> mpidr = boot_cpu_data.mpidr.bits & MPIDR_HWID_MASK;
> @@ -197,7 +197,7 @@ static void __init dt_smp_init_cpus(void)
> if ( hwid == mpidr )
> {
> i = 0;
> - bootcpu_valid = 1;
> + bootcpu_valid = true;
> }
> else
> i = cpuidx++;
> @@ -352,7 +352,7 @@ void __cpu_disable(void)
> void stop_cpu(void)
> {
> local_irq_disable();
> - cpu_is_dead = 1;
> + cpu_is_dead = true;
> /* Make sure the write happens before we sleep forever */
> dsb(sy);
> isb();
> @@ -454,7 +454,7 @@ void __cpu_die(unsigned int cpu)
> printk(KERN_ERR "CPU %u still not dead...\n", cpu);
> smp_mb();
> }
> - cpu_is_dead = 0;
> + cpu_is_dead = false;
> smp_mb();
> }
>
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] arm/vtimer.c: switch to plain bool
2017-09-15 9:42 ` [PATCH 11/12] arm/vtimer.c: " Wei Liu
@ 2017-09-15 14:36 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:36 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Cheers,
> ---
> xen/arch/arm/vtimer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
> index 0460962f08..3f84893a74 100644
> --- a/xen/arch/arm/vtimer.c
> +++ b/xen/arch/arm/vtimer.c
> @@ -100,7 +100,7 @@ int domain_vtimer_init(struct domain *d, struct xen_arch_domainconfig *config)
> int vcpu_vtimer_init(struct vcpu *v)
> {
> struct vtimer *t = &v->arch.phys_timer;
> - bool_t d0 = is_hardware_domain(v->domain);
> + bool d0 = is_hardware_domain(v->domain);
>
> /*
> * Hardware domain uses the hardware interrupts, guests get the virtual
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] arm/decode.c: switch to plain bool
2017-09-15 14:33 ` Julien Grall
@ 2017-09-15 14:39 ` Wei Liu
2017-09-15 14:43 ` Julien Grall
0 siblings, 1 reply; 30+ messages in thread
From: Wei Liu @ 2017-09-15 14:39 UTC (permalink / raw)
To: Julien Grall; +Cc: Xen-devel, Stefano Stabellini, Wei Liu
On Fri, Sep 15, 2017 at 03:33:27PM +0100, Julien Grall wrote:
> Hi Wei,
>
> On 09/15/2017 10:42 AM, Wei Liu wrote:
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > ---
> > xen/arch/arm/decode.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
> > index 514b7a21a5..795d126f02 100644
> > --- a/xen/arch/arm/decode.c
> > +++ b/xen/arch/arm/decode.c
> > @@ -26,7 +26,7 @@
> > #include "decode.h"
> > static void update_dabt(struct hsr_dabt *dabt, int reg,
> > - uint8_t size, bool_t sign)
> > + uint8_t size, bool sign)
>
> You probably want to switch from 0 to false all the callers of update_dabt.
>
The following diff will be folded in.
diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
index 795d126f02..8b1e15d118 100644
--- a/xen/arch/arm/decode.c
+++ b/xen/arch/arm/decode.c
@@ -101,16 +101,16 @@ static int decode_thumb(register_t pc, struct
hsr_dabt *dabt)
switch ( opB & 0x3 )
{
case 0: /* Non-signed word */
- update_dabt(dabt, reg, 2, 0);
+ update_dabt(dabt, reg, 2, false);
break;
case 1: /* Non-signed halfword */
- update_dabt(dabt, reg, 1, 0);
+ update_dabt(dabt, reg, 1, false);
break;
case 2: /* Non-signed byte */
- update_dabt(dabt, reg, 0, 0);
+ update_dabt(dabt, reg, 0, false);
break;
case 3: /* Signed byte */
- update_dabt(dabt, reg, 0, 1);
+ update_dabt(dabt, reg, 0, true);
break;
}
@@ -118,19 +118,19 @@ static int decode_thumb(register_t pc, struct
hsr_dabt *dabt)
}
case 6:
/* Load/Store word immediate offset */
- update_dabt(dabt, instr & 7, 2, 0);
+ update_dabt(dabt, instr & 7, 2, false);
break;
case 7:
/* Load/Store byte immediate offset */
- update_dabt(dabt, instr & 7, 0, 0);
+ update_dabt(dabt, instr & 7, 0, false);
break;
case 8:
/* Load/Store halfword immediate offset */
- update_dabt(dabt, instr & 7, 1, 0);
+ update_dabt(dabt, instr & 7, 1, false);
break;
case 9:
/* Load/Store word sp offset */
- update_dabt(dabt, (instr >> 8) & 7, 2, 0);
+ update_dabt(dabt, (instr >> 8) & 7, 2, false);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 12/12] arm: use plain bool in various headers
2017-09-15 9:42 ` [PATCH 12/12] arm: use plain bool in various headers Wei Liu
@ 2017-09-15 14:41 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:41 UTC (permalink / raw)
To: Wei Liu, Xen-devel; +Cc: Stefano Stabellini
Hi Wei,
On 09/15/2017 10:42 AM, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> xen/include/asm-arm/altp2m.h | 4 ++--
> xen/include/asm-arm/arm64/insn.h | 2 +-
> xen/include/asm-arm/domain.h | 2 +-
> xen/include/asm-arm/guest_access.h | 2 +-
> xen/include/asm-arm/p2m.h | 8 ++++----
> 5 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/xen/include/asm-arm/altp2m.h b/xen/include/asm-arm/altp2m.h
> index a87747a291..df50cb2f09 100644
> --- a/xen/include/asm-arm/altp2m.h
> +++ b/xen/include/asm-arm/altp2m.h
> @@ -22,10 +22,10 @@
> #include <xen/sched.h>
>
> /* Alternate p2m on/off per domain */
> -static inline bool_t altp2m_active(const struct domain *d)
> +static inline bool altp2m_active(const struct domain *d)
> {
> /* Not implemented on ARM. */
> - return 0;
> + return false;
> }
>
> /* Alternate p2m VCPU */
> diff --git a/xen/include/asm-arm/arm64/insn.h b/xen/include/asm-arm/arm64/insn.h
> index 2ec4ad7c7f..4e0d364d41 100644
> --- a/xen/include/asm-arm/arm64/insn.h
> +++ b/xen/include/asm-arm/arm64/insn.h
> @@ -55,7 +55,7 @@ enum aarch64_insn_branch_type {
> };
>
> #define __AARCH64_INSN_FUNCS(abbr, mask, val) \
> -static always_inline bool_t aarch64_insn_is_##abbr(u32 code) \
> +static always_inline bool aarch64_insn_is_##abbr(u32 code) \
Hmmm, I am not sure why this was turned to a bool_t at first the hand.
This file was supposed to be a copy of the Linux version.
Acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 09/12] arm/decode.c: switch to plain bool
2017-09-15 14:39 ` Wei Liu
@ 2017-09-15 14:43 ` Julien Grall
0 siblings, 0 replies; 30+ messages in thread
From: Julien Grall @ 2017-09-15 14:43 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Stefano Stabellini
On 09/15/2017 03:39 PM, Wei Liu wrote:
> On Fri, Sep 15, 2017 at 03:33:27PM +0100, Julien Grall wrote:
>> Hi Wei,
>>
>> On 09/15/2017 10:42 AM, Wei Liu wrote:
>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>>> ---
>>> xen/arch/arm/decode.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
>>> index 514b7a21a5..795d126f02 100644
>>> --- a/xen/arch/arm/decode.c
>>> +++ b/xen/arch/arm/decode.c
>>> @@ -26,7 +26,7 @@
>>> #include "decode.h"
>>> static void update_dabt(struct hsr_dabt *dabt, int reg,
>>> - uint8_t size, bool_t sign)
>>> + uint8_t size, bool sign)
>>
>> You probably want to switch from 0 to false all the callers of update_dabt.
>>
>
> The following diff will be folded in.
Looks good to me.
Cheers,
>
> diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
> index 795d126f02..8b1e15d118 100644
> --- a/xen/arch/arm/decode.c
> +++ b/xen/arch/arm/decode.c
> @@ -101,16 +101,16 @@ static int decode_thumb(register_t pc, struct
> hsr_dabt *dabt)
> switch ( opB & 0x3 )
> {
> case 0: /* Non-signed word */
> - update_dabt(dabt, reg, 2, 0);
> + update_dabt(dabt, reg, 2, false);
> break;
> case 1: /* Non-signed halfword */
> - update_dabt(dabt, reg, 1, 0);
> + update_dabt(dabt, reg, 1, false);
> break;
> case 2: /* Non-signed byte */
> - update_dabt(dabt, reg, 0, 0);
> + update_dabt(dabt, reg, 0, false);
> break;
> case 3: /* Signed byte */
> - update_dabt(dabt, reg, 0, 1);
> + update_dabt(dabt, reg, 0, true);
> break;
> }
>
> @@ -118,19 +118,19 @@ static int decode_thumb(register_t pc, struct
> hsr_dabt *dabt)
> }
> case 6:
> /* Load/Store word immediate offset */
> - update_dabt(dabt, instr & 7, 2, 0);
> + update_dabt(dabt, instr & 7, 2, false);
> break;
> case 7:
> /* Load/Store byte immediate offset */
> - update_dabt(dabt, instr & 7, 0, 0);
> + update_dabt(dabt, instr & 7, 0, false);
> break;
> case 8:
> /* Load/Store halfword immediate offset */
> - update_dabt(dabt, instr & 7, 1, 0);
> + update_dabt(dabt, instr & 7, 1, false);
> break;
> case 9:
> /* Load/Store word sp offset */
> - update_dabt(dabt, (instr >> 8) & 7, 2, 0);
> + update_dabt(dabt, (instr >> 8) & 7, 2, false);
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2017-09-15 14:44 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 9:42 [PATCH 00/12] xen/arm: eliminate bool_t from arch-arm code Wei Liu
2017-09-15 9:42 ` [PATCH 01/12] arm/acpi: switch to plain bool Wei Liu
2017-09-15 10:40 ` Julien Grall
2017-09-15 11:07 ` Wei Liu
2017-09-15 9:42 ` [PATCH 02/12] arm/{v,}gic: " Wei Liu
2017-09-15 10:48 ` Julien Grall
2017-09-15 11:09 ` Wei Liu
2017-09-15 14:06 ` Julien Grall
2017-09-15 9:42 ` [PATCH 03/12] arm/domain_build: " Wei Liu
2017-09-15 11:00 ` Julien Grall
2017-09-15 9:42 ` [PATCH 04/12] arm/irq: " Wei Liu
2017-09-15 14:09 ` Julien Grall
2017-09-15 9:42 ` [PATCH 05/12] arm/platform: " Wei Liu
2017-09-15 14:11 ` Julien Grall
2017-09-15 9:42 ` [PATCH 06/12] arm/alternative.c: " Wei Liu
2017-09-15 14:12 ` Julien Grall
2017-09-15 9:42 ` [PATCH 07/12] arm/cpu{errata, feature}.[ch]: " Wei Liu
2017-09-15 14:30 ` Julien Grall
2017-09-15 9:42 ` [PATCH 08/12] arm/bootfdt.c: " Wei Liu
2017-09-15 14:31 ` Julien Grall
2017-09-15 9:42 ` [PATCH 09/12] arm/decode.c: " Wei Liu
2017-09-15 14:33 ` Julien Grall
2017-09-15 14:39 ` Wei Liu
2017-09-15 14:43 ` Julien Grall
2017-09-15 9:42 ` [PATCH 10/12] arm/smpboot.c: " Wei Liu
2017-09-15 14:34 ` Julien Grall
2017-09-15 9:42 ` [PATCH 11/12] arm/vtimer.c: " Wei Liu
2017-09-15 14:36 ` Julien Grall
2017-09-15 9:42 ` [PATCH 12/12] arm: use plain bool in various headers Wei Liu
2017-09-15 14:41 ` Julien Grall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.