From patchwork Mon Dec 21 20:40:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Wool X-Patchwork-Id: 11985295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72DBDC433DB for ; Mon, 21 Dec 2020 20:40:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E5AB122527 for ; Mon, 21 Dec 2020 20:40:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5AB122527 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 34F766B0036; Mon, 21 Dec 2020 15:40:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FF456B005C; Mon, 21 Dec 2020 15:40:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 215446B0068; Mon, 21 Dec 2020 15:40:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id 0D21B6B0036 for ; Mon, 21 Dec 2020 15:40:33 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C54FE8249980 for ; Mon, 21 Dec 2020 20:40:32 +0000 (UTC) X-FDA: 77618457504.17.neck23_620d9612745a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id A559B180D0185 for ; Mon, 21 Dec 2020 20:40:32 +0000 (UTC) X-HE-Tag: neck23_620d9612745a X-Filterd-Recvd-Size: 3450 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 21 Dec 2020 20:40:32 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id g185so162835wmf.3 for ; Mon, 21 Dec 2020 12:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jund9TXlnupe35gJiRs3rlJ2dF8c/LF0cBDOiamrga4=; b=dcjeDWM97PPAPy3EN2Fu4DTPB0b3hUyVJD61ZljZLy948ZzfWKnpXNhikzBKuTGaiF Mq8Y279C6taJxuCIbXG/nQ2Bpb3ntYjpelqFT81R4Owh2B2z+9y+3Az/AE5cTM3+xyxn Nsd1jjs9muTxWq+gvNSYx5hpbN1+HN4I8pJDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jund9TXlnupe35gJiRs3rlJ2dF8c/LF0cBDOiamrga4=; b=ba1NteMwp/oN9szNnyWfmKUtBLxvZyhC5QIYY+Ga3fdviUhPxwnhyNvYtnVvPdOZNJ ZvPPMvCeKl1l59WXrc3TptDNo6Oy7WkkHwe4RzJzioT4ypCIzwKMgafB8zHh0wkBPaFg qsEll/hNqxXuEdqXAQbTff/FU/bm7cXJi3z0eT+vrwr7zhy1OSNKUuYcpLORtZaJiv00 r0dYYt9jGXQTHqyrmbtEAwm+gz7eMKGelUqHE/2eS5+X5iXYYQn4QNg3Sqvtqzdm6vRU n5ifslwfivA/HpTPs7iXz+btrK0vNG5MbOPjVMhacLLaxWyLtEg1+UrTpnW6XAcKD7DP shlA== X-Gm-Message-State: AOAM533pq8z3tqj79GKsWmhT2YmhvgUrYHkGZfpgpyTvBQOO9nWX94kJ KhpwhG5L+dGUlRVgi/KSl+N+qg== X-Google-Smtp-Source: ABdhPJyPzseWQbr4uS6KoyR6F4QNx3b85eBpNFiMwvxbxmxi2/6uD4SrqacbKdYMsnecOASGec1lKw== X-Received: by 2002:a1c:6056:: with SMTP id u83mr18072152wmb.90.1608583230972; Mon, 21 Dec 2020 12:40:30 -0800 (PST) Received: from lootbox.konsulko.bg (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id v11sm28385656wrt.25.2020.12.21.12.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 12:40:30 -0800 (PST) From: Vitaly Wool To: linux-kernel@vger.kernel.org, linux-mm Cc: Nicolas Pitre , Vitaly Wool Subject: [PATCH] arch/Kconfig: JUMP_LABEL should depend on !XIP Date: Mon, 21 Dec 2020 22:40:05 +0200 Message-Id: <20201221204004.16138-1-vitaly.wool@konsulko.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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: There's no point in trying to optimize the code when the code is executed from a read-only medium (e. g. NOR flash) as in the XIP case. Moreover, trying to do so in a XIP kernel may result in faults and kernel crashes so let's explicitly disallow JUMP_LABEL if XIP_KERNEL configuration option is set. Signed-off-by: Vitaly Wool --- arch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/Kconfig b/arch/Kconfig index 56b6ccc0e32d..88632c9588ae 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -81,6 +81,7 @@ config JUMP_LABEL bool "Optimize very unlikely/likely branches" depends on HAVE_ARCH_JUMP_LABEL depends on CC_HAS_ASM_GOTO + depends on !XIP_KERNEL help This option enables a transparent branch optimization that makes certain almost-always-true or almost-always-false branch