Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] create struct arch_esf that is public and deprecate z_arch_esf_t #73673

Closed
ycsin opened this issue Jun 3, 2024 · 0 comments · Fixed by #73593
Closed

[RFC] create struct arch_esf that is public and deprecate z_arch_esf_t #73673

ycsin opened this issue Jun 3, 2024 · 0 comments · Fixed by #73593
Labels
RFC Request For Comments: want input from the community

Comments

@ycsin
Copy link
Member

ycsin commented Jun 3, 2024

Introduction

Functions and types that start with the z_ prefix are meant for internal use only, but we have z_arch_esf_t appearing in the public headers/APIs that is sort of an implicit requirement for all architectures.

There are functions/header files using z_arch_esf_t while not directly including any header file that defines this named struct.

To complicate the issues mentioned above, the underlying struct names aren't consistent across the archs, which means we can't actually declare the named struct without some macro magic:

  • arc - struct _irq_stack_frame
  • x86 - struct nanoEsf
  • x86_64 - struct x86_esf
  • xtensa - int
  • testsuite - struct esf
  • arm, arm64, riscv, mips, nios2, posix, sparc - struct __esf

Problem description

This leads to #73454, and blocks #73587.

Proposed change

Deprecate z_arch_esf_t, have all the architecture define struct arch_esf and declare this in the arch_interface.h

Detailed RFC

Please see #73593

Proposed change (Detailed)

Please see #73593

Dependencies

Any external modules that uses z_arch_esf_t has to be updated to use the new struct arch_esf, i.e. zephyrproject-rtos/sof#46

Concerns and Unresolved Questions

TBD

Alternatives

#73587 can be unblocked by using void *, #73454 can be worked around by using macros in the arch-agnostic exception header.

@ycsin ycsin added RFC Request For Comments: want input from the community Breaking API Change Breaking changes to stable, public APIs labels Jun 3, 2024
@carlescufi carlescufi removed the Breaking API Change Breaking changes to stable, public APIs label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments: want input from the community
Projects
Status: Done
2 participants