@@ -1975,7 +1975,7 @@ static void rcu_torture_reader_do_mbchk(long myid, struct rcu_torture *rtp,
1975
1975
1976
1976
// Verify the specified RCUTORTURE_RDR* state.
1977
1977
#define ROEC_ARGS "%s %s: Current %#x To add %#x To remove %#x preempt_count() %#x\n", __func__, s, curstate, new, old, preempt_count()
1978
- static void rcutorture_one_extend_check (char * s , int curstate , int new , int old , bool insoftirq )
1978
+ static void rcutorture_one_extend_check (char * s , int curstate , int new , int old )
1979
1979
{
1980
1980
int mask ;
1981
1981
@@ -2038,8 +2038,7 @@ static void rcutorture_one_extend_check(char *s, int curstate, int new, int old,
2038
2038
* beginning or end of the critical section and if there was actually a
2039
2039
* change, do a ->read_delay().
2040
2040
*/
2041
- static void rcutorture_one_extend (int * readstate , int newstate , bool insoftirq ,
2042
- struct torture_random_state * trsp ,
2041
+ static void rcutorture_one_extend (int * readstate , int newstate , struct torture_random_state * trsp ,
2043
2042
struct rt_read_seg * rtrsp )
2044
2043
{
2045
2044
bool first ;
@@ -2054,7 +2053,7 @@ static void rcutorture_one_extend(int *readstate, int newstate, bool insoftirq,
2054
2053
first = idxold1 == 0 ;
2055
2054
WARN_ON_ONCE (idxold2 < 0 );
2056
2055
WARN_ON_ONCE (idxold2 & ~(RCUTORTURE_RDR_ALLBITS | RCUTORTURE_RDR_UPDOWN ));
2057
- rcutorture_one_extend_check ("before change" , idxold1 , statesnew , statesold , insoftirq );
2056
+ rcutorture_one_extend_check ("before change" , idxold1 , statesnew , statesold );
2058
2057
rtrsp -> rt_readstate = newstate ;
2059
2058
2060
2059
/* First, put new protection in place to avoid critical-section gap. */
@@ -2074,8 +2073,7 @@ static void rcutorture_one_extend(int *readstate, int newstate, bool insoftirq,
2074
2073
idxnew2 = (cur_ops -> readlock () << RCUTORTURE_RDR_SHIFT_2 ) & RCUTORTURE_RDR_MASK_2 ;
2075
2074
2076
2075
// Complain unless both the old and the new protection is in place.
2077
- rcutorture_one_extend_check ("during change" ,
2078
- idxold1 | statesnew , statesnew , statesold , insoftirq );
2076
+ rcutorture_one_extend_check ("during change" , idxold1 | statesnew , statesnew , statesold );
2079
2077
2080
2078
// Sample CPU under both sets of protections to reduce confusion.
2081
2079
if (IS_ENABLED (CONFIG_RCU_TORTURE_TEST_LOG_CPU )) {
@@ -2150,7 +2148,7 @@ static void rcutorture_one_extend(int *readstate, int newstate, bool insoftirq,
2150
2148
WARN_ON_ONCE (* readstate < 0 );
2151
2149
if (WARN_ON_ONCE (* readstate & ~RCUTORTURE_RDR_ALLBITS ))
2152
2150
pr_info ("Unexpected readstate value of %#x\n" , * readstate );
2153
- rcutorture_one_extend_check ("after change" , * readstate , statesnew , statesold , insoftirq );
2151
+ rcutorture_one_extend_check ("after change" , * readstate , statesnew , statesold );
2154
2152
}
2155
2153
2156
2154
/* Return the biggest extendables mask given current RCU and boot parameters. */
@@ -2217,8 +2215,7 @@ rcutorture_extend_mask(int oldmask, struct torture_random_state *trsp)
2217
2215
* critical section.
2218
2216
*/
2219
2217
static struct rt_read_seg *
2220
- rcutorture_loop_extend (int * readstate , bool insoftirq , struct torture_random_state * trsp ,
2221
- struct rt_read_seg * rtrsp )
2218
+ rcutorture_loop_extend (int * readstate , struct torture_random_state * trsp , struct rt_read_seg * rtrsp )
2222
2219
{
2223
2220
int i ;
2224
2221
int j ;
@@ -2233,7 +2230,7 @@ rcutorture_loop_extend(int *readstate, bool insoftirq, struct torture_random_sta
2233
2230
for (j = 0 ; j < i ; j ++ ) {
2234
2231
mask = rcutorture_extend_mask (* readstate , trsp );
2235
2232
WARN_ON_ONCE (mask & RCUTORTURE_RDR_UPDOWN );
2236
- rcutorture_one_extend (readstate , mask , insoftirq , trsp , & rtrsp [j ]);
2233
+ rcutorture_one_extend (readstate , mask , trsp , & rtrsp [j ]);
2237
2234
}
2238
2235
return & rtrsp [j ];
2239
2236
}
@@ -2279,7 +2276,7 @@ static bool rcu_torture_one_read_start(struct rcu_torture_one_read_state *rtorsp
2279
2276
(rtorsp -> readstate & RCUTORTURE_RDR_UPDOWN ));
2280
2277
if (rtorsp -> p == NULL ) {
2281
2278
/* Wait for rcu_torture_writer to get underway */
2282
- rcutorture_one_extend (& rtorsp -> readstate , 0 , myid < 0 , trsp , rtorsp -> rtrsp );
2279
+ rcutorture_one_extend (& rtorsp -> readstate , 0 , trsp , rtorsp -> rtrsp );
2283
2280
return false;
2284
2281
}
2285
2282
if (rtorsp -> p -> rtort_mbtest == 0 )
@@ -2293,7 +2290,7 @@ static bool rcu_torture_one_read_start(struct rcu_torture_one_read_state *rtorsp
2293
2290
* critical sections and check for errors.
2294
2291
*/
2295
2292
static void rcu_torture_one_read_end (struct rcu_torture_one_read_state * rtorsp ,
2296
- struct torture_random_state * trsp , long myid )
2293
+ struct torture_random_state * trsp )
2297
2294
{
2298
2295
int i ;
2299
2296
unsigned long completed ;
@@ -2340,7 +2337,7 @@ static void rcu_torture_one_read_end(struct rcu_torture_one_read_state *rtorsp,
2340
2337
}
2341
2338
if (cur_ops -> reader_blocked )
2342
2339
preempted = cur_ops -> reader_blocked ();
2343
- rcutorture_one_extend (& rtorsp -> readstate , 0 , myid < 0 , trsp , rtorsp -> rtrsp );
2340
+ rcutorture_one_extend (& rtorsp -> readstate , 0 , trsp , rtorsp -> rtrsp );
2344
2341
WARN_ON_ONCE (rtorsp -> readstate );
2345
2342
// This next splat is expected behavior if leakpointer, especially
2346
2343
// for CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels.
@@ -2370,13 +2367,13 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
2370
2367
init_rcu_torture_one_read_state (& rtors , trsp );
2371
2368
newstate = rcutorture_extend_mask (rtors .readstate , trsp );
2372
2369
WARN_ON_ONCE (newstate & RCUTORTURE_RDR_UPDOWN );
2373
- rcutorture_one_extend (& rtors .readstate , newstate , myid < 0 , trsp , rtors .rtrsp ++ );
2370
+ rcutorture_one_extend (& rtors .readstate , newstate , trsp , rtors .rtrsp ++ );
2374
2371
if (!rcu_torture_one_read_start (& rtors , trsp , myid )) {
2375
- rcutorture_one_extend (& rtors .readstate , 0 , myid < 0 , trsp , rtors .rtrsp );
2372
+ rcutorture_one_extend (& rtors .readstate , 0 , trsp , rtors .rtrsp );
2376
2373
return false;
2377
2374
}
2378
- rtors .rtrsp = rcutorture_loop_extend (& rtors .readstate , myid < 0 , trsp , rtors .rtrsp );
2379
- rcu_torture_one_read_end (& rtors , trsp , myid );
2375
+ rtors .rtrsp = rcutorture_loop_extend (& rtors .readstate , trsp , rtors .rtrsp );
2376
+ rcu_torture_one_read_end (& rtors , trsp );
2380
2377
return true;
2381
2378
}
2382
2379
@@ -2469,7 +2466,7 @@ static enum hrtimer_restart rcu_torture_updown_hrt(struct hrtimer *hrtp)
2469
2466
struct rcu_torture_one_read_state_updown * rtorsup ;
2470
2467
2471
2468
rtorsup = container_of (hrtp , struct rcu_torture_one_read_state_updown , rtorsu_hrt );
2472
- rcu_torture_one_read_end (& rtorsup -> rtorsu_rtors , & rtorsup -> rtorsu_trs , -1 );
2469
+ rcu_torture_one_read_end (& rtorsup -> rtorsu_rtors , & rtorsup -> rtorsu_trs );
2473
2470
WARN_ONCE (rtorsup -> rtorsu_nups >= rtorsup -> rtorsu_ndowns , "%s: Up without matching down #%zu.\n" , __func__ , rtorsup - updownreaders );
2474
2471
WRITE_ONCE (rtorsup -> rtorsu_nups , rtorsup -> rtorsu_nups + 1 );
2475
2472
WRITE_ONCE (rtorsup -> rtorsu_nmigrates ,
@@ -2519,7 +2516,7 @@ static void rcu_torture_updown_cleanup(void)
2519
2516
if (!smp_load_acquire (& rtorsup -> rtorsu_inuse ))
2520
2517
continue ;
2521
2518
if (hrtimer_cancel (& rtorsup -> rtorsu_hrt ) || WARN_ON_ONCE (rtorsup -> rtorsu_inuse )) {
2522
- rcu_torture_one_read_end (& rtorsup -> rtorsu_rtors , & rtorsup -> rtorsu_trs , -1 );
2519
+ rcu_torture_one_read_end (& rtorsup -> rtorsu_rtors , & rtorsup -> rtorsu_trs );
2523
2520
WARN_ONCE (rtorsup -> rtorsu_nups >= rtorsup -> rtorsu_ndowns , "%s: Up without matching down #%zu.\n" , __func__ , rtorsup - updownreaders );
2524
2521
WRITE_ONCE (rtorsup -> rtorsu_nups , rtorsup -> rtorsu_nups + 1 );
2525
2522
smp_store_release (& rtorsup -> rtorsu_inuse , false);
0 commit comments