1a9de470cSBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 2a9de470cSBruce Richardson * Copyright(c) 2010-2014 Intel Corporation 3a9de470cSBruce Richardson */ 4a9de470cSBruce Richardson 5a9de470cSBruce Richardson #include <stdio.h> 6a9de470cSBruce Richardson #include <stdint.h> 7a9de470cSBruce Richardson 8a9de470cSBruce Richardson #include <rte_prefetch.h> 9a9de470cSBruce Richardson 10a9de470cSBruce Richardson #include "test.h" 11a9de470cSBruce Richardson 12a9de470cSBruce Richardson /* 13a9de470cSBruce Richardson * Prefetch test 14a9de470cSBruce Richardson * ============= 15a9de470cSBruce Richardson * 16a9de470cSBruce Richardson * - Just test that the macro can be called and validate the compilation. 17a9de470cSBruce Richardson * The test always return success. 18a9de470cSBruce Richardson */ 19a9de470cSBruce Richardson 20a9de470cSBruce Richardson static int test_prefetch(void)21a9de470cSBruce Richardsontest_prefetch(void) 22a9de470cSBruce Richardson { 2350eea2bfSKevin Traynor int a = 0; 24a9de470cSBruce Richardson 25a9de470cSBruce Richardson rte_prefetch0(&a); 26a9de470cSBruce Richardson rte_prefetch1(&a); 27a9de470cSBruce Richardson rte_prefetch2(&a); 28a9de470cSBruce Richardson 2931f83163SHarry van Haaren rte_prefetch0_write(&a); 3031f83163SHarry van Haaren rte_prefetch1_write(&a); 3131f83163SHarry van Haaren rte_prefetch2_write(&a); 3231f83163SHarry van Haaren 334ffc2276SOmkar Maslekar rte_cldemote(&a); 344ffc2276SOmkar Maslekar 35a9de470cSBruce Richardson return 0; 36a9de470cSBruce Richardson } 37a9de470cSBruce Richardson 38*e0a8442cSBruce Richardson REGISTER_FAST_TEST(prefetch_autotest, true, true, test_prefetch); 39