Remove volatile qualifier from testword pointers.

Now we use the atomic read/write functions, these are redundant.
This commit is contained in:
Martin Whitaker 2022-02-19 13:01:42 +00:00
parent 02bcec2418
commit 0e61b1605e
8 changed files with 30 additions and 30 deletions

View File

@ -324,12 +324,12 @@ void error_init(void)
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;
}
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
/* Skip any errrors that appear to be due to the BIOS using location

View File

@ -25,12 +25,12 @@ void error_init(void);
/*
* 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.
*/
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
/*

View File

@ -50,7 +50,7 @@ int test_addr_walk1(int my_cpu)
// Walking one on our first address.
uintptr_t mask1 = sizeof(testword_t);
do {
volatile testword_t *p1 = (testword_t *)(pb | mask1);
testword_t *p1 = (testword_t *)(pb | mask1);
mask1 <<= 1;
if (p1 > (testword_t *)pe) {
break;
@ -61,7 +61,7 @@ int test_addr_walk1(int my_cpu)
// Walking one on our second address.
uintptr_t mask2 = sizeof(testword_t);
do {
volatile testword_t *p2 = (testword_t *)(pb | mask2);
testword_t *p2 = (testword_t *)(pb | mask2);
mask2 <<= 1;
if (p2 == p1) {
continue;

View File

@ -41,8 +41,8 @@ static int pattern_fill(int my_cpu, testword_t pattern)
testword_t *start = vm_map[i].start;
testword_t *end = vm_map[i].end;
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -79,8 +79,8 @@ static int pattern_check(int my_cpu, testword_t pattern)
testword_t *start = vm_map[i].start;
testword_t *end = vm_map[i].end;
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {

View File

@ -42,8 +42,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -100,8 +100,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -135,8 +135,8 @@ int test_mov_inv_fixed(int my_cpu, int iterations, testword_t pattern1, testword
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
volatile testword_t *p = end;
volatile testword_t *ps = end;
testword_t *p = end;
testword_t *ps = end;
bool at_start = false;
do {

View File

@ -51,8 +51,8 @@ int test_mov_inv_random(int my_cpu)
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -87,8 +87,8 @@ int test_mov_inv_random(int my_cpu)
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {

View File

@ -42,8 +42,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, i, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -79,8 +79,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -116,8 +116,8 @@ int test_mov_inv_walk1(int my_cpu, int iterations, int offset, bool inverse)
testword_t *start, *end;
calculate_chunk(&start, &end, my_cpu, j, sizeof(testword_t));
volatile testword_t *p = end;
volatile testword_t *ps = end;
testword_t *p = end;
testword_t *ps = end;
bool at_start = false;
do {

View File

@ -40,8 +40,8 @@ static int pattern_fill(int my_cpu, testword_t offset)
testword_t *start = vm_map[i].start;
testword_t *end = vm_map[i].end;
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {
@ -79,8 +79,8 @@ static int pattern_check(int my_cpu, testword_t offset)
testword_t *start = vm_map[i].start;
testword_t *end = vm_map[i].end;
volatile testword_t *p = start;
volatile testword_t *pe = start;
testword_t *p = start;
testword_t *pe = start;
bool at_end = false;
do {