From: Michael Ellerman Subject: Re: [PATCH] of/fdt: Remove PPC32 longtrail hack in memory scan Date: Mon, 30 Jul 2018 20:47:01 +1000 Message-ID: <87in4xhufu.fsf@concordia.ellerman.id.au> References: <20180727053555.26596-1-mpe@ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Rob Herring Cc: devicetree@vger.kernel.org, Frank Rowand , Paul Mackerras , linuxppc-dev List-Id: devicetree@vger.kernel.org Rob Herring writes: > On Thu, Jul 26, 2018 at 11:36 PM Michael Ellerman wrote: >> When the OF code was originally made common by Grant in commit >> 51975db0b733 ("of/flattree: merge early_init_dt_scan_memory() common >> code") (Feb 2010), the common code inherited a hack to handle >> PPC "longtrail" machines, which had a "memory@0" node with no >> device_type. >> >> That check was then made to only apply to PPC32 in b44aa25d20e2 ("of: >> Handle memory@0 node on PPC32 only") (May 2014). >> >> But according to Paul Mackerras the "longtrail" machines are long >> dead, if they were ever seen in the wild at all. If someone does still >> have one, we can handle this firmware wart in powerpc platform code. >> >> So remove the hack once and for all. > > Yay. I guess Power Macs and other quirks will never die... Not soon. In base.c I see: - the hack in arch_find_n_match_cpu_physical_id() - we should just move that into arch code, it's a __weak arch hook after all. - a PPC hack in of_alias_scan(), I guess we need to retain that behaviour, but it's pretty minor anyway. In address.c there's the powermac empty ranges hack. Seems like we could fix that just by creating empty `ranges` properties in fixup_device_tree(). I don't think we support booting powermacs other than via prom_init(). (Ben?) > I'll queue this up. cheers