From patchwork Fri Sep 29 10:41:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 9977479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51E8360311 for ; Fri, 29 Sep 2017 10:42:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 522B5297AC for ; Fri, 29 Sep 2017 10:42:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 458EB29810; Fri, 29 Sep 2017 10:42:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A5271297AC for ; Fri, 29 Sep 2017 10:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9rlAZa3RCGt9r8tOXAxltGLBCKGmAxefYettpxO//bI=; b=ocoyF37vI8wIBl p87lrE4SDgC3Xe8Sy7jmSUlGu7djAlhWjfyWkI4kU2Nv+7GBcufm+AyDBqpHBa6gR0/9Jui07sFpM o7+tE2lkYxYGgx9i+w94jqMQN5X/DQdy5WkiXEYMPYEgxGJTQtnh5OoABnPWodSlpWLSMdNexY90r nTZlunFLhWiO82tyDLF2xy78BpJdcBHD/PIFRssTwySa/3p08yRBMYVgedJ0JCO9mTQ1tEgAOzfvc fHam5nxFjPGD6tig58C7tJ/bLxMgJKIho8xPwUSqPttRZ1qzgqhWQo0ecXliajeb3TXM74WpZCKro SHSVDtkVRgILAw7/Ax9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dxskE-0001R4-Eb; Fri, 29 Sep 2017 10:42:10 +0000 Received: from mail.aperture-lab.de ([2a01:4f8:171:314c::100:a1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dxskA-0001IC-TV for linux-amlogic@lists.infradead.org; Fri, 29 Sep 2017 10:42:09 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id 68C7BE3937; Fri, 29 Sep 2017 12:41:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id dVJ86sjdAseW; Fri, 29 Sep 2017 12:41:41 +0200 (CEST) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:c85:8cff:fe0f:63fe]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Fri, 29 Sep 2017 12:41:41 +0200 (CEST) From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: linux-amlogic@lists.infradead.org Subject: [RFC PATCH] ARM: dts: meson8b: add reserved memory zones Date: Fri, 29 Sep 2017 12:41:32 +0200 Message-Id: <20170929104132.18138-1-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170929_034207_142154_6FD9DBE7 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Linus=20L=C3=BCssing?= Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP So far, the stress-ng tool for instance quickly resulted in a silent freeze of the system with no prior notice on a serial console when running its filesystem or memory stressor classes. Even with a panic-on-OOM and reboot-on-panic (vm.panic_on_oom=1, kernel.panic=10) configured, the system would neither reboot nor would the OOM killer get any chance to otherwise do its job. By copying the reserved memory sections used for meson8 already, stress-ng was able to run on an Odroid C1+ just fine for several hours, the OOM killer was able to do kill processes again and if configured would successfully trigger a reboot of the system. Reported-by: Linus Lüssing Acked-by: Martin Blumenstingl --- The following stress-ng command worked fine now: $ stress-ng -v --sequential 0 -t 120s --exclude sysfs,opcode --metrics (5 hours runtime, tested on an Odroid C1+ with an 4.14-rc1 kernel + SMP + USB DTS patches) I do not know why these memory regions would need to be reserved, I copied them blindly from mesno8.dtsi. Furthermore I'm a little confused because the Hardkernel sources seem to reserver a totally different memory region (16MB from the region at 80MB to 96MB): https://github.com/hardkernel/linux/blob/odroidc-3.10.y/arch/arm/boot/dts/meson8b_odroidc.dts#L58 If anyone more experienced and knowledege in this would like to claim authorship and responsibility for this patch or would like to suggest an alternative one then please feel free to do so. --- arch/arm/boot/dts/meson8b.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index b9b6600..aa5c79c 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -92,6 +92,33 @@ }; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* 2 MiB reserved for Hardware ROM Firmware? */ + hwrom@0 { + reg = <0x0 0x200000>; + no-map; + }; + + /* + * 1 MiB reserved for the "ARM Power Firmware": this is ARM + * code which is responsible for system suspend. It loads a + * piece of ARC code ("arc_power" in the vendor u-boot tree) + * into SRAM, executes that and shuts down the (last) ARM core. + * The arc_power firmware then checks various wakeup sources + * (IR remote receiver, HDMI CEC, WIFI and Bluetooth wakeup or + * simply the power key) and re-starts the ARM core once it + * detects a wakeup request. + */ + power-firmware@4f00000 { + reg = <0x4f00000 0x100000>; + no-map; + }; + }; + scu@c4300000 { compatible = "arm,cortex-a5-scu"; reg = <0xc4300000 0x100>;