From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Carstens Subject: [patch 4/9] m68k/asm-offsets: rename signal defines Date: Mon, 31 Aug 2009 14:43:34 +0200 Message-ID: <20090831124416.998821502@de.ibm.com> References: <20090831124330.014480226@de.ibm.com> Return-path: Received: from mtagate5.de.ibm.com ([195.212.17.165]:50215 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbZHaMoR (ORCPT ); Mon, 31 Aug 2009 08:44:17 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id n7VCiIb0010801 for ; Mon, 31 Aug 2009 12:44:18 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7VCiI7a2740416 for ; Mon, 31 Aug 2009 14:44:18 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7VCiHiD024615 for ; Mon, 31 Aug 2009 14:44:18 +0200 Content-Disposition: inline; filename=m68k_signal.diff Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrew Morton , Ingo Molnar , Linus Torvalds , David Miller , Benjamin Herrenschmidt Cc: linux-arch@vger.kernel.org, Peter Zijlstra , Arnd Bergmann , Nick Piggin , Martin Schwidefsky , Horst Hartmann , Christian Ehrhardt , Heiko Carstens From: Heiko Carstens In order to be able to use asm-offsets.h in C files the existing namespace conflicts must be solved first. In asm-offsets.h there are defines for signal constants, so they can be used in assembler files. Unfortunately the existing defines use a 1:1 mapping for the macro names which results in name space conflicts if the header file would also be used in C files. So rename the created defines and add an "L" prefix to each one since that has already been done for the SIGTRAP define in entry_mm. Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Heiko Carstens --- arch/m68k/include/asm/entry_mm.h | 1 - arch/m68k/kernel/asm-offsets.c | 8 ++++---- arch/m68k/math-emu/fp_entry.S | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) Index: linux-2.6/arch/m68k/include/asm/entry_mm.h =================================================================== --- linux-2.6.orig/arch/m68k/include/asm/entry_mm.h +++ linux-2.6/arch/m68k/include/asm/entry_mm.h @@ -46,7 +46,6 @@ #define curptr a2 LFLUSH_I_AND_D = 0x00000808 -LSIGTRAP = 5 /* process bits for task_struct.ptrace */ PT_TRACESYS_OFF = 3 Index: linux-2.6/arch/m68k/kernel/asm-offsets.c =================================================================== --- linux-2.6.orig/arch/m68k/kernel/asm-offsets.c +++ linux-2.6/arch/m68k/kernel/asm-offsets.c @@ -84,10 +84,10 @@ int main(void) DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref)); /* signal defines */ - DEFINE(SIGSEGV, SIGSEGV); - DEFINE(SEGV_MAPERR, SEGV_MAPERR); - DEFINE(SIGTRAP, SIGTRAP); - DEFINE(TRAP_TRACE, TRAP_TRACE); + DEFINE(LSIGSEGV, SIGSEGV); + DEFINE(LSEGV_MAPERR, SEGV_MAPERR); + DEFINE(LSIGTRAP, SIGTRAP); + DEFINE(LTRAP_TRACE, TRAP_TRACE); /* offsets into the custom struct */ DEFINE(CUSTOMBASE, &amiga_custom); Index: linux-2.6/arch/m68k/math-emu/fp_entry.S =================================================================== --- linux-2.6.orig/arch/m68k/math-emu/fp_entry.S +++ linux-2.6/arch/m68k/math-emu/fp_entry.S @@ -85,8 +85,8 @@ fp_err_ua2: fp_err_ua1: addq.l #4,%sp move.l %a0,-(%sp) - pea SEGV_MAPERR - pea SIGSEGV + pea LSEGV_MAPERR + pea LSIGSEGV jsr fpemu_signal add.w #12,%sp jra ret_from_exception @@ -96,8 +96,8 @@ fp_err_ua1: | it does not really belong here, but... fp_sendtrace060: move.l (FPS_PC,%sp),-(%sp) - pea TRAP_TRACE - pea SIGTRAP + pea LTRAP_TRACE + pea LSIGTRAP jsr fpemu_signal add.w #12,%sp jra ret_from_exception -- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mtagate5.de.ibm.com ([195.212.17.165]:50215 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbZHaMoR (ORCPT ); Mon, 31 Aug 2009 08:44:17 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id n7VCiIb0010801 for ; Mon, 31 Aug 2009 12:44:18 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7VCiI7a2740416 for ; Mon, 31 Aug 2009 14:44:18 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7VCiHiD024615 for ; Mon, 31 Aug 2009 14:44:18 +0200 Message-ID: <20090831124416.998821502@de.ibm.com> References: <20090831124330.014480226@de.ibm.com> Date: Mon, 31 Aug 2009 14:43:34 +0200 From: Heiko Carstens Subject: [patch 4/9] m68k/asm-offsets: rename signal defines Content-Disposition: inline; filename=m68k_signal.diff Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrew Morton , Ingo Molnar , Linus Torvalds , David Miller , Benjamin Herrenschmidt , Paul Mackerras , Geert Uytterhoeven , Roman Zippel Cc: linux-arch@vger.kernel.org, Peter Zijlstra , Arnd Bergmann , Nick Piggin , Martin Schwidefsky , Horst Hartmann , Christian Ehrhardt , Heiko Carstens Message-ID: <20090831124334.qCN6PrtKo7gp-WJAPB5VUvtAV4Ye8l6PKJ6wplwGS1w@z> From: Heiko Carstens In order to be able to use asm-offsets.h in C files the existing namespace conflicts must be solved first. In asm-offsets.h there are defines for signal constants, so they can be used in assembler files. Unfortunately the existing defines use a 1:1 mapping for the macro names which results in name space conflicts if the header file would also be used in C files. So rename the created defines and add an "L" prefix to each one since that has already been done for the SIGTRAP define in entry_mm. Cc: Geert Uytterhoeven Cc: Roman Zippel Signed-off-by: Heiko Carstens --- arch/m68k/include/asm/entry_mm.h | 1 - arch/m68k/kernel/asm-offsets.c | 8 ++++---- arch/m68k/math-emu/fp_entry.S | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) Index: linux-2.6/arch/m68k/include/asm/entry_mm.h =================================================================== --- linux-2.6.orig/arch/m68k/include/asm/entry_mm.h +++ linux-2.6/arch/m68k/include/asm/entry_mm.h @@ -46,7 +46,6 @@ #define curptr a2 LFLUSH_I_AND_D = 0x00000808 -LSIGTRAP = 5 /* process bits for task_struct.ptrace */ PT_TRACESYS_OFF = 3 Index: linux-2.6/arch/m68k/kernel/asm-offsets.c =================================================================== --- linux-2.6.orig/arch/m68k/kernel/asm-offsets.c +++ linux-2.6/arch/m68k/kernel/asm-offsets.c @@ -84,10 +84,10 @@ int main(void) DEFINE(FONT_DESC_PREF, offsetof(struct font_desc, pref)); /* signal defines */ - DEFINE(SIGSEGV, SIGSEGV); - DEFINE(SEGV_MAPERR, SEGV_MAPERR); - DEFINE(SIGTRAP, SIGTRAP); - DEFINE(TRAP_TRACE, TRAP_TRACE); + DEFINE(LSIGSEGV, SIGSEGV); + DEFINE(LSEGV_MAPERR, SEGV_MAPERR); + DEFINE(LSIGTRAP, SIGTRAP); + DEFINE(LTRAP_TRACE, TRAP_TRACE); /* offsets into the custom struct */ DEFINE(CUSTOMBASE, &amiga_custom); Index: linux-2.6/arch/m68k/math-emu/fp_entry.S =================================================================== --- linux-2.6.orig/arch/m68k/math-emu/fp_entry.S +++ linux-2.6/arch/m68k/math-emu/fp_entry.S @@ -85,8 +85,8 @@ fp_err_ua2: fp_err_ua1: addq.l #4,%sp move.l %a0,-(%sp) - pea SEGV_MAPERR - pea SIGSEGV + pea LSEGV_MAPERR + pea LSIGSEGV jsr fpemu_signal add.w #12,%sp jra ret_from_exception @@ -96,8 +96,8 @@ fp_err_ua1: | it does not really belong here, but... fp_sendtrace060: move.l (FPS_PC,%sp),-(%sp) - pea TRAP_TRACE - pea SIGTRAP + pea LTRAP_TRACE + pea LSIGTRAP jsr fpemu_signal add.w #12,%sp jra ret_from_exception --