From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 20 Nov 2012 08:25:17 +0100 Subject: [U-Boot] [PATCH 0/57] RFC: Move arch-specific global data into its own structure In-Reply-To: <1353100842-20126-1-git-send-email-sjg@chromium.org> References: <1353100842-20126-1-git-send-email-sjg@chromium.org> Message-ID: <20121120072517.295652003D0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message <1353100842-20126-1-git-send-email-sjg@chromium.org> you wrote: > The previous generic board series hit a snag in that we needed generic > code to access some of the architecture-specific fields in global_data. I missed that. Can you please summarize what exactly the problem was, and how this modification is supposed to fix it? > The solution eventually arrived at was to move these fields into a > separate structure, so that global_data has the generic fields, > and within that there is an arch_global_data structure holding the > architecture-specific ones. > > This series makes that change. Assuming this is reasonable, the next > step is to bring back the generic board patches on top of this. This cover letter has a RFC in the subject,. but the following patch series does not. This is actually bad! General comments / questions: - We always attempted to keep global data as small as possible. What happens here appears to be a move in a totally wrong direction. Instead of simplyfiyng it (and moving stuff out of global data), we add more and more complexity to it. That's wrong. We should not do that. - The change makes the code less readable. Reading "gd->arch." instead of plain "gd->" is no improvements, but rather vice versa. If we really go this way, this should be improved. - What exactly is the impact of this code changes on the memory footprint? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I'm what passes for a Unix guru in my office. This is a frightening concept. - Lee Ann Goldstein, in <3k55ba$c43@butch.lmsc.lockheed.com>