From patchwork Mon Nov 13 12:47:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 13453954 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 B8FB1C4332F for ; Mon, 13 Nov 2023 12:47:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A5CE6B01A2; Mon, 13 Nov 2023 07:47:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 32EA16B01A3; Mon, 13 Nov 2023 07:47:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A88C6B01A4; Mon, 13 Nov 2023 07:47:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 04BCA6B01A2 for ; Mon, 13 Nov 2023 07:47:35 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CC0021CB2E4 for ; Mon, 13 Nov 2023 12:47:34 +0000 (UTC) X-FDA: 81452907228.07.3C0B6B3 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by imf30.hostedemail.com (Postfix) with ESMTP id 1BEFD80011 for ; Mon, 13 Nov 2023 12:47:32 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MF2Zuau9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf30.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699879653; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=gI+IXBV+qpvJ7bjdWxUIsbkCiBzZ5O6FKXwTdFM3SRM=; b=vlvRz3c31+gby72cFGL55QqwI3B0pDLuOiQlMXMdJrQwIXC6/g7ZtOcoT5UIb/UEVBMUcX t/H93VWjgkn2HjbK2x2aOa8iDJVNgMfD32b5zBzm+2FzSDjdDTq0LaOLSUcJiPJEgCGNJ+ T73LWm8sPtOoDNRvyXJpV8XEsUc7UCE= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=MF2Zuau9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf30.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.47 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699879653; a=rsa-sha256; cv=none; b=hYTKuQHHl0rXiWP7XNqqDCcZYlgkr9VSSey27ntJ8Vud+Ey2Q2f2Sdd5qBgPGFar1tMh+n +dvi3hIFAoiB+JoE4D+M7uLc6Tn5YCShXpVwtgb2ZbvBOg5aewcLbQ7OO//OLTQo3tzLfG CwrKpMk+B58XuERpEGcMKAVVtiq5kIY= Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-9d0b4dfd60dso665079066b.1 for ; Mon, 13 Nov 2023 04:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699879651; x=1700484451; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gI+IXBV+qpvJ7bjdWxUIsbkCiBzZ5O6FKXwTdFM3SRM=; b=MF2Zuau98jcPG/Flg+pLv/JL125GF0Y+KoDkcQKCPMQrfVQeuUymJkp6ZW5legCTEo 2c7sLzobw50BRVZEJPDHSBfSuRHG9QkyqiJq3LQZ+1FgUEHc7ZHf46MrY7jLQ0e52LmN M5bv8Id8jny9DkrevnYkBQS9DuG51qq6elPPmvNqp8bzxbEJrIjnO7Dx7C/f2cKbgZ85 rW0gldBPcptyLrIBtNiCxhRQ1lHP71YyrkWNZjo3ibPpTSsNol7n26amisedR2d7fcUf /bkImMCQV6SbF29Do+1WntUN+EBE/wgUyd3LyshvqQoe+oANaY1RnMFKXNrAd4OoT5dY kiMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699879651; x=1700484451; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gI+IXBV+qpvJ7bjdWxUIsbkCiBzZ5O6FKXwTdFM3SRM=; b=NOAkkAIa+0R8IMhJTeGne6drDLWY4pf1M9EmOwNFa+zejkS6UdrREvz2ttAHLCrx9Z /JgzpZGYCes5WZ8LpW1GbpTrQTaktg4pri19hJst2EEuIVcIt2uIuZ+huPx7Jt3lSOjt Twt0/jeF4pp7Ux8mSC396iZJjYpKkFMXKS9V9vW6CvhP1TKRvwaZZetcsEqkCBtY5ayh zI8K6OCNtvrQYVZ/7hIPKUoOYAxRFgIThrlOJRuF+FdLfXW7TlZ7z+tVYwykowyMRbJ3 csBNllpb46yYnVplRjbrvGeTRqCFAI7xf7U6l3pLclcALQUpyBeRMkemCoyILpaXcey2 BkwQ== X-Gm-Message-State: AOJu0Ywzaec8JdmeXVZJiLEU3z58Qr4meLhgXFQdZRDSkf17XM3rYUf7 A4Bp+u1IyDSPBGZepk5A5mk= X-Google-Smtp-Source: AGHT+IHbwahlfNhfkHJ8gKKKfnq9f/xQ9hlrwf5bhtgfIFyKxaS8hg1JuXDeqkmVwLGGOP2FkPmM8Q== X-Received: by 2002:a17:906:32d9:b0:9cc:97b:5a15 with SMTP id k25-20020a17090632d900b009cc097b5a15mr4312892ejk.64.1699879651148; Mon, 13 Nov 2023 04:47:31 -0800 (PST) Received: from felia.fritz.box ([2a02:810d:7e40:14b0:d4a9:adca:9d2f:e54c]) by smtp.gmail.com with ESMTPSA id ck20-20020a170906c45400b0099ce188be7fsm3976519ejb.3.2023.11.13.04.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 04:47:30 -0800 (PST) From: Lukas Bulwahn To: Andrew Morton , Ard Biesheuvel , linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] mmap: remove the IA64-specific vma expansion implementation Date: Mon, 13 Nov 2023 13:47:28 +0100 Message-Id: <20231113124728.3974-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 X-Rspamd-Queue-Id: 1BEFD80011 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: n9k1ouityrxcbwow3kua6zw55fo9dhp8 X-HE-Tag: 1699879652-283470 X-HE-Meta: U2FsdGVkX196p/G5MJH6Hy/Qvkk3kBzUdiw818z+EEHGMincMGQqBFHBwn5QmJnMXBYuSkmFmPnUf8JMIfjhnSs3CzpAUOg0oPMaFpH9GPWqseN9EvFE4to0+oYzAR10vxw+G0BFmxiKXYKzNyQ1Hw4HZGcGPW1l2pvJ0GTmq4sA2UHzEp+S7FVKOPA4B3PaEQFZLw3m3OcvfKKMkXysi4DxdfbE5vf5x6qZZYhY5BfMfJG8dQ654MvJxJ03OjQDyf9PU+55v/VA3LFDkDoASLLvl7m9yZpxaNKhHrcJnhruXdjOzJYPKREL8lJFV+VToI1J2bGZ1gQW6LxenAWbFounVNKpBAxeAmFSTJsO7OkSX7QO9kFatCNGnbtI0tWhDUnqTvu6YwCbo9f9zbUVY9Y/+wE0g4ljaNu5Gqsmw72P+G9/NSDkgCdaEDqL+GTshdafe3wxcDY0aeKXdn6AXSohYfpDLW6TPEuIj6hdRcM67XMV+BQf+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: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: With commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), there is no need to keep the IA64-specific vma expansion. Clean up the IA64-specific vma expansion implementation. Signed-off-by: Lukas Bulwahn Acked-by: David Hildenbrand --- mm/mmap.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 1971bfffcc03..72a3bdea4fa4 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2207,42 +2207,7 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon } #endif -/* - * IA64 has some horrid mapping rules: it can expand both up and down, - * but with various special rules. - * - * We'll get rid of this architecture eventually, so the ugliness is - * temporary. - */ -#ifdef CONFIG_IA64 -static inline bool vma_expand_ok(struct vm_area_struct *vma, unsigned long addr) -{ - return REGION_NUMBER(addr) == REGION_NUMBER(vma->vm_start) && - REGION_OFFSET(addr) < RGN_MAP_LIMIT; -} - -/* - * IA64 stacks grow down, but there's a special register backing store - * that can grow up. Only sequentially, though, so the new address must - * match vm_end. - */ -static inline int vma_expand_up(struct vm_area_struct *vma, unsigned long addr) -{ - if (!vma_expand_ok(vma, addr)) - return -EFAULT; - if (vma->vm_end != (addr & PAGE_MASK)) - return -EFAULT; - return expand_upwards(vma, addr); -} - -static inline bool vma_expand_down(struct vm_area_struct *vma, unsigned long addr) -{ - if (!vma_expand_ok(vma, addr)) - return -EFAULT; - return expand_downwards(vma, addr); -} - -#elif defined(CONFIG_STACK_GROWSUP) +#if defined(CONFIG_STACK_GROWSUP) #define vma_expand_up(vma,addr) expand_upwards(vma, addr) #define vma_expand_down(vma, addr) (-EFAULT)