From patchwork Thu Apr 2 06:01:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Anand X-Patchwork-Id: 6144421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 741D0BF4A6 for ; Thu, 2 Apr 2015 06:05:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7139220108 for ; Thu, 2 Apr 2015 06:05:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 864AC200D6 for ; Thu, 2 Apr 2015 06:05:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdYCm-0003jz-C4; Thu, 02 Apr 2015 06:02:16 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdYCh-0003Vd-Rw; Thu, 02 Apr 2015 06:02:12 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3261McK009293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Apr 2015 02:01:22 -0400 Received: from localhost.localdomain (vpn-58-10.rdu2.redhat.com [10.10.58.10]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3261FNO028150; Thu, 2 Apr 2015 02:01:16 -0400 Message-ID: <551CDB2A.5060604@redhat.com> Date: Thu, 02 Apr 2015 11:31:14 +0530 From: Pratyush Anand User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: AKASHI Takahiro , catalin.marinas@arm.com, will.deacon@arm.com, vgoyal@redhat.com, hbabus@us.ibm.com Subject: Re: [PATCH 0/5] arm64: add kdump support References: <1427358533-3754-1-git-send-email-takahiro.akashi@linaro.org> <551C1537.2030009@redhat.com> <551C7EF5.9030806@linaro.org> <551CCC67.1040607@redhat.com> <551CD58E.60807@linaro.org> In-Reply-To: <551CD58E.60807@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150401_230212_043017_39B2060D X-CRM114-Status: GOOD ( 12.03 ) X-Spam-Score: -5.0 (-----) Cc: linaro-kernel@lists.linaro.org, geoff@infradead.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, david.griego@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thursday 02 April 2015 11:07 AM, AKASHI Takahiro wrote: > Pratyush, > > On 04/02/2015 01:58 PM, Pratyush Anand wrote: >> >> >> On Thursday 02 April 2015 04:57 AM, AKASHI Takahiro wrote: >>> Please try my latest kexec-tools in my linaro repo (branch name is >>> kdump/v0.11) >>> and let me know the result. >> >> Thanks a lot.. Just fetched your repo and found v.0.11. >> >> With this crash kernel loaded successfully, if I do not use initrd. >> >> With following I still see Overlapping memory segments >> >> kexec -p /home/panand/work/kernel/bsa2_kdump/vmlinux >> --initrd=/boot/initramfs-3.19.0.bz1198945+.img --append="$( cat >> /proc/cmdline ) maxcpus=1 mem=64M reset_devices" > > How big is your initrd? > If it is good small, please tell me segments info, or messages from > add_segment_phys_virt() > for all the segments. > add_segment_phys_virt: 000000000dcd0b90 - 000000000dcd0f90 (00000400) -> 00000040c3ff0000 - 00000040c4000000 (00010000) add_segment_phys_virt: 000003ff88c10010 - 000003ff8984a010 (00c3a000) -> 00000040c0080000 - 00000040c1310000 (01290000) add_segment_phys_virt: 000000000dcd53c0 - 000000000dcd96b8 (000042f8) -> 00000040c0000000 - 00000040c0010000 (00010000) add_segment_phys_virt: 000003ff87360010 - 000003ff88bfcc2f (0189cc1f) -> 00000040c0010000 - 00000040c18b0000 (018a0000) Overlapping memory segments at 0x40c18b0000 sort_segments failed Why do we try to fit dtb just after crash_reserved_mem.start. Should n't it should start after crash_reserved_mem.start + arm64_mem.text_offset + arm64_mem.image_size I tried following and it works perfectly: } With this changes new allocations are: add_segment_phys_virt: 0000000010350b90 - 0000000010350f90 (00000400) -> 00000040c3ff0000 - 00000040c4000000 (00010000) add_segment_phys_virt: 000003ff7ad70010 - 000003ff7b9aa010 (00c3a000) -> 00000040c0080000 - 00000040c1310000 (01290000) add_segment_phys_virt: 00000000103553c0 - 00000000103596b8 (000042f8) -> 00000040c1360000 - 00000040c1370000 (00010000) add_segment_phys_virt: 000003ff794c0010 - 000003ff7ad5cc2f (0189cc1f) -> 00000040c1370000 - 00000040c2c10000 (018a0000) add_segment_phys_virt: 00000000103596c0 - 0000000010360190 (00006ad0) -> 00000040c2c10000 - 00000040c2c20000 (00010000) Crash kernel loaded upon panic. ~Pratyush diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c index 41266f294589..75f4e4d269ca 100644 --- a/kexec/arch/arm64/crashdump-arm64.c +++ b/kexec/arch/arm64/crashdump-arm64.c @@ -312,5 +312,6 @@ void set_crash_entry(struct mem_ehdr *ehdr, struct kexec_info *info) off_t locate_dtb_in_crashmem(struct kexec_info *info, off_t dtb_size) { return locate_hole(info, dtb_size, 128UL * 1024, - crash_reserved_mem.start, crash_reserved_mem.end, 1); + crash_reserved_mem.start + arm64_mem.text_offset + + arm64_mem.image_size, crash_reserved_mem.end, 1);