[PATCH 2.6.19.1] m32r: Build fix for processors without ISA_DSP_LEVEL2
From: Hirokazu Takata
Date: Thu Dec 14 2006 - 05:00:57 EST
Additional fixes for processors without ISA_DSP_LEVEL2.
sigcontext_t does not have dummy_acc1h, dummy_acc1l members any longer.
This patch is against v2.6.19.1 kernel.
From: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
Subject: [PATCH 2.6.19] m32r: Make userspace headers platform-independent
Date: Wed, 06 Dec 2006 19:00:01 +0900
> The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa
> configuration" for userspace application programs, such as glibc, gdb, etc.
>
> This is because the recent kernel do not include linux/config.h not to
> expose kernel headers for userspace.
>
> To fix the above compile errors, this patch fixes two headers ptrace.h
> and sigcontext.h for m32r and makes them platform-independent.
>
> Signed-off-by: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
> ---
> arch/m32r/kernel/entry.S | 65 ++++++++++++++++++----------------------
> include/asm-m32r/ptrace.h | 28 ++---------------
> include/asm-m32r/sigcontext.h | 13 +-------
> 3 files changed, 35 insertions(+), 71 deletions(-)
>
Signed-off-by: Hirokazu Takata <takata@xxxxxxxxxxxxxx>
---
arch/m32r/kernel/process.c | 2 +-
arch/m32r/kernel/signal.c | 26 ++++----------------------
2 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 44cbe0c..a689e29 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs)
regs->acc1h, regs->acc1l);
#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
printk("ACCH[%08lx]:ACCL[%08lx]\n", \
- regs->acch, regs->accl);
+ regs->acc0h, regs->acc0l);
#else
#error unknown isa configuration
#endif
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index b60cea4..045f958 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
COPY(r10);
COPY(r11);
COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
COPY(acc0h);
COPY(acc0l);
- COPY(acc1h);
- COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
- COPY(acch);
- COPY(accl);
- COPY(dummy_acc1h);
- COPY(dummy_acc1l);
-#else
-#error unknown isa configuration
-#endif
+ COPY(acc1h); /* ISA_DSP_LEVEL2 only */
+ COPY(acc1l); /* ISA_DSP_LEVEL2 only */
COPY(psw);
COPY(bpc);
COPY(bbpsw);
@@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
COPY(r10);
COPY(r11);
COPY(r12);
-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
COPY(acc0h);
COPY(acc0l);
- COPY(acc1h);
- COPY(acc1l);
-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
- COPY(acch);
- COPY(accl);
- COPY(dummy_acc1h);
- COPY(dummy_acc1l);
-#else
-#error unknown isa configuration
-#endif
+ COPY(acc1h); /* ISA_DSP_LEVEL2 only */
+ COPY(acc1l); /* ISA_DSP_LEVEL2 only */
COPY(psw);
COPY(bpc);
COPY(bbpsw);
--
1.4.4.2
--
Hirokazu Takata <takata@xxxxxxxxxxxxxx>
Linux/M32R Project: http://www.linux-m32r.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/