Re: [PATCH 2/6] FRV: Fix FRV arch compile errors [try #3]

From: Andrew Morton
Date: Thu Jul 06 2006 - 13:35:00 EST


On Thu, 06 Jul 2006 13:47:21 +0100
David Howells <dhowells@xxxxxxxxxx> wrote:

> From: David Howells <dhowells@xxxxxxxxxx>
>
> The attached patch fixes some FRV arch compile errors, including:
>
> (*) Marking nr_kernel_pages as __initdata so that references to it end up
> being properly calculated rather than being assumed to be in the small
> data section (and thus calculated wrt the GP register). Not doing this
> causes the linker to emit errors as the offset is too big to fit into the
> load instruction.

ocrap, I didn't read this bit. Really? We skip the section tag on the
declaration all over the place and keeping them in sync is going to be
quite unreliable due to lack of compiler checking.

> --- a/include/linux/bootmem.h
> +++ b/include/linux/bootmem.h
> @@ -91,7 +91,7 @@ static inline void *alloc_remap(int nid,
> }
> #endif
>
> -extern unsigned long nr_kernel_pages;
> +extern unsigned long __initdata nr_kernel_pages;
> extern unsigned long nr_all_pages;
>
> extern void *__init alloc_large_system_hash(const char *tablename,

So this wants to be __meminitdata. Problem. How does it manifest on FRV?
A linker error or a mysterious crash?
-
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/