RE: [patch V2 03/13] x86/irq/64: Adjust the per CPU irq stack pointer by 8

From: David Laight
Date: Wed Feb 10 2021 - 06:47:23 EST


From: Thomas Gleixner
> Sent: 09 February 2021 23:41
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> The per CPU hardirq_stack_ptr contains the pointer to the irq stack in the
> form that it is ready to be assigned to [ER]SP so that the first push ends
> up on the top entry of the stack.
...
> Do the -8 adjustment right when storing the pointer and make the data type
> a void pointer to avoid confusion vs. the struct irq_stack data type which
> is on 64bit only used to declare the backing store...

It might be better to make it a pointer to an undefined struct.
That will stop all accidental assignments - except those that
are already 'void *'.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)