iommu/io-pgtable-arm: Restore selftest_running

This variable is used by upstream. Restore it.

Change-Id: I9742a4eb2f9708d02223fac12b831c096d901499
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
This commit is contained in:
Patrick Daly 2016-02-10 17:25:49 -08:00 committed by David Keitel
parent 78d8595253
commit 2024cabb4d

View file

@ -206,6 +206,8 @@ struct arm_lpae_io_pgtable {
typedef u64 arm_lpae_iopte; typedef u64 arm_lpae_iopte;
static bool selftest_running = false;
/* /*
* We'll use some ignored bits in table entries to keep track of the number * We'll use some ignored bits in table entries to keep track of the number
* of page mappings beneath the table. The maximum number of entries * of page mappings beneath the table. The maximum number of entries
@ -1190,6 +1192,7 @@ static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
#define __FAIL(ops, i) ({ \ #define __FAIL(ops, i) ({ \
WARN(1, "selftest: test failed for fmt idx %d\n", (i)); \ WARN(1, "selftest: test failed for fmt idx %d\n", (i)); \
arm_lpae_dump_ops(ops); \ arm_lpae_dump_ops(ops); \
selftest_running = false; \
suppress_map_failures = false; \ suppress_map_failures = false; \
-EFAULT; \ -EFAULT; \
}) })
@ -1243,6 +1246,8 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
size_t size; size_t size;
struct io_pgtable_ops *ops; struct io_pgtable_ops *ops;
selftest_running = true;
for (i = 0; i < ARRAY_SIZE(fmts); ++i) { for (i = 0; i < ARRAY_SIZE(fmts); ++i) {
unsigned long test_sg_sizes[] = { SZ_4K, SZ_64K, SZ_2M, unsigned long test_sg_sizes[] = { SZ_4K, SZ_64K, SZ_2M,
SZ_1M * 12, SZ_1M * 20 }; SZ_1M * 12, SZ_1M * 20 };