From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932453AbdA3Vre (ORCPT ); Mon, 30 Jan 2017 16:47:34 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36790 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932383AbdA3Vrc (ORCPT ); Mon, 30 Jan 2017 16:47:32 -0500 Date: Tue, 31 Jan 2017 03:09:15 +0530 From: Afzal Mohammed To: Russell King - ARM Linux Cc: Vladimir Murzin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/4] ARM: nommu: display vectors base Message-ID: <20170130213915.GA2976@afzalpc> References: <20170122031652.13074-1-afzal.mohd.ma@gmail.com> <20170122032212.13456-1-afzal.mohd.ma@gmail.com> <20170130140326.GU27312@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170130140326.GU27312@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Jan 30, 2017 at 02:03:26PM +0000, Russell King - ARM Linux wrote: > On Sun, Jan 22, 2017 at 08:52:12AM +0530, afzal mohammed wrote: > > The exception base address is now dynamically estimated for no-MMU, > > display it. As it is the case, now limit VECTORS_BASE usage to MMU > > scenario. > > +#define VECTORS_BASE UL(0xffff0000) > > + > > #else /* CONFIG_MMU */ > > > > /* > > @@ -111,8 +113,6 @@ > > > > #endif /* !CONFIG_MMU */ > > > > -#define VECTORS_BASE UL(0xffff0000) > > I think adding a definition for VECTORS_BASE in asm/memory.h for nommu: > > extern unsigned long vectors_base; > #define VECTORS_BASE vectors_base Above was required to be enclosed by below, #ifndef __ASSEMBLY__ #endif Putting it inside the existing #ifndef __ASSEMBLY__ (which encloses other externs) in asm/memory.h would put it alongside not so related definitions as compared to the existing location. And the existing #ifndef __ASSEMBLY__ in asm/memory.h is a bit down that makes the above stand separately, > > +#ifdef CONFIG_MMU > > MLK(VECTORS_BASE, VECTORS_BASE + PAGE_SIZE), > > +#else > > + MLK(vectors_base, vectors_base + PAGE_SIZE), > > +#endif > > will mean that this conditional becomes unnecessary. > > -#endif > > +#else /* CONFIG_MMU */ > > +extern unsigned long vectors_base; > > +#endif /* CONFIG_MMU */ > > and you don't need this here either. but the above improvements make the patch simpler. Regards afzal