Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5812364ybl; Tue, 27 Aug 2019 09:59:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAsjMoUtxSOUlfg1Bn2Loh54RhfMo1iGoDwwvtZTXRILt3GAIwGW89/rHILlY9aC3PaFLo X-Received: by 2002:a17:902:96a:: with SMTP id 97mr18381948plm.264.1566925158296; Tue, 27 Aug 2019 09:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566925158; cv=none; d=google.com; s=arc-20160816; b=AdTXsXdUkT9DNrCrON0GmlA5N8iTmqsKhbZo7zX+rYeWOEXmdMhuiOUUDjExv6FW83 STVzCVA/nI4Bh6UucAM5E3Z3bBrO91gHDFoYgn5qLBO4xNBllo/qChGAPhEqi+kL3ShT QnrpPPaXJ6Y0UuEKvhU/9FoIzsNyr/9kYEl1oyYcHhQlMxWfruoEL1zdKq5jfdEXAm08 /A0I6FTdPKiivdhoisOekYrrw5XHLqeSWL5SyNA6qPGLqNIIzNPD00dX9kUOBCg/dTCi UgQvaX9IqvwFknk5qfErQPQcnzHUZSBh2pEaQw5uP8EojpFj6kAFosB33LHddTVY3c5e kcvA== 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=GTzcbZUVLBqv6PRvL7q6KDnuINBeAmadNmtHl1QKWxEIE39btPlzO6UqMI/8oLpvLs ezwwOJc4ksbE2x77vRRQznRMgygVJsH4g8U4Pkboam0SIaNNcJ5QKMUMg1+JQ+fmg4zO O2W9wWjxZ6K0oZGMHHgo7fVY3YUtdsuXP/5Li0T7ZXbqRafpsqQMzXU08RH2MMMFgP4d VWGLbirO10l59bPu+nUrflLQmVW3PbmC5C9OydfKrcDhiQgkHevQaqmRpNtWJ5Zx+pkm RVebvNgJ/pRAF5OkQsMoGhdgsfRKvtn//0/FbNnylHt9xNDS6KOFpunTSiu35XB8QLXy qzgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=gVWWO6Ic; 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 o185si14220703pfb.206.2019.08.27.09.59.02; Tue, 27 Aug 2019 09:59:18 -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=gVWWO6Ic; 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 S1730104AbfH0Q5b (ORCPT + 99 others); Tue, 27 Aug 2019 12:57:31 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:9373 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727784AbfH0Q5a (ORCPT ); Tue, 27 Aug 2019 12:57:30 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46Hw5z6vG9z9txt1; Tue, 27 Aug 2019 18:57:27 +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=gVWWO6Ic; 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 AE3RAvWcKv5D; Tue, 27 Aug 2019 18:57:27 +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 46Hw5z5PW7z9txsv; Tue, 27 Aug 2019 18:57:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1566925047; bh=ubHkbneok8K2cTYT/jQrBsXkaZGXihrm+aatYILFw2I=; h=From:Subject:To:Cc:Date:From; b=gVWWO6IcTMnvIj39ktT9tiPESnFDEQ0WhT3Xpm6aktoOi2R6+6fGoyFguDAxdmJBy zEdtfwOipOahid/G69xheHIBQiYtTmi49UEolD3hsqI1j2d9dA/j2DiMa5Y2mY8hWy +CeBVXNOtF5Jd4dmCIwKpIDu6/P/gCISNN8H4ZGk= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 72E3B8B842; Tue, 27 Aug 2019 18:57:29 +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 g4EpfJcQhBIs; Tue, 27 Aug 2019 18:57:29 +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 3CB608B847; Tue, 27 Aug 2019 18:57:29 +0200 (CEST) Received: by pc16032vm.idsi0.si.c-s.fr (Postfix, from userid 0) id CF443696EA; Tue, 27 Aug 2019 16:57:28 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH 1/2] powerpc: permanently include 8xx registers in reg.h To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , ravi.bangoria@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 27 Aug 2019 16:57:28 +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