linux/lib/math/test_div64.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021  Maciej W. Rozycki
 */

#define pr_fmt(fmt)

#include <linux/init.h>
#include <linux/ktime.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/time64.h>
#include <linux/types.h>

#include <asm/div64.h>

#define TEST_DIV64_N_ITER

static const u64 test_div64_dividends[] =;
#define SIZE_DIV64_DIVIDENDS

#define TEST_DIV64_DIVISOR_0
#define TEST_DIV64_DIVISOR_1
#define TEST_DIV64_DIVISOR_2
#define TEST_DIV64_DIVISOR_3
#define TEST_DIV64_DIVISOR_4
#define TEST_DIV64_DIVISOR_5
#define TEST_DIV64_DIVISOR_6
#define TEST_DIV64_DIVISOR_7
#define TEST_DIV64_DIVISOR_8

static const u32 test_div64_divisors[] =;
#define SIZE_DIV64_DIVISORS

static const struct {} test_div64_results[SIZE_DIV64_DIVISORS][SIZE_DIV64_DIVIDENDS] =;

static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j)
{}

/*
 * This needs to be a macro, because we don't want to rely on the compiler
 * to do constant propagation, and `do_div' may take a different path for
 * constants, so we do want to verify that as well.
 */
#define test_div64_one(dividend, divisor, i, j)

/*
 * Run calculation for the same divisor value expressed as a constant
 * and as a variable, so as to verify the implementation for both cases
 * should they be handled by different code execution paths.
 */
static bool __init test_div64(void)
{}

static int __init test_div64_init(void)
{}

static void __exit test_div64_exit(void)
{}

module_init();
module_exit(test_div64_exit);

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();