Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp511270ybl; Thu, 22 Aug 2019 00:08:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE6DhbXvltWu78J7LfBXsTJrTgfXnTlV6wr764rxpC9PeCqYryd5QTDPcAjcQuIkJWSIQh X-Received: by 2002:a17:90a:fe01:: with SMTP id ck1mr3871761pjb.89.1566457732316; Thu, 22 Aug 2019 00:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566457732; cv=none; d=google.com; s=arc-20160816; b=nbBG6BcgmqmQFiKgn+PZ0qujux2FRfYSKPDgWCe96iqX9DWg9Q25iCgNs/q3DF4mfD 3GYORc1DBJeDaLTXZe7GcpEG+73/uJXuGZ/CsfWAVroKIk2cs0Iu9yNqKXQpGCsy57AU UB8JgagnHB/EYOBSMnjNw6M4doS0/DcxjNcDzA9boHMx66ajWLay3GE3I7PXOnCsFYhy zAUd06NnZZnDTbYs5/ajJ3Fkv/4Ru2OMVl0OpFjWirDn6Znm0yCHIHrntQ8KljI2sksV pF6JrXW1k32QX/diqkBGRlAZzZEcqnPkVUnAKiGnEbA3rQM7EXUGEVilb5CEm6UWA4tt 7b0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=WGYmPP20LKf0UgwbEPU3wEDVKfwqikmwMWQTuYhidAM=; b=QZV0PE7QK73UG8yXtopMJeDKNGazfy+2DAJ6YOYNM+hMknXKTETueqXZpZtK8RVv2q wImvq+91Zy2SqciA1pHp77R3xL9o8a+XTH+4kpSZKTpRpYnyjTRapvNZFtWHzZGM7fk3 RX4ll4AQUligSKNUpWnm8wHNaHs90YBcLkp9zyIItW0iN/jkbg4mdrsoyfrDZuhNnJ/B BxCUd03e045a0+OSehFgjvxe7+QW2D3gnprNyHLd+uEakiRgFBwlhjsqYlBbdSmw7OEr nRpq+51Z33ST5pA4JHlXOmX+2mOcqb8lmX9cUjqtS/A+UdMjTGN1VCFtaNAuH8ITW/Lu qe/w== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si16395355pge.429.2019.08.22.00.08.36; Thu, 22 Aug 2019 00:08:52 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731776AbfHVGk4 (ORCPT + 99 others); Thu, 22 Aug 2019 02:40:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9034 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728405AbfHVGk4 (ORCPT ); Thu, 22 Aug 2019 02:40:56 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7M6ajgD056934 for ; Thu, 22 Aug 2019 02:40:55 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2uhnug0ac1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 22 Aug 2019 02:40:54 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Aug 2019 07:40:53 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 22 Aug 2019 07:40:49 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x7M6eRIb38863218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2019 06:40:27 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B6FDAE04D; Thu, 22 Aug 2019 06:40:48 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5DBFEAE045; Thu, 22 Aug 2019 06:40:47 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.59]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 22 Aug 2019 06:40:47 +0000 (GMT) Date: Thu, 22 Aug 2019 09:40:45 +0300 From: Mike Rapoport To: Chester Lin Cc: "linux@armlinux.org.uk" , "ard.biesheuvel@linaro.org" , "akpm@linux-foundation.org" , "geert@linux-m68k.org" , "tglx@linutronix.de" , "mark.rutland@arm.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "guillaume.gardet@arm.com" , Gary Lin , Joey Lee Subject: Re: [PATCH] arm: skip nomap memblocks while finding the lowmem/highmem boundary References: <20190822034425.25899-1-clin@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190822034425.25899-1-clin@suse.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19082206-0020-0000-0000-000003625C21 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19082206-0021-0000-0000-000021B79599 Message-Id: <20190822064045.GB18872@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-22_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908220071 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 22, 2019 at 03:45:34AM +0000, Chester Lin wrote: > adjust_lowmem_bounds() checks every memblocks in order to find the boundary > between lowmem and highmem. However some memblocks could be marked as NOMAP > so they are not used by kernel, which should be skipped while calculating > the boundary. > > Signed-off-by: Chester Lin Reviewed-by: Mike Rapoport > --- > arch/arm/mm/mmu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c > index 426d9085396b..b86dba44d828 100644 > --- a/arch/arm/mm/mmu.c > +++ b/arch/arm/mm/mmu.c > @@ -1181,6 +1181,9 @@ void __init adjust_lowmem_bounds(void) > phys_addr_t block_start = reg->base; > phys_addr_t block_end = reg->base + reg->size; > > + if (memblock_is_nomap(reg)) > + continue; > + > if (reg->base < vmalloc_limit) { > if (block_end > lowmem_limit) > /* > -- > 2.22.0 > -- Sincerely yours, Mike.