From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335800171576.2011990661732; Mon, 27 Jun 2022 06:16:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356601.584852 (Exim 4.92) (envelope-from ) id 1o5ob5-0005Y9-TZ; Mon, 27 Jun 2022 13:16:11 +0000 Received: by outflank-mailman (output) from mailman id 356601.584852; Mon, 27 Jun 2022 13:16:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5ob5-0005Y2-OV; Mon, 27 Jun 2022 13:16:11 +0000 Received: by outflank-mailman (input) for mailman id 356601; Mon, 27 Jun 2022 13:16:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5ob4-0005HM-DF for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:10 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 4c4db998-f61b-11ec-b725-ed86ccbb4733; Mon, 27 Jun 2022 15:16:04 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8B224175A; Mon, 27 Jun 2022 06:16:08 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F6F13F5A1; Mon, 27 Jun 2022 06:16:06 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4c4db998-f61b-11ec-b725-ed86ccbb4733 From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 1/7] xen/arm: Use unsigned int instead of plain unsigned Date: Mon, 27 Jun 2022 15:15:37 +0200 Message-Id: <20220627131543.410971-2-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335802187100002 Content-Type: text/plain; charset="utf-8" This is just for the style and consistency reasons as the former is being used more often than the latter. Signed-off-by: Michal Orzel Acked-by: Julien Grall --- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/guestcopy.c | 13 +++++++------ xen/arch/arm/include/asm/arm32/bitops.h | 8 ++++---- xen/arch/arm/include/asm/fixmap.h | 4 ++-- xen/arch/arm/include/asm/guest_access.h | 8 ++++---- xen/arch/arm/include/asm/mm.h | 2 +- xen/arch/arm/irq.c | 2 +- xen/arch/arm/kernel.c | 2 +- xen/arch/arm/mm.c | 4 ++-- 9 files changed, 23 insertions(+), 22 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 7ddd16c26d..3fd1186b53 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1007,7 +1007,7 @@ static void __init set_interrupt(gic_interrupt_t inte= rrupt, */ static int __init fdt_property_interrupts(const struct kernel_info *kinfo, gic_interrupt_t *intr, - unsigned num_irq) + unsigned int num_irq) { int res; =20 diff --git a/xen/arch/arm/guestcopy.c b/xen/arch/arm/guestcopy.c index 32681606d8..abb6236e27 100644 --- a/xen/arch/arm/guestcopy.c +++ b/xen/arch/arm/guestcopy.c @@ -56,7 +56,7 @@ static unsigned long copy_guest(void *buf, uint64_t addr,= unsigned int len, copy_info_t info, unsigned int flags) { /* XXX needs to handle faults */ - unsigned offset =3D addr & ~PAGE_MASK; + unsigned int offset =3D addr & ~PAGE_MASK; =20 BUILD_BUG_ON((sizeof(addr)) < sizeof(vaddr_t)); BUILD_BUG_ON((sizeof(addr)) < sizeof(paddr_t)); @@ -64,7 +64,7 @@ static unsigned long copy_guest(void *buf, uint64_t addr,= unsigned int len, while ( len ) { void *p; - unsigned size =3D min(len, (unsigned)PAGE_SIZE - offset); + unsigned int size =3D min(len, (unsigned int)PAGE_SIZE - offset); struct page_info *page; =20 page =3D translate_get_page(info, addr, flags & COPY_linear, @@ -106,26 +106,27 @@ static unsigned long copy_guest(void *buf, uint64_t a= ddr, unsigned int len, return 0; } =20 -unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len) +unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int l= en) { return copy_guest((void *)from, (vaddr_t)to, len, GVA_INFO(current), COPY_to_guest | COPY_linear); } =20 unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from, - unsigned len) + unsigned int len) { return copy_guest((void *)from, (vaddr_t)to, len, GVA_INFO(current), COPY_to_guest | COPY_flush_dcache | COPY_linear); } =20 -unsigned long raw_clear_guest(void *to, unsigned len) +unsigned long raw_clear_guest(void *to, unsigned int len) { return copy_guest(NULL, (vaddr_t)to, len, GVA_INFO(current), COPY_to_guest | COPY_linear); } =20 -unsigned long raw_copy_from_guest(void *to, const void __user *from, unsig= ned len) +unsigned long raw_copy_from_guest(void *to, const void __user *from, + unsigned int len) { return copy_guest(to, (vaddr_t)from, len, GVA_INFO(current), COPY_from_guest | COPY_linear); diff --git a/xen/arch/arm/include/asm/arm32/bitops.h b/xen/arch/arm/include= /asm/arm32/bitops.h index 57938a5874..d0309d47c1 100644 --- a/xen/arch/arm/include/asm/arm32/bitops.h +++ b/xen/arch/arm/include/asm/arm32/bitops.h @@ -6,17 +6,17 @@ /* * Little endian assembly bitops. nr =3D 0 -> byte 0 bit 0. */ -extern int _find_first_zero_bit_le(const void * p, unsigned size); +extern int _find_first_zero_bit_le(const void * p, unsigned int size); extern int _find_next_zero_bit_le(const void * p, int size, int offset); -extern int _find_first_bit_le(const unsigned long *p, unsigned size); +extern int _find_first_bit_le(const unsigned long *p, unsigned int size); extern int _find_next_bit_le(const unsigned long *p, int size, int offset); =20 /* * Big endian assembly bitops. nr =3D 0 -> byte 3 bit 0. */ -extern int _find_first_zero_bit_be(const void * p, unsigned size); +extern int _find_first_zero_bit_be(const void * p, unsigned int size); extern int _find_next_zero_bit_be(const void * p, int size, int offset); -extern int _find_first_bit_be(const unsigned long *p, unsigned size); +extern int _find_first_bit_be(const unsigned long *p, unsigned int size); extern int _find_next_bit_be(const unsigned long *p, int size, int offset); =20 #ifndef __ARMEB__ diff --git a/xen/arch/arm/include/asm/fixmap.h b/xen/arch/arm/include/asm/f= ixmap.h index 365a2385a0..d0c9a52c8c 100644 --- a/xen/arch/arm/include/asm/fixmap.h +++ b/xen/arch/arm/include/asm/fixmap.h @@ -30,9 +30,9 @@ extern lpae_t xen_fixmap[XEN_PT_LPAE_ENTRIES]; =20 /* Map a page in a fixmap entry */ -extern void set_fixmap(unsigned map, mfn_t mfn, unsigned attributes); +extern void set_fixmap(unsigned int map, mfn_t mfn, unsigned int attribute= s); /* Remove a mapping from a fixmap entry */ -extern void clear_fixmap(unsigned map); +extern void clear_fixmap(unsigned int map); =20 #define fix_to_virt(slot) ((void *)FIXMAP_ADDR(slot)) =20 diff --git a/xen/arch/arm/include/asm/guest_access.h b/xen/arch/arm/include= /asm/guest_access.h index 53766386d3..4421e43611 100644 --- a/xen/arch/arm/include/asm/guest_access.h +++ b/xen/arch/arm/include/asm/guest_access.h @@ -4,11 +4,11 @@ #include #include =20 -unsigned long raw_copy_to_guest(void *to, const void *from, unsigned len); +unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int l= en); unsigned long raw_copy_to_guest_flush_dcache(void *to, const void *from, - unsigned len); -unsigned long raw_copy_from_guest(void *to, const void *from, unsigned len= ); -unsigned long raw_clear_guest(void *to, unsigned len); + unsigned int len); +unsigned long raw_copy_from_guest(void *to, const void *from, unsigned int= len); +unsigned long raw_clear_guest(void *to, unsigned int len); =20 /* Copy data to guest physical address, then clean the region. */ unsigned long copy_to_guest_phys_flush_dcache(struct domain *d, diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h index 045a8ba4bb..c4bc3cd1e5 100644 --- a/xen/arch/arm/include/asm/mm.h +++ b/xen/arch/arm/include/asm/mm.h @@ -192,7 +192,7 @@ extern void setup_xenheap_mappings(unsigned long base_m= fn, unsigned long nr_mfns /* Map a frame table to cover physical addresses ps through pe */ extern void setup_frametable_mappings(paddr_t ps, paddr_t pe); /* map a physical range in virtual memory */ -void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned attributes); +void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned int attribu= tes); =20 static inline void __iomem *ioremap_nocache(paddr_t start, size_t len) { diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 5268c01434..fd0c15fffd 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -631,7 +631,7 @@ void pirq_set_affinity(struct domain *d, int pirq, cons= t cpumask_t *mask) BUG(); } =20 -static bool irq_validate_new_type(unsigned int curr, unsigned new) +static bool irq_validate_new_type(unsigned int curr, unsigned int new) { return (curr =3D=3D IRQ_TYPE_INVALID || curr =3D=3D new ); } diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index 25ded1c056..2556a45c38 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -256,7 +256,7 @@ static __init int kernel_decompress(struct bootmodule *= mod) char *output, *input; char magic[2]; int rc; - unsigned kernel_order_out; + unsigned int kernel_order_out; paddr_t output_size; struct page_info *pages; mfn_t mfn; diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index be37176a47..009b8cd9ef 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -352,7 +352,7 @@ lpae_t mfn_to_xen_entry(mfn_t mfn, unsigned int attr) } =20 /* Map a 4k page in a fixmap entry */ -void set_fixmap(unsigned map, mfn_t mfn, unsigned int flags) +void set_fixmap(unsigned int map, mfn_t mfn, unsigned int flags) { int res; =20 @@ -361,7 +361,7 @@ void set_fixmap(unsigned map, mfn_t mfn, unsigned int f= lags) } =20 /* Remove a mapping from a fixmap entry */ -void clear_fixmap(unsigned map) +void clear_fixmap(unsigned int map) { int res; =20 --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 165633579530457.31492715041702; Mon, 27 Jun 2022 06:16:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356602.584864 (Exim 4.92) (envelope-from ) id 1o5ob9-0005qw-4P; Mon, 27 Jun 2022 13:16:15 +0000 Received: by outflank-mailman (output) from mailman id 356602.584864; Mon, 27 Jun 2022 13:16:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5ob9-0005qn-0j; Mon, 27 Jun 2022 13:16:15 +0000 Received: by outflank-mailman (input) for mailman id 356602; Mon, 27 Jun 2022 13:16:13 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5ob7-0005lc-Ad for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:13 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 50b8281d-f61b-11ec-bd2d-47488cf2e6aa; Mon, 27 Jun 2022 15:16:12 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B9545175A; Mon, 27 Jun 2022 06:16:11 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D23983F5A1; Mon, 27 Jun 2022 06:16:08 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 50b8281d-f61b-11ec-bd2d-47488cf2e6aa From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 2/7] xen/domain: Use unsigned int instead of plain unsigned Date: Mon, 27 Jun 2022 15:15:38 +0200 Message-Id: <20220627131543.410971-3-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335796211100001 Content-Type: text/plain; charset="utf-8" This is just for the style and consistency reasons as the former is being used more often than the latter. Signed-off-by: Michal Orzel Acked-by: Jan Beulich --- xen/common/domain.c | 2 +- xen/include/xen/domain.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 7570eae91a..57a8515f21 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1446,7 +1446,7 @@ int vcpu_reset(struct vcpu *v) * of memory, and it sets a pending event to make sure that a pending * event doesn't get missed. */ -int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) +int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned int offset) { struct domain *d =3D v->domain; void *mapping; diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 1c3c88a14d..628b14b086 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -65,7 +65,7 @@ void cf_check free_pirq_struct(void *); int arch_vcpu_create(struct vcpu *v); void arch_vcpu_destroy(struct vcpu *v); =20 -int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset); +int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned int offset); void unmap_vcpu_info(struct vcpu *v); =20 int arch_domain_create(struct domain *d, --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335796499577.2087017696385; Mon, 27 Jun 2022 06:16:36 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356603.584875 (Exim 4.92) (envelope-from ) id 1o5obD-0006BN-Ei; Mon, 27 Jun 2022 13:16:19 +0000 Received: by outflank-mailman (output) from mailman id 356603.584875; Mon, 27 Jun 2022 13:16:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obD-0006BA-BO; Mon, 27 Jun 2022 13:16:19 +0000 Received: by outflank-mailman (input) for mailman id 356603; Mon, 27 Jun 2022 13:16:17 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obB-0005lc-HH for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:17 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 534a9ce7-f61b-11ec-bd2d-47488cf2e6aa; Mon, 27 Jun 2022 15:16:16 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0A2711758; Mon, 27 Jun 2022 06:16:16 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 518FB3F5A1; Mon, 27 Jun 2022 06:16:11 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 534a9ce7-f61b-11ec-bd2d-47488cf2e6aa From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Juergen Gross , Dario Faggioli Subject: [PATCH 3/7] xen/common: Use unsigned int instead of plain unsigned Date: Mon, 27 Jun 2022 15:15:39 +0200 Message-Id: <20220627131543.410971-4-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335798172100007 Content-Type: text/plain; charset="utf-8" This is just for the style and consistency reasons as the former is being used more often than the latter. Signed-off-by: Michal Orzel Acked-by: Jan Beulich Reviewed-by: Juergen Gross --- xen/common/grant_table.c | 6 +++--- xen/common/gunzip.c | 8 ++++---- xen/common/sched/cpupool.c | 4 ++-- xen/common/trace.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 3918e6de6b..2d110d9f41 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -895,7 +895,7 @@ done: static int _set_status(const grant_entry_header_t *shah, grant_status_t *status, struct domain *rd, - unsigned rgt_version, + unsigned int rgt_version, struct active_grant_entry *act, int readonly, int mapflag, @@ -1763,8 +1763,8 @@ static int gnttab_populate_status_frames(struct domain *d, struct grant_table *gt, unsigned int req_nr_frames) { - unsigned i; - unsigned req_status_frames; + unsigned int i; + unsigned int req_status_frames; =20 req_status_frames =3D grant_to_status_frames(req_nr_frames); =20 diff --git a/xen/common/gunzip.c b/xen/common/gunzip.c index aa16fec4bb..71ec5f26be 100644 --- a/xen/common/gunzip.c +++ b/xen/common/gunzip.c @@ -14,13 +14,13 @@ static memptr __initdata free_mem_end_ptr; #define WSIZE 0x80000000 =20 static unsigned char *__initdata inbuf; -static unsigned __initdata insize; +static unsigned int __initdata insize; =20 /* Index of next byte to be processed in inbuf: */ -static unsigned __initdata inptr; +static unsigned int __initdata inptr; =20 /* Bytes in output buffer: */ -static unsigned __initdata outcnt; +static unsigned int __initdata outcnt; =20 #define OF(args) args =20 @@ -73,7 +73,7 @@ static __init void flush_window(void) * compute the crc. */ unsigned long c =3D crc; - unsigned n; + unsigned int n; unsigned char *in, ch; =20 in =3D window; diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index a20e3a5fcb..2afe54f54d 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -850,7 +850,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) =20 case XEN_SYSCTL_CPUPOOL_OP_ADDCPU: { - unsigned cpu; + unsigned int cpu; const cpumask_t *cpus; =20 cpu =3D op->cpu; @@ -895,7 +895,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) =20 case XEN_SYSCTL_CPUPOOL_OP_RMCPU: { - unsigned cpu; + unsigned int cpu; =20 c =3D cpupool_get_by_id(op->cpupool_id); ret =3D -ENOENT; diff --git a/xen/common/trace.c b/xen/common/trace.c index a7c092fcbb..fb3752ce62 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -834,7 +834,7 @@ void __trace_hypercall(uint32_t event, unsigned long op, =20 #define APPEND_ARG32(i) \ do { \ - unsigned i_ =3D (i); \ + unsigned int i_ =3D (i); \ *a++ =3D args[(i_)]; \ d.op |=3D TRC_PV_HYPERCALL_V2_ARG_32(i_); \ } while( 0 ) --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335797341675.476408214371; Mon, 27 Jun 2022 06:16:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356604.584886 (Exim 4.92) (envelope-from ) id 1o5obF-0006UK-PJ; Mon, 27 Jun 2022 13:16:21 +0000 Received: by outflank-mailman (output) from mailman id 356604.584886; Mon, 27 Jun 2022 13:16:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obF-0006UB-LL; Mon, 27 Jun 2022 13:16:21 +0000 Received: by outflank-mailman (input) for mailman id 356604; Mon, 27 Jun 2022 13:16:20 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obE-0005HM-S1 for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:20 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 52ddb4d1-f61b-11ec-b725-ed86ccbb4733; Mon, 27 Jun 2022 15:16:15 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B24A61758; Mon, 27 Jun 2022 06:16:19 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6830C3F5A1; Mon, 27 Jun 2022 06:16:16 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 52ddb4d1-f61b-11ec-b725-ed86ccbb4733 From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 4/7] include/xen: Use unsigned int instead of plain unsigned Date: Mon, 27 Jun 2022 15:15:40 +0200 Message-Id: <20220627131543.410971-5-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335798159100005 Content-Type: text/plain; charset="utf-8" This is just for the style and consistency reasons as the former is being used more often than the latter. Signed-off-by: Michal Orzel Acked-by: Jan Beulich --- xen/include/xen/perfc.h | 2 +- xen/include/xen/sched.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h index bb010b0aae..7c5ce537bd 100644 --- a/xen/include/xen/perfc.h +++ b/xen/include/xen/perfc.h @@ -49,7 +49,7 @@ enum perfcounter { #undef PERFSTATUS #undef PERFSTATUS_ARRAY =20 -typedef unsigned perfc_t; +typedef unsigned int perfc_t; #define PRIperfc "" =20 DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters); diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 463d41ffb6..b9515eb497 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -519,7 +519,7 @@ struct domain /* hvm_print_line() and guest_console_write() logging. */ #define DOMAIN_PBUF_SIZE 200 char *pbuf; - unsigned pbuf_idx; + unsigned int pbuf_idx; spinlock_t pbuf_lock; =20 /* OProfile support. */ --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335797637601.5561870812453; Mon, 27 Jun 2022 06:16:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356607.584897 (Exim 4.92) (envelope-from ) id 1o5obJ-0006tV-2p; Mon, 27 Jun 2022 13:16:25 +0000 Received: by outflank-mailman (output) from mailman id 356607.584897; Mon, 27 Jun 2022 13:16:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obI-0006t2-Vc; Mon, 27 Jun 2022 13:16:24 +0000 Received: by outflank-mailman (input) for mailman id 356607; Mon, 27 Jun 2022 13:16:24 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obI-0005HM-3q for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:24 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 54c4fbbd-f61b-11ec-b725-ed86ccbb4733; Mon, 27 Jun 2022 15:16:19 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 000331758; Mon, 27 Jun 2022 06:16:22 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08E843F5A1; Mon, 27 Jun 2022 06:16:19 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 54c4fbbd-f61b-11ec-b725-ed86ccbb4733 From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 5/7] include/public: Use uint32_t instead of unsigned (int) Date: Mon, 27 Jun 2022 15:15:41 +0200 Message-Id: <20220627131543.410971-6-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335798166100006 Content-Type: text/plain; charset="utf-8" Public interfaces shall make use of types that indicate size and signedness. Take the opportunity to also modify places where explicit unsigned int is used. Signed-off-by: Michal Orzel Reviewed-by: Jan Beulich --- xen/include/public/physdev.h | 4 ++-- xen/include/public/sysctl.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/include/public/physdev.h b/xen/include/public/physdev.h index d271766ad0..f8d1905e30 100644 --- a/xen/include/public/physdev.h +++ b/xen/include/public/physdev.h @@ -211,8 +211,8 @@ struct physdev_manage_pci_ext { /* IN */ uint8_t bus; uint8_t devfn; - unsigned is_extfn; - unsigned is_virtfn; + uint32_t is_extfn; + uint32_t is_virtfn; struct { uint8_t bus; uint8_t devfn; diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index b0a4af8789..60c8711483 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -624,7 +624,7 @@ struct xen_sysctl_arinc653_schedule { /* If a domain has multiple VCPUs, vcpu_id specifies which one * this schedule entry applies to. It should be set to 0 if * there is only one VCPU for the domain. */ - unsigned int vcpu_id; + uint32_t vcpu_id; /* runtime specifies the amount of time that should be allocated * to this VCPU per major frame. It is specified in nanoseconds */ uint64_aligned_t runtime; @@ -644,18 +644,18 @@ struct xen_sysctl_credit_schedule { /* Length of timeslice in milliseconds */ #define XEN_SYSCTL_CSCHED_TSLICE_MAX 1000 #define XEN_SYSCTL_CSCHED_TSLICE_MIN 1 - unsigned tslice_ms; - unsigned ratelimit_us; + uint32_t tslice_ms; + uint32_t ratelimit_us; /* * How long we consider a vCPU to be cache-hot on the * CPU where it has run (max 100ms, in microseconds) */ #define XEN_SYSCTL_CSCHED_MGR_DLY_MAX_US (100 * 1000) - unsigned vcpu_migr_delay_us; + uint32_t vcpu_migr_delay_us; }; =20 struct xen_sysctl_credit2_schedule { - unsigned ratelimit_us; + uint32_t ratelimit_us; }; =20 /* XEN_SYSCTL_scheduler_op */ --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335801636849.8731798753984; Mon, 27 Jun 2022 06:16:41 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356608.584908 (Exim 4.92) (envelope-from ) id 1o5obL-0007JY-Ja; Mon, 27 Jun 2022 13:16:27 +0000 Received: by outflank-mailman (output) from mailman id 356608.584908; Mon, 27 Jun 2022 13:16:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obL-0007JK-F4; Mon, 27 Jun 2022 13:16:27 +0000 Received: by outflank-mailman (input) for mailman id 356608; Mon, 27 Jun 2022 13:16:26 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obK-0005lc-3c for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:26 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 58936768-f61b-11ec-bd2d-47488cf2e6aa; Mon, 27 Jun 2022 15:16:25 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B0B11758; Mon, 27 Jun 2022 06:16:25 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4501F3F5A1; Mon, 27 Jun 2022 06:16:22 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 58936768-f61b-11ec-bd2d-47488cf2e6aa From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Daniel De Graaf , "Daniel P. Smith" Subject: [PATCH 6/7] xsm/flask: Use unsigned int instead of plain unsigned Date: Mon, 27 Jun 2022 15:15:42 +0200 Message-Id: <20220627131543.410971-7-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335802150100001 Content-Type: text/plain; charset="utf-8" This is just for the style and consistency reasons as the former is being used more often than the latter. Signed-off-by: Michal Orzel Acked-by: Jan Beulich --- xen/xsm/flask/ss/avtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/xsm/flask/ss/avtab.c b/xen/xsm/flask/ss/avtab.c index 017f5183de..9761d028d8 100644 --- a/xen/xsm/flask/ss/avtab.c +++ b/xen/xsm/flask/ss/avtab.c @@ -349,7 +349,7 @@ int avtab_read_item(struct avtab *a, void *fp, struct p= olicydb *pol, struct avtab_key key; struct avtab_datum datum; int i, rc; - unsigned set; + unsigned int set; =20 memset(&key, 0, sizeof(struct avtab_key)); memset(&datum, 0, sizeof(struct avtab_datum)); --=20 2.25.1 From nobody Fri May 3 22:28:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1656335804173398.1787455093613; Mon, 27 Jun 2022 06:16:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.356612.584919 (Exim 4.92) (envelope-from ) id 1o5obO-0007jV-2X; Mon, 27 Jun 2022 13:16:30 +0000 Received: by outflank-mailman (output) from mailman id 356612.584919; Mon, 27 Jun 2022 13:16:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obN-0007jD-QV; Mon, 27 Jun 2022 13:16:29 +0000 Received: by outflank-mailman (input) for mailman id 356612; Mon, 27 Jun 2022 13:16:29 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o5obN-0005lc-47 for xen-devel@lists.xenproject.org; Mon, 27 Jun 2022 13:16:29 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 59fdf657-f61b-11ec-bd2d-47488cf2e6aa; Mon, 27 Jun 2022 15:16:27 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 666D9175A; Mon, 27 Jun 2022 06:16:27 -0700 (PDT) Received: from e129167.arm.com (unknown [10.57.42.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 697053F5A1; Mon, 27 Jun 2022 06:16:25 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 59fdf657-f61b-11ec-bd2d-47488cf2e6aa From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Jan Beulich Subject: [PATCH 7/7] drivers/acpi: Drop the unneeded casts to unsigned Date: Mon, 27 Jun 2022 15:15:43 +0200 Message-Id: <20220627131543.410971-8-michal.orzel@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220627131543.410971-1-michal.orzel@arm.com> References: <20220627131543.410971-1-michal.orzel@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1656335806183100001 Content-Type: text/plain; charset="utf-8" ... and make use of PRIu format specifiers when applicable. Signed-off-by: Michal Orzel Reviewed-by: Jan Beulich --- xen/drivers/acpi/tables/tbfadt.c | 6 +++--- xen/drivers/acpi/tables/tbutils.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/xen/drivers/acpi/tables/tbfadt.c b/xen/drivers/acpi/tables/tbf= adt.c index f11fd5a900..d8fcc50dec 100644 --- a/xen/drivers/acpi/tables/tbfadt.c +++ b/xen/drivers/acpi/tables/tbfadt.c @@ -233,9 +233,9 @@ void __init acpi_tb_create_local_fadt(struct acpi_table= _header *table, u32 lengt */ if (length > sizeof(struct acpi_table_fadt)) { ACPI_WARNING((AE_INFO, - "FADT (revision %u) is longer than ACPI 5.0 version," - " truncating length %u to %zu", - table->revision, (unsigned)length, + "FADT (revision %"PRIu8") is longer than ACPI 5.0 version," + " truncating length %"PRIu32" to %zu", + table->revision, length, sizeof(struct acpi_table_fadt))); } =20 diff --git a/xen/drivers/acpi/tables/tbutils.c b/xen/drivers/acpi/tables/tb= utils.c index d135a50ff9..11412c47de 100644 --- a/xen/drivers/acpi/tables/tbutils.c +++ b/xen/drivers/acpi/tables/tbutils.c @@ -481,7 +481,6 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_add= ress, u8 flags) if (ACPI_FAILURE(status)) { ACPI_WARNING((AE_INFO, "Truncating %u table entries!", - (unsigned) (acpi_gbl_root_table_list.size - acpi_gbl_root_table_list. count))); --=20 2.25.1