[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130617153322.f3cecaa54aacd465fedb7c36@linux-foundation.org>
Date: Mon, 17 Jun 2013 15:33:22 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Andrea Arcangeli <aarcange@...hat.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] thp: define HPAGE_PMD_* constans as BUILD_BUG() if !THP
On Tue, 18 Jun 2013 01:27:03 +0300 (EEST) "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com> wrote:
> > > #else /* CONFIG_TRANSPARENT_HUGEPAGE */
> > > +#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> > > +#define HPAGE_PMD_MASK ({ BUILD_BUG(); 0; })
> > > +#define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
> > >
> >
> > We've done this sort of thing before and it blew up. We do want to be
> > able to use things like HPAGE_PMD_foo in global-var initialisers and
> > definitions, but the problem is that BUILD_BUG() can't be used outside
> > functions.
>
> I don't see how it's a blocker. For global variables, we will have to use
> #ifdefs, but the approach is still useful for in-function code.
OK. Current mainline uses BUILD_BUG() here, so I guess the change
won't break anything. Yet.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists