Received: by 10.213.65.68 with SMTP id h4csp711005imn; Fri, 6 Apr 2018 07:40:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Xos9VlxjifObWI5rX7Sa8Zm6WFnxLFrwXG6UVprtvtNKboFgEJUkop5xvWh3jnpzkfirI X-Received: by 2002:a17:902:36a:: with SMTP id 97-v6mr27150284pld.186.1523025604593; Fri, 06 Apr 2018 07:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523025604; cv=none; d=google.com; s=arc-20160816; b=h7iBhQCnH0hxtjE/Wo6JdSzRPAgetQ70Fz2p7/2xA7iXfgUoFQEP5ik1J5JKF7xaIA 1p8pCdP72uHBn6hQOcormRgX9OgLDEMfNt8BHByODTJvyfy0vh8Dk+Ha3KAkaz0dQXpS +k9TeIKK36mNGbp/ub5QkCdA9tFKz+GzTDuxeO8P3DEEXujEABhz4ji151xIDFoZcdp9 Z/Bou4PFmoHXRH+NI8n5PHrQdNNjax5e1rfJ9unxGoZvQ7nQwiii4Or2K5XfSGH2WBXi ZybktvL+cr1rDKg8kCI905bLr50+mHVv7CDfy0vLPG6i/Qmpd8//c1w793TSyj3j3f1B 1lfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=S2orbjwKU+aI9mFCOxcmgmWbcnzK9lypiy3jiJe89Wc=; b=EZvrTC9rtMl2l046hABO6cuta7DpcTJF1ns+ClCffE3gsn3HRx21GIIEg36Q2Gt9lP m2M/JcC8j+gzDqiJK21XAjEhApCEpVQnIEVNKv25yqWtniU8qtBBBeiG3TJMiDccDAvE z1MFFXlMf/FQ0NuWM6rQyaEIOK8e4Hq41TNFas0ij9DLJcHN8WImuesJOlZJq/CRFtqs MohphdcNLEnuHNR6ph+mxga9dHiEDZ9RqMZkRCPqYc3v4xXNI1vRAlGKG1xBbXhml/vj rUn3HD1a8aLvjxd+3xih6uig2YYlshBHY+n7ZnIgiQesuYjxoCYHqRgmTc5okUHCSLSd GkaA== 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 l84si8151468pfj.344.2018.04.06.07.39.50; Fri, 06 Apr 2018 07:40:04 -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 S1755668AbeDFOiw (ORCPT + 99 others); Fri, 6 Apr 2018 10:38:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58596 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeDFNfB (ORCPT ); Fri, 6 Apr 2018 09:35:01 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6C345DB4; Fri, 6 Apr 2018 13:35:00 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Mark Rutland , Laura Abbott , Shanker Donthineni , Will Deacon , Greg Hackmann , Alex Shi Subject: [PATCH 4.9 059/102] arm64: entry: Explicitly pass exception level to kernel_ventry macro Date: Fri, 6 Apr 2018 15:23:40 +0200 Message-Id: <20180406084339.887782436@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084331.507038179@linuxfoundation.org> References: <20180406084331.507038179@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon commit 5b1f7fe41909 upstream. We will need to treat exceptions from EL0 differently in kernel_ventry, so rework the macro to take the exception level as an argument and construct the branch target using that. Reviewed-by: Mark Rutland Tested-by: Laura Abbott Tested-by: Shanker Donthineni Signed-off-by: Will Deacon Signed-off-by: Alex Shi [v4.9 backport] [Mark: avoid dependency on C error handler backport] Signed-off-by: Mark Rutland [v4.9 backport] Tested-by: Will Deacon Tested-by: Greg Hackmann Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/entry.S | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -70,10 +70,10 @@ #define BAD_FIQ 2 #define BAD_ERROR 3 - .macro kernel_ventry label + .macro kernel_ventry, el, label, regsize = 64 .align 7 sub sp, sp, #S_FRAME_SIZE - b \label + b el\()\el\()_\label .endm .macro kernel_entry, el, regsize = 64 @@ -264,31 +264,31 @@ tsk .req x28 // current thread_info .align 11 ENTRY(vectors) - kernel_ventry el1_sync_invalid // Synchronous EL1t - kernel_ventry el1_irq_invalid // IRQ EL1t - kernel_ventry el1_fiq_invalid // FIQ EL1t - kernel_ventry el1_error_invalid // Error EL1t - - kernel_ventry el1_sync // Synchronous EL1h - kernel_ventry el1_irq // IRQ EL1h - kernel_ventry el1_fiq_invalid // FIQ EL1h - kernel_ventry el1_error_invalid // Error EL1h - - kernel_ventry el0_sync // Synchronous 64-bit EL0 - kernel_ventry el0_irq // IRQ 64-bit EL0 - kernel_ventry el0_fiq_invalid // FIQ 64-bit EL0 - kernel_ventry el0_error_invalid // Error 64-bit EL0 + kernel_ventry 1, sync_invalid // Synchronous EL1t + kernel_ventry 1, irq_invalid // IRQ EL1t + kernel_ventry 1, fiq_invalid // FIQ EL1t + kernel_ventry 1, error_invalid // Error EL1t + + kernel_ventry 1, sync // Synchronous EL1h + kernel_ventry 1, irq // IRQ EL1h + kernel_ventry 1, fiq_invalid // FIQ EL1h + kernel_ventry 1, error_invalid // Error EL1h + + kernel_ventry 0, sync // Synchronous 64-bit EL0 + kernel_ventry 0, irq // IRQ 64-bit EL0 + kernel_ventry 0, fiq_invalid // FIQ 64-bit EL0 + kernel_ventry 0, error_invalid // Error 64-bit EL0 #ifdef CONFIG_COMPAT - kernel_ventry el0_sync_compat // Synchronous 32-bit EL0 - kernel_ventry el0_irq_compat // IRQ 32-bit EL0 - kernel_ventry el0_fiq_invalid_compat // FIQ 32-bit EL0 - kernel_ventry el0_error_invalid_compat // Error 32-bit EL0 + kernel_ventry 0, sync_compat, 32 // Synchronous 32-bit EL0 + kernel_ventry 0, irq_compat, 32 // IRQ 32-bit EL0 + kernel_ventry 0, fiq_invalid_compat, 32 // FIQ 32-bit EL0 + kernel_ventry 0, error_invalid_compat, 32 // Error 32-bit EL0 #else - kernel_ventry el0_sync_invalid // Synchronous 32-bit EL0 - kernel_ventry el0_irq_invalid // IRQ 32-bit EL0 - kernel_ventry el0_fiq_invalid // FIQ 32-bit EL0 - kernel_ventry el0_error_invalid // Error 32-bit EL0 + kernel_ventry 0, sync_invalid, 32 // Synchronous 32-bit EL0 + kernel_ventry 0, irq_invalid, 32 // IRQ 32-bit EL0 + kernel_ventry 0, fiq_invalid, 32 // FIQ 32-bit EL0 + kernel_ventry 0, error_invalid, 32 // Error 32-bit EL0 #endif END(vectors)