Commit graph

11 commits

Author SHA1 Message Date
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Anas Nashif 9183ceaf91 cache: introduce incoherent cache interface
Introduce a set of cache APIs used on architectures with cache incoherency.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-03 13:42:33 -05:00
Carlo Caione 0ace886359 cache: Add note about buffer alignment and size
Cache operations that act on unaligned buffers (with respect to cache
line) or buffers that are not multiple of the cache line size are at
least dangerous with an high risk of data and memory corruption.

While we do not enforce a contract on the buffer characteristics between
users and APIs, we can at least add a note in the documentation
specifying an undefined behaviour when the passed buffer is unaligned or
wrongly sized.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-22 06:06:32 -04:00
Gerard Marull-Paretas 248137169a doc: doxygen: add some subsystems to os_services group
Add the following root Doxygen modules under the umbrella of "OS
Services" Doxygen group:

- Cache
- File system
- IPC
- RTIO
- CRC
- Iterable sections
- ZBus
- Task watchdog
- Shell
- Semihosting
- Logging
- System init

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-31 14:39:29 -04:00
Carlo Caione d3ed4a784b cache: Rework headers and force inlining
The current headers do not allow the full inlining of the cache
functions. Rework and cleanup the headers to allow for the full
inlining.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Carlo Caione b23c02f4e0 cache: Fix wrong defines
Fix wrong DCACHE/ICACHE defines.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-01-10 18:22:32 -05:00
Carlo Caione a031ecdc9d cache: Fix the doxygen documentation
And create a new group.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-13 16:31:42 +00:00
Carlo Caione 189cd1f4a2 cache: Rework cache API
The cache operations must be quick, optimized and possibly inlined. The
current API is clunky, functions are not inlined and passing parameters
around that are basically always known at compile time.

In this patch we rework the cache functions to allow us to get rid of
useless parameters and make inlining easier.

In particular this changeset is doing three things:

1. `CONFIG_HAS_ARCH_CACHE` is now `CONFIG_ARCH_CACHE` and
   `CONFIG_HAS_EXTERNAL_CACHE` is now `CONFIG_EXTERNAL_CACHE`

2. The cache API has been reworked.

3. Comments are added.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-12-01 13:40:56 -05:00
Carlo Caione ae82071ae4 arch: Rework cache-related Kconfig symbols
We have now:

- CPU_HAS_{D,I}CACHE: when the CPU has support for d-cache and i-cache

- {D,I}CACHE: to enable / disable d-cache and i-cache

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-08-18 11:30:49 +00:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Renamed from include/cache.h (Browse further)