| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2015, Michael Neuling, IBM Corp. |
|---|
| 3 | | - * Licensed under GPLv2. |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * Original: Michael Neuling 3/4/2014 |
|---|
| 6 | 6 | * Modified: Rashmica Gupta 8/12/2015 |
|---|
| .. | .. |
|---|
| 21 | 21 | * (a) begin transaction |
|---|
| 22 | 22 | * (b) abort transaction |
|---|
| 23 | 23 | * (c) check TEXASR to see if FS has been corrupted |
|---|
| 24 | | - * |
|---|
| 25 | 24 | */ |
|---|
| 26 | 25 | |
|---|
| 27 | 26 | #define _GNU_SOURCE |
|---|
| .. | .. |
|---|
| 34 | 33 | #include "utils.h" |
|---|
| 35 | 34 | #include "tm.h" |
|---|
| 36 | 35 | |
|---|
| 37 | | -int num_loops = 10000; |
|---|
| 36 | +int num_loops = 1000000; |
|---|
| 38 | 37 | int passed = 1; |
|---|
| 39 | 38 | |
|---|
| 40 | 39 | void tfiar_tfhar(void *in) |
|---|
| 41 | 40 | { |
|---|
| 42 | | - int i, cpu; |
|---|
| 43 | 41 | unsigned long tfhar, tfhar_rd, tfiar, tfiar_rd; |
|---|
| 44 | | - cpu_set_t cpuset; |
|---|
| 45 | | - |
|---|
| 46 | | - CPU_ZERO(&cpuset); |
|---|
| 47 | | - cpu = (unsigned long)in >> 1; |
|---|
| 48 | | - CPU_SET(cpu, &cpuset); |
|---|
| 49 | | - sched_setaffinity(0, sizeof(cpuset), &cpuset); |
|---|
| 42 | + int i; |
|---|
| 50 | 43 | |
|---|
| 51 | 44 | /* TFIAR: Last bit has to be high so userspace can read register */ |
|---|
| 52 | 45 | tfiar = ((unsigned long)in) + 1; |
|---|