* [PATCH] elf-em.h: move EM_MICROBLAZE to the common header
@ 2015-08-18 7:28 Mike Frysinger
2015-08-19 11:01 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2015-08-18 7:28 UTC (permalink / raw)
To: linux-kernel; +Cc: dwmw2, microblaze-uclinux, Michal Simek
The linux/audit.h header uses EM_MICROBLAZE in order to define
AUDIT_ARCH_MICROBLAZE, but it's only available in the microblaze
asm headers. Move it to the common elf-em.h header so that the
define can be used on non-microblaze systems. Otherwise we get
build errors that EM_MICROBLAZE isn't defined when we try to use
the AUDIT_ARCH_MICROBLAZE symbol.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
arch/microblaze/include/uapi/asm/elf.h | 3 ++-
include/uapi/linux/elf-em.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/microblaze/include/uapi/asm/elf.h b/arch/microblaze/include/uapi/asm/elf.h
index be1731d..e9bcdb6 100644
--- a/arch/microblaze/include/uapi/asm/elf.h
+++ b/arch/microblaze/include/uapi/asm/elf.h
@@ -11,12 +11,13 @@
#ifndef _UAPI_ASM_MICROBLAZE_ELF_H
#define _UAPI_ASM_MICROBLAZE_ELF_H
+#include <linux/elf-em.h>
+
/*
* Note there is no "official" ELF designation for Microblaze.
* I've snaffled the value from the microblaze binutils source code
* /binutils/microblaze/include/elf/microblaze.h
*/
-#define EM_MICROBLAZE 189
#define EM_MICROBLAZE_OLD 0xbaab
#define ELF_ARCH EM_MICROBLAZE
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
index b088296..8c90a79 100644
--- a/include/uapi/linux/elf-em.h
+++ b/include/uapi/linux/elf-em.h
@@ -38,6 +38,7 @@
#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
#define EM_TI_C6000 140 /* TI C6X DSPs */
#define EM_AARCH64 183 /* ARM 64 bit */
+#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
#define EM_FRV 0x5441 /* Fujitsu FR-V */
#define EM_AVR32 0x18ad /* Atmel AVR32 */
--
2.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] elf-em.h: move EM_MICROBLAZE to the common header
2015-08-18 7:28 [PATCH] elf-em.h: move EM_MICROBLAZE to the common header Mike Frysinger
@ 2015-08-19 11:01 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2015-08-19 11:01 UTC (permalink / raw)
To: Mike Frysinger, linux-kernel; +Cc: dwmw2, microblaze-uclinux
[-- Attachment #1: Type: text/plain, Size: 2265 bytes --]
On 08/18/2015 09:28 AM, Mike Frysinger wrote:
> The linux/audit.h header uses EM_MICROBLAZE in order to define
> AUDIT_ARCH_MICROBLAZE, but it's only available in the microblaze
> asm headers. Move it to the common elf-em.h header so that the
> define can be used on non-microblaze systems. Otherwise we get
> build errors that EM_MICROBLAZE isn't defined when we try to use
> the AUDIT_ARCH_MICROBLAZE symbol.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> arch/microblaze/include/uapi/asm/elf.h | 3 ++-
> include/uapi/linux/elf-em.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/microblaze/include/uapi/asm/elf.h b/arch/microblaze/include/uapi/asm/elf.h
> index be1731d..e9bcdb6 100644
> --- a/arch/microblaze/include/uapi/asm/elf.h
> +++ b/arch/microblaze/include/uapi/asm/elf.h
> @@ -11,12 +11,13 @@
> #ifndef _UAPI_ASM_MICROBLAZE_ELF_H
> #define _UAPI_ASM_MICROBLAZE_ELF_H
>
> +#include <linux/elf-em.h>
> +
> /*
> * Note there is no "official" ELF designation for Microblaze.
> * I've snaffled the value from the microblaze binutils source code
> * /binutils/microblaze/include/elf/microblaze.h
> */
> -#define EM_MICROBLAZE 189
> #define EM_MICROBLAZE_OLD 0xbaab
> #define ELF_ARCH EM_MICROBLAZE
>
> diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h
> index b088296..8c90a79 100644
> --- a/include/uapi/linux/elf-em.h
> +++ b/include/uapi/linux/elf-em.h
> @@ -38,6 +38,7 @@
> #define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
> #define EM_TI_C6000 140 /* TI C6X DSPs */
> #define EM_AARCH64 183 /* ARM 64 bit */
> +#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
> #define EM_FRV 0x5441 /* Fujitsu FR-V */
> #define EM_AVR32 0x18ad /* Atmel AVR32 */
>
>
Applied.
We should probably also remove EM_MICROBLAZE_OLD which shouldn't be used
now.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-19 11:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 7:28 [PATCH] elf-em.h: move EM_MICROBLAZE to the common header Mike Frysinger
2015-08-19 11:01 ` Michal Simek
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).