Received: by 10.223.164.202 with SMTP id h10csp2755916wrb; Tue, 28 Nov 2017 00:22:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMa/i0OhMWC1YtD8u8dZWHx3LBcc1dNEEdrUfy2Vn1Gj/0sTc88XQukUKnHwKSKoqCQRwfHW X-Received: by 10.98.61.220 with SMTP id x89mr40176765pfj.73.1511857327872; Tue, 28 Nov 2017 00:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511857327; cv=none; d=google.com; s=arc-20160816; b=goxFyO5UO1DI07+LA7yxTnkq9jYg8rRL0uMGZvAQ8Em7+ZUlcCn/oYrZUZgwtCZVUj yz+abLSh5FQD+QvNs/Z4GVXmC28SXJ/+IRTXQA6sEAIfNEoaFlWO0TMvkCiNWISI3bpb UM5QF/19yBXWcdMw8BSwIP5K/XrZ5WfPHSzHVDzrj1ia4IpYTd9wiU6AiHOT3gwVayxd f53R0cic4p9J01I6fAXCGw+wR/SGupSALh1X95fVfFKuQOZnGf05IZUoyjXyVcAKRD9H oEOldX/JqRGPSpe/j6NEpLysujIrbS6N54LvTsIyzxvcpHKqZWFrkH7UEPGRSrQXpWHI 8NPw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=587tgcBQUiKIrguFUo97x1UMrinDUm9XkWiMNg7WTvg=; b=s+KkEoz9IK2ZYPpyyRYo56THWXZMyO0hD6SQ2Yu9q/VW0otjDYHei2U5s/68exbawd qLOG0RQqcOTY0JtVlj2KHOjmx/FDzVOu9vqYMt6GrIn66Fyk5ClYkvshmeUaGhKQWDcp M/PPRRVdMXLMegwTzrVgghKmYOAqRy5XPD4CLI43XUyGg/VuhQBQaleSO1B+zLnikbHk WwtXMq7LBOxaDGGwYqaW8NgzfH7gcTr3yyLwPuDhgI9JGOKeO5Ie67dFaN+WApmEzVYB nfTd18F01ZcvziSXpK5Vev2Whq/dgqzZfgQOf8IOWfj5CEPKgBh2+HOUTh/ByK2z3p8w qB9g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si24432120plz.525.2017.11.28.00.21.56; Tue, 28 Nov 2017 00:22:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751610AbdK1ITz (ORCPT + 78 others); Tue, 28 Nov 2017 03:19:55 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:54047 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbdK1ITy (ORCPT ); Tue, 28 Nov 2017 03:19:54 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 324211836E; Tue, 28 Nov 2017 09:19:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id q9HU-f3k362O; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id 4234F183BF; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28A921A09C; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C09A1A075; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder02.se.axis.com (Postfix) with ESMTP; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: from lnxjespern3.se.axis.com (lnxjespern3.se.axis.com [10.88.4.8]) by thoth.se.axis.com (Postfix) with ESMTP id 0F7102191; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Received: by lnxjespern3.se.axis.com (Postfix, from userid 363) id 0BB82800EF; Tue, 28 Nov 2017 09:19:49 +0100 (CET) Date: Tue, 28 Nov 2017 09:19:49 +0100 From: Jesper Nilsson To: Nicolas Pitre Cc: Tejun Heo , Guenter Roeck , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com Subject: Re: mm/percpu.c: use smarter memory allocation for struct pcpu_alloc_info (crisv32 hang) Message-ID: <20171128081948.GE32368@axis.com> References: <20171118182542.GA23928@roeck-us.net> <20171127194105.GM983427@devbig577.frc2.facebook.com> <20171127203335.GQ983427@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 03:51:04PM -0500, Nicolas Pitre wrote: > On Mon, 27 Nov 2017, Tejun Heo wrote: > > > Hello, > > > > On Mon, Nov 27, 2017 at 03:31:52PM -0500, Nicolas Pitre wrote: > > > So IMHO I don't think reverting the commit is the right thing to do. > > > That commit is clearly not at fault here. > > > > It's not about the blame. We just want to avoid breaking boot in a > > way which is difficult to debug. Once cris is fixed, we can re-apply > > the patch. > > In that case I suggest the following instead. No point penalizing > everyone for a single architecture's fault. And this will serve as a > visible reminder to the cris people that they need to clean up. > > ----- >8 > Subject: percpu: hack to let the CRIS architecture to boot until they clean up > > Commit 438a506180 ("percpu: don't forget to free the temporary struct > pcpu_alloc_info") uncovered a problem on the CRIS architecture where > the bootmem allocator is initialized with virtual addresses. Given it > has: > > #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) > > then things just work out because the end result is the same whether you > give this a physical or a virtual address. > > Untill you call memblock_free_early(__pa(address)) that is, because > values from __pa() don't match with the virtual addresses stuffed in the > bootmem allocator anymore. > > Avoid freeing the temporary pcpu_alloc_info memory on that architecture > until they fix things up to let the kernel boot like it did before. > > Signed-off-by: Nicolas Pitre > > diff --git a/mm/percpu.c b/mm/percpu.c > index 79e3549cab..50e7fdf840 100644 > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -2719,7 +2719,11 @@ void __init setup_per_cpu_areas(void) > > if (pcpu_setup_first_chunk(ai, fc) < 0) > panic("Failed to initialize percpu areas."); > +#ifdef CONFIG_CRIS > +#warning "the CRIS architecture has physical and virtual addresses confused" > +#else > pcpu_free_alloc_info(ai); > +#endif > } > > #endif /* CONFIG_SMP */ Works for me, and thanks. /^JN - Jesper Nilsson -- Jesper Nilsson -- jesper.nilsson@axis.com From 1585255203105141001@xxx Mon Nov 27 21:12:52 +0000 2017 X-GM-THRID: 1584466607656225114 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread