Skip to content

Commit 713f3e3

Browse files
gmarullqipengzha
authored andcommitted
iterable_sections: move to specific header
Until now iterable sections APIs have been part of the toolchain (common) headers. They are not strictly related to a toolchain, they just rely on linker providing support for sections. Most files relied on indirect includes to access the API, now, it is included as needed. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent a00d325 commit 713f3e3

File tree

133 files changed

+599
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+599
-430
lines changed

arch/x86/core/intel64/irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <zephyr/drivers/interrupt_controller/loapic.h>
1313
#include <zephyr/irq.h>
1414
#include <zephyr/logging/log.h>
15+
#include <zephyr/sys/iterable_sections.h>
1516
#include <x86_mmu.h>
1617

1718
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);

boards/arm/ip_k66f/linker.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#include <zephyr/linker/iterable_sections.h>
8+
79
/**
810
* @file
911
* @brief Linker command/script file

drivers/console/uart_mux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ LOG_MODULE_REGISTER(uart_mux, CONFIG_UART_MUX_LOG_LEVEL);
1717
#include <zephyr/sys/ring_buffer.h>
1818
#include <zephyr/sys/util.h>
1919
#include <zephyr/sys/atomic.h>
20+
#include <zephyr/sys/iterable_sections.h>
2021

2122
#include "gsm_mux.h"
2223

drivers/pcie/host/pcie.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ LOG_MODULE_REGISTER(pcie, LOG_LEVEL_ERR);
1313
#include <zephyr/sys/check.h>
1414
#include <stdbool.h>
1515
#include <zephyr/drivers/pcie/pcie.h>
16+
#include <zephyr/sys/iterable_sections.h>
1617

1718
#if CONFIG_PCIE_MSI
1819
#include <zephyr/drivers/pcie/msi.h>

drivers/sensor/sensor_shell.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <ctype.h>
1111
#include <zephyr/device.h>
1212
#include <zephyr/drivers/sensor.h>
13+
#include <zephyr/sys/iterable_sections.h>
1314

1415
#define SENSOR_GET_HELP \
1516
"Get sensor data. Channel names are optional. All channels are read " \

drivers/usb/uvb/uvb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <zephyr/kernel.h>
99
#include <zephyr/device.h>
1010
#include <zephyr/sys/dlist.h>
11+
#include <zephyr/sys/iterable_sections.h>
1112

1213
#include "uvb.h"
1314

drivers/usb/uvb/uvb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#ifndef ZEPHYR_INCLUDE_UVB
1313
#define ZEPHYR_INCLUDE_UVB
1414

15-
#include <zephyr/linker/linker-defs.h>
1615
#include <zephyr/sys/atomic.h>
1716
#include <zephyr/sys/dlist.h>
17+
#include <zephyr/sys/iterable_sections.h>
1818

1919
#ifdef __cplusplus
2020
extern "C" {

include/zephyr/arch/x86/intel64/arch.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#include <zephyr/arch/x86/intel64/thread.h>
1010
#include <zephyr/arch/x86/thread_stack.h>
11+
#if defined(CONFIG_PCIE) && !defined(_ASMLANGUAGE)
12+
#include <zephyr/sys/iterable_sections.h>
13+
#endif
1114

1215
#if CONFIG_ISR_STACK_SIZE != (CONFIG_ISR_SUBSTACK_SIZE * CONFIG_ISR_DEPTH)
1316
#error "Check ISR stack configuration (CONFIG_ISR_*)"
@@ -113,15 +116,15 @@ struct x86_ssf {
113116
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */ \
114117
} while (false)
115118

116-
#endif /* _ASMLANGUAGE */
117-
118119
#ifdef CONFIG_PCIE
119120
#define X86_RESERVE_IRQ(irq_p, name) \
120121
static TYPE_SECTION_ITERABLE(uint8_t, name, irq_alloc, name) = irq_p
121122
#else
122123
#define X86_RESERVE_IRQ(irq_p, name)
123124
#endif
124125

126+
#endif /* _ASMLANGUAGE */
127+
125128
/*
126129
* All Intel64 interrupts are dynamically connected.
127130
*/

include/zephyr/bluetooth/conn.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <zephyr/bluetooth/addr.h>
2626
#include <zephyr/bluetooth/gap.h>
2727
#include <zephyr/bluetooth/direction.h>
28+
#include <zephyr/sys/iterable_sections.h>
2829

2930
#ifdef __cplusplus
3031
extern "C" {

include/zephyr/bluetooth/gatt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <zephyr/bluetooth/conn.h>
2828
#include <zephyr/bluetooth/uuid.h>
2929
#include <zephyr/bluetooth/att.h>
30+
#include <zephyr/sys/iterable_sections.h>
3031

3132
#ifdef __cplusplus
3233
extern "C" {

0 commit comments

Comments
 (0)