mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
lib/raid6: replace custom zero page with ZERO_PAGE
Use the system-wide zero page instead of a custom zero page. [herbert@gondor.apana.org.au: update lib/raid6/recov_rvv.c, per Klara] Link: https://lkml.kernel.org/r/aFkUnXWtxcgOTVkw@gondor.apana.org.au Link: https://lkml.kernel.org/r/Z9flJNkWQICx0PXk@gondor.apana.org.au Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Cc: Song Liu <song@kernel.org> Cc: Yu Kuai <yukuai3@huawei.com> Cc: Klara Modin <klarasmodin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
41a7f73768
commit
1857fcc847
@@ -11,8 +11,13 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
extern const char raid6_empty_zero_page[PAGE_SIZE];
|
||||
/* This should be const but the raid6 code is too convoluted for that. */
|
||||
static inline void *raid6_get_zero_page(void)
|
||||
{
|
||||
return page_address(ZERO_PAGE(0));
|
||||
}
|
||||
|
||||
#else /* ! __KERNEL__ */
|
||||
/* Used for testing in user space */
|
||||
@@ -191,6 +196,11 @@ static inline uint32_t raid6_jiffies(void)
|
||||
return tv.tv_sec*1000 + tv.tv_usec/1000;
|
||||
}
|
||||
|
||||
static inline void *raid6_get_zero_page(void)
|
||||
{
|
||||
return raid6_empty_zero_page;
|
||||
}
|
||||
|
||||
#endif /* ! __KERNEL__ */
|
||||
|
||||
#endif /* LINUX_RAID_RAID6_H */
|
||||
|
||||
Reference in New Issue
Block a user