Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5140234rwl; Tue, 11 Apr 2023 00:41:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ZEe10tZrAgIJt575Z6Fioca1YbH0fqQVoQnn47y/H6eDI6VdnoGO5SLaoQpqX+5wMG6QVb X-Received: by 2002:a05:6a20:1326:b0:d9:3257:f2b3 with SMTP id g38-20020a056a20132600b000d93257f2b3mr13936248pzh.40.1681198868868; Tue, 11 Apr 2023 00:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681198868; cv=none; d=google.com; s=arc-20160816; b=ImG/dn5eGhEXU2eccXX8DEt2+AlGDUxqsT7ybnnaPXdPK3R74LgGuEOdOFgFUec5hQ 2bcKfXW8CQQLPx7AK6XWxSAt1I1Aqdl22QGNqQsz00QcscLYNmVcCkB7XGlPX9zhLrUT JgCEG8DxPcBo0Aqn7Qg49/avaGzQq6V6iZPIFJx+mVO7jef9i+syiLO4+IX0ucWOWQ5p SOcHGns9oY6F8wG3tJJRXKSXz+dOypmu+b22hkyznQNqWSK5B2+l+gCSgjl7Oz4iKbIg qpTcy+c8TDYT8Gds26UlAXp9idPDTbnn0ZvWgiTqjHokMXMHTBDDjhsQj9Or+eFFyPm8 4g/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Le6BHbAuvWhA8utehB6+SOQVZz6Qqmw/1JDMufZ72Gk=; b=SWPRqqUJ2/kuNh+pwwqTY370JjS/TqWjz7STBqtEc4TvqFfJ3h1Fj1QXr+f6aWUSoA sbEqlcoZmZ5w/LkKJHNxiTdbAPlDD0wvD2VeXi5LGOWOWzfLMGjBhtyUyLszMz2b4ouy RcfAAtTAMSAkJ5TC2X7FfkI0/i1URLfPAOCQMFd4gnJ6EjYDoWP/fz0uG9mBZkTyC2W7 T8Hip48P/WNsT+Gn2Q/cqaUmub/TK30dmIxFZDi4kJHRndOSTIVzgsVQ4jkbCCMGbF9b kmIu9xQ3i3Sq/b47P6ypa/ot3sMD3ZPMflbFmGyOqYikFbQTBAa/yhVNPZVBimsZbC2s 2LLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pc3B3hgS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a71-20020a63904a000000b00519d69a233csi5178303pge.626.2023.04.11.00.40.56; Tue, 11 Apr 2023 00:41:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pc3B3hgS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229896AbjDKHgK (ORCPT + 99 others); Tue, 11 Apr 2023 03:36:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjDKHgH (ORCPT ); Tue, 11 Apr 2023 03:36:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4291734; Tue, 11 Apr 2023 00:36:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8810960AAE; Tue, 11 Apr 2023 07:36:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE4DC433EF; Tue, 11 Apr 2023 07:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681198561; bh=9ighdUcP/UTYLMiyXaga2dDu7U1Ozp7TXI7PHr3dDYU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pc3B3hgSIKCjI2c/0a4HjZdd2ehgt6z2AB/2lkt3ZD6vimWx/pG5aGfdOrQOKPqBx gjPeI3PzxplsapH8uFKl4f+UNMeQlirH6NJ6KQEL4JYpMdrlAhgc1e/+qQSLPnJ6Jt Z1r3Ty3+mnw9Oj7MUoOrTlHiUY2ndF8deB2I3KnvL3FWE7fXSuDRq+RSoWwlPp3c6D qv/asV3Ccah13L3j+wQu/EayolE5EbXi4uitIEu42TucY1rgfDOee6evA4HatXTpwF 6dJhup7XFRTiwuy8FxHXbRACloOKnZ5kfXVq4yfp6LSnzMlnfs/3XmYg/cP3gsVGh1 8lMMn383lj2Lw== Date: Tue, 11 Apr 2023 09:35:55 +0200 From: Simon Horman To: Chen Jiahao Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-doc@vger.kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, conor.dooley@microchip.com, guoren@kernel.org, heiko@sntech.de, bjorn@rivosinc.com, alex@ghiti.fr, akpm@linux-foundation.org, atishp@rivosinc.com, bhe@redhat.com, thunder.leizhen@huawei.com Subject: Re: [PATCH -next v4 1/2] riscv: kdump: Implement crashkernel=X,[high,low] Message-ID: References: <20230410130553.3226347-1-chenjiahao16@huawei.com> <20230410130553.3226347-2-chenjiahao16@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230410130553.3226347-2-chenjiahao16@huawei.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 10, 2023 at 09:05:52PM +0800, Chen Jiahao wrote: > On riscv, the current crash kernel allocation logic is trying to > allocate within 32bit addressible memory region by default, if > failed, try to allocate without 4G restriction. > > In need of saving DMA zone memory while allocating a relatively large > crash kernel region, allocating the reserved memory top down in > high memory, without overlapping the DMA zone, is a mature solution. > Here introduce the parameter option crashkernel=X,[high,low]. > > One can reserve the crash kernel from high memory above DMA zone range > by explicitly passing "crashkernel=X,high"; or reserve a memory range > below 4G with "crashkernel=X,low". > > Signed-off-by: Chen Jiahao > Acked-by: Guo Ren > Reviewed-by: Zhen Lei Reviewed-by: Simon Horman