[PATCH 13/18] common: Drop asm/ptrace.h from common header

Simon Glass sjg at chromium.org
Sun May 10 22:36:48 CEST 2020


Hi Michal,

On Tue, 7 Apr 2020 at 00:50, Michal Simek <michal.simek at xilinx.com> wrote:
>
> On 07. 04. 20 4:40, Simon Glass wrote:
> > Move this uncommon header out of the common header.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  arch/arm/cpu/arm1136/mx35/timer.c       | 1 +
> >  arch/arm/cpu/arm926ejs/mx25/timer.c     | 1 +
> >  arch/arm/cpu/arm926ejs/mx27/timer.c     | 1 +
> >  arch/arm/cpu/arm926ejs/spear/spl.c      | 1 +
> >  arch/arm/cpu/arm926ejs/spear/timer.c    | 1 +
> >  arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 +
> >  arch/arm/cpu/armv8/sec_firmware.c       | 1 +
> >  arch/arm/lib/interrupts.c               | 1 +
> >  arch/arm/lib/interrupts_64.c            | 1 +
> >  arch/arm/mach-imx/sip.c                 | 1 +
> >  arch/arm/mach-meson/board-common.c      | 1 +
> >  arch/arm/mach-meson/sm.c                | 1 +
> >  arch/arm/mach-mvebu/arm64-common.c      | 1 +
> >  arch/m68k/lib/interrupts.c              | 1 +
> >  arch/m68k/lib/traps.c                   | 1 +
> >  arch/mips/lib/traps.c                   | 1 +
> >  arch/powerpc/cpu/mpc83xx/interrupts.c   | 1 +
> >  arch/powerpc/cpu/mpc83xx/traps.c        | 1 +
> >  arch/powerpc/cpu/mpc85xx/interrupts.c   | 1 +
> >  arch/powerpc/cpu/mpc85xx/traps.c        | 1 +
> >  arch/powerpc/cpu/mpc86xx/interrupts.c   | 1 +
> >  arch/powerpc/cpu/mpc86xx/traps.c        | 1 +
> >  arch/powerpc/cpu/mpc8xx/interrupts.c    | 1 +
> >  arch/powerpc/cpu/mpc8xx/traps.c         | 1 +
> >  arch/powerpc/lib/interrupts.c           | 1 +
> >  arch/powerpc/lib/kgdb.c                 | 1 +
> >  arch/x86/cpu/i386/interrupt.c           | 1 +
> >  arch/xtensa/cpu/exceptions.c            | 1 +
> >  board/cavium/thunderx/atf.c             | 1 +
> >  board/xilinx/zynqmp/zynqmp.c            | 1 +
> >  cmd/bedbug.c                            | 1 +
> >  common/bedbug.c                         | 1 +
> >  common/kgdb.c                           | 1 +
> >  common/kgdb_stubs.c                     | 1 +
> >  drivers/clk/clk_versal.c                | 1 +
> >  drivers/firmware/firmware-zynqmp.c      | 1 +
> >  drivers/timer/mpc83xx_timer.c           | 1 +
> >  include/common.h                        | 1 -
> >  38 files changed, 37 insertions(+), 1 deletion(-)
> >

[...]

> > diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> > index 76758237c00..4f8a0453f46 100644
> > --- a/board/xilinx/zynqmp/zynqmp.c
> > +++ b/board/xilinx/zynqmp/zynqmp.c
> > @@ -22,6 +22,7 @@
> >  #include <asm/arch/psu_init_gpl.h>
> >  #include <asm/cache.h>
> >  #include <asm/io.h>
> > +#include <asm/ptrace.h>
>
> I did a grep and I can't see ptrace macros used anywhere in the code.
> I see show_regs used by architecture and common code but not by boards.
> That's why at least for zynqmp please remove this header because nothing
> is used from it.

For example: xilinx_zynqmp_virt

ilinx_zynqmp_virt
+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+board/xilinx/zynqmp/zynqmp.c: In function 'chip_id':
+board/xilinx/zynqmp/zynqmp.c:198:17: error: storage size of 'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+make[2]: *** [board/xilinx/zynqmp/zynqmp.o] Error 1
+make[1]: *** [board/xilinx/zynqmp] Error 2
+make: *** [sub-make] Error 2



+WARNING: BL31 file bl31.bin NOT found, U-Boot will run in EL3
+drivers/firmware/firmware-zynqmp.c: In function 'xilinx_pm_request':
+drivers/firmware/firmware-zynqmp.c:159:17: error: storage size of
'regs' isn't known
+  struct pt_regs regs;
+                 ^~~~
+ }
+ ^
+make[3]: *** [drivers/firmware/firmware-zynqmp.o] Error 1
+make[2]: *** [drivers/firmware] Error 2
+make[1]: *** [drivers] Error 2
+make: *** [sub-make] Error 2
w+drivers/firmware/firmware-zynqmp.c:159:17: warning: unused variable
'regs' [-Wunused-variable]
w+drivers/firmware/firmware-zynqmp.c:181:1: warning: control reaches
end of non-void function [-Wreturn-type]

Regards,
Simon


More information about the U-Boot mailing list