From patchwork Wed Aug 28 05:49:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13780606 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F0ED156F27 for ; Wed, 28 Aug 2024 05:49:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724824186; cv=none; b=nCqCNXPpJPOGOxOMaCB2jAlaRTos4VETkMAvRNSS1aOR88zfz6vN+zHIeQfFPz7KlmKnmh5zH7dv/+ATKu8cnJo9ZfKfrH6MFN9CZwGNTX6uCrn1/CQYFFZtGZvjb8PzhDKCDYauLTynadTKK6ld86ijQakH8hN2eBHW/hZyEDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724824186; c=relaxed/simple; bh=h9Jl0isly8hfO1RunVOJNqZoeZvdanuDoXET0lufwJg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HJF3EozhAf0VpRu/jZCZxuovjiLrN8bJG9xSXm35zfEtA/x2dNZl8diuzve8Qx84IoTQ5FSTc/+8+6hES7ld56RkwL05bcMgwOyKc6OQ/+hqTmXQt4Y34imsfJFuVyajjhjyJYPw3ECtGVL9r4CGgvPXfDqD47R5wqYZO1nljlY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=SdEfP3uD; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="SdEfP3uD" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-202376301e6so49035305ad.0 for ; Tue, 27 Aug 2024 22:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1724824183; x=1725428983; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Q5srBcKEXlmg65Adrhp9lVjL7ktMhhBJWYWob6ko31g=; b=SdEfP3uD3zsNjVEX1Pvh5I+ZIZUakaUIzBEKiPkmhSm3NWP3i48Vox5K7/qd4G01Zj nedYNM/PePwBL11dBTmfx/BT9cUcK9iCb5WYgSxijzDNQ/wte+Cx8MIKUPgWNj35qJra k3hb+Bqtg9fCrGUwcGaty3kxVFvcjVS1+lB6ZMxDqQFELzeakNjL2v/2rFYfNRBr77gW Yh9/ieECY6bcTGEqt96y1TkpVRGOx/0vwR1ookdlxbE5E0aPJUWvhWhORs8dHuRFzyjx rsTcxqhrvJyNhMvOaszQfngUQKGCMA0BbU15eU8LRqbQkYC0ThnobpJAEHjgQbH3xH39 YBdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724824183; x=1725428983; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q5srBcKEXlmg65Adrhp9lVjL7ktMhhBJWYWob6ko31g=; b=t0FeNjR85RoAVvcVGn4Q5hlbI4err8h2z+dANVns/6PZK+g1oo57EBt+/z5KAAqfNV eW4EdiJ4bUet9+30GNt2xQT9qNgERpOIwJqGrH7J5C5/lYO/L31Tp2LpSocoPP8z+yTt kEtrzhlb1Me6Knz8xscXa2qyvfkSjU2pBu/eRfpqNhxaaaJxUoRazh7mN27+rhyFMdsB LeCPPSjV1bRLOkZpe3nlVC+JopwbH90zY+tHkADhK03jhkg+4LZNAFRdimPNez4TgreF dNi/Tr0avOr+HjmNz5MaLAa0H4fDeyK9fcuZnzLzVb/tKfEmV3wVW7xdmd0QrXID/rzS bXuw== X-Forwarded-Encrypted: i=1; AJvYcCWs0EfEz4rr8YeobEx0ASTzsLrjXPNactqzp2Aji9zwbst1+6kWbElaQb2rv6764dnHq5LdiUre+MYq@vger.kernel.org X-Gm-Message-State: AOJu0Yz3HxmNkp878TD6FXM8GmlD7MNfW0r1uHhJ23CCGGzBLmTxji9b UMKgf8N04yiyBa+2SgySsrDfzwP6T9DPYqC+nS8yq8xxpDLBwQgyEhwBLSHmQZ8= X-Google-Smtp-Source: AGHT+IGHu+eM9GywkA2KKhkiXH1gwQVKDtYtrmu0o3xp962KqVz7yKVZ3UFfIj7ogPOJug6LrKMhnQ== X-Received: by 2002:a17:902:e54c:b0:1fb:3474:9500 with SMTP id d9443c01a7336-2039e4ab846mr148619915ad.27.1724824183237; Tue, 27 Aug 2024 22:49:43 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-203855df0c4sm92092495ad.157.2024.08.27.22.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 22:49:42 -0700 (PDT) From: Charlie Jenkins Date: Tue, 27 Aug 2024 22:49:11 -0700 Subject: [PATCH 05/16] riscv: mm: Support MAP_BELOW_HINT Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240827-patches-below_hint_mmap-v1-5-46ff2eb9022d@rivosinc.com> References: <20240827-patches-below_hint_mmap-v1-0-46ff2eb9022d@rivosinc.com> In-Reply-To: <20240827-patches-below_hint_mmap-v1-0-46ff2eb9022d@rivosinc.com> To: Arnd Bergmann , Paul Walmsley , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Muchun Song , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Huacai Chen , WANG Xuerui , Russell King , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Andreas Larsson , Shuah Khan , Alexandre Ghiti Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kselftest@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=921; i=charlie@rivosinc.com; h=from:subject:message-id; bh=h9Jl0isly8hfO1RunVOJNqZoeZvdanuDoXET0lufwJg=; b=owGbwMvMwCHWx5hUnlvL8Y3xtFoSQ9q5XXFHufOLGl2Wf1oQkLR82ZWndTOfPt314eCzeyv3r BZKWtO7oKOUhUGMg0FWTJGF51oDc+sd/bKjomUTYOawMoEMYeDiFICJNPxjZOjefGX9Tl/G6Irp nxS+dN0zOpEeMVEk78LzG1JnNgQw8RYzMpwwaro+TU52Snefw54npdeqTGoNrXMnik1KMY5Wjl7 KxwgA X-Developer-Key: i=charlie@rivosinc.com; a=openpgp; fpr=7D834FF11B1D8387E61C776FFB10D1F27D6B1354 When adding support for MAP_BELOW_HINT, the riscv implementation becomes identical to the default implementation, so arch_get_mmap_base() and arch_get_mmap_end() can be removed. Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/processor.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h index 7ff559bf46f2..20b4ba7d32be 100644 --- a/arch/riscv/include/asm/processor.h +++ b/arch/riscv/include/asm/processor.h @@ -14,16 +14,6 @@ #include -#define arch_get_mmap_end(addr, len, flags) \ -({ \ - STACK_TOP_MAX; \ -}) - -#define arch_get_mmap_base(addr, len, base, flags) \ -({ \ - base; \ -}) - #ifdef CONFIG_64BIT #define DEFAULT_MAP_WINDOW (UL(1) << (MMAP_VA_BITS - 1)) #define STACK_TOP_MAX TASK_SIZE_64