Message ID | 20241210024119.2488608-6-kaleshsingh@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 583DCE7717D for <linux-mm@archiver.kernel.org>; Tue, 10 Dec 2024 02:41:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E5646B00F0; Mon, 9 Dec 2024 21:41:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A8186B00F2; Mon, 9 Dec 2024 21:41:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 635086B00F3; Mon, 9 Dec 2024 21:41:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2F84A6B00F0 for <linux-mm@kvack.org>; Mon, 9 Dec 2024 21:41:36 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C7728C0229 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 02:41:35 +0000 (UTC) X-FDA: 82877497752.13.F3262FA Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by imf15.hostedemail.com (Postfix) with ESMTP id 371F4A0006 for <linux-mm@kvack.org>; Tue, 10 Dec 2024 02:41:12 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tqRnqMXC; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of 3XKpXZwsKCFE3t4xB0B16z0z77z4x.v75416DG-553Etv3.7Az@flex--kaleshsingh.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3XKpXZwsKCFE3t4xB0B16z0z77z4x.v75416DG-553Etv3.7Az@flex--kaleshsingh.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733798474; a=rsa-sha256; cv=none; b=UdjKCXKrQo+evrF/vtVb+KgalMTsy69GEYBmSe9nJbVeElYUv+fiIGDzBvSZhBFJdc3rBP JFZgd77YABhpHZjIaJ2gqEi1L5fzyPOynPmQVE7dASJ5kUirD8PYss3X3i60vz3q3UnQsK DQoaou+U761GNgD/uzwQVv96YXSedhk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tqRnqMXC; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf15.hostedemail.com: domain of 3XKpXZwsKCFE3t4xB0B16z0z77z4x.v75416DG-553Etv3.7Az@flex--kaleshsingh.bounces.google.com designates 209.85.216.74 as permitted sender) smtp.mailfrom=3XKpXZwsKCFE3t4xB0B16z0z77z4x.v75416DG-553Etv3.7Az@flex--kaleshsingh.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733798474; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=plyHizQjFILOlGH5Iba1IrDdDMxWHhXvOcpLcYrtGxg=; b=NxnFEaB/zXYSbN2T5t0vib9ipTaHJjIzgw0xZcckbgoG6wHgVDzChQi3uK27UjEemujnii ZfD/og1EX5/MGr/vn2eoDRiRQcjwSgjtPFdiVpt03DTjdPE8Lhnk4hgjWWyykVpHoPr79j +T+U8XVS4BH+PLP/U3vbFfMHzSLeD8g= Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2efc3292021so1880778a91.1 for <linux-mm@kvack.org>; Mon, 09 Dec 2024 18:41:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1733798493; x=1734403293; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=plyHizQjFILOlGH5Iba1IrDdDMxWHhXvOcpLcYrtGxg=; b=tqRnqMXCx4LOaB/P02yIiVdSoqCPe+OlCbrSCCMy4ReWmeTArfpzua00ef/Nj4d1O5 MmJAsOs74F9t+rq+NQZrwqhCqBZcnlFtRPj9DfpIeCGyJ/OPzsRIa/SuAJxQDD58bll0 E5han2vwutExxoalhNeJ2uy1gpu3PWMpCFV9WSyHtvgNW/RmON8cfFRD82bYa2Z/gDH9 tABGn3WAjuratCmVOccG7pfGzf/AHAjTSOUq7+k1ZOA1kat7U3pBh/kE7e4NWeD6opc4 5FKpfqG+k6hX3JrFUqAL4KaQRuvyGETZlAN0hfUzwzUUHKUnKmlrfCg1MZdN6ChINAOF 4uWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733798493; x=1734403293; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=plyHizQjFILOlGH5Iba1IrDdDMxWHhXvOcpLcYrtGxg=; b=VytrwNIK06BB9HdH2jMFG6o0gTBvWKqaS/6tTdM1HMOvLRzm8p1GrwQzxeH7SMBcKH FtYhQjyJ0Prg2rgf9anCFedpn6qXv2Lbj7Gt7s9IRl3znlcm3rHa18NTDxw84NkS7U36 1nSJd+j2mBXHKi3T2JqhGrSZ6iSdE12kuTT7TzWoi2dBBS4CjpD0cIHa0iU/d0KV2IJQ rIRgsqkAUZCYZ/9zVRgbh/LJf6BdFLgws1CBnH/K7ydOA6XZggOCmbaoLBIKyYfBrpvb yhZ8rCRW2pPf2LkHSggLATsxLHQSgYMuOWcDk1K5CHPpqg5Fj+BF0ngQnMKUdJixdclG UCaA== X-Forwarded-Encrypted: i=1; AJvYcCWVF3F/sxSD1GE9FvIUkqBb9pPfN3OLndvqtdwRosmAyhSOPRTP8os6pynqgBLuDjG19oi6GoC9sQ==@kvack.org X-Gm-Message-State: AOJu0YwqB6yTb8cwV9XEKs7/V3MF1IBQxx8lPENiwQ0rvQLQz2YyRJpj Mods0Z/83lxj7SnUK7ZQfBjOH87CiPHEvmZLPf58Cw5RxzZ3WOf50pX6x6LVl6CJCiLQjbD9pBm BsnuDMM/Ghl97VXIb1w23SA== X-Google-Smtp-Source: AGHT+IHwTbEIW/FAeU1sg3ure6LNMbce1+qfNwJ7QwjwcLyYjZmtwQZSOt2eORyWNRKplpOxNs0RywA1YRSDvXTeEQ== X-Received: from pjbsd7.prod.google.com ([2002:a17:90b:5147:b0:2ea:5c73:542c]) (user=kaleshsingh job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3c0f:b0:2ee:ad18:b309 with SMTP id 98e67ed59e1d1-2efcf1700c3mr4344722a91.3.1733798492790; Mon, 09 Dec 2024 18:41:32 -0800 (PST) Date: Mon, 9 Dec 2024 18:41:07 -0800 In-Reply-To: <20241210024119.2488608-1-kaleshsingh@google.com> Mime-Version: 1.0 References: <20241210024119.2488608-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Message-ID: <20241210024119.2488608-6-kaleshsingh@google.com> Subject: [PATCH mm-unstable 05/17] mm: arc: Use generic_mmap_hint() From: Kalesh Singh <kaleshsingh@google.com> To: akpm@linux-foundation.org, vbabka@suse.cz, yang@os.amperecomputing.com, riel@surriel.com, david@redhat.com Cc: linux@armlinux.org.uk, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, ysato@users.sourceforge.jp, dalias@libc.org, glaubitz@physik.fu-berlin.de, davem@davemloft.net, andreas@gaisler.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, chris@zankel.net, jcmvbkbc@gmail.com, bhelgaas@google.com, jason.andryuk@amd.com, leitao@debian.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, kernel-team@android.com, android-mm@google.com, Kalesh Singh <kaleshsingh@google.com> Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: s9o1s35oi4k7dge9t1n41dkjx65t3r58 X-Rspam-User: X-Rspamd-Queue-Id: 371F4A0006 X-Rspamd-Server: rspam08 X-HE-Tag: 1733798471-664812 X-HE-Meta: U2FsdGVkX19WGViSPCG0nav9HHkOlfSZrGsqX6kTNPWXMe11Fgm8VQuu2BJ023+sGymgnQ/UbjkIVpDI7BPfZzlc9+6kRbqrC7qgkehGs6u8iHZvD0Z3oR0ZfEfS/9vwvs2OhX0c0YtpNeTBhV3HhcHSjTZ2ZNoV4INLaag58Jiyz9ouu/TFSST57BOdc54M/mwJJRpu+R5JodAv2rkZ2DaLR9S1dDs7GPgNy05PilJncaCV5U9KYSQ50KdrHDKYYw7/ySKUu+5IpmJrgPKVVjkQln5SbSz/0TI6EimIzSvZpBFgoTuEr41LXsQVXVCk8Yja71vM9qjg2SRAWxOpht309xfeG3ddtlzwJcdPUIoOiLOulr1nLX0UViPazhqrxpFh880oj2hot7LVR4B+pd5zOwOsBdDLpyABjKTrXI64U7IUvMyYy5U51RaPyDZTL+/0m0RgyC5A13f64ZP35E7Rda2OfIlbgy75DAgmU9yUjPvlZ3Dfx6Ft9m4wYVaBa9SHzKMQsA1QbaUTKtVAzNpCWaQQr53ZOgMuQq6WTSfTfQ1F0qivH+g42U44o/sFsaO1Qs12L3eJL4kiNlWc74SP8MSLa7B+B8Thrn3mIV2T4fMcUru1NwNBH3qRa3Sf/zXXW6txIzGFw7AW4rvBJGR26DOYRxTx+HPDKfBTzsIxY0FnFh4BTsDBRRcPDMRG16FVULH/bBgMesGUDhi+Lu9N8nE9YDJbepVDH41yjUfmRFFMQu0rlB/n41nQZtGcGhhr9ficWbOCLyow8K2B0qy2ecn918+fEDGe8cu9gXDn/tv/10XmPxJg6zE+c6bnjAqCHin/sS6LmxeqJsUO4XUg2ytzXZ44nkMiGohhlMKdAjB5qIWHW+18pWpAQhILRsrSacwHXuzn5KQwfmXSbFbyqdOQRBBaqP3y7eGz7pKLtI3LMnZgOBGH6kcxVxqQ7GiCuroAoYlZ5E6UQw1 MgJm38+B aaIMeRtel9YUD4fnWshmz5KaFGC9FZiA/8skt5MkY0uzZF6qJLXWTbU1/SMcGdwTF5hnaB5Z/+hO1A4CyKmyRska9Ry3U/MMkf6nT04EMxikGsO05b2YCwKZvqELUs5HZI43iCOJlb4DhmxJPcid8GB6e3xVmGubX24O/oC89CbsMGwq8akey9IDqlwBd+z2I4TTkP+M5JWbMAopX3/XFYkUMhOlEDCY8mn1jbf0lMCoATn5kJjG+zwzwR0lupC2qWDQP0MpUI/eglwxikPYMvGQPT9VLNVlFOzvuYDa7QycBMfTbDMV9r/rQP5CryIzOvdu3BIARlmY+80XSdaME/2G/8EePwqbU7XBntWGGkeKNNqD87g0ZtpjwgmryGR4bkGG+tr7heayQzG+x60vJKBWyEQ3bmKV5w+LfHl6Hyltxh9RsCaV/4ooRhLiVqun0F/gdoyc4MgKCgwRsHjNLdqs4WTI0jk0jiYUaCFiCiXsXACKhQXPLxVLC+bBDEPiDbjifL3m7aujZa82MAJF3nn9P0TB8SI5PBCHZoMAXD4UN9hQ8H90N2MR/GEp8bKBO5o5ItD5Kja+Xth83Ypq0DajWh2D/HlJ1XUKb5vrqutCX2NTP57YdzP9WLPOWl6bNj5bJAfhPcaWyK2GD2a9n6AfG+VQfhDHSBCPi X-Bogosity: Ham, tests=bogofilter, spamicity=0.243631, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm: Introduce arch_mmap_hint()
|
expand
|
diff --git a/arch/arc/mm/mmap.c b/arch/arc/mm/mmap.c index 2185afe8d59f..6b1fcea06779 100644 --- a/arch/arc/mm/mmap.c +++ b/arch/arc/mm/mmap.c @@ -27,7 +27,6 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long flags, vm_flags_t vm_flags) { struct mm_struct *mm = current->mm; - struct vm_area_struct *vma; struct vm_unmapped_area_info info = {}; /* @@ -43,14 +42,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, if (len > TASK_SIZE) return -ENOMEM; - if (addr) { - addr = PAGE_ALIGN(addr); - - vma = find_vma(mm, addr); - if (TASK_SIZE - len >= addr && - (!vma || addr + len <= vm_start_gap(vma))) - return addr; - } + addr = generic_mmap_hint(filp, addr, len, pgoff, flags); + if (addr) + return addr; info.length = len; info.low_limit = mm->mmap_base;
Use generic_mmap_hint() in arch arch_get_unmapped_area(). Signed-off-by: Kalesh Singh <kaleshsingh@google.com> --- arch/arc/mm/mmap.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)