lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC V3 6/9] x86/entry: Pass irqentry_state_t by reference
Date
On Mon, Oct 19 2020 at 13:26, Ira Weiny wrote:
> On Mon, Oct 19, 2020 at 11:32:50AM +0200, Thomas Gleixner wrote:
> Sorry, let me clarify. After this patch we have.
>
> typedef union irqentry_state {
> bool exit_rcu;
> bool lockdep;
> } irqentry_state_t;
>
> Which reflects the mutual exclusion of the 2 variables.

Huch? From the patch I gave you:

#ifndef irqentry_state
typedef struct irqentry_state {
bool exit_rcu;
+ bool lockdep;
} irqentry_state_t;
#endif

How is that a union?

> But then when the pkrs stuff is added the union changes back to a structure and
> looks like this.

So you want:

1) Move stuff to struct irqentry_state (my patch)

2) Change it to a union and pass it as pointer at the same time

3) Change it back to struct to add PKRS

> Is that clear?

What's clear is that the above is nonsense. We can just do

#ifndef irqentry_state
typedef struct irqentry_state {
union {
bool exit_rcu;
bool lockdep;
};
} irqentry_state_t;
#endif

right in the patch which I gave you. Because that actually makes sense.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-10-19 23:13    [W:0.120 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site