From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5402DC43460 for ; Thu, 6 May 2021 12:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 064A6613D8 for ; Thu, 6 May 2021 12:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231327AbhEFMoi (ORCPT ); Thu, 6 May 2021 08:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbhEFMoh (ORCPT ); Thu, 6 May 2021 08:44:37 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB4EEC061763 for ; Thu, 6 May 2021 05:43:38 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id o16so6876432ljp.3 for ; Thu, 06 May 2021 05:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fbHWIIjNsb9wei3xXx6Otqpzu53zaXTIXIFKBmpNOgo=; b=Bgqg7sh9bCd5nshaNaWvRHui08dl/ZbqDnFZ0IJ97hliP13z/2GcIBrux/SLdwV0/i Km45HFsHhgWctbcGuGF6Ai0HvMZqIj6POZRSs6/PpSRACJl2PlFmLQU4hlC1yDovIWBg aoQtkENq3gxHz6laQ2nmHkKeFF5HDzsMB1hneI4Ds46GeucQ1zmRGYA3wLsnyxnSTV+p Db5TgOzJNR01i8q8ZcC7fzaKnTvJPicRUV9tY8zTJ3Fn3kGnBEhC16d3shmCkOArTBkz lLFzcth3mqWw7rRMzs4kvzsjIlgL1hnv1j22fv57T54QODE0L88yQ2jCksh+4ITE6+wH 5VGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fbHWIIjNsb9wei3xXx6Otqpzu53zaXTIXIFKBmpNOgo=; b=K92eClfWreYBSi1EHnzI43vAtCtdowAw9ATXLIRCLpKa8OWQX/BqtUabKokATOorWs BBoix+S5SsAftC7enZMlgw/oBDRDxQMpUsMqO03foSXB4xvt4byYjHfFj9YrSwp89oEc QeQM7I5STPs4AbeEVB4ZVB/TCszX+U69cRpWubL+MH+c9QusSamTY3Mv3e77uKX8MDef jz8d3vGf8w2zSELTacy58FpQw4mo4LyFgwSQqY+jDsSFBLw9oit/d8PxrO54wRAbrVG5 97tfeTie7ee1NnO7JHcdVpdhWA569aS837mLhMO90N9ahU37YPSHSOUmIb1l0i3aqBDX DGkQ== X-Gm-Message-State: AOAM530ful2UmSXPy34IRW0AkZLN6tD0xHVSHtlC2J5WqnifvUPbSYpU FNbCR+XLuBSSUU2HCUhTufEydroSeja3Drbfk0I0zA== X-Google-Smtp-Source: ABdhPJz4optDOZiBZ3vSZcVI8Py60XPMQCZzXNInCGDBXfYIu467P3Ej4pt6DNl0kP7Ihy/ZCeYrBXG2yJQ/QYMK8Ng= X-Received: by 2002:a05:651c:503:: with SMTP id o3mr3172636ljp.368.1620305017299; Thu, 06 May 2021 05:43:37 -0700 (PDT) MIME-Version: 1.0 References: <20210317113130.2554368-1-geert+renesas@glider.be> In-Reply-To: <20210317113130.2554368-1-geert+renesas@glider.be> From: Linus Walleij Date: Thu, 6 May 2021 14:43:26 +0200 Message-ID: Subject: Re: [PATCH v3] ARM: Parse kdump DT properties To: Geert Uytterhoeven Cc: Russell King , Ard Biesheuvel , Nicolas Pitre , Marek Szyprowski , Dmitry Osipenko , Rob Herring , Simon Horman , Arnd Bergmann , Stephen Boyd , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lukasz Stelmach , Linux ARM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , linux-kernel , kexec@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 12:31 PM Geert Uytterhoeven wrote: > Parse the following DT properties in the crash dump kernel, to provide a > modern interface between kexec and the crash dump kernel: > - linux,elfcorehdr: ELF core header segment, similar to the > "elfcorehdr=" kernel parameter. > - linux,usable-memory-range: Usable memory reserved for the crash dump > kernel. > This makes the memory reservation explicit. If present, Linux no > longer needs to mask the program counter, and rely on the "mem=" > kernel parameter to obtain the start and size of usable memory. > > For backwards compatibility, the traditional method to derive the start > of memory is still used if "linux,usable-memory-range" is absent, and > the "elfcorehdr=" and "mem=" kernel parameters are still parsed. > > Loosely based on the ARM64 version by Akashi Takahiro. > > Signed-off-by: Geert Uytterhoeven I like the approach overall. I see Rob has some comments that need adressing. The chosen.txt file needs an example of how to use this so people can intuitively get it right if they want to play with it, it was at least the first question in my head: how does that look in practice? Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42DBBC433B4 for ; Thu, 6 May 2021 12:46:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A058613C1 for ; Thu, 6 May 2021 12:46:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A058613C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=o0gEvBAv+FZDgUrhJhG7IWq+qc4YOZkFBWPk/hjz0AU=; b=GtC4WP38YDkg4O1r9x647GhIt Bw5KDe5T5K2YAeSTvxd2jL0rHF1XZAHl8sfKqQhJG+9huCjj96NPU4MHEUTQovrJzF3Yz7KWKPjfB A+8y7J0VRDjJJs+pnLcUPdO3Sc2b4Idz2BcO+udXVGAQcioYxWm9wgmb1W8kgb22dZ33Buu47wM93 o5Ih3dV/HG74jBo7eJskmUdR7U8X5eE50yWdQWfTokJtJP/K3L0QKHxrq2vaDlhGz1pMN7BfTo7Ii 80oGEXs6tZtVLh+1KKVTcqBDyGOUs7l3GCzfYb028ettwh1km8EA842ijDsau/Hs2tdSxuQLg8JOX GfoS55w/w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ledM2-004FFd-V6; Thu, 06 May 2021 12:43:47 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ledM0-004FFO-P3 for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 12:43:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fbHWIIjNsb9wei3xXx6Otqpzu53zaXTIXIFKBmpNOgo=; b=WRKDVYxLQa6YaRgYnrNkupqv/g wYx2AeP6xv+Bwesc4JJ2HItDpUg63f4otXwX95y96wl+3vK55BUbu2k+XIkjC8qPeJoaQT6ghW1N9 0M7SJeMf8Tor6+oHdVHJ04a5CoNclwoy7N8lp4EQwzH42IM/xiNgU9zQthh6NmZTHbvkc+/vmq70O 8uJvElEFOhrlDQbaPCtOiYirrrOhmdFuKwK4Ca0cPTTOVx3M/W7QTn74hjc0MaP6LSwj/eQC2WmsM EokLeX3GC5FKUIHIa0EtMMCxTex9vwRN8UUBxYJw7WLCn/sBy2xem/tv/c4haAc9QUM+W78SJiZn6 uSph4cDA==; Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ledLx-0061vh-V9 for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 12:43:43 +0000 Received: by mail-lj1-x22e.google.com with SMTP id v6so6860972ljj.5 for ; Thu, 06 May 2021 05:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fbHWIIjNsb9wei3xXx6Otqpzu53zaXTIXIFKBmpNOgo=; b=Bgqg7sh9bCd5nshaNaWvRHui08dl/ZbqDnFZ0IJ97hliP13z/2GcIBrux/SLdwV0/i Km45HFsHhgWctbcGuGF6Ai0HvMZqIj6POZRSs6/PpSRACJl2PlFmLQU4hlC1yDovIWBg aoQtkENq3gxHz6laQ2nmHkKeFF5HDzsMB1hneI4Ds46GeucQ1zmRGYA3wLsnyxnSTV+p Db5TgOzJNR01i8q8ZcC7fzaKnTvJPicRUV9tY8zTJ3Fn3kGnBEhC16d3shmCkOArTBkz lLFzcth3mqWw7rRMzs4kvzsjIlgL1hnv1j22fv57T54QODE0L88yQ2jCksh+4ITE6+wH 5VGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fbHWIIjNsb9wei3xXx6Otqpzu53zaXTIXIFKBmpNOgo=; b=SC94pcG58Tr3XNbyodSN34kH1uWhnL5enDyY7OIVPluTnlB8rpea/mOeP3BfnPykDS 7A3c2KBQiBtkxhW3G/P46A/bnfrCcs4MauYPS+f7BvKJSX6I2PomQH0Di8Wh2YOLVWdA Rpegm14K/N9rqoh7uLgOI52fxCSs1nYOa0jWeSqD7kvdxLjQ46KhQLSwtqtXLdGoi0xR ij8rd6V5l3a5RrCb1EnBIvA4wX9WFie1xbUK5y+ZnoKErskFaxQWwNSZaTpgir3wl2sE 8gWYImwwg6ukac7JGcfJpcjMTSpFgLyw+YIGhSNysKeH9Q6fr+q6WQCHqHcVi5na1Voa yFEw== X-Gm-Message-State: AOAM533dpUIyrQMqEdV5w1gF1Z3vMD4+kLMWgY8vtF8mAHjcWfzArK4D 0DoNaRXa3lCfs8htxIUiR9PMOfgY51h9jl7Pfwj4UQ== X-Google-Smtp-Source: ABdhPJz4optDOZiBZ3vSZcVI8Py60XPMQCZzXNInCGDBXfYIu467P3Ej4pt6DNl0kP7Ihy/ZCeYrBXG2yJQ/QYMK8Ng= X-Received: by 2002:a05:651c:503:: with SMTP id o3mr3172636ljp.368.1620305017299; Thu, 06 May 2021 05:43:37 -0700 (PDT) MIME-Version: 1.0 References: <20210317113130.2554368-1-geert+renesas@glider.be> In-Reply-To: <20210317113130.2554368-1-geert+renesas@glider.be> From: Linus Walleij Date: Thu, 6 May 2021 14:43:26 +0200 Message-ID: Subject: Re: [PATCH v3] ARM: Parse kdump DT properties To: Geert Uytterhoeven Cc: Russell King , Ard Biesheuvel , Nicolas Pitre , Marek Szyprowski , Dmitry Osipenko , Rob Herring , Simon Horman , Arnd Bergmann , Stephen Boyd , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lukasz Stelmach , Linux ARM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , linux-kernel , kexec@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_054342_024238_343FC580 X-CRM114-Status: GOOD ( 18.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 17, 2021 at 12:31 PM Geert Uytterhoeven wrote: > Parse the following DT properties in the crash dump kernel, to provide a > modern interface between kexec and the crash dump kernel: > - linux,elfcorehdr: ELF core header segment, similar to the > "elfcorehdr=" kernel parameter. > - linux,usable-memory-range: Usable memory reserved for the crash dump > kernel. > This makes the memory reservation explicit. If present, Linux no > longer needs to mask the program counter, and rely on the "mem=" > kernel parameter to obtain the start and size of usable memory. > > For backwards compatibility, the traditional method to derive the start > of memory is still used if "linux,usable-memory-range" is absent, and > the "elfcorehdr=" and "mem=" kernel parameters are still parsed. > > Loosely based on the ARM64 version by Akashi Takahiro. > > Signed-off-by: Geert Uytterhoeven I like the approach overall. I see Rob has some comments that need adressing. The chosen.txt file needs an example of how to use this so people can intuitively get it right if they want to play with it, it was at least the first question in my head: how does that look in practice? Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ledLx-0061vi-VD for kexec@lists.infradead.org; Thu, 06 May 2021 12:43:43 +0000 Received: by mail-lj1-x232.google.com with SMTP id u25so6858271ljg.7 for ; Thu, 06 May 2021 05:43:38 -0700 (PDT) MIME-Version: 1.0 References: <20210317113130.2554368-1-geert+renesas@glider.be> In-Reply-To: <20210317113130.2554368-1-geert+renesas@glider.be> From: Linus Walleij Date: Thu, 6 May 2021 14:43:26 +0200 Message-ID: Subject: Re: [PATCH v3] ARM: Parse kdump DT properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Geert Uytterhoeven Cc: Russell King , Ard Biesheuvel , Nicolas Pitre , Marek Szyprowski , Dmitry Osipenko , Rob Herring , Simon Horman , Arnd Bergmann , Stephen Boyd , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lukasz Stelmach , Linux ARM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-Renesas , linux-kernel , kexec@lists.infradead.org On Wed, Mar 17, 2021 at 12:31 PM Geert Uytterhoeven wrote: > Parse the following DT properties in the crash dump kernel, to provide a > modern interface between kexec and the crash dump kernel: > - linux,elfcorehdr: ELF core header segment, similar to the > "elfcorehdr=" kernel parameter. > - linux,usable-memory-range: Usable memory reserved for the crash dump > kernel. > This makes the memory reservation explicit. If present, Linux no > longer needs to mask the program counter, and rely on the "mem=" > kernel parameter to obtain the start and size of usable memory. > > For backwards compatibility, the traditional method to derive the start > of memory is still used if "linux,usable-memory-range" is absent, and > the "elfcorehdr=" and "mem=" kernel parameters are still parsed. > > Loosely based on the ARM64 version by Akashi Takahiro. > > Signed-off-by: Geert Uytterhoeven I like the approach overall. I see Rob has some comments that need adressing. The chosen.txt file needs an example of how to use this so people can intuitively get it right if they want to play with it, it was at least the first question in my head: how does that look in practice? Yours, Linus Walleij _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec