Quoting Bharata B Rao (2017-05-31 23:06:46) > On Thu, Jun 01, 2017 at 11:52:14AM +1000, David Gibson wrote: > > The code managing DRCs[0] has quite a few things that are more > > complicated than they need to be. In particular the object > > representing a DRC has a bunch of method pointers, despite the fact > > that there are currently no subclasses, and even if there were the > > method implementations would be unlikely to differ. > > So you are getting rid of a few methods. How about other methods ? > Specially attach and detach which have incorporated all the logic needed > to handle logical and physical DRs into their implementations ?
I would avoid any methods that incorporate special-casing for physical vs. logical DRCs, since that seems like a good logical starting point for moving to 'physical'/'logical' DRC sub-classes to help simplify the increasingly complicated state-tracking. I also don't think we should expose DRC internal fields to outside callers (which attach/detach would involve). This series does that to some extent with the RTAS calls, but since those are now moved to spapr_drc.c it makes more sense. > > Guess these will be follow in subequent parts ? > > Regards, > Bharata. > >