On 01.10.2011 10:15, Aleš Nesrsta wrote: > Vladimir 'φ-coder/phcoder' Serbinenko píše v Pá 30. 09. 2011 v 17:37 > +0200: >> That must be a too long interval of writing e-mail. I started it a month >> ago, then interrupted and now finishing it > No problem, I have often very, very long "response time" too... > (sometimes infinite...) :-) > > According to all comments/changes below - in fact I agree with all, but > I will wait with changes in code until You try EHCI on fuloong or > another machine(s), as there could be some additional mistakes/changes > in code after test - or feel totally free to make Your own corrected > starting version of this driver code for any experimental branch or > trunk. > Ok, I'll do it since EHCI is important. I also feel like there is no need to maroon it in experimental > Currently I have only note to discussed "packed" attribute "problem": > I have no problem to delete it - especially if it is usual programmer > praxis in such cases (or You can do it instead of me without my > agreement - no problem, because You are the maintainer of whole code and > You are making code rules... :-) ). > Don't consider me some kind of dictator, I just want some coherency in design, rather than having incoherent problems. > Only to clarify my point of view: > > 1. I think there is difference between structures and arrays, compiler > can (must) use different alignment for each case: > For array members - there it must be according to type of array, resp. > length of array member > For structure members (and possibly whole structure alignment) - there > can be used any alignment, I see no reason why should be structure > member alignment generally restricted in some way even if the whole > structure is then used as array member > > 2. AFAIK (but maybe it is not true, maybe it was never true...?) > compilers are using default alignment of variables usually according to > native length of CPU "word". So, as we have 64-bit machines now, it > could be only question of time when compilers will use 64 bits alignment > as default. Reading and writing into a byte aligned on word doesn't bring any advantage and wastes memory and decreases portability so no compiler will ever do it. The whole reason to align is because of performance advantages and instruction availability. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko