Re: [PATCH 13/20] inflate: (arch) kill silly zlib typedefs

2005-10-31 Thread Geert Uytterhoeven
On Tue, 1 Nov 2005, Willy Tarreau wrote: > But if it's a pointer why don't you declare them unsigned long then ? > C defines the long as the integer the right size to store a pointer. ^ Is it C? Since on Wintendo P64 it's not true... Gr{oetje,eeting}s,

Re: [PATCH 13/20] inflate: (arch) kill silly zlib typedefs

2005-10-31 Thread Willy Tarreau
On Mon, Oct 31, 2005 at 01:14:22PM -0800, Matt Mackall wrote: > On Mon, Oct 31, 2005 at 10:05:15PM +0100, Geert Uytterhoeven wrote: > > On Mon, 31 Oct 2005, Matt Mackall wrote: > > > inflate: remove legacy type definitions from callers > > > > > > This replaces the legacy zlib typedefs and usage w

Re: [PATCH consolidate sys_ptrace

2005-10-31 Thread Christoph Hellwig
On Tue, Nov 01, 2005 at 06:09:00AM +0100, Christoph Hellwig wrote: > [Let's try again now that sys_ptrace returns long everywhere mainline..] > > The sys_ptrace boilerplate code (everything outside the big switch > statement for the arch-specific requests) is shared by most > architectures. This

[PATCH consolidate sys_ptrace

2005-10-31 Thread Christoph Hellwig
[Let's try again now that sys_ptrace returns long everywhere mainline..] The sys_ptrace boilerplate code (everything outside the big switch statement for the arch-specific requests) is shared by most architectures. This patch moves it to kernel/ptrace.c and leaves the arch-specific code as arch_p

Re: [PATCH 1/20] inflate: lindent and manual formatting changes

2005-10-31 Thread Matt Mackall
On Tue, Nov 01, 2005 at 11:24:27AM +1100, Paul Mackerras wrote: > Matt, > > My concern about this series of patches is that it will make it harder > to keep the kernel zlib in sync with the upstream zlib. This code is very long out of sync with the existing upstream zlib in terms of coding style

Re: [PATCH 1/20] inflate: lindent and manual formatting changes

2005-10-31 Thread Paul Mackerras
Matt, My concern about this series of patches is that it will make it harder to keep the kernel zlib in sync with the upstream zlib. Are you signing up to track the upstream zlib and apply any changes made there to the kernel version, for the forseeable future? Paul.

Re: [PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Russell King
On Mon, Oct 31, 2005 at 03:11:21PM -0800, Matt Mackall wrote: > On Mon, Oct 31, 2005 at 11:10:52PM +, Russell King wrote: > > That's what threading is for. 8) > > What's what's threading is for? > > > > I think for ARM, we can simply do -DINITDATA=const, yes? > > > > No, unless you want to m

Re: [PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Matt Mackall
On Mon, Oct 31, 2005 at 11:10:52PM +, Russell King wrote: > That's what threading is for. 8) What's what's threading is for? > > 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

Re: [PATCH 19/20] inflate: (arch) use proper linking

2005-10-31 Thread Russell King
On Mon, Oct 31, 2005 at 03:02:33PM -0800, Matt Mackall wrote: > On Mon, Oct 31, 2005 at 10:45:01PM +, Russell King wrote: > > On Mon, Oct 31, 2005 at 02:54:52PM -0600, Matt Mackall wrote: > > > inflate: remove include of lib/inflate.c and use proper linking > > > > > > - make free_mem_ptr vars

Re: [PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Russell King
On Mon, Oct 31, 2005 at 02:57:46PM -0800, Matt Mackall wrote: > On Mon, Oct 31, 2005 at 10:43:01PM +, 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

Re: [PATCH 19/20] inflate: (arch) use proper linking

2005-10-31 Thread Matt Mackall
On Mon, Oct 31, 2005 at 10:45:01PM +, Russell King wrote: > On Mon, Oct 31, 2005 at 02:54:52PM -0600, Matt Mackall wrote: > > inflate: remove include of lib/inflate.c and use proper linking > > > > - make free_mem_ptr vars nonstatic > > - make gunzip nonstatic > > - add gunzip prototype to new

Re: [PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Matt Mackall
On Mon, Oct 31, 2005 at 10:43:01PM +, 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 suppo

Re: [PATCH 19/20] inflate: (arch) use proper linking

2005-10-31 Thread Russell King
On Mon, Oct 31, 2005 at 02:54:52PM -0600, Matt Mackall wrote: > inflate: remove include of lib/inflate.c and use proper linking > > - make free_mem_ptr vars nonstatic > - make gunzip nonstatic > - add gunzip prototype to new inflate.h > - add per-arch Makefile bits > - change inflate.c includes to

Re: [PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Russell King
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 initi

Re: [PATCH 13/20] inflate: (arch) kill silly zlib typedefs

2005-10-31 Thread Matt Mackall
On Mon, Oct 31, 2005 at 10:05:15PM +0100, Geert Uytterhoeven wrote: > On Mon, 31 Oct 2005, Matt Mackall wrote: > > inflate: remove legacy type definitions from callers > > > > This replaces the legacy zlib typedefs and usage with kernel types in > > all the inflate users. > > > -static ulg free_m

[PATCH 20/20] inflate: make in-core inflate share common CRC

2005-10-31 Thread Matt Mackall
inflate: make in-core inflate share common CRC code Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 2005-10-28 22:04:32.0 -0700 +++ 2.6.14/lib/inflate.c2

[PATCH 7/20] inflate: eliminate memzero usage

2005-10-31 Thread Matt Mackall
inflate: replace call to memzero with simple loop This is the only user of memzero in the inflate code and it's only for 16 bytes. Removing this lets us drop a copy of memzero from most lib/inflate users. Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c ===

[PATCH 19/20] inflate: (arch) use proper linking

2005-10-31 Thread Matt Mackall
inflate: remove include of lib/inflate.c and use proper linking - make free_mem_ptr vars nonstatic - make gunzip nonstatic - add gunzip prototype to new inflate.h - add per-arch Makefile bits - change inflate.c includes to inflate.h includes - change NO_INFLATE_MALLOC to CORE - compile core kernel

[PATCH 17/20] inflate: mark some arrays as initdata

2005-10-31 Thread Matt Mackall
inflate: mark some arrays as INITDATA and define it in in-core callers Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: tiny/init/do_mounts_rd.c === --- tiny.orig/init/do_mounts_rd.c 2005-09-30 23:45:21.0 -0700 ++

[PATCH 16/20] inflate: remove legacy DEBG macros

2005-10-31 Thread Matt Mackall
inflate: remove legacy DEBG macros Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 2005-10-28 22:04:23.0 -0700 +++ 2.6.14/lib/inflate.c2005-10-28 22:04:2

[PATCH 11/20] inflate: (arch) kill get_byte

2005-10-31 Thread Matt Mackall
inflate: replace get_byte with readbyte Each inflate user was providing a get_byte macro that hid the details of tracking the input buffer. This is now handled with new variables in the iostate structure and a callback (most users pass NULL as the entire input is provided in a single buffer). Sig

[PATCH 1/20] inflate: lindent and manual formatting changes

2005-10-31 Thread Matt Mackall
inflate: lindent and general reformatting Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: tiny/lib/inflate.c === --- tiny.orig/lib/inflate.c 2005-09-27 19:31:03.0 -0700 +++ tiny/lib/inflate.c 2005-09-27 19:58:58.0

[PATCH 9/20] inflate: (arch) refactor inflate malloc code

2005-10-31 Thread Matt Mackall
inflate: refactor inflate malloc code Inflate requires some dynamic memory allocation very early in the boot process and this is provided with a set of four functions: malloc/free/gzip_mark/gzip_release. The old inflate code used a mark/release strategy rather than implement free. This new versio

[PATCH 3/20] inflate: clean up input logic

2005-10-31 Thread Matt Mackall
inflate: cleanup input logic Transform ugly macros to inlines Kill mask_bits table Eliminate magic underrun handling (dealt with by getbyte()) Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: tiny/lib/inflate.c === --- tiny.or

Re: [PATCH 13/20] inflate: (arch) kill silly zlib typedefs

2005-10-31 Thread Geert Uytterhoeven
On Mon, 31 Oct 2005, Matt Mackall wrote: > inflate: remove legacy type definitions from callers > > This replaces the legacy zlib typedefs and usage with kernel types in > all the inflate users. > -static ulg free_mem_ptr; > -static ulg free_mem_ptr_end; > +static u32 free_mem_ptr; > +static u32

[PATCH 14/20] inflate: (arch) use an error callback rather than a global

2005-10-31 Thread Matt Mackall
inflate: error handling cleanup This passes the error function as a callback rather than using a global symbol. Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/arch/alpha/boot/misc.c === --- 2.6.14.orig/arch/alpha/boot

[PATCH 12/20] inflate: internalize (arch) most of the output window handling

2005-10-31 Thread Matt Mackall
inflate: internalize most of the output window handling This moves the inflate window definition and handling into lib/inflate.c and rather than calling a global flush_window function, now calls a flush callback. The callback in most callers is also greatly simplified. Signed-off-by: Matt Mackall

[PATCH 8/20] inflate: (arch) kill unneeded declarations

2005-10-31 Thread Matt Mackall
inflate: remove a bunch of declarations/definitions from callers This removes: - memset/memzero/memcpy implementations - OF - STATIC - gzip flag byte defines - unused debug defines and saves an average of 50 lines in each of 12 users. Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.

[PATCH 10/20] inflate: (arch) kill external CRC calculation

2005-10-31 Thread Matt Mackall
inflate: move CRC calculation Each inflate user was doing its own open-coded CRC calculation and initializing its own CRC table. This is now hidden inside lib/inflate.c Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/arch/alpha/boot/misc.c ==

[PATCH 18/20] inflate: minor const changes

2005-10-31 Thread Matt Mackall
inflate: small constant tidy-up Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 2005-10-28 22:04:29.0 -0700 +++ 2.6.14/lib/inflate.c2005-10-28 22:04:31.0 -0700 @@ -52,7 +52,7 @@ The Huffman

[PATCH 6/20] inflate: internalize CRC calculation, cleanup table calculation

2005-10-31 Thread Matt Mackall
inflate: cleanup CRC calculation Move CRC calculation into inflate code Cleanup table calculation code Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 2005-10-28 22:01:

[PATCH 2/20] inflate: kill legacy bits

2005-10-31 Thread Matt Mackall
inflate: kill legacy bits Kill RCSID Kill old includes and defines Kill screwy types Kill unused memory usage tracking Kill 'register' usage Kill unused tracing calls Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: tiny/lib/inflate.c ===

[PATCH 4/20] inflate: start moving globals into iostate

2005-10-31 Thread Matt Mackall
inflate: move globals into a state structure Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 2005-10-28 20:41:17.0 -0700 +++ 2.6.14/lib/inflate.c2005-10-

[PATCH 15/20] inflate: (arch) tidy user declarations

2005-10-31 Thread Matt Mackall
inflate: tidy user declarations Regroup the few remaining gzip-related declarations in users. As the bulk of the users are now _not_ a collection of routines copied from gzip, that comment is removed. Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/arch/alpha/boot/misc.c ==

[PATCH 5/20] inflate: cleanup Huffman table code

2005-10-31 Thread Matt Mackall
inflate: cleanup huffman table code sensible names for huft struct members get rid of assignment-in-expression usage Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/lib/inflate.c === --- 2.6.14.orig/lib/inflate.c 200

[PATCH 13/20] inflate: (arch) kill silly zlib typedefs

2005-10-31 Thread Matt Mackall
inflate: remove legacy type definitions from callers This replaces the legacy zlib typedefs and usage with kernel types in all the inflate users. Signed-off-by: Matt Mackall <[EMAIL PROTECTED]> Index: 2.6.14/arch/alpha/boot/misc.c =