public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, schwidefsky@de.ibm.com
Subject: Re: [patch] s390: setup.c cleanup + build fix
Date: Fri, 23 Jun 2006 23:15:35 -0700	[thread overview]
Message-ID: <20060623231535.b368fbda.akpm@osdl.org> (raw)
In-Reply-To: <20060623133122.GJ9446@osiris.boeblingen.de.ibm.com>

On Fri, 23 Jun 2006 15:31:22 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> wrote:

> From: Heiko Carstens <heiko.carstens@de.ibm.com>
> 
> Cleanup & fix 31 bit compilation:
> 
>   CC      arch/s390/kernel/setup.o
> arch/s390/kernel/setup.c:83: error: initializer element is not computable at
>                                     load time
> arch/s390/kernel/setup.c:83: error: (near initialization for
>                                     'code_resource.start')
> Not sure which patch in the -mm tree breaks this, but since this can be
> considered a cleanup it can be merged anyway.
> 

That's strange.

>  /*
> - * Setup options
> - */
> -extern int _text,_etext, _edata, _end;
> -
> -/*
>   * This is set up by the setup-routine at boot-time
>   * for S390 need to find out, what we have to setup
>   * using address 0x10400 ...
> @@ -80,15 +76,11 @@ extern int _text,_etext, _edata, _end;
>  
>  static struct resource code_resource = {
>  	.name  = "Kernel code",
> -	.start = (unsigned long) &_text,
> -	.end = (unsigned long) &_etext - 1,
>  	.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
>  };
>  
>  static struct resource data_resource = {
>  	.name = "Kernel data",
> -	.start = (unsigned long) &_etext,
> -	.end = (unsigned long) &_edata - 1,
>  	.flags = IORESOURCE_BUSY | IORESOURCE_MEM,
>  };
>  
> @@ -422,6 +414,11 @@ setup_resources(void)
>  	struct resource *res;
>  	int i;
>  
> +	code_resource.start = (unsigned long) &_text;
> +	code_resource.end = (unsigned long) &_etext - 1;
> +	data_resource.start = (unsigned long) &_etext;
> +	data_resource.end = (unsigned long) &_edata - 1;
> +
>  	for (i = 0; i < MEMORY_CHUNKS && memory_chunk[i].size > 0; i++) {
>  		res = alloc_bootmem_low(sizeof(struct resource));
>  		res->flags = IORESOURCE_BUSY | IORESOURCE_MEM;

The linker should be able to handle all that.  I wonder why it didn't.

And it works for me.  What is "31 bit compilation"?

  reply	other threads:[~2006-06-24  6:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-23 13:31 [patch] s390: setup.c cleanup + build fix Heiko Carstens
2006-06-24  6:15 ` Andrew Morton [this message]
2006-06-24  7:45   ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060623231535.b368fbda.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox