Re: [PATCH 20/20] ARC: pt_regs: create seperate type for ecr

From: Pavel . Kozlov
Date: Thu Aug 17 2023 - 08:11:39 EST


Hi Vineet,

I'm testing your updates and ran into the same build issue reported by the build
robot.
http://lists.infradead.org/pipermail/linux-snps-arc/2023-August/007522.html

> #ifdef CONFIG_ISA_ARCOMPACT
> @@ -40,18 +51,7 @@ struct pt_regs {
> * Last word used by Linux for extra state mgmt (syscall-restart)
> * For interrupts, use artificial ECR values to note current prio-level
> */
> - union {
> - struct {
> -#ifdef CONFIG_CPU_BIG_ENDIAN
> - unsigned long state:8, ecr_vec:8,
> - ecr_cause:8, ecr_param:8;
> -#else
> - unsigned long ecr_param:8, ecr_cause:8,
> - ecr_vec:8, state:8;
> -#endif
> - };
> - unsigned long event;
> - };
> + ecr_reg ecr;
> }
>
> #define MAX_REG_OFFSET offsetof(struct pt_regs, event)

This change causes a build issue for ARC700, as the event field has been
removed and the MAX_REG_OFFSET macro hasn't been updated.

Regards,
Pavel