13 Mar, 2010

2 commits

  • inflate_fast() can do either POST INC or PRE INC on its pointers walking
    the memory to decompress. Default is PRE INC.

    The sout pointer offset was miscalculated in one case as the calculation
    assumed sout was a char * This breaks inflate_fast() iff configured to do
    POST INC.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     
  • Commit 6846ee5ca68d81e6baccf0d56221d7a00c1be18b ("zlib: Fix build of
    powerpc boot wrapper") made the new optimized inflate only available on
    arch's that define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS.

    This patch will again enable the optimization for all arch's by defining
    our own endian independent version of unaligned access. As an added
    bonus, arch's that define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS do a
    plain load instead.

    Signed-off-by: Joakim Tjernlund
    Cc: Anton Blanchard
    Cc: Benjamin Herrenschmidt
    Cc: David Woodhouse
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     

14 Jan, 2010

1 commit

  • Commit ac4c2a3bbe5db5fc570b1d0ee1e474db7cb22585 broke the build
    of all powerpc boot wrappers.

    It attempts to add an include of autoconf.h but used the wrong
    path for it. It also adds -D__KERNEL__ to our boot wrapper, both
    things that we pretty much didn't do on purpose so far.

    We want our boot wrapper to remain independent enough of the kernel
    for various reasons, one of them being that you can "wrap" an existing
    kernel at distro install time which allows to ship one kernel image
    and a set of boot wrappers for different platforms, the wrappers
    don't have to be built out of the same kernel build tree.

    It's also incorrect to do what the patch does in our boot environment
    since we may not have a proper alignment exception handler which means
    we may not be able to fixup the few cases where an unaligned access will
    need SW emulation (depends on the core variant, could be when crossing
    page or segment boundaries for example).

    This patch fixes it by putting the old code back in and using the
    new "fancy" variant only when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
    is set, which happens not to be set on powerpc since we don't include
    autoconf.h. It also reverts the changes to our boot wrapper Makefile.

    This means that x86 should, afaik, keep the optimisations since its
    boot wrapper does include autoconf.h and define __KERNEL__ (though I
    doubt they make that much different outside of slow embedded processors).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

12 Jan, 2010

1 commit

  • JFFS2 uses lesser compression ratio and inflate always ends up in "copy
    direct from output" case.

    This patch tries to optimize the direct copy procedure. Uses
    get_unaligned() but only in one place.

    The copy loop just above this one can also use this optimization, but I
    havn't done so as I have not tested if it is a win there too.

    On my MPC8321 this is about 17% faster on my JFFS2 root FS than the
    original.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joakim Tjernlund
    Cc: Roel Kluin
    Cc: Richard Purdie
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     

05 Jan, 2009

1 commit

  • Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code

    This is the first part of the bzip2/lzma patch

    The bzip patch is based on an idea by Christian Ludwig, includes support for
    compressing the kernel with bzip2 or lzma rather than gzip. Both
    compressors give smaller sizes than gzip. Lzma's decompresses faster
    than bzip2.

    It also supports ramdisks and initramfs' compressed using these two
    compressors.

    The functionality has been successfully used for a couple of years by
    the udpcast project

    This version applies to "tip" kernel 2.6.28

    This part contains:
    - changed inflate.c to accomodate rest of patch
    - implementation of bzip2 compression (not used at this stage yet)
    - implementation of lzma compression (not used at this stage yet)
    - Makefile routines to support bzip2 and lzma kernel compression

    Signed-off-by: Alain Knaff
    Signed-off-by: H. Peter Anvin

    Alain Knaff
     

12 Oct, 2007

1 commit


11 Oct, 2007

1 commit


08 May, 2007

1 commit

  • The last zlib_inflate update broke certain corner cases for ppp_deflate
    decompression handling. This patch fixes some logic to make things work
    properly again. Users other than ppp_deflate (the only Z_PACKET_FLUSH
    user) should be unaffected.

    Fixes bug 8405 (confirmed by Stefan)

    Signed-off-by: Richard Purdie
    Cc: Stefan Wenk
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     

01 Aug, 2006

1 commit

  • The recent zlib update (commit 4f3865fb57a04db7cca068fed1c15badc064a302)
    broke ppc32 zImage decompression as it tries to decompress to address zero
    and the updated zlib_inflate checks that strm->next_out isn't a null
    pointer.

    This little patch fixes it.

    [rpurdie@rpsys.net: add comment]
    Signed-off-by: Peter Korsgaard
    Acked-by: Tom Rini
    Signed-off-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Korsgaard
     

28 Jun, 2006

1 commit

  • Fix function definitions to be ANSI-compliant:
    lib/zlib_inflate/inffast.c:68:1: warning: non-ANSI definition of function 'inflate_fast'
    lib/zlib_inflate/inftrees.c:33:1: warning: non-ANSI definition of function 'zlib_inflate_table'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

27 Jun, 2006

1 commit


23 Jun, 2006

1 commit

  • Upgrade the zlib_inflate implementation in the kernel from a patched
    version 1.1.3/4 to a patched 1.2.3.

    The code in the kernel is about seven years old and I noticed that the
    external zlib library's inflate performance was significantly faster (~50%)
    than the code in the kernel on ARM (and faster again on x86_32).

    For comparison the newer deflate code is 20% slower on ARM and 50% slower
    on x86_32 but gives an approx 1% compression ratio improvement. I don't
    consider this to be an improvement for kernel use so have no plans to
    change the zlib_deflate code.

    Various changes have been made to the zlib code in the kernel, the most
    significant being the extra functions/flush option used by ppp_deflate.
    This update reimplements the features PPP needs to ensure it continues to
    work.

    This code has been tested on ARM under both JFFS2 (with zlib compression
    enabled) and ppp_deflate and on x86_32. JFFS2 sees an approx. 10% real
    world file read speed improvement.

    This patch also removes ZLIB_VERSION as it no longer has a correct value.
    We don't need version checks anyway as the kernel's module handling will
    take care of that for us. This removal is also more in keeping with the
    zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24) and I've
    added something to the zlib.h header to note its a modified version.

    Signed-off-by: Richard Purdie
    Acked-by: Joern Engel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     

