From patchwork Mon Sep 23 14:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 13809671 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 D8723CF9C69 for ; Mon, 23 Sep 2024 14:25:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4FBB96B0092; Mon, 23 Sep 2024 10:25:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 485116B0093; Mon, 23 Sep 2024 10:25:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2FE066B0095; Mon, 23 Sep 2024 10:25:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0F0936B0092 for ; Mon, 23 Sep 2024 10:25:40 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AAC714133D for ; Mon, 23 Sep 2024 14:25:39 +0000 (UTC) X-FDA: 82596226398.22.0716335 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf15.hostedemail.com (Postfix) with ESMTP id C819AA0012 for ; Mon, 23 Sep 2024 14:25:37 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nS4NoPLb; dmarc=none; spf=pass (imf15.hostedemail.com: domain of groeck7@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=groeck7@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727101442; a=rsa-sha256; cv=none; b=4bbnDi0RjxHP9vWo24SmebFZgmu7Cx5962pt/4DGxIYJvpj6LTkwZVH/rTXlnOctTajUHW hyJOjfupHxSVE1DnOD2hjEig+O7cErDTzOKbZvuciki3uQfpeuBaT0esUPGgeucLlhCeky Ky4Fwq4IiAK05XFQkVC6aul7sMkc2Ts= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=nS4NoPLb; dmarc=none; spf=pass (imf15.hostedemail.com: domain of groeck7@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=groeck7@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727101442; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=f/RAhNxEAp+I30ReyW3KKpuGInU42s+KyP1A1+TRN0g=; b=l5p/3KmA6PZb1pZoWemsUP8d7h+Kh1m2WMoa3wgB/LlR633rOThXJH+fDRLO43HxtIjxsF 6IgXTYbMWEzD/7FkJQ4INh9Mnm8Q0zCDk+cXfyNEJzXqfpCNczrR/zBjiGm5fVS5JV6tuR 53JH5dVU1xjknjBBVks80pRIlyaKjpg= Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-71781f42f75so4199279b3a.1 for ; Mon, 23 Sep 2024 07:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727101536; x=1727706336; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=f/RAhNxEAp+I30ReyW3KKpuGInU42s+KyP1A1+TRN0g=; b=nS4NoPLbehORRC9nQWOzaW2rZzzCcdhSD8Dr2gsKrUrSBMjDMxdkfmhv++sKhqMdUl yM15FOu8L+omqCAdmn+NJGLFgKVaEo4nde9HLCEB/cMmQWqIodazsXKGuqWm1O6DtiGC 0ZLMzzgYc47ctYzgIEy4GXh2ITbmxDn1v9IEzqr3weLRrZY0lKk2OlPQMoB5EIbMzy6N Gtf4/33P7qANY71SIj/dDqX69U6YNfPP/h2txnCFI+aJG1wMOAGeFDRnOIN44Gy7HkWJ H1oV5hQoWmEqMCmCNfqIGel5wca9gARcbW5cBsTQ9FujRlhxyduPZ9YeyLtAl07AfhTM lf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727101536; x=1727706336; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=f/RAhNxEAp+I30ReyW3KKpuGInU42s+KyP1A1+TRN0g=; b=sOuFkUL7gELNGpoOwzrokpCnlF0BjGVhIMjEY3bUha/7AsD1F/nPP1Q+t6SbrjTJVF hzYW0q87j98b//UUqSGLT6m0IbL7d9geGKEdAiGDvhVsjAG4HpkVhLKbXRYEujO+kCYt WtnQb2vL0ZIsiy+l9SDPuNcenPpbFNbhG4yc44MuUHdiEFIubLB9IJBwUSUnA5ydmwjj owteOZH009Tu8dBvE9J1x7rjOZWEMxj7lWqVg+R7mI07iOYHnK7R+Hth0xIxVuC2E7Kw c8/eF9E14lzPLvGjGabvLYskvxknuLQxY1TmWW+V0kNzxUG+ugeF2WpM3tgzwgB9t5LM bwvg== X-Gm-Message-State: AOJu0YwQ5QTqeQPucBnk0zw40aO95VnPdvZkqS4sq8nTHfDYB1e5kg51 xp7dcoAzeQRdrOzlqffnH06ogek8oU6BnNYfOOZ/FWuHxt0D1q19 X-Google-Smtp-Source: AGHT+IF/32xVhJM+Yi3WbHwCjjj37zZwnw2o/XTaGsqD/M6rrHqJy0NKwypUhzJVuXy0X9+Zk/xoAg== X-Received: by 2002:aa7:8894:0:b0:719:7475:f073 with SMTP id d2e1a72fcca58-7199cc45545mr17539289b3a.1.1727101536224; Mon, 23 Sep 2024 07:25:36 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944ab56d0sm13952571b3a.66.2024.09.23.07.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 07:25:35 -0700 (PDT) From: Guenter Roeck To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Guenter Roeck , David Hildenbrand , Geert Uytterhoeven Subject: [PATCH] mm: Make SPLIT_PTE_PTLOCKS depend on the existence of NR_CPUS Date: Mon, 23 Sep 2024 07:25:33 -0700 Message-ID: <20240923142533.1197982-1-linux@roeck-us.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C819AA0012 X-Stat-Signature: yz6xgbdohs64ti5uuuzh8we7km7shzwe X-Rspam-User: X-HE-Tag: 1727101537-88424 X-HE-Meta: U2FsdGVkX1/pjtGr3R2YwfEOxY4QLKqNCfnTnltEFGM37m+jB3tS/4nt1ggiY+gSPkyCImaYrYUCQtK69qT8QDFXx5ZFEwPYVfDUj29Ap9XpcShixvkYmoH/UdJ8iviEtWXvajstf/Z90xahaegAKTkizYozbIc+FIS02GxhQZo0rExACnwaHjweHiosoHITq3E3oN5XK83V9ugDfIqpF8y3skRa5pUsDU2vtCO1m0SOmVXZSPvEuEnkWHoX5SD6HGM42rs5o5+UO35ZRcO5XcPfwvNslpnOac3kG8ELCBBI1EYjidEV9REYk5LHYa53TuxDHTEcBS8VIJgwvWT4GwmnJz8teGxy3UDTcOmqWSDl4aKd8Mk5Mz5OkI5XMIcC+gbLHBUbYAGHEuKbfxsDYztxBI6ZXTqv1n1C0tHel85Sirmw8w/xQGV32u7Nmm1YJQvp9IzbpH5PeHtYBOpoWjB4AH517czrsartRsn/S4Z3d27HFbTIDLh1Bn1KlP9K3p8Es9ZYM8Mu9zh2G/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y9PrOlXy+NRFseWTgA0Y3qnlLRqFOXbQFdOQI2rES0RYN5Z2WdH 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: List-Subscribe: List-Unsubscribe: SPLIT_PTE_PTLOCKS already depends on "NR_CPUS >= 4", but that evaluates to true if there is no NR_CPUS configuration option (such as for m68k). This results in CONFIG_SPLIT_PTE_PTLOCKS=y for mac_defconfig. This in turn causes the m68k "q800" machine to crash in qemu. Adding an explicit dependency on the existence of NR_CPUS fixes the problem. Fixes: 394290cba966 ("mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options") Cc: David Hildenbrand Cc: Andrew Morton Cc: Geert Uytterhoeven Signed-off-by: Guenter Roeck Acked-by: David Hildenbrand --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/Kconfig b/mm/Kconfig index 09aebca1cae3..20fe60389cf5 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -595,7 +595,7 @@ config ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE config SPLIT_PTE_PTLOCKS def_bool y depends on MMU - depends on NR_CPUS >= 4 + depends on NR_CPUS && NR_CPUS >= 4 depends on !ARM || CPU_CACHE_VIPT depends on !PARISC || PA20 depends on !SPARC32