Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3341862imu; Mon, 28 Jan 2019 03:12:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN7p336PZqv2MvYpxFsc65rFiRoq1BnYqv5OBYcwRovqbrfACshusuAfFyQ+8J5/qUzWJDk6 X-Received: by 2002:a63:77ce:: with SMTP id s197mr19360186pgc.89.1548673973776; Mon, 28 Jan 2019 03:12:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548673973; cv=none; d=google.com; s=arc-20160816; b=cJvdeIPUbrUgekVUHkF5y/MfXWpOrV/qGPmTWf889/0GzLvGUxbdoy6P2xCH/7UpZ5 8F2RiowqLvC6bBXpYnbmSOpGhwEH6Bs0uSmW3lN5HPhg5fTHz1oVhn6c8xNiMFoG+f2Z QOlQgbsOxNJK18znyEpoL2cbipLmdY2NsetsWRhphNSbvAcToWQhApYl0TNMJl/kgKzC HhSD1hEPnmc+EPiGbGTkzx74khWo8UaXmpEwlc8VzyTC5gauMubDT5GYMxi+kVWMr1rb QW7aQMaeJFQt1vIT5EZqovo5sdRHuL84xZtOch4zRm9aU69/AMU3Kd7lnj3Kd1MIT7n3 3F5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=NlqFJ1s5i4VAlel5PS716pJ3Faba940iLFOUBMdSEdI=; b=k6triAaHQenJAfuEAA6Idaw2gaJu/aSjPtkSDSdH+i5/0uL3KSd/+6urhk7EKoL7IB 2nflcjSsYC3GX/FSuW7DvHUyAn70dsXV5KO9vhDWo/EPaBzY2wIBnTWHdGvaeYDpFmzW hP+TmmmPNGWfKqcoiUvY0MEgnjPlJqhgY22GK68+M/y3HrmPgyHSX8kb9uh8OFC4K+Kb PDsWPq1AqXJs5apzryPUmjhT1TjRSXkqhsxA5ad4pPy53LaOZa466PxBr0BNHRuQedYE O5FbIGV35SqtWOcd6ty/hJ+gtohmJTU44UHg5rpU5o3FaH016wmCx5tralLBgxs5xXbk ppVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=m8QWAqim; 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 h19si31670687plr.67.2019.01.28.03.12.38; Mon, 28 Jan 2019 03:12:53 -0800 (PST) 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; dkim=pass header.i=@c-s.fr header.s=mail header.b=m8QWAqim; 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 S1727120AbfA1LMB (ORCPT + 99 others); Mon, 28 Jan 2019 06:12:01 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:5726 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfA1LLV (ORCPT ); Mon, 28 Jan 2019 06:11:21 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43p6Pr6CgWz9v1qB; Mon, 28 Jan 2019 12:11:12 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=m8QWAqim; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id vnNPX1_sIHPf; Mon, 28 Jan 2019 12:11:12 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43p6Pr5617z9v1q3; Mon, 28 Jan 2019 12:11:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1548673872; bh=NlqFJ1s5i4VAlel5PS716pJ3Faba940iLFOUBMdSEdI=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=m8QWAqim+080I1LEXa78u6e4zbQyF5C6IyS25Z+w4QX7v+EdB1Tj/CcVuzegYrb8/ UPRAA6hS4w6MzQOGEcr4AjfN6I6VbbBNgy0JL87wS4H4TkFa4+DFZH61hAmE3pXcCA ZtYIUXFOaHHygvbJ7x3H6cxCHCo4mKZUeQXDDgFs= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2E01E8B79D; Mon, 28 Jan 2019 12:11:19 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id j_ia7CnyPgZ8; Mon, 28 Jan 2019 12:11:19 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0E8658B796; Mon, 28 Jan 2019 12:11:19 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 0C8B572DE6; Mon, 28 Jan 2019 11:11:19 +0000 (UTC) Message-Id: <261649c2a789e3321c886f1e6f8741f8a8cdad86.1548673552.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH 04/11] powerpc/32: add CLR_MSR_WE() in EXCEPTION_PROLOG in head_32.h To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 28 Jan 2019 11:11:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add CLR_MSR_WE() macro to allow 40x to clear that bit from the register containing msr value. This is the only difference between common EXCEPTION_PROLOG and 40x one. This patch will allow 40x to use the common one. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index 9e6fb9d468f0..643dd8d34aac 100644 --- a/arch/powerpc/kernel/head_32.h +++ b/arch/powerpc/kernel/head_32.h @@ -8,6 +8,10 @@ #define SET_AND_STORE_MSR_RI(reg) #endif +#ifndef CLR_MSR_WE +#define CLR_MSR_WE(reg) +#endif + /* * Exception entry code. This code runs with address translation * turned off, i.e. using physical addresses. @@ -49,6 +53,7 @@ stw r1,0(r11); \ tovirt(r1,r11); /* set new kernel sp */ \ SET_AND_STORE_MSR_RI(r10); /* can take exceptions */ \ + CLR_MSR_WE(r9); \ stw r0,GPR0(r11); \ lis r10,STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */ \ addi r10,r10,STACK_FRAME_REGS_MARKER@l; \ -- 2.13.3