Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1258823ybl; Tue, 13 Aug 2019 09:42:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7OWaD2GVM8ofARUxCxsSclJkN95Sf+XbMKRJ1p5/J2O7viGe30sIFFTbeXryDYnWF1R/y X-Received: by 2002:a63:221f:: with SMTP id i31mr35923858pgi.251.1565714545323; Tue, 13 Aug 2019 09:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565714545; cv=none; d=google.com; s=arc-20160816; b=f4yWfQ8+4GoPa6vwxOQtQmzgXuY+D7MB+ztgAwFeSL4BcyBbu7opSzD8JNReehJyh0 Tt8FGk0AUN8C+duh5XuPfp1WnbKOnEHbq1k4EBcnTSKxhAJL9JYYJ7juK3It5A6ZFpV9 3sWoTm3uAnd+ETXZOQbSNjQu3kHFO++IJLxOlVQlgioznqyvRoqxQu7eMkwxCQPrY48k hFXua0EP2DY0KTxF//qM+y7ne8i2YeRXy21Us/d4OlN0WIWX//9PMzmdkoIS5aoQMN4O awdPZ4Zx2ZJZqYNN1lJU7KMM6QfhzKEi9Ov4lm8NX5nDVakxskerMh9ky5eMtAYk7S+j rdgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=I69b5JV+phZxzHOcqYgo6XHHHWtifAb0O34LlDzNHJA=; b=BsYc9AT42RYH3XpLSpMuDU5yVaejoefi3jVJhGMkBjb01SkLHRsj2IM+NSOauuZxR4 4TuCMQLA+yL0wDRi3ngPlWK83niep1mqL8jbemHTB1dfHaiV7q7UZ++h3mExRH2OURxP uKhKO7L/VjJTHpa+2ULdFLAtFixDKn+Iy4kHsk5vKPIBHzeXdCkp3puEa4U67MSQXSKo IS0arvYN96kLG++1uyCAhKR4kU37c2TFsEP5P9uqMPjloSojKyTcu7LSYRu4q7CIKV/G tSZ84zTRrV/7v2/HFLOz9dYQB2g+LYOhQmapRQiX/ag3vdQcqTbaECTc2Mn2xNjJrrrw piRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=EYZczN2l; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y30si16325363pga.143.2019.08.13.09.42.09; Tue, 13 Aug 2019 09:42:25 -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=@sifive.com header.s=google header.b=EYZczN2l; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728088AbfHMQjo (ORCPT + 99 others); Tue, 13 Aug 2019 12:39:44 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:33728 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727923AbfHMQjo (ORCPT ); Tue, 13 Aug 2019 12:39:44 -0400 Received: by mail-ot1-f68.google.com with SMTP id q20so22062081otl.0 for ; Tue, 13 Aug 2019 09:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=I69b5JV+phZxzHOcqYgo6XHHHWtifAb0O34LlDzNHJA=; b=EYZczN2l+SqgeTR3GO7GAxvQEc8bVCSyDaCrU9+64khCt4jyBvD8MNRcIhomdraDeP 7BKBB1AqvgHbi2qq9U2Iw6E6749KNtRkgofzb4RE+czdKJORnjJngYtY4yjPrNyrBpNz jwgpxgNIDDN+l/P1LHXaKoL/lgIV1M6S0eUHMlTSjoQ7J0MAUyb4itLv66hBtYUe7lqz v//euY0qskbOTYEncKVgZMYHdzDBswGtY2kZW6PDJ/gAIeyEQbLeJKpubKOOcoi8dQn4 qUZ3IHLfJfDhcAtLNXIxAn/duIcW+T+HCk4eNzPgKRvwQdGJwNlLr7OyrsuCeFZtDA+t qG/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=I69b5JV+phZxzHOcqYgo6XHHHWtifAb0O34LlDzNHJA=; b=PAKjn9bI/XIPkkpxARY3uHBXiN/QONjkkObK8q2p4J6t8N+dUtqXZtAVa0Wn2HhHM/ S2QM++/N5iLiBGL9Xb6cCAYCad6vJNlom8JLrHjOE5/939rD5rE/bTm2SBZEWIhzrzsA wtHbfz4bLwBjjJ8OxWcQD5ftHHyg9bPxxv9v184j5FHS7JmdTlo1PBZjatg1beZbefNm etVM9aQU9bprJ7/1C9ecxOYbJeXL+3sDBIsB/Kv1nKXo5OV1E/KakEinGHUe0pcP+VSL 4ccu/fmjiNPG3i4WIPjIkRj19qnveexzc3BTYqBXqIgTte+HYxD0y3CCjDENvuPZzZbr f7ig== X-Gm-Message-State: APjAAAUpmSOZ5m99xlad2++ThL2gVaHihM86Cg6+HnmhH4rP9Ymsxg7z WncJdjdMTI44ZQ8gMWRXotGDig== X-Received: by 2002:a5e:8210:: with SMTP id l16mr1641684iom.240.1565714383183; Tue, 13 Aug 2019 09:39:43 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id c13sm22298080iok.84.2019.08.13.09.39.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 09:39:42 -0700 (PDT) Date: Tue, 13 Aug 2019 09:39:41 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Logan Gunthorpe cc: Greentime Hu , Rob Herring , Albert Ou , Andrew Waterman , Palmer Dabbelt , Linux Kernel Mailing List , Stephen Bates , Olof Johansson , greentime.hu@sifive.com, linux-riscv@lists.infradead.org, Michael Clark , Christoph Hellwig , linux-mm@vger.kernel.org Subject: Re: [PATCH v4 2/2] RISC-V: Implement sparsemem In-Reply-To: <5506c875-9387-acc9-a7fe-5b7c10036c40@deltatee.com> Message-ID: References: <20190109203911.7887-1-logang@deltatee.com> <20190109203911.7887-3-logang@deltatee.com> <0926a261-520e-4c40-f926-ddd40bb8ce44@deltatee.com> <96156909-1453-d487-ff66-a041d67c74d6@deltatee.com> <5506c875-9387-acc9-a7fe-5b7c10036c40@deltatee.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Aug 2019, Logan Gunthorpe wrote: > On 2019-08-13 12:04 a.m., Greentime Hu wrote: > > > Every architecture with mmu defines their own pfn_valid(). > > Not true. Arm64, for example just uses the generic implementation in > mmzone.h. arm64 seems to define their own: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/Kconfig#n899 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/mm/init.c#n235 While there are many architectures which have their own pfn_valid(); oddly, almost none of them set HAVE_ARCH_PFN_VALID ? - Paul