public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Matt Mackall <mpm@selenic.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH 17/20] inflate: mark some arrays as initdata
Date: Mon, 31 Oct 2005 23:10:52 +0000	[thread overview]
Message-ID: <20051031231052.GA1710@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20051031225746.GD4367@waste.org>

On Mon, Oct 31, 2005 at 02:57:46PM -0800, Matt Mackall wrote:
> On Mon, Oct 31, 2005 at 10:43:01PM +0000, Russell King wrote:
> > On Mon, Oct 31, 2005 at 02:54:51PM -0600, Matt Mackall wrote:
> > > inflate: mark some arrays as INITDATA and define it in in-core callers
> > 
> > This breaks ARM.  Our decompressor has some rather odd requirements
> > due to the way we support PIC - it's PIC text with fixed data.
> > 
> > This means that all fixed initialised data must be "const" or initialised
> > by code.  This patch breaks that assertion.
> 
> It would have been helpful if you quoted the patch.

That's what threading is for. 8)

> +#ifndef INITDATA
> +#define INITDATA
> +#endif
> ...
> -static const u16 cplens[] = {
> +static INITDATA u16 cplens[] = {
>         3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
>         35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
>  };
> 
> etc..
> 
> I think for ARM, we can simply do -DINITDATA=const, yes?

No, unless you want to make this const:

-static u8 window[0x8000]; /* use a statically allocated window */
+static u8 INITDATA window[0x8000]; /* use a statically allocated window */

It shouldn't be marked INITDATA either anyway - it's uninitialised so
it'll end up in the BSS.  There is no "discarded at runtime" BSS so
anything you want to place in a non-BSS section has to be initialised.

Of course, if you initialise it, you end up needlessly adding 32K to
the kernel image size...

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-10-31 23:10 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 20:54 [PATCH 1/20] inflate: lindent and manual formatting changes Matt Mackall
2005-10-31 20:54 ` [PATCH 2/20] inflate: kill legacy bits Matt Mackall
2005-10-31 20:54   ` [PATCH 3/20] inflate: clean up input logic Matt Mackall
2005-10-31 20:54     ` [PATCH 4/20] inflate: start moving globals into iostate Matt Mackall
2005-10-31 20:54       ` [PATCH 5/20] inflate: cleanup Huffman table code Matt Mackall
2005-10-31 20:54         ` [PATCH 6/20] inflate: internalize CRC calculation, cleanup table calculation Matt Mackall
2005-10-31 20:54           ` [PATCH 7/20] inflate: eliminate memzero usage Matt Mackall
2005-10-31 20:54             ` [PATCH 8/20] inflate: (arch) kill unneeded declarations Matt Mackall
2005-10-31 20:54               ` [PATCH 9/20] inflate: (arch) refactor inflate malloc code Matt Mackall
2005-10-31 20:54                 ` [PATCH 10/20] inflate: (arch) kill external CRC calculation Matt Mackall
2005-10-31 20:54                   ` [PATCH 11/20] inflate: (arch) kill get_byte Matt Mackall
2005-10-31 20:54                     ` [PATCH 12/20] inflate: internalize (arch) most of the output window handling Matt Mackall
2005-10-31 20:54                       ` [PATCH 13/20] inflate: (arch) kill silly zlib typedefs Matt Mackall
2005-10-31 20:54                         ` [PATCH 14/20] inflate: (arch) use an error callback rather than a global Matt Mackall
2005-10-31 20:54                           ` [PATCH 15/20] inflate: (arch) tidy user declarations Matt Mackall
2005-10-31 20:54                             ` [PATCH 16/20] inflate: remove legacy DEBG macros Matt Mackall
2005-10-31 20:54                               ` [PATCH 17/20] inflate: mark some arrays as initdata Matt Mackall
2005-10-31 20:54                                 ` [PATCH 18/20] inflate: minor const changes Matt Mackall
2005-10-31 20:54                                   ` [PATCH 19/20] inflate: (arch) use proper linking Matt Mackall
2005-10-31 20:54                                     ` [PATCH 20/20] inflate: make in-core inflate share common CRC Matt Mackall
2005-10-31 22:45                                     ` [PATCH 19/20] inflate: (arch) use proper linking Russell King
2005-10-31 23:02                                       ` Matt Mackall
2005-10-31 23:13                                         ` Russell King
2005-10-31 22:43                                 ` [PATCH 17/20] inflate: mark some arrays as initdata Russell King
2005-10-31 22:57                                   ` Matt Mackall
2005-10-31 23:10                                     ` Russell King [this message]
2005-10-31 23:11                                       ` Matt Mackall
2005-10-31 23:36                                         ` Russell King
2005-10-31 21:05                         ` [PATCH 13/20] inflate: (arch) kill silly zlib typedefs Geert Uytterhoeven
2005-10-31 21:14                           ` Matt Mackall
2005-11-01  6:53                             ` Willy Tarreau
2005-11-01  7:50                               ` Geert Uytterhoeven
2005-11-01  8:57                                 ` Willy Tarreau
2005-11-01 11:27                                   ` Geert Uytterhoeven
2005-11-08  6:05                                   ` Miles Bader
2005-11-08  6:18                                     ` Willy Tarreau
2005-11-01  0:24 ` [PATCH 1/20] inflate: lindent and manual formatting changes Paul Mackerras
2005-11-01  1:39   ` Matt Mackall
2005-11-01  7:50     ` Rob Landley
2005-11-01 18:28 ` Oops! Forgot [PATCH 0/20] inflate cleanups Matt Mackall
  -- strict thread matches above, loose matches on Subject: below --
2005-12-22 18:26 [PATCH 16/20] inflate: remove legacy DEBG macros Matt Mackall
2005-12-22 18:26 ` [PATCH 17/20] inflate: mark some arrays as initdata Matt Mackall

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=20051031231052.GA1710@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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