-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Refactor device structures #23407
Refactor device structures #23407
Commits on May 8, 2020
-
device: Fix tiny indentation issue
The whole file is perfectly indented everywhere else. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 9aade5b - Browse repository at this point
Copy the full SHA 9aade5bView commit details -
init: Fix tiny indentation issue
The whole file is perfectly indented everywhere else. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 402b146 - Browse repository at this point
Copy the full SHA 402b146View commit details -
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>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 960bde1 - Browse repository at this point
Copy the full SHA 960bde1View commit details -
device: Fix structure attributes access
Since struct devconfig was merged earlier into struct device, let's fix accessing config_info, name, ... attributes everywhere via: grep -rlZ 'dev->config->' | xargs -0 sed -i 's/dev->config->/dev->/g' Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for bafaeb4 - Browse repository at this point
Copy the full SHA bafaeb4View commit details -
scripts: Fix gen_kobject_list.py to fit with device refactoring
device_api attribute is not at offset 4 but 8 now as name and config_info has been directly imported into struct device. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 4817771 - Browse repository at this point
Copy the full SHA 4817771View commit details -
usermode: Rework Z_SYSCALL_SPECIFIC_DRIVER to fit with device refacto…
…ring init_fn is not anymore part of struct device, so let's test instead the driver's API structure pointer which is also unique per device driver. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 2a2ffc6 - Browse repository at this point
Copy the full SHA 2a2ffc6View commit details -
drivers/interrupt_controller: Fix loapic/ioapic header inclusion
s/init.h/device.h Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for bdfbab6 - Browse repository at this point
Copy the full SHA bdfbab6View commit details -
drivers/interrupt_controller: Rename ioapic init function
The '_' is not necessary, plus it makes the sys init object name aligning with all others. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tomasz Bursztyka committedMay 8, 2020 Configuration menu - View commit details
-
Copy full SHA for 7798173 - Browse repository at this point
Copy the full SHA 7798173View commit details