Messages in this thread | | | Subject | Re: [PATCH 1/1] mcb: Remove requesting memory region to avoid memory overlapping | From | Johannes Thumshirn <> | Date | Thu, 23 Mar 2023 16:53:12 +0100 |
| |
On 23.03.23 16:11, Rodríguez Barbarin, José Javier wrote: > One thing we can do is modify the chameleon_parse_cells prototype to > return the actual "chameleon table" size instead of the number of cells > which can have an undetermined size. At the moment, the return value is > only used for error checking but the number of cells is never used. > > After that, we can check the actual "chameleon table" size and > drop/reallocate if needed. Hi Javier,
Yeah that sounds reasonable. mcb_bus_add_devices() calls device_attach() for the respective IP cores, so they individual driver's ->probe() function shouldn't be called before mcb_bus_add_devices(). So you could shrink the resource between chameleon_parse_cells() and mcb_add_devices().
Btw, mcb-lpc.c needs the same fix as well.
Byte, Johannes
| |