Received: by 10.213.65.68 with SMTP id h4csp335708imn; Wed, 21 Mar 2018 20:38:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELstaRYeflI+xv4VVfxiaNwDqaWK7KEokYzsViYgk+6RSgRPcsAS81Hnj1f1jW4jYGeMHb/t X-Received: by 2002:a17:902:28e3:: with SMTP id f90-v6mr15041774plb.250.1521689933929; Wed, 21 Mar 2018 20:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521689933; cv=none; d=google.com; s=arc-20160816; b=ZMwlSGo1jWDaSMBRMTyGIdLcqml/2yVorsF6jRS0j4KfQm1PhO3w7WYJS4x8a32nAC lVf4BQTU90THM7i01IEEgKPZW2OKIAITuJNfFsWnTO97h2CvHWRY9ywgaM7/KyEk4SWa 3MqpSElFUZmfpZ25YKRUYtEp7N03xiH8XA2IDpRZYSRCg3ZATVeE5Ku3NtZG7Xv37Duh dqdX38D/Xkm1ah3cB0vQeqz6PbuvsOqTnIgLHb/MPc97jiTDHN5B+2i66WEbB1duUtAw lCAmgboc3aeGeZ91UAMgub50Qn2ez4Us0vw0+/EGiQXJytOp/EDkv4HWiFvpOEIMd1OJ Ts+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/6YKKIapjo0dfoorCzBsVEBLe8ccGtP3ygFoFFTciDI=; b=F1jd/WfjbYqsGymHydCqbu6q0a/IoKN/IrjiQFcOHuMWJyVefwLRduqDmzCbZPk3Tn MYFJMSStfAWvHXzkqrlCa5QSZjec8BkwnTbAEojGDym0BzI/fs0rLLtUHQSwqcWzzMza onyZ61D1EqB+ekV3XIOLW6Fk2qiI/fnA3q2H0mUDuD/8g+MCdBxeSCkAmGoay/tKfNzZ gNDf87I9iGHN3iuq2UGi2JSK+gqyd0Pw5dhFs1pmq1FSwA6QHXLdtU3/Y8IjD0z4RWOf jVdwukXpq5HHIjE4cRAb1JhDeKLjbh8VvGXg2VOkah4BjC3aF+nKdNIEdiRWKwIJgmeE bdTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si3739933pgq.48.2018.03.21.20.38.39; Wed, 21 Mar 2018 20:38:53 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752004AbeCVDhi (ORCPT + 99 others); Wed, 21 Mar 2018 23:37:38 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751728AbeCVDhh (ORCPT ); Wed, 21 Mar 2018 23:37:37 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD2DD8182D2E; Thu, 22 Mar 2018 03:37:36 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-8-26.pek2.redhat.com [10.72.8.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B7F92026980; Thu, 22 Mar 2018 03:37:31 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, akpm@linux-foundation.org, takahiro.akashi@linaro.org, ebiederm@xmission.com, vgoyal@redhat.com, dyoung@redhat.com, prudo@linux.vnet.ibm.com, Baoquan He Subject: [PATCH 0/2] Kexec_file: Load kernel at top of system ram Date: Thu, 22 Mar 2018 11:37:20 +0800 Message-Id: <20180322033722.9279-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Mar 2018 03:37:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 22 Mar 2018 03:37:36 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bhe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current kexec_file ignores kexec_buf.top_down value when call arch_kexec_walk_mem() to allocate memory for loading kernel/initrd stuffs. This is not supposed to be what kexec_buf.top_down is used for. In patch 0001, introduce a new function walk_system_ram_res_rev() which is a variant of walk_system_ram_res(), walks through resources of System RAM from top to down. And patch 0001 is picked from AKASHI's patchset which adds arm64 kexec_file support. His next round of post won't need walk_system_ram_res_rev any more, so I take it into this patchset and use it in patch 0002. In patch 0002, check kexec_buf.top_down in arch_kexec_walk_mem(), if its value is 'true', call walk_system_ram_res_rev(). Otherwise call walk_system_ram_res(). AKASHI Takahiro (1): resource: add walk_system_ram_res_rev() Baoquan He (1): kexec_file: Load kernel at top of system RAM if required include/linux/ioport.h | 3 +++ kernel/kexec_file.c | 2 ++ kernel/resource.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) -- 2.13.6