From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759154AbYDJPBW (ORCPT ); Thu, 10 Apr 2008 11:01:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758736AbYDJPAk (ORCPT ); Thu, 10 Apr 2008 11:00:40 -0400 Received: from mx1.redhat.com ([66.187.233.31]:42656 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758567AbYDJPAj (ORCPT ); Thu, 10 Apr 2008 11:00:39 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens (Ireland) From: David Howells Subject: [PATCH 4/5] FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 To: torvalds@osdl.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com Date: Thu, 10 Apr 2008 16:00:35 +0100 Message-ID: <20080410150035.30046.93080.stgit@warthog.procyon.org.uk> In-Reply-To: <20080410150020.30046.84293.stgit@warthog.procyon.org.uk> References: <20080410150020.30046.84293.stgit@warthog.procyon.org.uk> User-Agent: StGIT/0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells Make NOMMU-mode work with base addresses other than 0xC0000000 by: (1) Giving the code that sets up the protection registers the right address in __sdram_base. Rather than being hard coded to 0xC0000000, the value of __page_offset is obtained from the linker script. (2) Eliminate the check in __switch_to() that verifies the current thread info is in the 0xCxxxxxxx region. Signed-off-by: David Howells --- arch/frv/kernel/head.inc | 2 +- arch/frv/kernel/switch_to.S | 7 ------- 2 files changed, 1 insertions(+), 8 deletions(-) diff --git a/arch/frv/kernel/head.inc b/arch/frv/kernel/head.inc index d424cd2..bff6662 100644 --- a/arch/frv/kernel/head.inc +++ b/arch/frv/kernel/head.inc @@ -46,5 +46,5 @@ #ifdef CONFIG_MMU __sdram_base = 0x00000000 /* base address to which SDRAM relocated */ #else -__sdram_base = 0xc0000000 /* base address to which SDRAM relocated */ +__sdram_base = __page_offset /* base address to which SDRAM relocated */ #endif diff --git a/arch/frv/kernel/switch_to.S b/arch/frv/kernel/switch_to.S index b5275fa..b066686 100644 --- a/arch/frv/kernel/switch_to.S +++ b/arch/frv/kernel/switch_to.S @@ -102,13 +102,6 @@ __switch_to: movgs gr14,lr bar - srli gr15,#28,gr5 - subicc gr5,#0xc,gr0,icc0 - beq icc0,#0,111f - break - nop -111: - # jump to __switch_back or ret_from_fork as appropriate # - move prev to GR8 movgs gr4,psr