Received: by 10.213.65.68 with SMTP id h4csp1672332imn; Mon, 19 Mar 2018 10:10:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELtMg1ZKW8h3QptSQdYEjzdpVq0awwThBFWvQk26Fj2TWI7qQxy2BsamI9Kjxlh+GgEiDhOJ X-Received: by 10.99.109.203 with SMTP id i194mr9903161pgc.314.1521479459506; Mon, 19 Mar 2018 10:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521479459; cv=none; d=google.com; s=arc-20160816; b=n59y/RyJ9/Abey/XkrfS5x1spwSmmi6db18HK3LLD3TWPa3NkVA7OICpz4fBVjaiko 5ekHmpLOFb8qlFIXpGNu3g6GJfVcHYTD1T35EQcA2wY+SPYD2hYVlG1Toq7YcPANBh1O XtYGbjosO5CWOGCDYbARlF4PsM4z0Lm0uqRbN0myMQBMzLeJO20Ii+tZduh7IPV6wSvt rdQ1qOrIk9aLatDq7ZCBar0lcCynbJmtVQizZ6AJqfmOQap+AZicekRFoPKImZBEdKjR OQnmjr8bBv0PX9gkAw9bmBbdoYmEJ80dw1BbShZJuRhJ3iNdXGaxjaW24u2RG0cFoLAx Ug8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Jf9F9btYzjAAzg9fJFPNg8Yki1nclgyQ7G43C+Le64c=; b=vbwxVDNDpaUouawyF1e2zgkXOM5uHWvwDF4w4VbbKMvOgT71sHjBfh2/3HfUPKPjBg ZIWPsPcrHJMR1pUaJEVrfsfZSE7KvWQM+qMpsvtMXbj5wD+xPrea1qU6I+TfkYdT3qla ZSHu41eGVICv0j3LPcChL2Lu1Kla6DFoiasbBF1zOtaeQjI7vpOcqUKdR6VJIFM4qE2Q GTyAEIzfFvUvr2hZE90nx5n9kwyvRg37CvD21720FyJH40F78U3TKKsQIcV0teqWcDk4 UHJBilEX0UkZvOyF4lrvXw0prawt+O2sOeVpY1Qt16t6VKq1R8d+XeeTdEJH8PHBkdFe /YpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NeR/ZIXe; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e33-v6si270156pld.493.2018.03.19.10.10.45; Mon, 19 Mar 2018 10:10:59 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=NeR/ZIXe; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966944AbeCSRIR (ORCPT + 99 others); Mon, 19 Mar 2018 13:08:17 -0400 Received: from mail-bn3nam01on0108.outbound.protection.outlook.com ([104.47.33.108]:5984 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966172AbeCSQKr (ORCPT ); Mon, 19 Mar 2018 12:10:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Jf9F9btYzjAAzg9fJFPNg8Yki1nclgyQ7G43C+Le64c=; b=NeR/ZIXeFYnmjWE7AtCEhqgWJ62I2AqezWwRqHrj04Qc4qi+ABWZoH6R8JCrxl7v7gUBbyivGJMIm+pKIpT01tGn4XRnjJJ9/Z008+hxVLmrIbg0KKRv3ZHQG7qvjf4GbNLH6D/hO0tUNP7IlaNXZ5Oc+Uuj1okevCGw/09qJx0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1095.namprd21.prod.outlook.com (52.132.130.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:10:42 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:10:42 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Marcin Nowakowski , "linux-mips@linux-mips.org" , Ralf Baechle , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 136/167] MIPS: mm: adjust PKMAP location Thread-Topic: [PATCH AUTOSEL for 4.4 136/167] MIPS: mm: adjust PKMAP location Thread-Index: AQHTv5x7PZsTsYQjY0i42w5FsRTaPw== Date: Mon, 19 Mar 2018 16:08:13 +0000 Message-ID: <20180319160513.16384-136-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1095;7:KVwj07RosKMq5rOBgNKRSDdXGpkP/iFsVMmRLVqR4dFJWAbBmQAP7e2x6J2Q3Zg+7STq2PGDR+FuuSPZUIv2wkqtA3NJCLmzNIQ5wvGrbBF9JTHBPMi1/bhoT7L5HY+dafOqB59u0HTyV/z4rvKbnJPeIms10MAirE2OHmTa1ibB+mIbEFlwC2wAqDr2oOSLFepraQ1ukIeMGySpcVvqkthlPajBwWqgLo7aFaI/s2AWyWHohGhWGR6cNnKvXIqo;20:LPvx5kui++sv9qnBEdVuQPeg7OwLsJpCzxpQM4wVQUC6Em4jixAJX7JWfTwcLUocWWHMYS1fHfm+WleQYIs6BM5m9PsgbAdTda9ZzrPcgh/91jKAY4Ro4oFEvixY/45sVmbugU/5I782oHGUikICoV1fYu4T0HpbwCm1NXDr7EI= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8c238b48-a04e-4023-4df5-08d58db3f6af x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1095; x-ms-traffictypediagnostic: DM5PR2101MB1095: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1095;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1095; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(366004)(39860400002)(396003)(39380400002)(189003)(199004)(305945005)(316002)(1076002)(7736002)(14454004)(86612001)(25786009)(8936002)(2950100002)(110136005)(66066001)(186003)(10090500001)(6666003)(5250100002)(2501003)(99286004)(76176011)(86362001)(4326008)(68736007)(3660700001)(105586002)(8676002)(81166006)(81156014)(106356001)(3280700002)(72206003)(10290500003)(478600001)(2900100001)(966005)(59450400001)(97736004)(54906003)(6512007)(6306002)(53936002)(6506007)(102836004)(6436002)(5660300001)(6486002)(107886003)(26005)(2906002)(22452003)(6116002)(3846002)(36756003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1095;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: RCTYDg/GVTlYV2DwAqU7Sp9+HlrxYySSDSB/9pb2Zh1IM7Pz3s4dt3wbrdvBRaae4LHbkE0QxTSWTGKaAGKuzm6nqhZjAutE2jcF2w7Xq1B/vqUmE8CEn7nc7RiGY/o62wJjF0FwDf2LEQ06YI7Cb/FlTiu2q1OWKpoq1EEcuKxYjyiaSoLDx0e6VmOXJnXuMguYkvpYquXcT0LfqH5OR4spwl0sTJZj+ImN7WCXTVf12X7NcPcnuOkHmyZoCf1UGvWZMBvQsjhBU3keFKQZXjOgJeOWmPVpp8Lu+VIXIue41DX0hEndw6sSBW05690ifudg5u8JCBj2R+wKDBaYmQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c238b48-a04e-4023-4df5-08d58db3f6af X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:08:13.6668 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1095 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcin Nowakowski [ Upstream commit c56e7a4c3e77f6fbd9b55c06c14eda65aae58958 ] Space reserved for PKMap should span from PKMAP_BASE to FIXADDR_START. For large page sizes this is not the case as eg. for 64k pages the range currently defined is from 0xfe000000 to 0x102000000(!!) which obviously isn't right. Remove the hardcoded location and set the BASE address as an offset from FIXADDR_START. Since all PKMAP ptes have to be placed in a contiguous memory, ensure that this is the case by placing them all in a single page. This is achieved by aligning the end address to pkmap pages count pages. Signed-off-by: Marcin Nowakowski Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15950/ Signed-off-by: Ralf Baechle Signed-off-by: Sasha Levin --- arch/mips/include/asm/pgtable-32.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgt= able-32.h index 832e2167d00f..ef7c02af7522 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h @@ -18,6 +18,10 @@ =20 #include =20 +#ifdef CONFIG_HIGHMEM +#include +#endif + extern int temp_tlb_entry; =20 /* @@ -61,7 +65,8 @@ extern int add_temporary_entry(unsigned long entrylo0, un= signed long entrylo1, =20 #define VMALLOC_START MAP_BASE =20 -#define PKMAP_BASE (0xfe000000UL) +#define PKMAP_END ((FIXADDR_START) & ~((LAST_PKMAP << PAGE_SHIFT)-1)) +#define PKMAP_BASE (PKMAP_END - PAGE_SIZE * LAST_PKMAP) =20 #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) --=20 2.14.1