Re: [PATCH RFC V3 6/9] x86/entry: Pass irqentry_state_t by reference

From
Thomas Gleixner <hidden>
Date
2020-10-19 21:12:50
Also in
linux-fsdevel, linux-kselftest, linux-mm, lkml, nvdimm
Reply to
Ira Weiny, 2020-10-19
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
Thread (47 messages) 47 messages, 4 authors, last reply 2020-10-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help