diff options
author | Tom Rini <trini@konsulko.com> | 2023-04-07 10:44:19 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-07 10:44:19 -0400 |
commit | 340bebf9c799793affefd166875d5776744988bd (patch) | |
tree | 193a646521cf659f333c5e1c11745116259b0477 /include | |
parent | b0b77fdf3d7d2c1a5e48c3971a677f14e372c164 (diff) | |
parent | a554ee7edee8e10b38c6899ad8556daf58ca3afe (diff) |
Merge branch '2023-04-06-assorted-updates'
- Make use of the semi-formal "fallthrough" mechanism, update env tools
to use /run for lockfile, add 2048 game (as a way to test console
changes), update some CONFIG option logic in Kconfig, have lmb command
show regions in use, remove some duplicate serial code, add
__gnu_thumb1_case_si code and fix m68k custodian email address.
Diffstat (limited to 'include')
-rw-r--r-- | include/lmb.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/lmb.h b/include/lmb.h index 7298c2ccc4..07bf22144e 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -35,6 +35,24 @@ struct lmb_property { enum lmb_flags flags; }; +/* + * For regions size management, see LMB configuration in KConfig + * all the #if test are done with CONFIG_LMB_USE_MAX_REGIONS (boolean) + * + * case 1. CONFIG_LMB_USE_MAX_REGIONS is defined (legacy mode) + * => CONFIG_LMB_MAX_REGIONS is used to configure the region size, + * directly in the array lmb_region.region[], with the same + * configuration for memory and reserved regions. + * + * case 2. CONFIG_LMB_USE_MAX_REGIONS is not defined, the size of each + * region is configurated *independently* with + * => CONFIG_LMB_MEMORY_REGIONS: struct lmb.memory_regions + * => CONFIG_LMB_RESERVED_REGIONS: struct lmb.reserved_regions + * lmb_region.region is only a pointer to the correct buffer, + * initialized in lmb_init(). This configuration is useful to manage + * more reserved memory regions with CONFIG_LMB_RESERVED_REGIONS. + */ + /** * struct lmb_region - Description of a set of region. * @@ -68,7 +86,7 @@ struct lmb_region { struct lmb { struct lmb_region memory; struct lmb_region reserved; -#ifdef CONFIG_LMB_MEMORY_REGIONS +#if !IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS]; struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; #endif |