lib/zlib: add zlib_deflate_dfltcc_enabled() function
Add a new function to zlib.h checking if s390 Deflate-Conversion facility is installed and enabled. Link: http://lkml.kernel.org/r/20200103223334.20669-6-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko <zaslonko@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: Ilya Leoshkevich <iii@linux.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>
This commit is contained in:

committed by
Linus Torvalds

parent
c65e6815db
commit
803521b149
@@ -3,8 +3,6 @@
|
||||
#define DFLTCC_UTIL_H
|
||||
|
||||
#include <linux/zutil.h>
|
||||
#include <asm/facility.h>
|
||||
#include <asm/setup.h>
|
||||
|
||||
/*
|
||||
* C wrapper for the DEFLATE CONVERSION CALL instruction.
|
||||
@@ -24,7 +22,6 @@ typedef enum {
|
||||
#define HBT_CIRCULAR (1 << 7)
|
||||
#define HB_BITS 15
|
||||
#define HB_SIZE (1 << HB_BITS)
|
||||
#define DFLTCC_FACILITY 151
|
||||
|
||||
static inline dfltcc_cc dfltcc(
|
||||
int fn,
|
||||
@@ -101,12 +98,6 @@ static inline int dfltcc_are_params_ok(
|
||||
(strategy == Z_DEFAULT_STRATEGY);
|
||||
}
|
||||
|
||||
static inline int is_dfltcc_enabled(void)
|
||||
{
|
||||
return (zlib_dfltcc_support != ZLIB_DFLTCC_DISABLED &&
|
||||
test_facility(DFLTCC_FACILITY));
|
||||
}
|
||||
|
||||
char *oesc_msg(char *buf, int oesc);
|
||||
|
||||
#endif /* DFLTCC_UTIL_H */
|
||||
|
Reference in New Issue
Block a user