On Mon, 18 May 2020 at 06:04, Markus Armbruster <arm...@redhat.com> wrote: > > xlnx_dp_init() creates these two devices, but they're never realized. > Affects machine xlnx-zcu102. > > I wonder how this ever worked. If the "device becomes real only on > realize" thing actually works, then we've always been missing these > two devices, yet nobody noticed.
It depends entirely on the implementation of the device. If it happens to do nothing in the realize method that matters (eg i2c-ddc has no realize method and does the limited amount of initialization it needs in instance_init) then the device will (by lucky accident) work just fine. We should really ideally have an assert() in the DeviceClass reset that the device was realized, so we can keep this kind of bug out of the codebase. (Last time I looked it wasn't obvious exactly where to put the assert now that we have both legacy-reset and three-phase-reset, unfortunately.) thanks -- PMM