Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1210340ybe; Fri, 6 Sep 2019 13:43:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuDS70ycyzCZZZ7foqeOcH39/zLK12YMQ1WNOuyeyCEgx/5OIchNAV/eYZnpFmy3kc4lWf X-Received: by 2002:a63:101b:: with SMTP id f27mr5738634pgl.291.1567802635257; Fri, 06 Sep 2019 13:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567802635; cv=none; d=google.com; s=arc-20160816; b=rzs3plLROrIwFKGQX8F0e/9+1TqWpf9iykAEP3qOkWSyhlhe/lv7ZRZ8AnO0UuzgIc dGrJuW3ehHd9dIonk+HkR4eVGRhayNo67v0Opr+Jjkp9Hyw8lbAe80mnAmsRfTW9OCCg 7tpgpVE0Tu9XawLmOq/oxh0T2Z8HOfoGyMJSEuA7VpukF+wtytcrRQf7PLSzawPLJFBD Rx8NmlZ6+OZ7rKWm+/oq5DUMkibHGNgCLceX6X7xeS3c6otDPiI6BvjDHg8Gqsu+VPFR KPE33g76YRuRO6k4v/IfRRM4IGzYr0nZkIsam/q6qDZH0w4edE81/a4rQSATwGYGAVKw vz8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PmqIXyMM/sV9iVvJFWjK1+tIjPFT0YvujAo06atRi7E=; b=h1LKLWR3u0lKSAuHBX9u6Uj2pYNzJFlR7fgd62XcN0yZOfnR7g2Qrsc2NtCuR416Jf pmedjdBA0WcGSPsZsCD8PeFnHmf9HMxCCXzfODbpQOHrcwJ/6sSsYDKX196YI+BznqYe R8x3nakfVa7/lgKKV0Mlt3BUEPoetEIU9IRIc/+EG3Nm+cVeXgAtzad/i0J/HOWafglR N4SkeaYWRlhmmyk6S6VSfdTaeIoPAJGcDlEhrxzrnT6AfDr6QzQBp0OBdl1EShgw81aT 3r6afD+wTjAcPz281dmXLFPsZIWuyxiU9aoJqm0oAapidif05kus0LK+2xaz7PXg4WQ0 RStg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k9eBe8u5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si5659194pgf.346.2019.09.06.13.43.39; Fri, 06 Sep 2019 13:43:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k9eBe8u5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404746AbfIFNCc (ORCPT + 99 others); Fri, 6 Sep 2019 09:02:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:56044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727914AbfIFNCc (ORCPT ); Fri, 6 Sep 2019 09:02:32 -0400 Received: from rapoport-lnx (unknown [87.71.71.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 291C520578; Fri, 6 Sep 2019 13:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567774951; bh=cS+jKt5ph0FPxFV3bytX1mCFf3/6EuAElXCY755Qphs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k9eBe8u5TKKzZ0KdndmsTfF3GToYgcWW7XpSdb2POg6+ywj+6iniQzlnoH1pi7ODO +8BUTlpWcjhnXZVPD1hjeMZlszKHrcAOpPXfwa2PADjv6v6MnM9tygYHLi/WWhzS9D KyVu0nxVFAFPf7V7kwwvHVSBHjabjuzzczosEOsM= Date: Fri, 6 Sep 2019 16:02:24 +0300 From: Mike Rapoport To: Thomas Bogendoerfer Cc: Paul Burton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM Message-ID: <20190906130223.GA17704@rapoport-lnx> References: <1567662477-27404-1-git-send-email-rppt@kernel.org> <20190905152150.f7ff6ef70726085de63df828@suse.de> <20190905133251.GA3650@rapoport-lnx> <20190905154831.88b7853b47ba7db7bd7626bd@suse.de> <20190905154747.GB3650@rapoport-lnx> <20190905233800.0f6b3fb3722cde2f5a88663a@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190905233800.0f6b3fb3722cde2f5a88663a@suse.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 05, 2019 at 11:38:00PM +0200, Thomas Bogendoerfer wrote: > On Thu, 5 Sep 2019 18:47:49 +0300 > Mike Rapoport wrote: > > > On Thu, Sep 05, 2019 at 03:48:31PM +0200, Thomas Bogendoerfer wrote: > > > On Thu, 5 Sep 2019 16:32:53 +0300 > > > Mike Rapoport wrote: > > > > > > > On Thu, Sep 05, 2019 at 03:21:50PM +0200, Thomas Bogendoerfer wrote: > > > > > On Thu, 5 Sep 2019 08:47:57 +0300 > > > > > Mike Rapoport wrote: > > > > > > > > > > > From: Mike Rapoport > > > > > > > > > > > > The memory initialization of SGI-IP27 is already half-way to support > > > > > > SPARSEMEM and only a call to sparse_init() was missing. Add it to > > > > > > prom_meminit() and adjust arch/mips/Kconfig to enable SPARSEMEM and > > > > > > SPARSEMEM_EXTREME for SGI-IP27 > > > > > > > > > > > > Signed-off-by: Mike Rapoport > > > > > > --- > > > > > > > > > > > > Thomas, could you please test this on your Origin machine? > > > > > > > > > > it crashes in sparse_early_usemaps_alloc_pgdat_section(). Since there is > > > > > already a sparse_init() in arch_mem_setup() I removed it from ip27-memory.c. > > > > > > > > Oops, missed that. > > > > > > > > > With this booting made more progress but I get an unaligned access in > > > > > kernel_init_free_pages(). > > > > > > > > Can you please share the log? > > > > > > sure > > > > Nothing looked particularly suspicious, but I've found that I've missed the > > definition of pfn_to_nid() is for DISCONTIGMEM only, maybe making it > > available for SPARSE would help :) > > > > I'm pretty much shooting in the dark here, but can you please try the patch > > below on top of the original one: > > doesn't compile: > > /home/tbogendoerfer/wip/mips/linux/include/linux/mmzone.h:1367:0: warning: "pfn_to_nid" redefined > #define pfn_to_nid(pfn) \ > > > For testing I've removed the version in linux/mmzone.h, but kernel still crashes. Only > difference is that several CPUs are printing the oops in unaligned handler in parallel. > With the sparse_init() in prom_meminit() kernel dies at the same spot as before. Well, apparently the generic pfn_to_nid() is better :) I suspect that unaligned access comes from __page_to_pfn, can you please check what scripts/fadd2line reports for kernel_init_free_pages+0xcc/0x138? > Thomas. > > -- > SUSE Software Solutions Germany GmbH > HRB 247165 (AG M?nchen) > Gesch?ftsf?hrer: Felix Imend?rffer -- Sincerely yours, Mike.