From patchwork Sun Dec 4 01:30:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 29357 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1607556wrr; Sat, 3 Dec 2022 18:04:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf5P0tGsbG7a+aHuc9QjwuPyUdCPtahy0DmP720wLTrxM7DsOkRPtaGYlt/R7GrD/Z/5sV8m X-Received: by 2002:a17:902:8698:b0:188:e255:39af with SMTP id g24-20020a170902869800b00188e25539afmr59419965plo.86.1670119476892; Sat, 03 Dec 2022 18:04:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670119476; cv=none; d=google.com; s=arc-20160816; b=rpG3K2Xc3SDATZ/GzSXoBs4YqCXwV5zuIZbdgQ2V3BfrO/1rqHUHsRpH3mUGtOJehf AlPv8xJ4NLoZnMwtMvckn6Qm1DnsKI5jyVmW5cgs5TFqbF4z9Znmwf/5NR/p22tciJ9i 4ia2NbXKsJV6cwyMW4SVHfl4mrRRlVZvn6R5B2wGHlv/tHr0IWrotj2rg5MMVYczI/dj TMAIOlH2+o892S4GOlL2aHyJrz0BpkyRWgMwa3PT4XCBKRJdlVgk0/mqj7yaUyqc8PAw hniNHiwD82rSylOLdNRcuNmDA0xymQPF1km3OMjoummCKU56gzOzNZYrR0s4LiBSPGDe 1jKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ueAglvJtCjt6234pC1YgPM7y4iC/0ZyTKdRHiIvyVAM=; b=KrvPhWLLH5G2pkiG3ktMBqB5XnkzagQZWXAmnoFPDEK0NBV/iqe17HP5C014n8j+gH HzUyxWutkJusWsWu1jtvAe+/QUZb+IUlfutCMpyRpEWiTWENmMKFKR+gd6tY738PzZWD x8oacBtGRYaXDH9US+ei6g/+gThr98Z+7DDOjVne3PEhNKxeM4bSZTgb0S4ssatX7gag mixzg4btC2S9BjdTXuCuFJ/Qxv0OeZpxjZBNUVipnuhg9vFMYVWbdK8E2FwT3tNwFj9H juT8xNGnRJ9Xt/vVZBsHNRuSaDbAJ4ePbB6RYLQcnWfgPDPK6l7YAybLQIe7DASDL4Mt iWWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iJ1EaHFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq5-20020a17090b380500b00218ee363d60si12207075pjb.139.2022.12.03.18.04.07; Sat, 03 Dec 2022 18:04:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iJ1EaHFK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbiLDBc7 (ORCPT + 99 others); Sat, 3 Dec 2022 20:32:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbiLDBcg (ORCPT ); Sat, 3 Dec 2022 20:32:36 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5191C1A213 for ; Sat, 3 Dec 2022 17:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670117505; 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=ueAglvJtCjt6234pC1YgPM7y4iC/0ZyTKdRHiIvyVAM=; b=iJ1EaHFKS0+NELGQsk7h2GxTW13d1MHFzcHiJfeBvteHW3L0U/Jg2TLyiP40xvWBO4jTm4 PeNyxgONoCNxl6TzROtU3Vd+GN3B/1eW5FtFG5V46vMRapiK3F9cuvlmk2kbKZhlHmnt/P 0LmYU5Yy0O5BNOEagrJCt+1ahjccsrM= 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-628-jhdNYiZBN8SKwnEUewJfCQ-1; Sat, 03 Dec 2022 20:31:40 -0500 X-MC-Unique: jhdNYiZBN8SKwnEUewJfCQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D087185A792; Sun, 4 Dec 2022 01:31:39 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 105C81410DDA; Sun, 4 Dec 2022 01:31:32 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, stephen.s.brennan@oracle.com, urezki@gmail.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 v1 7/7] sh: mm: set VM_IOREMAP flag to the vmalloc area Date: Sun, 4 Dec 2022 09:30:46 +0800 Message-Id: <20221204013046.154960-8-bhe@redhat.com> In-Reply-To: <20221204013046.154960-1-bhe@redhat.com> References: <20221204013046.154960-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751247200753923250?= X-GMAIL-MSGID: =?utf-8?q?1751247200753923250?= 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 (open list:SUPERH) --- 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;