Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6612294ybp; Tue, 15 Oct 2019 18:33:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+cWQXX6oFd9NrZs0JcJbmFnMMk8tTSS4Cc7taclhu2JW+Z0DxIeQzYlpCM6VAWpLqCyyd X-Received: by 2002:a17:906:615:: with SMTP id s21mr37720221ejb.276.1571189592695; Tue, 15 Oct 2019 18:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571189592; cv=none; d=google.com; s=arc-20160816; b=SFgjU5Wf6295LbEyjUDSoGcWk0o+6R/MW9II+zOYnLGpWtdhakO6RdFXPgOP+2lF0M uwFAF/uoyNu58IvfhtPlRAW0GEYxcRWSFJSZX31bPBeXgfO7am630LLdVBmBUQOOXEIh ahyiaF7R3Oyc86dSLBRKRmrJuHTbeJukb1nO532EN8zKY7BDHXEozexzPNdpj1zm9/Mk kq22ZkyX8Bk+P/XA1xjghfIUwylQIrA5s5o/Z42L32frM0qvcyzfqHJCGldMiHnTpsNz RLGiG+MMFDSIdUoPS7hJT+G2yp7nyyYqfeLr5ETCMocIfm+TxVsS9I7PBUxg9ZF4GNgw winw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kL3rUmmn2BVLtEQUwJf4m8O2w+hW0QzQtQ6cdY8X8d4=; b=gFLOODbv1JVDKPssmXR6E016La99gtq+b/Io0KZprqfgM7Qjv95+Y4T2v0smdPXeIK 9SzLMpGUamUFriXmoEEiV1V7IoUyBwhQsXt7q8JkXMbzI9ZLMi8qXXyMRrYzrC61ZEQt Lwf0ydsLKiLkXnynYnuWpJj5q3uu++K2cCYfO9xXZyH2+Wg/CppJUxPWkJDgZj1bdO0N FBPE7SCZbeT9D+tTvlKK/XiRtMGazEPejUMIKoZK44XWnsbIUvwMMwlsQuAU98Li2nuV Ln20JpoWHOLi6Wo80nGiTJXBxKrvT50q7sts7J0US2BLbgBPsSlxd9NndigyZd2g2cFs gLHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si14478470ejr.125.2019.10.15.18.32.10; Tue, 15 Oct 2019 18:33:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389305AbfJOTSg (ORCPT + 99 others); Tue, 15 Oct 2019 15:18:36 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:45612 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfJOTSg (ORCPT ); Tue, 15 Oct 2019 15:18:36 -0400 Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1iKSL2-00067i-HU; Tue, 15 Oct 2019 21:18:32 +0200 From: Sebastian Andrzej Siewior To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Sebastian Andrzej Siewior Subject: [PATCH 02/34] arm64: Use CONFIG_PREEMPTION Date: Tue, 15 Oct 2019 21:17:49 +0200 Message-Id: <20191015191821.11479-3-bigeasy@linutronix.de> In-Reply-To: <20191015191821.11479-1-bigeasy@linutronix.de> References: <20191015191821.11479-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the Kconfig dependency, entry code and preemption handling over to use CONFIG_PREEMPTION. Add PREEMPT_RT output in show_stack(). Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Thomas Gleixner [bigeasy: +traps.c, Kconfig] Signed-off-by: Sebastian Andrzej Siewior --- arch/arm64/Kconfig | 52 +++++++++++++++--------------- arch/arm64/crypto/sha256-glue.c | 2 +- arch/arm64/include/asm/assembler.h | 6 ++-- arch/arm64/include/asm/preempt.h | 4 +-- arch/arm64/kernel/entry.S | 2 +- arch/arm64/kernel/traps.c | 3 ++ 6 files changed, 36 insertions(+), 33 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 950a56b71ff0d..4a621d6c6e676 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -35,32 +35,32 @@ config ARM64 select ARCH_HAS_TEARDOWN_DMA_OPS if IOMMU_SUPPORT select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAVE_NMI_SAFE_CMPXCHG - select ARCH_INLINE_READ_LOCK if !PREEMPT - select ARCH_INLINE_READ_LOCK_BH if !PREEMPT - select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPT - select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPT - select ARCH_INLINE_READ_UNLOCK if !PREEMPT - select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPT - select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPT - select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPT - select ARCH_INLINE_WRITE_LOCK if !PREEMPT - select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPT - select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPT - select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPT - select ARCH_INLINE_WRITE_UNLOCK if !PREEMPT - select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPT - select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPT - select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPT - select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPT - select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPT - select ARCH_INLINE_SPIN_LOCK if !PREEMPT - select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPT - select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPT - select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPT - select ARCH_INLINE_SPIN_UNLOCK if !PREEMPT - select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPT - select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPT - select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPT + select ARCH_INLINE_READ_LOCK if !PREEMPTION + select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION + select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION + select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION + select ARCH_INLINE_READ_UNLOCK if !PREEMPTION + select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION + select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION + select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION + select ARCH_INLINE_WRITE_LOCK if !PREEMPTION + select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION + select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION + select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION + select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION + select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION + select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION + select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION + select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION + select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION + select ARCH_INLINE_SPIN_LOCK if !PREEMPTION + select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION + select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION + select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION + select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION + select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION + select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION + select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION select ARCH_KEEP_MEMBLOCK select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_QUEUED_RWLOCKS diff --git a/arch/arm64/crypto/sha256-glue.c b/arch/arm64/crypto/sha256-glu= e.c index e273faca924f9..999da59f03a9d 100644 --- a/arch/arm64/crypto/sha256-glue.c +++ b/arch/arm64/crypto/sha256-glue.c @@ -97,7 +97,7 @@ static int sha256_update_neon(struct shash_desc *desc, co= nst u8 *data, * input when running on a preemptible kernel, but process the * data block by block instead. */ - if (IS_ENABLED(CONFIG_PREEMPT) && + if (IS_ENABLED(CONFIG_PREEMPTION) && chunk + sctx->count % SHA256_BLOCK_SIZE > SHA256_BLOCK_SIZE) chunk =3D SHA256_BLOCK_SIZE - sctx->count % SHA256_BLOCK_SIZE; diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/as= sembler.h index b8cf7c85ffa2a..2cc0dd8bd9f78 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -699,8 +699,8 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU * where