mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 01:59:51 +02:00
Add checks for memblock_alloc_from for default allocation direction.
The tested scenarios are:
- Not enough space to allocate memory at the minimal address
- Minimal address parameter is smaller than the start address
of the available memory
- Minimal address is too close to the available memory
Add simple memblock_alloc_from test that can be used to test both
allocation directions (minimal address is aligned or misaligned).
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/3dd645f437975fd393010b95b8faa85d2b86490a.1646055639.git.karolinadrobnik@gmail.com
9 lines
187 B
C
9 lines
187 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef _MEMBLOCK_ALLOC_HELPERS_H
|
|
#define _MEMBLOCK_ALLOC_HELPERS_H
|
|
|
|
#include "common.h"
|
|
|
|
int memblock_alloc_helpers_checks(void);
|
|
|
|
#endif
|