zephyr/kernel
Tomasz Bursztyka 8d7bb8ffd8 device: Refactor device structures
When the device driver model got introduced, there were no concept of
SYS_INIT() which can be seen as software service. These were introduced
afterwards and reusing the device infrastructure for simplicity.
However, it meant to allocate a bit too much for something that only
required an initialization function to be called at right time.

Thus refactoring the devices structures relevantly:
- introducing struct init_entry which is a generic init end-point
- struct deviceconfig is removed and struct device owns everything now.
- SYS_INIT() generates only a struct init_entry via calling
  INIT_ENTRY_DEFINE()
- DEVICE_AND_API_INIT() generates a struct device and calls
  INIT_ENTRY_DEFINE()
- init objects sections are in ROM
- device objects sections are in RAM (but will end up in ROM once they
  will be 'constified')

It also generate a tiny memory gain on both ROM and RAM, which is nice.

Perhaps kernel/device.c could be renamed to something more relevant.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-05-08 23:07:44 +02:00
..
include kernel: remove legacy fields in _kernel 2020-05-08 17:42:49 +02:00
atomic_c.c kernel: Add k_heap synchronized memory allocator 2020-04-14 10:05:55 -07:00
CMakeLists.txt kernel: Add k_mem_pool compatibility layer on top of k_heap 2020-04-14 10:05:55 -07:00
compiler_stack_protect.c kernel: Fix gcc-9.2 warning with _StackCheckHandler 2019-10-04 05:22:30 -07:00
device.c device: Refactor device structures 2020-05-08 23:07:44 +02:00
errno.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
fatal.c kernel: fatal: fix indentation in z_fatal_error 2020-03-11 10:26:36 +02:00
futex.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
idle.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
init.c device: Refactor device structures 2020-05-08 23:07:44 +02:00
Kconfig kernel/Kconfig: Add prompt for CONFIG_TIMEOUT_64BIT 2020-05-06 06:05:03 -04:00
Kconfig.power_mgmt kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
kheap.c kernel: Add k_mem_pool compatibility layer on top of k_heap 2020-04-14 10:05:55 -07:00
mailbox.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
mem_domain.c kernel: fix k_mem_partition data types 2019-12-12 14:48:42 -08:00
mem_slab.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
mempool_sys.c kernel: Refactor k_mem_pool APIs into a base and derived level 2020-04-14 10:05:55 -07:00
mempool.c kernel: Refactor k_mem_pool APIs into a base and derived level 2020-04-14 10:05:55 -07:00
msg_q.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
mutex.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
pipes.c kernel: pipe: read_avail / write_avail syscalls 2020-05-07 19:39:53 +02:00
poll.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
queue.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
sched.c kernel: fix issue with k_thread_join() timeouts 2020-05-05 11:43:08 -07:00
sem.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
smp.c kernel: interrupt/idle stacks/threads as array 2020-03-16 23:17:36 +02:00
stack.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
system_work_q.c
thread_abort.c kernel: use z_swap_unlocked in k_thread_abort 2020-03-12 10:57:02 -04:00
thread.c kconfig: Rename CONFIG_FP_SHARING to CONFIG_FPU_SHARING 2020-05-08 10:58:33 +02:00
timeout.c kernel/timeout: Check for K_FOREVER in z_add_timeout() 2020-04-22 11:10:17 -07:00
timer.c kernel/timer: Correctly clamp period argument 2020-04-24 16:38:33 +02:00
userspace_handler.c kernel: rename struct _k_object 2020-03-17 20:11:27 +02:00
userspace.c kernel: delete separate logic for priv stacks 2020-03-17 20:11:27 +02:00
version.c
work_q.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00