From patchwork Mon Jun 27 13:15:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896634 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCC61CCA47F for ; Mon, 27 Jun 2022 13:16:28 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 interrupt, */ static int __init fdt_property_interrupts(const struct kernel_info *kinfo, gic_interrupt_t *intr, - unsigned num_irq) + unsigned int num_irq) { int res; 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 = addr & ~PAGE_MASK; + unsigned int offset = addr & ~PAGE_MASK; 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 = min(len, (unsigned)PAGE_SIZE - offset); + unsigned int size = min(len, (unsigned int)PAGE_SIZE - offset); struct page_info *page; page = translate_get_page(info, addr, flags & COPY_linear, @@ -106,26 +106,27 @@ static unsigned long copy_guest(void *buf, uint64_t addr, unsigned int len, return 0; } -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 len) { return copy_guest((void *)from, (vaddr_t)to, len, GVA_INFO(current), COPY_to_guest | COPY_linear); } 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); } -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); } -unsigned long raw_copy_from_guest(void *to, const void __user *from, unsigned 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 = 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); /* * Big endian assembly bitops. nr = 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); #ifndef __ARMEB__ diff --git a/xen/arch/arm/include/asm/fixmap.h b/xen/arch/arm/include/asm/fixmap.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]; /* 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 attributes); /* Remove a mapping from a fixmap entry */ -extern void clear_fixmap(unsigned map); +extern void clear_fixmap(unsigned int map); #define fix_to_virt(slot) ((void *)FIXMAP_ADDR(slot)) 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 -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 len); 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); /* 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_mfn, 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 attributes); 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, const cpumask_t *mask) BUG(); } -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 == IRQ_TYPE_INVALID || curr == 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) } /* 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; @@ -361,7 +361,7 @@ void set_fixmap(unsigned map, mfn_t mfn, unsigned int flags) } /* Remove a mapping from a fixmap entry */ -void clear_fixmap(unsigned map) +void clear_fixmap(unsigned int map) { int res; From patchwork Mon Jun 27 13:15:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 498CFC43334 for ; Mon, 27 Jun 2022 13:16:27 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 = 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); -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); int arch_domain_create(struct domain *d, From patchwork Mon Jun 27 13:15:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0472CC43334 for ; Mon, 27 Jun 2022 13:16:29 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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; req_status_frames = grant_to_status_frames(req_nr_frames); 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 static unsigned char *__initdata inbuf; -static unsigned __initdata insize; +static unsigned int __initdata insize; /* Index of next byte to be processed in inbuf: */ -static unsigned __initdata inptr; +static unsigned int __initdata inptr; /* Bytes in output buffer: */ -static unsigned __initdata outcnt; +static unsigned int __initdata outcnt; #define OF(args) args @@ -73,7 +73,7 @@ static __init void flush_window(void) * compute the crc. */ unsigned long c = crc; - unsigned n; + unsigned int n; unsigned char *in, ch; in = 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) case XEN_SYSCTL_CPUPOOL_OP_ADDCPU: { - unsigned cpu; + unsigned int cpu; const cpumask_t *cpus; cpu = op->cpu; @@ -895,7 +895,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op) case XEN_SYSCTL_CPUPOOL_OP_RMCPU: { - unsigned cpu; + unsigned int cpu; c = cpupool_get_by_id(op->cpupool_id); ret = -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, #define APPEND_ARG32(i) \ do { \ - unsigned i_ = (i); \ + unsigned int i_ = (i); \ *a++ = args[(i_)]; \ d.op |= TRC_PV_HYPERCALL_V2_ARG_32(i_); \ } while( 0 ) From patchwork Mon Jun 27 13:15:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27E57C433EF for ; Mon, 27 Jun 2022 13:16:31 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 -typedef unsigned perfc_t; +typedef unsigned int perfc_t; #define PRIperfc "" 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; /* OProfile support. */ From patchwork Mon Jun 27 13:15:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14F7EC433EF for ; Mon, 27 Jun 2022 13:16:34 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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; }; struct xen_sysctl_credit2_schedule { - unsigned ratelimit_us; + uint32_t ratelimit_us; }; /* XEN_SYSCTL_scheduler_op */ From patchwork Mon Jun 27 13:15:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B7FC43334 for ; Mon, 27 Jun 2022 13:16:38 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 policydb *pol, struct avtab_key key; struct avtab_datum datum; int i, rc; - unsigned set; + unsigned int set; memset(&key, 0, sizeof(struct avtab_key)); memset(&datum, 0, sizeof(struct avtab_datum)); From patchwork Mon Jun 27 13:15:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Orzel X-Patchwork-Id: 12896638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61817C43334 for ; Mon, 27 Jun 2022 13:16:40 +0000 (UTC) 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 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 ... 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/tbfadt.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))); } diff --git a/xen/drivers/acpi/tables/tbutils.c b/xen/drivers/acpi/tables/tbutils.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_address, 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)));