11 Jan, 2006

1 commit

  • This patch contains the following possible cleanups:
    - #if 0 the following unused functions:
    - zlib_deflate/deflate.c: zlib_deflateSetDictionary
    - zlib_deflate/deflate.c: zlib_deflateParams
    - zlib_deflate/deflate.c: zlib_deflateCopy
    - zlib_inflate/infblock.c: zlib_inflate_set_dictionary
    - zlib_inflate/infblock.c: zlib_inflate_blocks_sync_point
    - zlib_inflate/inflate_sync.c: zlib_inflateSync
    - zlib_inflate/inflate_sync.c: zlib_inflateSyncPoint
    - remove the following unneeded EXPORT_SYMBOL's:
    - zlib_deflate/deflate_syms.c: zlib_deflateCopy
    - zlib_deflate/deflate_syms.c: zlib_deflateParams
    - zlib_inflate/inflate_syms.c: zlib_inflateSync
    - zlib_inflate/inflate_syms.c: zlib_inflateSyncPoint

    Signed-off-by: Adrian Bunk
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

29 Oct, 2005

1 commit


18 Aug, 2005

1 commit

  • It turns out that empty distance code tables are not an error, and that
    a compressed block with only literals can validly have an empty table
    and should not be flagged as a data error.

    Some old versions of gzip had problems with this case, but it does not
    affect the zlib code in the kernel.

    Analysis and explanations thanks to Sergey Vlasov

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Aug, 2005

1 commit

  • These bugs have been fixed in the standard zlib for a while.

    See for example

    a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html
    b) http://bugs.gentoo.org/show_bug.cgi?id=94584

    Signed-off-by: Tim Yamin
    Signed-off-by: Tavis Ormandy
    Signed-off-by: Linus Torvalds

    Tim Yamin
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds