Re: [PATCH 1/2] - Map UV chipset space - pagetable

From: Ingo Molnar
Date: Thu Jul 10 2008 - 04:57:59 EST



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Tue, 1 Jul 2008 14:45:32 -0500 Jack Steiner <steiner@xxxxxxx> wrote:
>
> > + BUG_ON((phys & ~PMD_MASK) || (size & ~PMD_MASK));
>
> BUG_ON(A || B) is usually a bad idea. If it goes bang, you'll really wish
> that it had been
>
> BUG_ON(A);
> BUG_ON(B);

if you check how it's used:

+ init_extra_mapping_uc(UV_GLOBAL_MMR32_BASE, UV_GLOBAL_MMR32_SIZE);
+ init_extra_mapping_uc(UV_LOCAL_MMR_BASE, UV_LOCAL_MMR_SIZE);

those base/size pairs are really supposed to be aligned on 2MB. I.e.
this is a really 'impossible' scenario that is not really driven by any
external factor (hw or driver detail) and a compact check for it is
acceptable too.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/