-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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: arch: arm: Remove aarch32 directory and split Cortex-M and Cortex-A/r code #60031
Merged
fabiobaltieri
merged 11 commits into
zephyrproject-rtos:main
from
SgrrZhf:topics/huizha01/split-cortex-m-and-cortex-ar
Sep 13, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
87f757d
arch: arm: Remove aarch32 directory
SgrrZhf bb24e9a
include: arch: arm: Remove aarch32 directory
SgrrZhf fe5d8c7
arch: arm: cortex-m: Move irq_relay.S to the cortex-m directory
SgrrZhf 26597a3
arch: arm: Separate common swap code
SgrrZhf a034e86
arch: arm: Separate common irq_manage and isr_wrapper code
SgrrZhf e3b4244
arch: arm: Separate common exc header file
SgrrZhf 16d0e29
arch: arm: Separate common prep_c code
SgrrZhf 0b9cf13
arch: arm: Separate common thread code
SgrrZhf 67e8f39
arch: arm: Separate common cpu_idle codes
SgrrZhf 2aff843
arch: arm: Separate common kernel_arch_func code
SgrrZhf 61b0703
doc: release-notes: Add Aarch32 v3.5.0 notes
SgrrZhf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* Copyright (c) 2013-2014 Wind River Systems, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @file | ||
* @brief ARM Cortex-A and Cortex-R power management | ||
* | ||
*/ | ||
|
||
#include <zephyr/toolchain.h> | ||
#include <zephyr/linker/sections.h> | ||
|
||
#if defined(CONFIG_ARM_ON_EXIT_CPU_IDLE) | ||
#include <soc_cpu_idle.h> | ||
#endif | ||
|
||
_ASM_FILE_PROLOGUE | ||
|
||
GTEXT(arch_cpu_idle) | ||
GTEXT(arch_cpu_atomic_idle) | ||
|
||
.macro _sleep_if_allowed wait_instruction | ||
#if defined(CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK) | ||
push {r0, lr} | ||
bl z_arm_on_enter_cpu_idle | ||
/* Skip the wait instruction if on_enter_cpu_idle() returns false. */ | ||
cmp r0, #0 | ||
beq _skip_\@ | ||
#endif /* CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK */ | ||
|
||
/* | ||
* Wait for all memory transactions to complete before entering low | ||
* power state. | ||
*/ | ||
dsb | ||
\wait_instruction | ||
|
||
#if defined(CONFIG_ARM_ON_EXIT_CPU_IDLE) | ||
/* Inline the macro provided by SoC-specific code */ | ||
SOC_ON_EXIT_CPU_IDLE | ||
#endif /* CONFIG_ARM_ON_EXIT_CPU_IDLE */ | ||
|
||
#if defined(CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK) | ||
_skip_\@: | ||
pop {r0, lr} | ||
#endif /* CONFIG_ARM_ON_ENTER_CPU_IDLE_HOOK */ | ||
.endm | ||
|
||
SECTION_FUNC(TEXT, arch_cpu_idle) | ||
#ifdef CONFIG_TRACING | ||
push {r0, lr} | ||
bl sys_trace_idle | ||
pop {r0, lr} | ||
#endif /* CONFIG_TRACING */ | ||
|
||
/* Enter low power state */ | ||
_sleep_if_allowed wfi | ||
|
||
/* | ||
* Clear PRIMASK and flush instruction buffer to immediately service | ||
* the wake-up interrupt. | ||
*/ | ||
cpsie i | ||
isb | ||
|
||
bx lr | ||
|
||
SECTION_FUNC(TEXT, arch_cpu_atomic_idle) | ||
#ifdef CONFIG_TRACING | ||
push {r0, lr} | ||
bl sys_trace_idle | ||
pop {r0, lr} | ||
#endif /* CONFIG_TRACING */ | ||
|
||
/* | ||
* Lock PRIMASK while sleeping: wfe will still get interrupted by | ||
* incoming interrupts but the CPU will not service them right away. | ||
*/ | ||
cpsid i | ||
|
||
/* r0: interrupt mask from caller */ | ||
|
||
/* No BASEPRI, call wfe directly | ||
*/ | ||
_sleep_if_allowed wfe | ||
|
||
cmp r0, #0 | ||
bne _irq_disabled | ||
cpsie i | ||
_irq_disabled: | ||
|
||
bx lr |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be updated to
@SgrrZhf @povergoing @microbuilder
Since Ioannis is no longer involved with the project.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, ignore this and lets make a separate PR since there are a lot of instances of this, and I agree with @carlocaione ... lets separate M and A/R here, and nothing else. I'll make a PR to cleanup
CODEOWNERS
later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the CODEOWNERS might also be a chance to officially blame me for the MMU stuff for everyone to see...