mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Remove volatile qualifier from testword pointers.
Now we use the atomic read/write functions, these are redundant.
This commit is contained in:
parent
02bcec2418
commit
0e61b1605e
@ -324,12 +324,12 @@ void error_init(void)
|
|||||||
error_count = 0;
|
error_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void addr_error(volatile testword_t *addr1, volatile testword_t *addr2, testword_t good, testword_t bad)
|
void addr_error(testword_t *addr1, testword_t *addr2, testword_t good, testword_t bad)
|
||||||
{
|
{
|
||||||
common_err(ADDR_ERROR, (uintptr_t)addr1, good, bad, false); (void)addr2;
|
common_err(ADDR_ERROR, (uintptr_t)addr1, good, bad, false); (void)addr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void data_error(volatile testword_t *addr, testword_t good, testword_t bad, bool use_for_badram)
|
void data_error(testword_t *addr, testword_t good, testword_t bad, bool use_for_badram)
|
||||||
{
|
{
|
||||||
#if USB_WORKAROUND
|
#if USB_WORKAROUND
|
||||||
/* Skip any errrors that appear to be due to the BIOS using location
|
/* Skip any errrors that appear to be due to the BIOS using location
|
||||||
|
@ -25,12 +25,12 @@ void error_init(void);
|
|||||||
/*
|
/*
|
||||||
* Adds an address error to the error reports.
|
* Adds an address error to the error reports.
|
||||||
*/
|
*/
|
||||||
void addr_error(volatile testword_t *addr1, volatile testword_t *addr2, testword_t good, testword_t bad);
|
void addr_error(testword_t *addr1, testword_t *addr2, testword_t good, testword_t bad);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adds a data error to the error reports.
|
* Adds a data error to the error reports.
|
||||||
*/
|
*/
|
||||||
void data_error(volatile testword_t *addr, testword_t good, testword_t bad, bool use_for_badram);
|
void data_error(testword_t *addr, testword_t good, testword_t bad, bool use_for_badram);
|
||||||
|
|
||||||
#if REPORT_PARITY_ERRORS
|
#if REPORT_PARITY_ERRORS
|
||||||
/*
|
/*
|
||||||
|
@ -50,7 +50,7 @@ int test_addr_walk1(int my_cpu)
|
|||||||
// Walking one on our first address.
|
// Walking one on our first address.
|
||||||
uintptr_t mask1 = sizeof(testword_t);
|
uintptr_t mask1 = sizeof(testword_t);
|
||||||
do {
|
do {
|
||||||
volatile testword_t *p1 = (testword_t *)(pb | mask1);
|
testword_t *p1 = (testword_t *)(pb | mask1);
|
||||||
mask1 <<= 1;
|
mask1 <<= 1;
|
||||||
if (p1 > (testword_t *)pe) {
|
if (p1 > (testword_t *)pe) {
|
||||||
break;
|
break;
|
||||||
@ -61,7 +61,7 @@ int test_addr_walk1(int my_cpu)
|
|||||||
// Walking one on our second address.
|
// Walking one on our second address.
|
||||||
uintptr_t mask2 = sizeof(testword_t);
|
uintptr_t mask2 = sizeof(testword_t);
|
||||||
do {
|
do {
|
||||||
volatile testword_t *p2 = (testword_t *)(pb | mask2);
|
testword_t *p2 = (testword_t *)(pb | mask2);
|
||||||
mask2 <<= 1;
|
mask2 <<= 1;
|
||||||
if (p2 == p1) {
|
if (p2 == p1) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -41,8 +41,8 @@ static int pattern_fill(int my_cpu, testword_t pattern)
|
|||||||
testword_t *start = vm_map[i].start;
|
testword_t *start = vm_map[i].start;
|
||||||
testword_t *end = vm_map[i].end;
|
testword_t *end = vm_map[i].end;
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -79,8 +79,8 @@ static int pattern_check(int my_cpu, testword_t pattern)
|
|||||||
testword_t *start = vm_map[i].start;
|
testword_t *start = vm_map[i].start;
|
||||||
testword_t *end = vm_map[i].end;
|
testword_t *end = vm_map[i].end;
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
|
@ -42,8 +42,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -100,8 +100,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -135,8 +135,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = end;
|
testword_t *p = end;
|
||||||
volatile testword_t *ps = end;
|
testword_t *ps = end;
|
||||||
|
|
||||||
bool at_start = false;
|
bool at_start = false;
|
||||||
do {
|
do {
|
||||||
|
@ -51,8 +51,8 @@ int test_mov_inv_random(int my_cpu)
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -87,8 +87,8 @@ int test_mov_inv_random(int my_cpu)
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
|
@ -42,8 +42,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -79,8 +79,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -116,8 +116,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
|
|||||||
testword_t *start, *end;
|
testword_t *start, *end;
|
||||||
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
|
||||||
|
|
||||||
volatile testword_t *p = end;
|
testword_t *p = end;
|
||||||
volatile testword_t *ps = end;
|
testword_t *ps = end;
|
||||||
|
|
||||||
bool at_start = false;
|
bool at_start = false;
|
||||||
do {
|
do {
|
||||||
|
@ -40,8 +40,8 @@ static int pattern_fill(int my_cpu, testword_t offset)
|
|||||||
testword_t *start = vm_map[i].start;
|
testword_t *start = vm_map[i].start;
|
||||||
testword_t *end = vm_map[i].end;
|
testword_t *end = vm_map[i].end;
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
@ -79,8 +79,8 @@ static int pattern_check(int my_cpu, testword_t offset)
|
|||||||
testword_t *start = vm_map[i].start;
|
testword_t *start = vm_map[i].start;
|
||||||
testword_t *end = vm_map[i].end;
|
testword_t *end = vm_map[i].end;
|
||||||
|
|
||||||
volatile testword_t *p = start;
|
testword_t *p = start;
|
||||||
volatile testword_t *pe = start;
|
testword_t *pe = start;
|
||||||
|
|
||||||
bool at_end = false;
|
bool at_end = false;
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user