Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5233243ybl; Tue, 27 Aug 2019 01:14:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUVaq0/iD5QF3/p5lK2K7ZEe5IMW+jm2XVuxcWa/CIHwc7d5cdjLPZOvlsYsYJIKMZ9q41 X-Received: by 2002:aa7:8a48:: with SMTP id n8mr7469804pfa.143.1566893684096; Tue, 27 Aug 2019 01:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893684; cv=none; d=google.com; s=arc-20160816; b=NIG74MWuf+IE71AakD+jvuYuT7E9iTxMt6KsePtB5zM4bA7OxAn2ahnD+aAInuNuQf VmeBuLFaDoOteJbcfGWLSFBfAWk3+uI+Ycw88qwBToO9yM+/w/6jP7U+HZ91waqfW07w dcYqPy4+oQlORgKq60cnpmDkKZLo9C8QSHHoAs/nIMALFnUHOIpPOVhvQSPMtzp2oi04 XbXH+k6jznbp+frLAeAt1ykRGG0IWVEfcSmOnHyTAGvuXETQzp66hq8vWwpowaSmcVws oY1091oNJzbhfdHkGE0Klshy+Dx6DmwHzLsAL2hqUpyOLkz50VAYk5yCAUj6zOXP8vPo 2a6g== 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:message-id :dkim-signature; bh=ubHkbneok8K2cTYT/jQrBsXkaZGXihrm+aatYILFw2I=; b=eClKrLkRgzt2MNXzy7yWmEW1G+7wVKzfEjtycgKi5BZZAMWBz1ju80dGNtTJ6bOjeZ BovgqdVnPpXWKhbOCGhb0jP9BeNSxF3YqzGtjLK7lvpsSLThDKZGOIcDOLxgmyGWP/mu T5dN1/sguTvy+ckS/YlwKXIn7Mi0nGs6BaV2fyupjmBQXhtYocIi6sIoDVb/dFwxO4m3 PrprlUqMW/6IXYB0nqDHhmFMSmIdzABKhsMlvpdxGHLTST4OodeaaaYw+t6V+8MpOWXe iFqALi2q03X+FIBfWegTI2NaMk5l75KGjDr7n1uMPKnBZ6t+5OJIN5AmRzDhMdUIq2xn PqDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=N58Mo1kB; 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 z7si1938815pjt.100.2019.08.27.01.14.28; Tue, 27 Aug 2019 01:14:44 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=N58Mo1kB; 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 S1731999AbfH0INL (ORCPT + 99 others); Tue, 27 Aug 2019 04:13:11 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:32664 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729563AbfH0INK (ORCPT ); Tue, 27 Aug 2019 04:13:10 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46HhSz6dDWzB09Zp; Tue, 27 Aug 2019 10:13:07 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=N58Mo1kB; 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 ibmxAVV2Dw-J; Tue, 27 Aug 2019 10:13:07 +0200 (CEST) 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 46HhSz5PB6zB09Zn; Tue, 27 Aug 2019 10:13:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1566893587; bh=ubHkbneok8K2cTYT/jQrBsXkaZGXihrm+aatYILFw2I=; h=From:Subject:To:Cc:Date:From; b=N58Mo1kBbG+y/ju35+KRtvnTi3QC2IqmKwRtxxKrVECVOpB7TQ9U/D/hiJhSGsQs/ vvGrlsSy2dZLG+f06Z+pb9vC9OWOvgluUXq6cvTglnruNzXRRPlAlHUyWry1pdSdBN BkLhBUWJ8cfScwRiVDa3GePPFTdEAV9PB6lMvHTQ= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C737E8B7F6; Tue, 27 Aug 2019 10:13:08 +0200 (CEST) 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 QfE1rjn32BdN; Tue, 27 Aug 2019 10:13:08 +0200 (CEST) Received: from pc16032vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 93D128B74C; Tue, 27 Aug 2019 10:13:08 +0200 (CEST) Received: by pc16032vm.idsi0.si.c-s.fr (Postfix, from userid 0) id DC623696D8; Tue, 27 Aug 2019 08:13:07 +0000 (UTC) Message-Id: <0f7e164afb5d1b022441559fe5a999bb6d3c0a23.1566893505.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH 1/2] powerpc: permanently include 8xx registers in reg.h To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 27 Aug 2019 08:13:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Most 8xx registers have specific names, so just include reg_8xx.h all the time in reg.h in order to have them defined even when CONFIG_PPC_8xx is not selected. This will avoid the need for #ifdefs in C code. Guard SPRN_ICTRL in an #ifdef CONFIG_PPC_8xx as this register has same name but different meaning and different spr number as another register in the mpc7450. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 2 -- arch/powerpc/include/asm/reg_8xx.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 10caa145f98b..b17ee25df226 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -25,9 +25,7 @@ #include #endif -#ifdef CONFIG_PPC_8xx #include -#endif /* CONFIG_PPC_8xx */ #define MSR_SF_LG 63 /* Enable 64 bit mode */ #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ diff --git a/arch/powerpc/include/asm/reg_8xx.h b/arch/powerpc/include/asm/reg_8xx.h index 7192eece6c3e..abc663c0f1db 100644 --- a/arch/powerpc/include/asm/reg_8xx.h +++ b/arch/powerpc/include/asm/reg_8xx.h @@ -38,7 +38,9 @@ #define SPRN_CMPF 153 #define SPRN_LCTRL1 156 #define SPRN_LCTRL2 157 +#ifdef CONFIG_PPC_8xx #define SPRN_ICTRL 158 +#endif #define SPRN_BAR 159 /* Commands. Only the first few are available to the instruction cache. -- 2.13.3