linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
To: "Huacai Chen" <chenhuacai@loongson.cn>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"David Airlie" <airlied@linux.ie>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Xuefeng Li" <lixuefeng@loongson.cn>,
	"Yanteng Si" <siyanteng@loongson.cn>,
	"Huacai Chen" <chenhuacai@gmail.com>,
	"Guo Ren" <guoren@kernel.org>, "Xuerui Wang" <kernel@xen0n.name>,
	"Stephen Rothwell" <sfr@canb.auug.org.au>,
	"WANG Xuerui" <git@xen0n.name>
Subject: Re: [PATCH V12 05/24] LoongArch: Add ELF-related definitions
Date: Wed, 01 Jun 2022 13:18:35 +0100	[thread overview]
Message-ID: <1ccd9ba8-3984-49e9-b1b2-805acdf3090c@www.fastmail.com> (raw)
In-Reply-To: <20220601100005.2989022-6-chenhuacai@loongson.cn>



在2022年6月1日六月 上午10:59,Huacai Chen写道:
> Add ELF-related definitions for LoongArch, including: EM_LOONGARCH,
> KEXEC_ARCH_LOONGARCH, AUDIT_ARCH_LOONGARCH32, AUDIT_ARCH_LOONGARCH64
> and NT_LOONGARCH_*.
>
> Reviewed-by: WANG Xuerui <git@xen0n.name>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>


