mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
1261961000
Add decompression functions to zlib_dfltcc library. Update zlib_inflate functions with the hooks for s390 hardware support and adjust workspace structures with extra parameter lists required for hardware inflate decompression. Link: http://lkml.kernel.org/r/20200103223334.20669-4-zaslonko@linux.ibm.com Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Co-developed-by: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Chris Mason <clm@fb.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: David Sterba <dsterba@suse.com> Cc: Eduard Shishkin <edward6@linux.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Josef Bacik <josef@toxicpanda.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
40 lines
1.0 KiB
C
40 lines
1.0 KiB
C
/* infutil.h -- types and macros common to blocks and codes
|
|
* Copyright (C) 1995-1998 Mark Adler
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
|
|
/* WARNING: this file should *not* be used by applications. It is
|
|
part of the implementation of the compression library and is
|
|
subject to change. Applications should only use zlib.h.
|
|
*/
|
|
|
|
#ifndef _INFUTIL_H
|
|
#define _INFUTIL_H
|
|
|
|
#include <linux/zlib.h>
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
#include "../zlib_dfltcc/dfltcc.h"
|
|
#include <asm/page.h>
|
|
#endif
|
|
|
|
/* memory allocation for inflation */
|
|
|
|
struct inflate_workspace {
|
|
struct inflate_state inflate_state;
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
struct dfltcc_state dfltcc_state;
|
|
unsigned char working_window[(1 << MAX_WBITS) + PAGE_SIZE];
|
|
#else
|
|
unsigned char working_window[(1 << MAX_WBITS)];
|
|
#endif
|
|
};
|
|
|
|
#ifdef CONFIG_ZLIB_DFLTCC
|
|
/* dfltcc_state must be doubleword aligned for DFLTCC call */
|
|
static_assert(offsetof(struct inflate_workspace, dfltcc_state) % 8 == 0);
|
|
#endif
|
|
|
|
#define WS(strm) ((struct inflate_workspace *)(strm->workspace))
|
|
|
|
#endif
|