Skip to content

inflate: refactor boot-time inflate code

Matt Mackall linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20inflate: lindent and manual formatting changeslib/inflate.c+883 -8880 replies
2/20inflate: kill legacy bitslib/inflate.c+115 -1650 replies
3/20inflate: clean up input logiclib/inflate.c+94 -1510 replies
4/20inflate: start moving globals into iostatelib/inflate.c+121 -1510 replies
5/20inflate: cleanup Huffman table codelib/inflate.c+63 -550 replies
6/20inflate: internalize CRC calculation, cleanup table calculationlib/inflate.c+22 -430 replies
7/20inflate: eliminate memzero usagelib/inflate.c+3 -10 replies
8/20inflate: (arch) kill unneeded declarationsarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +9 more+8 -6550 replies
9/20inflate: (arch) refactor inflate malloc codearch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +10 more+88 -5110 replies
10/20inflate: (arch) kill external CRC calculationarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +10 more+47 -1040 replies
11/20inflate: (arch) kill get_bytearch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +11 more+75 -2850 replies
12/20inflate: internalize (arch) most of the output window handlingarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +10 more+104 -4020 replies
13/20inflate: (arch) kill silly zlib typedefsarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +9 more+32 -790 replies
14/20inflate: (arch) use an error callback rather than a globalarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +10 more+52 -680 replies
15/20inflate: (arch) tidy user declarationsarch/alpha/boot/misc.c arch/arm/boot/compressed/misc.c arch/arm26/boot/compressed/misc.c +9 more+41 -1300 replies
16/20inflate: remove legacy DEBG macroslib/inflate.c+1 -610 replies
17/20inflate: mark some arrays as initdatainit/do_mounts_rd.c init/initramfs.c lib/inflate.c+10 -50 replies
18/20inflate: minor const changeslib/inflate.c+11 -130 replies
19/20inflate: (arch) use proper linkingarch/alpha/boot/misc.c arch/arm/boot/compressed/Makefile arch/arm/boot/compressed/misc.c +21 more+89 -750 replies
20/20inflate: make in-core inflate share common CRClib/inflate.c+26 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/20] inflate: refactor boot-time inflate code

This is a refactored version of the lib/inflate.c:

- clean up some really ugly code
- clean up atrocities like '#include "../../../lib/inflate.c"'
- drop a ton of cut and paste code from the kernel boot
- move towards making the boot decompressor pluggable
- move towards unifying the multiple inflate implementations
- save space

Recent changes include:

- use proper pointer types for minimal malloc arena
- fix up static const usage to make ARM happy
- fix compile with CONFIG_MODVERSIONS

This touches 11 architectures, which makes things slightly interesting. Rather than break the patches out by arch, I've gone the route of making a number of small incremental changes that sweep across the tree. Patches that touch the per-arch code are marked "(arch)".

I've been primarily testing this on x86, but various versions of this code have gotten testing on a variety of architectures as part of my linux-tiny tree.

(This work was sponsored in part by the CE Linux Forum.)