From patchwork Tue Mar 24 13:30:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco VIRLINZI X-Patchwork-Id: 13971 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2ODUFD7018673 for ; Tue, 24 Mar 2009 13:30:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753805AbZCXNaQ (ORCPT ); Tue, 24 Mar 2009 09:30:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755701AbZCXNaQ (ORCPT ); Tue, 24 Mar 2009 09:30:16 -0400 Received: from eu1sys200aog103.obsmtp.com ([207.126.144.115]:54193 "EHLO eu1sys200aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753805AbZCXNaO (ORCPT ); Tue, 24 Mar 2009 09:30:14 -0400 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKScjgYHVRfgmWBj0ZWyLmj7w2APse4WYI@postini.com; Tue, 24 Mar 2009 13:30:12 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 23CD2DB12 for ; Tue, 24 Mar 2009 13:29:06 +0000 (GMT) Received: from mail1.ctn.st.com (mail1.ctn.st.com [164.130.116.128]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E9E3E4C487 for ; Tue, 24 Mar 2009 13:30:06 +0000 (GMT) Received: from [10.52.139.41] (mdt-dhcp41.ctn.st.com [10.52.139.41]) by mail1.ctn.st.com (MOS 3.8.7a) with ESMTP id DAB69851 (AUTH virlinzi); Tue, 24 Mar 2009 14:30:05 +0100 (CET) Message-ID: <49C8E059.9040100@st.com> Date: Tue, 24 Mar 2009 14:30:01 +0100 From: Francesco VIRLINZI User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Linux-sh Subject: [PATCH] Added ASSEMBLY macro in the mmu.h file Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org This patch adds the ifndef __ASSEMBLY__ preprocessor to allow the defines in the file are used also in assembly code. Regards Francesco From 2adf176e3e8e429237742dedc82bc9ffc9f7ae97 Mon Sep 17 00:00:00 2001 From: Francesco Virlinzi Date: Tue, 24 Mar 2009 14:22:19 +0100 Subject: [PATCH] Added __ASSEMBLY__ ifdef in the mmu.h file Added the 'ifndef _ASSEMBLY__' to be able to use the defines in the mmu.h in assmebly code Signed-off-by: Francesco Virlinzi --- arch/sh/include/asm/mmu.h | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/arch/sh/include/asm/mmu.h b/arch/sh/include/asm/mmu.h index 6c43625..f596303 100644 --- a/arch/sh/include/asm/mmu.h +++ b/arch/sh/include/asm/mmu.h @@ -1,22 +1,6 @@ #ifndef __MMU_H #define __MMU_H -/* Default "unsigned long" context */ -typedef unsigned long mm_context_id_t[NR_CPUS]; - -typedef struct { -#ifdef CONFIG_MMU - mm_context_id_t id; - void *vdso; -#else - unsigned long end_brk; -#endif -#ifdef CONFIG_BINFMT_ELF_FDPIC - unsigned long exec_fdpic_loadmap; - unsigned long interp_fdpic_loadmap; -#endif -} mm_context_t; - /* * Privileged Space Mapping Buffer (PMB) definitions */ @@ -41,6 +25,24 @@ typedef struct { #define PMB_NO_ENTRY (-1) +#ifndef __ASSEMBLY__ + +/* Default "unsigned long" context */ +typedef unsigned long mm_context_id_t[NR_CPUS]; + +typedef struct { +#ifdef CONFIG_MMU + mm_context_id_t id; + void *vdso; +#else + unsigned long end_brk; +#endif +#ifdef CONFIG_BINFMT_ELF_FDPIC + unsigned long exec_fdpic_loadmap; + unsigned long interp_fdpic_loadmap; +#endif +} mm_context_t; + struct pmb_entry; struct pmb_entry { @@ -70,6 +72,7 @@ void pmb_free(struct pmb_entry *pmbe); long pmb_remap(unsigned long virt, unsigned long phys, unsigned long size, unsigned long flags); void pmb_unmap(unsigned long addr); +#endif /* __ASSEMBLY__ */ #endif /* __MMU_H */ -- 1.6.0.6