From patchwork Thu Jun 18 08:44:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 28849 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4E547B7272 for ; Thu, 18 Jun 2009 18:47:14 +1000 (EST) Received: by ozlabs.org (Postfix) id 421D2DDDA1; Thu, 18 Jun 2009 18:47:14 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C074ADDD1C for ; Thu, 18 Jun 2009 18:47:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757566AbZFRIo5 (ORCPT ); Thu, 18 Jun 2009 04:44:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757389AbZFRIo5 (ORCPT ); Thu, 18 Jun 2009 04:44:57 -0400 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:35667 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757388AbZFRIoz (ORCPT ); Thu, 18 Jun 2009 04:44:55 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 6ADF5C8C1B3; Thu, 18 Jun 2009 01:44:59 -0700 (PDT) Date: Thu, 18 Jun 2009 01:44:59 -0700 (PDT) Message-Id: <20090618.014459.182446746.davem@davemloft.net> To: a.beregalov@gmail.com Cc: sparclinux@vger.kernel.org Subject: Re: 2.6.31-rc1: sparc cannot boot From: David Miller In-Reply-To: References: <20090617.045122.141239226.davem@davemloft.net> X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org From: Alexander Beregalov Date: Wed, 17 Jun 2009 19:00:18 +0400 > Config is attached. Aha, the key is non-SMP build. > b696fdc259f0d94348a9327bed352fac44d4883d is first bad commit > sparc64: Defer cpu_data() setup until end of per-cpu data initialization. > > Does it make sense to you? I see the problem, please try this patch: sparc64: Fix UP bootup regression. Commit b696fdc259f0d94348a9327bed352fac44d4883d ("sparc64: Defer cpu_data() setup until end of per-cpu data initialization.") broke bootup for UP builds because the cpu_data() initialization only occurs in setup_per_cpu_areas() which is never compiled in nor called in UP builds. Fix this up by calling the setups directly from init_64.c when non-SMP. Reported-by: Alexander Beregalov Signed-off-by: David S. Miller --- arch/sparc/mm/init_64.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index ca92e2f..ed6be6b 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -1796,10 +1796,16 @@ void __init paging_init(void) prom_build_devicetree(); of_populate_present_mask(); +#ifndef CONFIG_SMP + of_fill_in_cpu_data(); +#endif if (tlb_type == hypervisor) { sun4v_mdesc_init(); mdesc_populate_present_mask(cpu_all_mask); +#ifndef CONFIG_SMP + mdesc_fill_in_cpu_data(cpu_all_mask); +#endif } /* Once the OF device tree and MDESC have been setup, we know