Re: [PATCH] FRV: Permit the memory to be located elsewhere in NOMMUmode

From: Linus Torvalds
Date: Mon Oct 29 2007 - 12:29:17 EST




On Mon, 29 Oct 2007, David Howells wrote:
>
> -__page_offset = 0xc0000000; /* start of area covered by struct pages */
> +/* start of area covered by struct pages */
> +#if defined(CONFIG_UCPAGE_OFFSET_20000000)
> +__page_offset = 0x20000000;
> +#elif defined(CONFIG_UCPAGE_OFFSET_40000000)
> +__page_offset = 0x40000000;
...

Please don't do these kinds of things in the source code.

Do them in the Kconfig language where it belongs, and where it makes much
more sense.

See, for example, arch/x86/Kconfig.i386:

config PAGE_OFFSET
hex
default 0xB0000000 if VMSPLIT_3G_OPT
default 0x80000000 if VMSPLIT_2G
default 0x78000000 if VMSPLIT_2G_OPT
default 0x40000000 if VMSPLIT_1G
default 0xC0000000

Notice? Even the syntax is much cleaner!

Linus
-
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/