From patchwork Sat Dec 17 01:54:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13075752 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F37DC4332F for ; Sat, 17 Dec 2022 01:55:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D3A268E0002; Fri, 16 Dec 2022 20:55:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CE9A78E0001; Fri, 16 Dec 2022 20:55:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB26F8E0002; Fri, 16 Dec 2022 20:55:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id AD0498E0001 for ; Fri, 16 Dec 2022 20:55:33 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8F4B21A05C7 for ; Sat, 17 Dec 2022 01:55:33 +0000 (UTC) X-FDA: 80250131346.13.8999F09 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id EB35918000B for ; Sat, 17 Dec 2022 01:55:30 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QoxqlCG7; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671242131; a=rsa-sha256; cv=none; b=PAPP8YtNiSlQxfIwt43UFNMIE3K4q+qqOGBu92rd1E7Ctn8kU8SKbIJooXoDo5OYW3sn0Q MNf9ouPBDPD9sJn3vKP4aAR3G3D9ejGYgGdPswkxrQfzfTI0tuekqq1dbOjiEormdnc6ec YiTpsVDenayt5Y8hzp9hsAWCFBEiy6Y= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QoxqlCG7; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671242131; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TQCOjBquH4pkVeAMaXmqGzrHd+dzzqTdFcVytK4qewc=; b=eXyCWHA5uN/PBLNvwkJ0hiiHpK/7O2BgrPnSzI1hZpII/DX0d7KIHtvCOMAkr7QLW2goLs l/RExENN4QC4blajoL73JROCpMveAkPtG4jB8IZX+iidXseJtOqg7WEzDqdNQdmxM3l6JV 0kQEHWYH+E76GFgSiUiWd46vocRSZ0A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671242130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TQCOjBquH4pkVeAMaXmqGzrHd+dzzqTdFcVytK4qewc=; b=QoxqlCG700Odknr//Q/DMdCWwLr33D2NuoPp7WChT+NSX+4A8tZCYeAEwUl0pwKVaNktLE 0knTtuP8iKcHI1Xtqfmv2XynN3ZsGp0KB3ztwa5ySPoLk/I3N6BZDjiPuneujbfcVenUwE oWOyGcc5DMRQnbm7O3VkIryIrxl1jXo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-182-GWwgl6saO368hRoPTIHngg-1; Fri, 16 Dec 2022 20:55:25 -0500 X-MC-Unique: GWwgl6saO368hRoPTIHngg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B12A2811E9C; Sat, 17 Dec 2022 01:55:24 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-34.pek2.redhat.com [10.72.12.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46C0F400F5A; Sat, 17 Dec 2022 01:55:18 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, urezki@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org, Baoquan He , Yoshinori Sato , Rich Felker , Greg Kroah-Hartman , linux-sh@vger.kernel.org Subject: [PATCH v2 7/7] sh: mm: set VM_IOREMAP flag to the vmalloc area Date: Sat, 17 Dec 2022 09:54:35 +0800 Message-Id: <20221217015435.73889-8-bhe@redhat.com> In-Reply-To: <20221217015435.73889-1-bhe@redhat.com> References: <20221217015435.73889-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EB35918000B X-Stat-Signature: bp1oprx5whsxafezzhjfyopgewbf6pr4 X-HE-Tag: 1671242130-147832 X-HE-Meta: U2FsdGVkX19zNSMVxXzfQ0cmszHvXcgVQJ+4PjI0uZurJVAQfAYMafHzJLt80fv3x1L0llTdb87ccaL5e7SgvnukUJtCpVhFfmsf6mn1RMSRMtIde2YsVBsi4s1RSiqSBZ2Nfgjjz2zoX7M+wRze7UAQ56aDIl59+jxJqzyYXmA3CpHOEvEBclYl2oIuw3wDhoOk+298aUupUMml3mAeixsZr2lUpCFki5UJloLMO54+mlqxz0CIUdHoCOJENG/NxvSeSi0aK4L3LxzGH06nErYLB2ui5v4g0S+oSqgiEKLGrdPYbNQmwQO32Fm2cFw2No0oRn/JWB0Cr1GULEqV3SES79ZFvyjVZdeerq5ykAzUqXQyFqQOcVMsyfFBI74z8ezudQPOxcZD0fhK/0fRf8G0SOjaPwzidLEjY/dZ6nY9empZjzxH8+mEsS4JUffJ/1r54BUBeCIwfuEkZVxEZKnlu1NI2nAsTvHrmo8Uf53ph408qSzh8SXA3gLPnNTftPsHXVucedYPB8uoc8Cc7lP1/hHQrAFU5D1DjjaPWwlxYPWueb9zIPsUWbTVp80440wJY/tLCCxHxtNnsFblYtABslGTbdlLIPQxCsf92u1veX/EWGbBbF2cNwhxr06/YdLsnP0eMD38bc4KXfH3otBIHQrAUGprVjaGwhcCWrZ7LxOBlId+d8Vvgl3VgiSSsDXdazDDOb9hFhLtvoAggYa8O8jvoxSGGyKgv3fT32w/N4exXvpVb02WyVrlJjhyllyEHIec2mRP6bOjLJ+eWtkjXZBscV5b9zCp40o1V85+pLaXYpx/tCoHCwS4BmsNto+a3SQVzKcYUbfZEioTWWJP3KVb061C/KCF+g3IrHa9jy+OyOTrzNHDGkYBgDqQf0wHcIJNNNH/5zULLtJlv+hAoeqN52mLOELhnaOB0Xz4qX2qbvRkBlWgc2H/Yz1b9TM/DSDtxEYe1AVrgwV vCg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Currently, for vmalloc areas with flag VM_IOREMAP set, except of the specific alignment clamping in __get_vm_area_node(), they will be 1) Shown as ioremap in /proc/vmallocinfo; 2) Ignored by /proc/kcore reading via vread() So for the ioremap in __sq_remap() of sh, we should set VM_IOREMAP in flag to make it handled correctly as above. Signed-off-by: Baoquan He Cc: Yoshinori Sato Cc: Rich Felker Cc: Greg Kroah-Hartman Cc: linux-sh@vger.kernel.org --- arch/sh/kernel/cpu/sh4/sq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index a76b94e41e91..27f2e3da5aa2 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -103,7 +103,7 @@ static int __sq_remap(struct sq_mapping *map, pgprot_t prot) #if defined(CONFIG_MMU) struct vm_struct *vma; - vma = __get_vm_area_caller(map->size, VM_ALLOC, map->sq_addr, + vma = __get_vm_area_caller(map->size, VM_IOREMAP, map->sq_addr, SQ_ADDRMAX, __builtin_return_address(0)); if (!vma) return -ENOMEM;