From patchwork Wed Mar 12 17:08:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 26154 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 04713203AB for ; Wed, 12 Mar 2014 17:08:58 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lg15sf8596279vcb.7 for ; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=/onHQfgea/im8xecJ1rU6OPiQsibYvZ/7EqNBz0vc74=; b=mersOO1Grb1gcjzAAYpVpSypM/LaIKTRz5I2krL1KFP0iscs2dzCO4BMYB6Vn8d5x2 u7Mno2Ef7UNej3CEG+92VJtqbyYoHJQMaU+lm59vn8oKKQo37M2r6sQl7SXDzH9Yi4ov KoMPRNQo30j/1/JDfdX0wTFgPyWfqICq8DVdd0ETDVlZDj3To7D1EEr7ktXOSiQC3exC nUh7m5V6WMPVBM/f4SHv7mwajkN+vXT16nX64Id86l+x5DdmbeL1mEk947U/J9ZKSIV5 BL6LkppckaggJBOBTccTLpq6Sf5qmnPkYTnID3XP+8olnQbzGkU6JJD9X4NVhVpHA8CZ FTEQ== X-Gm-Message-State: ALoCoQkw3LbgymojPP/KbwqhQrKE1BlKZ4eCoShZmRugF1AGQjO4AUiQpFMr0Q9dK4aI9PUI5QDT X-Received: by 10.58.37.72 with SMTP id w8mr18029803vej.29.1394644138771; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.85 with SMTP id y79ls2889258qgy.92.gmail; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) X-Received: by 10.58.161.101 with SMTP id xr5mr920992veb.36.1394644138572; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id a5si7005227vez.120.2014.03.12.10.08.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 10:08:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id id10so4083718vcb.40 for ; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) X-Received: by 10.58.37.232 with SMTP id b8mr1655857vek.27.1394644138479; Wed, 12 Mar 2014 10:08:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp305237vck; Wed, 12 Mar 2014 10:08:57 -0700 (PDT) X-Received: by 10.67.5.39 with SMTP id cj7mr6339846pad.7.1394644137445; Wed, 12 Mar 2014 10:08:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qy5si2939112pab.50.2014.03.12.10.08.56; Wed, 12 Mar 2014 10:08:56 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755829AbaCLRIs (ORCPT + 26 others); Wed, 12 Mar 2014 13:08:48 -0400 Received: from mail-qc0-f182.google.com ([209.85.216.182]:52390 "EHLO mail-qc0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755805AbaCLRIr (ORCPT ); Wed, 12 Mar 2014 13:08:47 -0400 Received: by mail-qc0-f182.google.com with SMTP id e16so11799301qcx.13 for ; Wed, 12 Mar 2014 10:08:46 -0700 (PDT) X-Received: by 10.224.25.73 with SMTP id y9mr3556372qab.101.1394644126552; Wed, 12 Mar 2014 10:08:46 -0700 (PDT) Received: from xanadu.home (modemcable177.143-130-66.mc.videotron.ca. [66.130.143.177]) by mx.google.com with ESMTPSA id r110sm37183863qgd.1.2014.03.12.10.08.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 10:08:44 -0700 (PDT) Date: Wed, 12 Mar 2014 13:08:42 -0400 (EDT) From: Nicolas Pitre To: Liu hua cc: Russell King - ARM Linux , Will Deacon , msalter@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Wang Nan , peifeiyue@huawei.com, wangkefeng.wang@huawei.com, Li Zefan Subject: Re: [ARM]Fixmap mapping region is not enough for system of 14+ CPUs. In-Reply-To: <53204956.30703@huawei.com> Message-ID: References: <53203F9C.8040500@huawei.com> <53204956.30703@huawei.com> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Wed, 12 Mar 2014, Liu hua wrote: > Hi Russell, Will or Nicolas, > > (In this mail, we only discuss ARM 32-bit linux.) > > As we know, the region (0xfff00000-0xfffdffff) is reserved as fixmap > mapping region. > > The function "kmap_atomic" maps highmem pages to this region referring > to CPUID and per-cpu variable "__kmap_atomic_idx" via > > idx = type + KM_TYPE_NR * smp_processor_id(); > vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); > > Size of region used by one cpu is 0x10000 (KM_TYPE_NR << PAGE_SHIFT). > And the total size of the fixmap mapping region is 0xe0000. > (only support 14 CPUs). > > So in a system of more than 14 CPUs, this region is not large enough. > should we change the memory layout on ARM Linux to support 14+ cpu system ? > Or can we do anything else to support that ? How many CPUs do you have? What about the following patch? If this doesn't work for you then more intrusive changes will be needed. Nicolas --- 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/ diff --git a/arch/arm/include/asm/fixmap.h b/arch/arm/include/asm/fixmap.h index 68ea615c2a..254f2df08d 100644 --- a/arch/arm/include/asm/fixmap.h +++ b/arch/arm/include/asm/fixmap.h @@ -14,7 +14,17 @@ */ #define FIXADDR_START 0xfff00000UL + +#if !defined(CONFIG_HAVE_TCM) && !defined(CONFIG_CPU_XSCALE) +/* + * If no TCM nor on on a XScale then enlarge the fixmap area to + * accommodate up to 30 CPUs. + */ +#define FIXADDR_END 0xffff0000UL +#else #define FIXADDR_END 0xfffe0000UL +#endif + #define FIXADDR_TOP (FIXADDR_END - PAGE_SIZE) enum fixed_addresses {