From nobody Mon Feb 9 07:06:23 2026 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; dkim=pass; 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=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1677238301; cv=none; d=zohomail.com; s=zohoarc; b=gOZOYc9YS2rrKoNaGWK+EtdfFdkWHdQE+VxYc+IscSFneZBtSWUHEvyuehb7nsijs5cctJDIZ9jfIPNAe/OaKVercLXQtvP++z2Zc9TFu2ygaNRrMQ9xh+KEkx+RvnWaMjQfYq+37c3vjUoJ9ohTusYUvKTrvykvXpRT+lAOOWY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677238301; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FHOe3gWUHwieeNaUAZbwaaYvn/OKztq6D7rxSzkp37U=; b=RHOR65N4HANLp1WF0SgJ76onC0o5fbEL4BLCNcSiEINnIWRkOUxkRuUQQgXHRp+1z2ETjsrgwLvJUVif+wsXHTxxlz3XevKupCKsGk+Ki3k6MbAVQJ90sFjl1amgfX0Ce8OhM0ZpfmWL8KWSx+DEOGfhvMp7ydsIwpf7xf10tHs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1677238301236277.04448738741416; Fri, 24 Feb 2023 03:31:41 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.500923.772488 (Exim 4.92) (envelope-from ) id 1pVWIJ-00054R-2k; Fri, 24 Feb 2023 11:31:19 +0000 Received: by outflank-mailman (output) from mailman id 500923.772488; Fri, 24 Feb 2023 11:31: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 1pVWII-00054K-Vw; Fri, 24 Feb 2023 11:31:18 +0000 Received: by outflank-mailman (input) for mailman id 500923; Fri, 24 Feb 2023 11:31:16 +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 1pVWIG-0004Z5-S3 for xen-devel@lists.xenproject.org; Fri, 24 Feb 2023 11:31:16 +0000 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [2a00:1450:4864:20::22e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bfdc4502-b436-11ed-88bb-e56d68cac8db; Fri, 24 Feb 2023 12:31:15 +0100 (CET) Received: by mail-lj1-x22e.google.com with SMTP id j17so14012390ljq.11 for ; Fri, 24 Feb 2023 03:31:15 -0800 (PST) Received: from 34-6F-24-FC-D2-65.. (46.204.108.92.nat.umts.dynamic.t-mobile.pl. [46.204.108.92]) by smtp.gmail.com with ESMTPSA id v19-20020a2ea613000000b00295a815e555sm92682ljp.134.2023.02.24.03.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 03:31:15 -0800 (PST) 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: bfdc4502-b436-11ed-88bb-e56d68cac8db DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FHOe3gWUHwieeNaUAZbwaaYvn/OKztq6D7rxSzkp37U=; b=nXD0eeC04kAsS+A9n1ec0duP6Z7xCP0jiZLGU+57mD38kYw4rCpdJF2NAKbEHt42Qb 3zFp9xusxhT7PvWfJdDL022rDqS86UjH9fDwcyZ8rZWSau9y8fJDejuzzVWFhtcq0ZLT kzI//i4ZvmWw8ufi43iQfGYI/KxpyVSgkEa9ZH4Z6fv9qZdkVCE0/O0zYz4SbAlvNjfc gS1d4ymufnvzquYKIOX+kaY78Rcm1v2sPPRVGjI+N7//kQ7zw5VVNqAg96kElnHYC3b+ ydujYcdlT9N8EG/NUMvk0whCagM8jQWVAKoklxkdjyESqiQFYlDJ/NTwKjpCraobqQ1L fybA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FHOe3gWUHwieeNaUAZbwaaYvn/OKztq6D7rxSzkp37U=; b=CUmwMPKIcvICgiwi0sMZepmizHWgU0LDlGv7r8V5tR9yDjmIKKYwwJhI0jIaFGyg+P YPc+TcRDrVRsptLuPz34i8I8NlnAHSChBclhD2JKlt+y8GOhKsTbzual37HZivaJ6lfd ugDJ5MX1tG3CIJRTn77/WjZ5BlQzEORz7iPbcMjKOp23KkPhnC5CvXAqkNNRRPMT6DYE iDnGoP7FxIWqspA43RoeBZwUDKSScftfcR7MuPmWSQ8Sum52HiQ/LWw50EnTpym2tJWQ I5NBiVPjfauL45nELcmgAB73hkUqItJuQ0QHynVtcjNkTQeofBSjCEodWlj/qIEzkKWQ hkwQ== X-Gm-Message-State: AO0yUKXpnC0uaXu+GAhzust7RhW6ir1z8+/8BPV24gR52SkcS4BH5olJ 4/HsDp4rLoER+hF06AyTogbNiT45+OA= X-Google-Smtp-Source: AK7set+Xij/4ZC2hO7U4EhhN2RDupsNnQZm8MtDj4vPEbhS3DrR1uAbQI3sKaR+ET+UKMLFn0h4gVA== X-Received: by 2002:a2e:be08:0:b0:282:d00d:4be6 with SMTP id z8-20020a2ebe08000000b00282d00d4be6mr7174601ljq.40.1677238275282; Fri, 24 Feb 2023 03:31:15 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Jan Beulich , Andrew Cooper , Stefano Stabellini , Gianluca Guida , Oleksii Kurochko , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , George Dunlap , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 2/4] xen: change to Date: Fri, 24 Feb 2023 13:31:05 +0200 Message-Id: <19404db4a577e17dffef85a101449a507965be19.1677233393.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1677238301807100005 Content-Type: text/plain; charset="utf-8" Since the generic version of bug.h stuff was introduced use instead of unnecessary Signed-off-by: Oleksii Kurochko --- Changes in V3: * Update patch 2 not to break compilation: move some parts from patches 3 = and 4 to patch 2: * move some generic parts from to * add define BUG_FRAME_STRUCT in ARM's --- Changes in V2: * Put [PATCH v1 4/4] xen: change to as second patc= h, update the patch to change all to among the whol= e project to not break build. * Update the commit message. --- xen/arch/arm/include/asm/bug.h | 19 +++---------------- xen/arch/arm/include/asm/div64.h | 2 +- xen/arch/arm/vgic/vgic-v2.c | 2 +- xen/arch/arm/vgic/vgic.c | 2 +- xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 +- xen/arch/x86/include/asm/asm_defns.h | 2 +- xen/arch/x86/include/asm/bug.h | 19 ++----------------- xen/drivers/cpufreq/cpufreq.c | 2 +- xen/include/xen/lib.h | 2 +- 9 files changed, 12 insertions(+), 40 deletions(-) diff --git a/xen/arch/arm/include/asm/bug.h b/xen/arch/arm/include/asm/bug.h index f4088d0913..cacaf014ab 100644 --- a/xen/arch/arm/include/asm/bug.h +++ b/xen/arch/arm/include/asm/bug.h @@ -1,6 +1,8 @@ #ifndef __ARM_BUG_H__ #define __ARM_BUG_H__ =20 +#include + #if defined(CONFIG_ARM_32) # include #elif defined(CONFIG_ARM_64) @@ -9,9 +11,7 @@ # error "unknown ARM variant" #endif =20 -#define BUG_DISP_WIDTH 24 -#define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH) -#define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH) +#define BUG_FRAME_STRUCT =20 struct bug_frame { signed int loc_disp; /* Relative address to the bug address */ @@ -26,13 +26,6 @@ struct bug_frame { #define bug_line(b) ((b)->line) #define bug_msg(b) ((const char *)(b) + (b)->msg_disp) =20 -#define BUGFRAME_run_fn 0 -#define BUGFRAME_warn 1 -#define BUGFRAME_bug 2 -#define BUGFRAME_assert 3 - -#define BUGFRAME_NR 4 - /* Many versions of GCC doesn't support the asm %c parameter which would * be preferable to this unpleasantness. We use mergeable string * sections to avoid multiple copies of the string appearing in the @@ -89,12 +82,6 @@ struct bug_frame { unreachable(); \ } while (0) =20 -extern const struct bug_frame __start_bug_frames[], - __stop_bug_frames_0[], - __stop_bug_frames_1[], - __stop_bug_frames_2[], - __stop_bug_frames_3[]; - #endif /* __ARM_BUG_H__ */ /* * Local variables: diff --git a/xen/arch/arm/include/asm/div64.h b/xen/arch/arm/include/asm/di= v64.h index 1cd58bc51a..fc667a80f9 100644 --- a/xen/arch/arm/include/asm/div64.h +++ b/xen/arch/arm/include/asm/div64.h @@ -74,7 +74,7 @@ =20 #elif __GNUC__ >=3D 4 =20 -#include +#include =20 /* * If the divisor happens to be constant, we determine the appropriate diff --git a/xen/arch/arm/vgic/vgic-v2.c b/xen/arch/arm/vgic/vgic-v2.c index 1a99d3a8b4..c90e88fddb 100644 --- a/xen/arch/arm/vgic/vgic-v2.c +++ b/xen/arch/arm/vgic/vgic-v2.c @@ -16,8 +16,8 @@ */ =20 #include -#include #include +#include #include #include =20 diff --git a/xen/arch/arm/vgic/vgic.c b/xen/arch/arm/vgic/vgic.c index f0f2ea5021..b9463a5f27 100644 --- a/xen/arch/arm/vgic/vgic.c +++ b/xen/arch/arm/vgic/vgic.c @@ -15,9 +15,9 @@ * along with this program. If not, see . */ =20 +#include #include #include -#include #include #include =20 diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufre= q/cpufreq.c index c27cbb2304..18ff2a443b 100644 --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c @@ -27,6 +27,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ */ =20 +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/xen/arch/x86/include/asm/asm_defns.h b/xen/arch/x86/include/as= m/asm_defns.h index d9431180cf..a8526cf36c 100644 --- a/xen/arch/x86/include/asm/asm_defns.h +++ b/xen/arch/x86/include/asm/asm_defns.h @@ -6,7 +6,7 @@ /* NB. Auto-generated from arch/.../asm-offsets.c */ #include #endif -#include +#include #include #include #include diff --git a/xen/arch/x86/include/asm/bug.h b/xen/arch/x86/include/asm/bug.h index b7265bdfbe..4b3e7b019d 100644 --- a/xen/arch/x86/include/asm/bug.h +++ b/xen/arch/x86/include/asm/bug.h @@ -1,19 +1,10 @@ #ifndef __X86_BUG_H__ #define __X86_BUG_H__ =20 -#define BUG_DISP_WIDTH 24 -#define BUG_LINE_LO_WIDTH (31 - BUG_DISP_WIDTH) -#define BUG_LINE_HI_WIDTH (31 - BUG_DISP_WIDTH) - -#define BUGFRAME_run_fn 0 -#define BUGFRAME_warn 1 -#define BUGFRAME_bug 2 -#define BUGFRAME_assert 3 - -#define BUGFRAME_NR 4 - #ifndef __ASSEMBLY__ =20 +#define BUG_FRAME_STRUCT + struct bug_frame { signed int loc_disp:BUG_DISP_WIDTH; unsigned int line_hi:BUG_LINE_HI_WIDTH; @@ -80,12 +71,6 @@ struct bug_frame { unreachable(); \ } while (0) =20 -extern const struct bug_frame __start_bug_frames[], - __stop_bug_frames_0[], - __stop_bug_frames_1[], - __stop_bug_frames_2[], - __stop_bug_frames_3[]; - #else /* !__ASSEMBLY__ */ =20 /* diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index a94520ee57..354f78580b 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -26,6 +26,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ */ =20 +#include #include #include #include @@ -39,7 +40,6 @@ #include #include #include -#include #include #include =20 diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 05ee1e18af..e914ccade0 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -24,12 +24,12 @@ =20 #ifndef __ASSEMBLY__ =20 +#include #include #include #include #include #include -#include =20 #define BUG_ON(p) do { if (unlikely(p)) BUG(); } while (0) #define WARN_ON(p) ({ \ --=20 2.39.0