Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753885AbaBUITx (ORCPT ); Fri, 21 Feb 2014 03:19:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21088 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752913AbaBUITv (ORCPT ); Fri, 21 Feb 2014 03:19:51 -0500 Date: Fri, 21 Feb 2014 16:18:06 +0800 From: Baoquan He To: Jon Mason Cc: WANG Chao , Muli Ben-Yehuda , discuss@x86-64.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel , "H. Peter Anvin" , Thomas Gleixner , Yinghai Lu , Vivek Goyal Subject: Re: How could we get rid of saved_max_pfn for calgary iommu? Message-ID: <20140221081806.GB1635@dhcp-16-105.nay.redhat.com> References: <20140219061824.GA29703@dhcp-17-89.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/19/14 at 05:04pm, Jon Mason wrote: > On Tue, Feb 18, 2014 at 11:18 PM, WANG Chao wrote: > > Hi, All > > > > arch/x86/kernel/pci-calgary.c is the only user of saved_max_pfn today: > > > > int __init detect_calgary(void) > > { > > [..] > > specified_table_size = determine_tce_table_size((is_kdump_kernel() ? > > saved_max_pfn : max_pfn) * PAGE_SIZE); > > [..] > > } > > IIUC, the purpose of this code is to reuse the TCE table from the > previous kernel. Thus, it needs to be of the same size as the > pre-kdump kernel. It is using the max_pfn to determine the TCE table > size in the non-kdump case. If there is another way to determine the > size it used before, then I am fine making the change to use that way. >From code the size is from 64K to 8M, saved_max_pfn is needed to get this. Could it be a fixed size for TCE table? If this can be a fixed value, E.g 8M, saved_max_pfn will be not needed any more though a little memory may be wasted if total ram is smaller than 4G. Baoquan Thanks > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/