> ---
>  include/uapi/linux/audit.h  | 2 ++
>  include/uapi/linux/elf-em.h | 1 +
>  include/uapi/linux/elf.h    | 5 +++++
>  include/uapi/linux/kexec.h  | 1 +
>  scripts/sorttable.c         | 5 +++++
>  5 files changed, 14 insertions(+)
>
> diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
> index 8eda133ca4c1..7c1dc818b1d5 100644
> --- a/include/uapi/linux/audit.h
> +++ b/include/uapi/linux/audit.h
> @@ -439,6 +439,8 @@ enum {
>  #define AUDIT_ARCH_UNICORE	(EM_UNICORE|__AUDIT_ARCH_LE)
>  #define 
> AUDIT_ARCH_X86_64	(EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
>  #define AUDIT_ARCH_XTENSA	(EM_XTENSA)
> +#define AUDIT_ARCH_LOONGARCH32	(EM_LOONGARCH|__AUDIT_ARCH_LE)
> +#define 
> AUDIT_ARCH_LOONGARCH64	(EM_LOONGARCH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
> 
>  #define AUDIT_PERM_EXEC		1
>  #define AUDIT_PERM_WRITE	2
> diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
> index f47e853546fa..ef38c2bc5ab7 100644
> --- a/include/uapi/linux/elf-em.h
> +++ b/include/uapi/linux/elf-em.h
> @@ -51,6 +51,7 @@
>  #define EM_RISCV	243	/* RISC-V */
>  #define EM_BPF		247	/* Linux BPF - in-kernel virtual machine */
>  #define EM_CSKY		252	/* C-SKY */
> +#define EM_LOONGARCH	258	/* LoongArch */
>  #define EM_FRV		0x5441	/* Fujitsu FR-V */
> 
>  /*
> diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
> index c4abd09c3da9..2b9f5e9985e5 100644
> --- a/include/uapi/linux/elf.h
> +++ b/include/uapi/linux/elf.h
> @@ -438,6 +438,11 @@ typedef struct elf64_shdr {
>  #define NT_MIPS_DSP	0x800		/* MIPS DSP ASE registers */
>  #define NT_MIPS_FP_MODE	0x801		/* MIPS floating-point mode */
>  #define NT_MIPS_MSA	0x802		/* MIPS SIMD registers */
> +#define NT_LOONGARCH_CPUCFG	0xa00	/* LoongArch CPU config registers */
> +#define NT_LOONGARCH_CSR	0xa01	/* LoongArch control and status 
> registers */
> +#define NT_LOONGARCH_LSX	0xa02	/* LoongArch Loongson SIMD Extension 
> registers */
> +#define NT_LOONGARCH_LASX	0xa03	/* LoongArch Loongson Advanced SIMD 
> Extension registers */
> +#define NT_LOONGARCH_LBT	0xa04	/* LoongArch Loongson Binary 
> Translation registers */
> 
>  /* Note types with note name "GNU" */
>  #define NT_GNU_PROPERTY_TYPE_0	5
> diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h
> index fb7e2ef60825..981016e05cfa 100644
> --- a/include/uapi/linux/kexec.h
> +++ b/include/uapi/linux/kexec.h
> @@ -43,6 +43,7 @@
>  #define KEXEC_ARCH_MIPS    ( 8 << 16)
>  #define KEXEC_ARCH_AARCH64 (183 << 16)
>  #define KEXEC_ARCH_RISCV   (243 << 16)
> +#define KEXEC_ARCH_LOONGARCH	(258 << 16)
> 
>  /* The artificial cap on the number of segments passed to kexec_load. */
>  #define KEXEC_SEGMENT_MAX 16
> diff --git a/scripts/sorttable.c b/scripts/sorttable.c
> index d00504c5f530..fba40e99f354 100644
> --- a/scripts/sorttable.c
> +++ b/scripts/sorttable.c
> @@ -60,6 +60,10 @@
>  #define EM_RISCV	243
>  #endif
> 
> +#ifndef EM_LOONGARCH
> +#define EM_LOONGARCH	258
> +#endif
> +
>  static uint32_t (*r)(const uint32_t *);
>  static uint16_t (*r2)(const uint16_t *);
>  static uint64_t (*r8)(const uint64_t *);
> @@ -313,6 +317,7 @@ static int do_file(char const *const fname, void *addr)
>  	case EM_ARCOMPACT:
>  	case EM_ARCV2:
>  	case EM_ARM:
> +	case EM_LOONGARCH:
>  	case EM_MICROBLAZE:
>  	case EM_MIPS:
>  	case EM_XTENSA:
> -- 
> 2.27.0

-- 
- Jiaxun

  reply	other threads:[~2022-06-01 12:18 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01  9:59 [PATCH V12 00/24] arch: Add basic LoongArch support Huacai Chen
2022-06-01  9:59 ` [PATCH V12 01/24] irqchip: Adjust Kconfig for Loongson Huacai Chen
2022-06-01 10:36   ` WANG Xuerui
2022-06-01  9:59 ` [PATCH V12 02/24] irqchip/loongson-liointc: Fix build error for LoongArch Huacai Chen
2022-06-01 10:37   ` WANG Xuerui
2022-06-01 12:09   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 03/24] Documentation: LoongArch: Add basic documentations Huacai Chen
2022-06-01 12:16   ` Jiaxun Yang
2022-06-02  9:13   ` Bagas Sanjaya
2022-06-02  9:26     ` Huacai Chen
2022-06-01  9:59 ` [PATCH V12 04/24] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2022-06-01 12:17   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 05/24] LoongArch: Add ELF-related definitions Huacai Chen
2022-06-01 12:18   ` Jiaxun Yang [this message]
2022-06-01  9:59 ` [PATCH V12 06/24] LoongArch: Add writecombine support for drm Huacai Chen
2022-06-01 12:20   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 07/24] LoongArch: Add build infrastructure Huacai Chen
2022-06-01 12:23   ` Jiaxun Yang
2022-06-01 15:47   ` Randy Dunlap
2022-06-01 16:02     ` Arnd Bergmann
2022-06-01  9:59 ` [PATCH V12 08/24] LoongArch: Add CPU definition headers Huacai Chen
2022-06-01 12:25   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 09/24] LoongArch: Add atomic/locking headers Huacai Chen
2022-06-01 12:27   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 10/24] LoongArch: Add other common headers Huacai Chen
2022-06-01 12:27   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 11/24] LoongArch: Add boot and setup routines Huacai Chen
2022-06-01 12:29   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 12/24] LoongArch: Add exception/interrupt handling Huacai Chen
2022-06-01 12:29   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 13/24] LoongArch: Add process management Huacai Chen
2022-06-01  9:59 ` [PATCH V12 14/24] LoongArch: Add memory management Huacai Chen
2022-06-01  9:59 ` [PATCH V12 15/24] LoongArch: Add system call support Huacai Chen
2022-06-01 12:30   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 16/24] LoongArch: Add signal handling support Huacai Chen
2022-06-01  9:59 ` [PATCH V12 17/24] LoongArch: Add ELF and module support Huacai Chen
2022-06-01 12:30   ` Jiaxun Yang
2022-06-01  9:59 ` [PATCH V12 18/24] LoongArch: Add misc common routines Huacai Chen
2022-06-01 12:31   ` Jiaxun Yang
2022-06-01 10:00 ` [PATCH V12 19/24] LoongArch: Add some library functions Huacai Chen
2022-06-01 12:33   ` Jiaxun Yang
2022-06-01 10:00 ` [PATCH V12 20/24] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2022-06-01 10:00 ` [PATCH V12 21/24] LoongArch: Add multi-processor (SMP) support Huacai Chen
2022-06-01 12:34   ` Jiaxun Yang
2022-06-01 10:00 ` [PATCH V12 22/24] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2022-06-01 11:27   ` WANG Xuerui
2022-06-01 10:00 ` [PATCH V12 23/24] LoongArch: Add Loongson-3 default config file Huacai Chen
2022-06-01 10:00 ` [PATCH V12 24/24] MAINTAINERS: Add maintainer information for LoongArch Huacai Chen
2022-06-01 12:35   ` Jiaxun Yang
2022-06-01 14:56     ` Guo Ren
2022-06-01 11:30 ` [PATCH V12 00/24] arch: Add basic LoongArch support WANG Xuerui
2022-06-01 12:44 ` Jiaxun Yang
2022-06-01 15:02   ` Guo Ren

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=1ccd9ba8-3984-49e9-b1b2-805acdf3090c@www.fastmail.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@gmail.com \
    --cc=chenhuacai@loongson.cn \
    --cc=corbet@lwn.net \
    --cc=git@xen0n.name \
    --cc=guoren@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=siyanteng@loongson.cn \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).