From patchwork Fri Jan 13 03:19:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13099680 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 F2469C54EBE for ; Fri, 13 Jan 2023 03:20:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 916FE900004; Thu, 12 Jan 2023 22:20:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C7A1900003; Thu, 12 Jan 2023 22:20:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78F20900007; Thu, 12 Jan 2023 22:20:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6C714900003 for ; Thu, 12 Jan 2023 22:20:20 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 49FCDA0156 for ; Fri, 13 Jan 2023 03:20:20 +0000 (UTC) X-FDA: 80348322600.08.AB4D874 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id B45C21A0004 for ; Fri, 13 Jan 2023 03:20:17 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QzZAg26U; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673580017; 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=285BkZEBCnAc+7uwK4L/HsvDVOrMR6yTW3lbxZ2Ub9M=; b=bt6ewo5Ub8733CWC569EssxRN61PShIQ2Oj7Kl/MhSruyb5bLlBUcXFy4A5wnof6qM28SG 4VlvAdwPbAj3LavJRnCUkrQ4hJUHKFIetgXd3EoQEQQUdv7yvuiRt1s7jyVYQavi9338A/ JHbOyRw/3gZJwCTuwYlhLJ2JKTCDPtQ= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QzZAg26U; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673580017; a=rsa-sha256; cv=none; b=8hKXDf6antNgN5M32Wm4lMQSJoEO5afNI2bg84x0QYAhVWJfikul4fdz2/d/iYrqngJf0O AUjEUK9ToSRiLOq3gpGgwJt8uQAh6/YC6fdbv7JBSRnVqByUF2Qk8s5RIDgPg/sgV1/cRj up0Ly+XtH2stOTTrR9Bt6yQsjoSctD4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673580017; 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=285BkZEBCnAc+7uwK4L/HsvDVOrMR6yTW3lbxZ2Ub9M=; b=QzZAg26UrDXJ8G5YxvNog7k20SEnKmPBJIZTKb3mTX9RjyC4II2mILmMyKEhKMte1vLyA3 1uhUAKNPo58IRtDl2VpMY3PCV7xPY2GUxHKInWuG1rhAz1zdYkS0sjOI9lpo81hwS9VAha ew1Rz/ruJFre57+oQ+YG3nG13U87WOY= 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-141-u4nw0xOlNvOayULRaj1xFA-1; Thu, 12 Jan 2023 22:20:13 -0500 X-MC-Unique: u4nw0xOlNvOayULRaj1xFA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D52B9101A521; Fri, 13 Jan 2023 03:20:12 +0000 (UTC) Received: from fedora.redhat.com (ovpn-12-229.pek2.redhat.com [10.72.12.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 724094078903; Fri, 13 Jan 2023 03:20:08 +0000 (UTC) From: Baoquan He To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, urezki@gmail.com, lstoakes@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org, Baoquan He Subject: [PATCH v3 7/7] sh: mm: set VM_IOREMAP flag to the vmalloc area Date: Fri, 13 Jan 2023 11:19:21 +0800 Message-Id: <20230113031921.64716-8-bhe@redhat.com> In-Reply-To: <20230113031921.64716-1-bhe@redhat.com> References: <20230113031921.64716-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspamd-Queue-Id: B45C21A0004 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: p48zp8d6hezcb7j9s33mqg4ygx18jiua X-HE-Tag: 1673580017-428701 X-HE-Meta: U2FsdGVkX1/1xKE7YpW0lCGTUzIp+vsqWMeZr7vwA2J5Dqa1XHqvPmtcgFwnOM6Raa08MdtS3u6hCf5j4M3x+SqIyCQAWhMxtiJRJOE5w/cGGpbSk/X/1XLnI5IU0J3Gul/it6+5I8uJbTooqlUIkWQhlj765rdtHSSv136ORyr9yKIp4NDVJauhCGXvR6tjx58fCp38pnkU8JcyedMj/WYnSLbSIKrlRYfRCp3cozvS+c67O6N1PxCKNLevG40VwmydLX3bNrPtGkBMHEbx0BzltPdpB0urZv9PPZTJKhjZb3/23fCLAXH4/Mbw3YaQ0oaoKkaq1SFfZtQdI7skVW2rdZiYb2uMirdC3hMkuNIXnyharTG5NroifYI3fS/H+LJfqQ6zhnGddryp3iI2ha8etYl0JaQ/nslRF2MkAl+PktVWM6HD1CZ9glv4FsrLl+SNGfYqglDDh5oPfmwu9H0M4Ab1KBSVOl/YpqEnTnOZq5xAjbvNNGk4G46+FH8d0Ba93YL+9u7OkkbpDleToCxPiZqId0FY4jlC/IQeXYgFFCcBwO8cJvo/eeNoZFPuOEzFHeaMM+kxD7Mxk5aGq8SYSKNNRWxzaEl+XIR6eJG+CiVq46WMhJZdIcCu0XT/1fHqbkHcPBUVZRHnlAyr8/UoVk5lwsbMl1sixjzpdQWkHqy0UY/SHnfQEaEZgnntTppTF2i9vnN3BqXEFKlq9W75aYj4tTRvu+a5/gTCjO/5Ym4OdfufDxXMDzt1kHamYb004FCon0QsCjTr/yujg4bHSGXN0E68u++f9fNWBj0BuHcizL8nZTNHh9TNOVPH51nyWvbGH+Ah20UDX5Ft8KyE4CgXByGo+bM+d2/pG+PSC/QhnZvF+UNndMUxAQTXuknmTV2nWmdRdW106wiWLWX4lxWYRsLh0TEF1HaQj7x6Qm60eH5LCAtWRGmADRYjyYoWnDIMQcILBC5x2MU 1JQ== 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 Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes --- 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;