All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH v1 0/4] introduce generic implementation of macros from bug.h
Date: Fri,  3 Feb 2023 19:05:46 +0200	[thread overview]
Message-ID: <cover.1675441720.git.oleksii.kurochko@gmail.com> (raw)

A large part of the content of the bug.h is repeated among all
architectures (especially ARM and RISCV have the same implementation), so it
was created a new config CONFIG_GENERIC_BUG_FRAME which are used to
introduce generic implementation of do_bug_frame() and move ARM's <asm/bug.h>
to <xen/common/...> with the following changes:
    * add inclusion of arch-specific header <asm/bug.h>
    * rename the guard and remove ARM specific changes
    * wrap macros BUG_FRAME/run_in_exception_handler/WARN/BUG/assert_failed
      into #ifndef "BUG_FRAME/run_in_exception_handler/WARN/BUG/assert_failed"
      thereby each architecture can override generic implementation of macros.
    * add #ifdef __ASSEMBLY__ ... #endif
    * Update run_in_exception_handler() with:
        register void *fn_ asm(__stringify(BUG_FN_REG)) = (fn);
      to avoid:
        asm ("mv " __stringify(BUG_FN_REG) ", %0\n"

For x86 only common parts was removed from <asm/bug.h>.

RISC-V will be switched to use <xen/bug.h> and in the future, it will use common
the version of do_bug_frame() when xen/common will work for RISC-V.

Oleksii Kurochko (4):
  xen: introduce CONFIG_GENERIC_BUG_FRAME
  xen/arm: switch ARM to use generic implementation of bug.h
  xen/x86: switch x86 to use generic implemetation of bug.h
  xen: change <asm/bug.h> to <xen/bug.h>

 xen/arch/arm/Kconfig                 |   1 +
 xen/arch/arm/include/asm/bug.h       |  86 ------------------
 xen/arch/arm/include/asm/div64.h     |   2 +-
 xen/arch/arm/traps.c                 |  79 -----------------
 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       |  32 +------
 xen/common/Kconfig                   |   6 ++
 xen/common/Makefile                  |   1 +
 xen/common/bug.c                     |  88 +++++++++++++++++++
 xen/drivers/cpufreq/cpufreq.c        |   2 +-
 xen/include/xen/bug.h                | 127 +++++++++++++++++++++++++++
 xen/include/xen/lib.h                |   2 +-
 15 files changed, 232 insertions(+), 202 deletions(-)
 create mode 100644 xen/common/bug.c
 create mode 100644 xen/include/xen/bug.h

-- 
2.39.0



             reply	other threads:[~2023-02-03 17:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 17:05 Oleksii Kurochko [this message]
2023-02-03 17:05 ` [PATCH v1 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME Oleksii Kurochko
2023-02-13 12:24   ` Jan Beulich
2023-02-13 13:19     ` Julien Grall
2023-02-13 13:30       ` Jan Beulich
2023-02-13 13:56         ` Julien Grall
2023-02-13 15:02           ` Jan Beulich
2023-02-13 15:07             ` Julien Grall
2023-02-13 15:14               ` Jan Beulich
2023-02-13 13:33       ` Andrew Cooper
2023-02-13 13:55         ` Julien Grall
2023-02-14 16:22     ` Oleksii
2023-02-14 16:55       ` Jan Beulich
2023-02-15 15:06         ` Oleksii
2023-02-15 17:59         ` Oleksii
2023-02-16  7:31           ` Jan Beulich
2023-02-16 10:44             ` Oleksii
2023-02-16 12:09               ` Oleksii
2023-02-16 12:19                 ` Andrew Cooper
2023-02-16 20:44                   ` Oleksii
2023-02-17  7:12                     ` Jan Beulich
2023-02-17  9:33                       ` Oleksii
2023-02-16 14:55               ` Jan Beulich
2023-02-16 10:48             ` Andrew Cooper
2023-02-16 12:21               ` Oleksii
2023-02-16 14:53               ` Jan Beulich
2023-02-03 17:05 ` [PATCH v1 2/4] xen/arm: switch ARM to use generic implementation of bug.h Oleksii Kurochko
2023-02-13 13:02   ` Jan Beulich
2023-02-14 16:28     ` Oleksii
2023-02-03 17:05 ` [PATCH v1 3/4] xen/x86: switch x86 to use generic implemetation " Oleksii Kurochko
2023-02-13 13:10   ` Jan Beulich
2023-02-14 16:41     ` Oleksii
2023-02-03 17:05 ` [PATCH v1 4/4] xen: change <asm/bug.h> to <xen/bug.h> Oleksii Kurochko
2023-02-13 13:13   ` Jan Beulich
2023-02-14 16:44     ` Oleksii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1675441720.git.oleksii.kurochko@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.