lkml.org 
[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 11/16] ARM: LPAE: Add fault handling support
On Sun, Oct 23, 2011 at 12:57:56PM +0100, Russell King - ARM Linux wrote:
> On Wed, Aug 10, 2011 at 04:03:34PM +0100, Catalin Marinas wrote:
> > @@ -494,6 +508,72 @@ static struct fsr_info {
> > int code;
> > const char *name;
> > } fsr_info[] = {
> > +#ifdef CONFIG_ARM_LPAE
...
> > +#else /* !CONFIG_ARM_LPAE */
> > /*
> > * The following are the standard ARMv3 and ARMv4 aborts. ARMv5
> > * defines these to be "precise" aborts.
> > @@ -535,6 +615,7 @@ static struct fsr_info {
> > { do_bad, SIGBUS, 0, "unknown 29" },
> > { do_bad, SIGBUS, 0, "unknown 30" },
> > { do_bad, SIGBUS, 0, "unknown 31" }
> > +#endif /* CONFIG_ARM_LPAE */
>
> Can't we do better than this?

The first thought was defining the fsr_info array in a different file
but that would mean exposing functions from the fault.c which are
currently defined as static.

The other variant is including a C file directly in fault.c. It's not
very nice but at least we remove the big #ifdef.

--
Catalin


\
 
 \ /
  Last update: 2011-11-02 18:05    [W:0.047 / U:45.552 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site