Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp377299rdb; Tue, 31 Oct 2023 09:52:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhUs8Wnd6KkTdcISJhqu4gr51NId6SnYoS1k9e0MJ8VhoSC/De5eJtxbvILd5diaxxhaXh X-Received: by 2002:a17:902:ecca:b0:1cc:54b5:b4fa with SMTP id a10-20020a170902ecca00b001cc54b5b4famr5399033plh.18.1698771176015; Tue, 31 Oct 2023 09:52:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698771176; cv=pass; d=google.com; s=arc-20160816; b=J/PmIbCYB9K8nTMMjiDgntmyWBWUOiX0+JGbjQrHLuuEKhpkVw51NdMUIKWPjJLY4V rESN8ofjbtUr5L2LW3142E2FCBX1vTHs0BNxzQZ6Kh98LXp9844fw0QRGtttW4WTv9hC clqYhem+Wk+5he49gC12eY+pcPkN8gNoWB9RAqbvLBNnwm8HvxEoJE4xFZ4/ier36DOD dJEz0yNCAK1tC4m/uPQ4nwtChteDBcsqOllAej44bW66RFATfVc8olgPHXL5eLDM666R BufzL88DrRjkCPc9hLynXbwjBPWdLQg9xAGtDn4a6GYM3VT+Qn9/xF4vKt30JDDNHnjB CN/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=J441UACOmM+plHFUNs2UCVgRdvQT0qPnSeGsc/Q08Aw=; fh=AE0jPXmH2uGjUWldeEmzGgVvVSJ9pNBsdVXkQhnqn70=; b=1FenAyXM6ipxFAvzkpreP761ec52zZc6scwleCsp+mjHX0SFgRtnvSYaPhBXE6Zsi1 +6uEriP2q/NlSuDWZf0OavLu5+2CsOntWm0e8kiX6YFOvSe+Rxvfh9Adpx+3jwGFfhSN jrETsXsLAjs36XIbNL+eucU3nRjtMLcNuOQyGzyMaRzabfppVlNedMKmjcAnLlMa60ql f1k+KX1tj4mxKM+hIws1wumY4lKqjIDSbPvXc6ItUaOXppg1fdbXpfKDMsSlJA6WKk6l QuZsLlChCqSPsX39x774iGglKRH/beLLY4xhy9BmHglMoUvFm7qDi4/fcLeCZidEJOul 7xQQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@syrmia.com header.s=selector1 header.b="SPshZl/9"; arc=pass (i=1 spf=pass spfdomain=syrmia.com dkim=pass dkdomain=syrmia.com dmarc=pass fromdomain=syrmia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bw34-20020a056a0204a200b005b8f2a018e5si1323553pgb.732.2023.10.31.09.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 09:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@syrmia.com header.s=selector1 header.b="SPshZl/9"; arc=pass (i=1 spf=pass spfdomain=syrmia.com dkim=pass dkdomain=syrmia.com dmarc=pass fromdomain=syrmia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2824D807C74A; Tue, 31 Oct 2023 09:52:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346938AbjJaQwo (ORCPT + 99 others); Tue, 31 Oct 2023 12:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346986AbjJaQwL (ORCPT ); Tue, 31 Oct 2023 12:52:11 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2093.outbound.protection.outlook.com [40.107.21.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3096BA2; Tue, 31 Oct 2023 09:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VMbOBMvLyvdwi6U6WFzfa+FuMY+/FMKP4Bvrbj+Zp011P8oQGikYfgLEq7NUJeK0nIfybRM5X5rolVoOK1yjV2xfAWljiQOYeBMZDIj5T/D1+YLnwpJXy2APk2o7pyKJ3HRngMqFBmkEaZPQ1M8/L7HPpM+abuqhJCxBkjr3aeYtlLeTaTSVi6EfBd0+DKsAo8v4VYOxiSjsmkyjXrzoaVVDoQ6imISlWWqX9jefcPQIgsdsXgYCMztNLpKTgB6GVKkxzL3ycCsWWC88bYquFL19sfL5OWtCcuN9FPE9n3CThQQHdh4wCiNbant37SGeykVYLTSyfYST3i/675SHrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=J441UACOmM+plHFUNs2UCVgRdvQT0qPnSeGsc/Q08Aw=; b=GcSgjhfZLZ0tEYU7aAaGOB2hLBge2Yg5YT8kYm+LME1CWG5Revyhv40FiexfM94vbkyxDt2bfG2qFx4qI/32vfmoJQsUaXaHPXQb9NGTQi1Rzt+VVsrox+uj5/XGuGt5Sl0Qzdg+58VU8bOAChffda0jjoIpDkJ7ZHbLj8zLt72qm/EKaAjOpZ5XZWueSlR6TIfLsG3xs8nc3sieDxDJy5x5utQLHHlpRwflw4KyXc9O9PjeGHpNqPmlYHGpPfqkPozYpMIQBr70KD6g6z9DlhEdi3Zsyx1IicsiIEfQGTxFA9qElx9H7s07AdK+0xQ1JYH8osWl+GE5B2lwmwXsYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=syrmia.com; dmarc=pass action=none header.from=syrmia.com; dkim=pass header.d=syrmia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syrmia.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J441UACOmM+plHFUNs2UCVgRdvQT0qPnSeGsc/Q08Aw=; b=SPshZl/9NE3/T5GO+y9KXv1mvt9XaiJYper0PtfUBeG/mm0y8iPc12c7870OaeO9u4glGiKtAV1UcGCLbQd21os4bDVci0xHtcFEzv+bwM1tBTLrLlN39eNV4h8dkpKKRL0jtiuKwRbQUgLsydo2PVn7EbsutNuIP5TRzTI1PLE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=syrmia.com; Received: from VI1PR0302MB3486.eurprd03.prod.outlook.com (2603:10a6:803:1e::32) by AM9PR03MB7187.eurprd03.prod.outlook.com (2603:10a6:20b:26f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Tue, 31 Oct 2023 16:49:39 +0000 Received: from VI1PR0302MB3486.eurprd03.prod.outlook.com ([fe80::59be:1f7c:f22b:baaa]) by VI1PR0302MB3486.eurprd03.prod.outlook.com ([fe80::59be:1f7c:f22b:baaa%4]) with mapi id 15.20.6907.032; Tue, 31 Oct 2023 16:49:39 +0000 From: Aleksandar Rikalo To: Thomas Bogendoerfer Cc: Aleksandar Rikalo , Chao-ying Fu , Daniel Lezcano , Dragan Mladjenovic , Geert Uytterhoeven , Greg Ungerer , Hauke Mehrtens , Ilya Lipnitskiy , Jiaxun Yang , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Marc Zyngier , Paul Burton , Peter Zijlstra , Serge Semin , Thomas Gleixner , Tiezhu Yang Subject: [PATCH v3 02/11] MIPS: GIC: Generate redirect block accessors Date: Tue, 31 Oct 2023 17:49:18 +0100 Message-Id: <20231031164927.371663-3-aleksandar.rikalo@syrmia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231031164927.371663-1-aleksandar.rikalo@syrmia.com> References: <20231031164927.371663-1-aleksandar.rikalo@syrmia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AM0PR10CA0065.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:15::18) To VI1PR0302MB3486.eurprd03.prod.outlook.com (2603:10a6:803:1e::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0302MB3486:EE_|AM9PR03MB7187:EE_ X-MS-Office365-Filtering-Correlation-Id: c0065edd-c448-402f-204a-08dbda315f9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6DIEhVIb7q1m2HlymGmzOTNEKkHaWR21z3vaCE6Fni3kAuNiEzCfBiBW4k+BL081AWXWf86FwtgDol6kvVYaRlUu8i75OepjdqxH5069CkzK2fzOQ8SZEGUQUbX9+p3sgu4wnte1BvP42hQ+jnUUUw1fZM20G9fvnbwjKbHDtKlvu9PhrVd4uN/KmjhgGKsvONtXfZr+Ab2NaotxriYoXqvJMcGOxrGjRGcDeffI5rHPtMrY0af5FeulAn25igx/SIMngytTamjC5Ntp3KCUtcyfjJ2v0C2USoLK+UGWxZOp6yF8x1qJD54jpyW7tVF3TLPK+2URDTzV6MMdAubVTOV0GsVmaAVqjTmtp5BjbztqtRXHCkMnyyIHPMXrsHE/CQwyKnNFqo2fxXKaYAUpk8FeWDuPJ7ciD0dhLPtHmAzQjs+zLtprj4TMResKcsBXQhrEc4IuEJWpL8YJaHr6PyIvjcs1FnRpxP59OB9jqHillobM9eoIeq3XljWNYlAfEEmMvn2YuoPLny+FrgnifNfAFUrlJfxaQCIkWh1atmIJlFfwxtv+RrtPpiytBfbdssrGciylcolF0aD7wkG2ieZ/DFCoC8ZGJ/NFHy4JHtHpdYXtGsqHLl5lMrAj4sbS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0302MB3486.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(376002)(136003)(346002)(39840400004)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(41300700001)(44832011)(316002)(54906003)(6916009)(66946007)(66556008)(66476007)(8936002)(7416002)(478600001)(2906002)(4326008)(5660300002)(8676002)(6486002)(26005)(52116002)(6512007)(6506007)(2616005)(83380400001)(36756003)(1076003)(38350700005)(38100700002)(6666004)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HUEFBIF9YntORipCHBEGVPEK5SOzz+i6b9tRG0g5VSQB4zvQXRcLD3PMUeYi?= =?us-ascii?Q?f5IaCcbUQq+ykLlsy1bzbVYHe2m3j13Ic5aDOFl59vj76IsyeKTBSKdubNtQ?= =?us-ascii?Q?nqnxaNUaBN/q6DrHGxUk34ejOEeansaa3s1CSOgkHke3DKt6OVFQGMM1ozqt?= =?us-ascii?Q?2dwCZoaXYehK9dR+U+AQ0X8Um2sV07GudDoJUh+Vh4EyLMImB64v6FnMlIwD?= =?us-ascii?Q?rNNlMLgQIJF7W58NcSzVcPeULL0Rnn42Daxn86fExMTudXd2YTELykq8PV4b?= =?us-ascii?Q?zFiVnOKBiO9orRQvN2vEGXTtd97chsMl0GcQKoxtp8rHW7aDARCzQZtNl/Hz?= =?us-ascii?Q?RogqpeUuOhW7LEZ7npLOrnFgfG83hYCHMflMMtoGxssP134yUxGsAV1HCQFd?= =?us-ascii?Q?GKwz6ZiewNm94H6nWVBF0h2Q1DGel3y/zSdpKbSs0UFiohF1qcuGItACZ9DQ?= =?us-ascii?Q?2Pd7xRKzfZuHJYHE2/qaAqMjRW8ZrQBD5S6FAaD2w229yjESbRPFuaGBDdVH?= =?us-ascii?Q?6QptYy7T973WCa4wN/0DQwtSA1H9Gur7PGb51Slo1NYi8vxDlFXkOs5YSmxs?= =?us-ascii?Q?rqUkB7EwftO0Nd6JZ1/qrO8IAzkuD2eDL7dW7JBthqETD5jtqjeCslBFGXNe?= =?us-ascii?Q?z/3fyRFp75Mt7+kU4tD7kgZTXqYuJHqoyizAxVih81C6ZvbhSSG4UTusPejU?= =?us-ascii?Q?EJRsB8iZa85hL2X3eepyDEfICYVlzNdD/4gxR6nQLkEqeoJoivC5pGlTYJsW?= =?us-ascii?Q?pO3ImAZAVQYz4+t8Xu499gzgQd52CtmHgsP5Tps5J4fDwZVCrpn5RJekb/L4?= =?us-ascii?Q?g38OpLrg12U9yZS+YwRKiNFGo4sE9DBYPQsIrjSNto8JE2euhoVc8f5GYpAj?= =?us-ascii?Q?humcroFTOL5R7ud3mo3FTcTKOuypl42LxODqan5eo8JFQhD5b+2UBoXazw+/?= =?us-ascii?Q?PZMnXMDCLNrhuKuauJ3PVpRsyu6P1GnOyRzIurShke/lFEH9pRqzyixRFGNJ?= =?us-ascii?Q?ax/fPC03d6qfotDBXbii782WJtJwlgqYsJeQ+SKC8EczyNBWxCGX3J8d+0nA?= =?us-ascii?Q?enOsk4gGqb0dJyQaiOCqGFD/2upNkEkh3IC5bx9557OsLN6flfGeBahmySPx?= =?us-ascii?Q?zVMQDxggkM7NsHOyT8Jx12erfkRIzUeoSmeeXmmJ19A9v2XEwzxh5QjO8SLu?= =?us-ascii?Q?dG/kkZPigvXsH88tQdPPrWoFiawHB1R5Yy9F223p4CNueUkakJar2vuDM3ZV?= =?us-ascii?Q?JK1FnyJ32/9qRHOz0Z5h2B50EV4ERCT90X80wiNQgTNzO7XcRpmpDxl+8yif?= =?us-ascii?Q?L8TthAJT6QOnKpkvtOZ+iE3kArSiti410O94HgQNv5kmta1H0clsJzQeya3x?= =?us-ascii?Q?iIqdwqEvB/pE2sNp33wR57epIat7vteSRirvRHEFezatUV0vgtWUlub6p619?= =?us-ascii?Q?SzDsHd5WugDRNs2dDRxqYlVxMidlWD5o7RdAofBq5foRXU34NxkXP0PQ7EsL?= =?us-ascii?Q?redOIVOwjQsN700JCz5v/YrDFLWCbDgVkubiovgfWMhc3ZFfF6mr/ZyzWyN/?= =?us-ascii?Q?l+V9VpfEIwhyykd5CkVK5oAXXUFaF7RhBEcT3jcAooWi1mYcbcORyNiblJI7?= =?us-ascii?Q?6A=3D=3D?= X-OriginatorOrg: syrmia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0065edd-c448-402f-204a-08dbda315f9c X-MS-Exchange-CrossTenant-AuthSource: VI1PR0302MB3486.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 16:49:39.6876 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 19214a73-c1ab-4e19-8f59-14bdcb09a66e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SlkzTubqqotJ3KHI6k1jsgBLPlTc4Lofq4vOKfN9EAzscHv5MXTwXHxwHkqom+qJ5qL4GuoJFdtH4bRcRLip6KRxauaOIsjssLBv+4+NtyY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR03MB7187 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 09:52:53 -0700 (PDT) From: Paul Burton With CM 3.5 the "core-other" register block evolves into the "redirect" register block, which is capable of accessing not only the core local registers of other cores but also the shared/global registers of other clusters. This patch generates accessor functions for shared/global registers accessed via the redirect block, with "redir_" inserted after "gic_" in their names. For example the accessor function: read_gic_config() ...accesses the GIC_CONFIG register of the GIC in the local cluster. With this patch a new function: read_gic_redir_config() ...is added which accesses the GIC_CONFIG register of the GIC in whichever cluster the GCR_CL_REDIRECT register is configured to access. This mirrors the similar redirect block accessors already provided for the CM & CPC. Reviewed-by: Jiaxun Yang Signed-off-by: Paul Burton Signed-off-by: Chao-ying Fu Signed-off-by: Dragan Mladjenovic Signed-off-by: Aleksandar Rikalo --- arch/mips/include/asm/mips-gic.h | 50 ++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/arch/mips/include/asm/mips-gic.h b/arch/mips/include/asm/mips-gic.h index 084cac1c5ea2..fd9da5e3beaa 100644 --- a/arch/mips/include/asm/mips-gic.h +++ b/arch/mips/include/asm/mips-gic.h @@ -28,11 +28,13 @@ extern void __iomem *mips_gic_base; /* For read-only shared registers */ #define GIC_ACCESSOR_RO(sz, off, name) \ - CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_SHARED_OFS + off, name) + CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_SHARED_OFS + off, name) \ + CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_REDIR_OFS + off, redir_##name) /* For read-write shared registers */ #define GIC_ACCESSOR_RW(sz, off, name) \ - CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_SHARED_OFS + off, name) + CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_SHARED_OFS + off, name) \ + CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_REDIR_OFS + off, redir_##name) /* For read-only local registers */ #define GIC_VX_ACCESSOR_RO(sz, off, name) \ @@ -45,7 +47,7 @@ extern void __iomem *mips_gic_base; CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_REDIR_OFS + off, vo_##name) /* For read-only shared per-interrupt registers */ -#define GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ +#define _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ static inline void __iomem *addr_gic_##name(unsigned int intr) \ { \ return mips_gic_base + (off) + (intr * (stride)); \ @@ -58,8 +60,8 @@ static inline unsigned int read_gic_##name(unsigned int intr) \ } /* For read-write shared per-interrupt registers */ -#define GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ - GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ +#define _GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ + _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ \ static inline void write_gic_##name(unsigned int intr, \ unsigned int val) \ @@ -68,22 +70,30 @@ static inline void write_gic_##name(unsigned int intr, \ __raw_writel(val, addr_gic_##name(intr)); \ } +#define GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ + _GIC_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, stride, redir_##name) + +#define GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ + _GIC_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, stride, redir_##name) + /* For read-only local per-interrupt registers */ #define GIC_VX_ACCESSOR_RO_INTR_REG(sz, off, stride, name) \ - GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ stride, vl_##name) \ - GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ + _GIC_ACCESSOR_RO_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ stride, vo_##name) /* For read-write local per-interrupt registers */ #define GIC_VX_ACCESSOR_RW_INTR_REG(sz, off, stride, name) \ - GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_LOCAL_OFS + off, \ stride, vl_##name) \ - GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ + _GIC_ACCESSOR_RW_INTR_REG(sz, MIPS_GIC_REDIR_OFS + off, \ stride, vo_##name) /* For read-only shared bit-per-interrupt registers */ -#define GIC_ACCESSOR_RO_INTR_BIT(off, name) \ +#define _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ static inline void __iomem *addr_gic_##name(void) \ { \ return mips_gic_base + (off); \ @@ -106,8 +116,8 @@ static inline unsigned int read_gic_##name(unsigned int intr) \ } /* For read-write shared bit-per-interrupt registers */ -#define GIC_ACCESSOR_RW_INTR_BIT(off, name) \ - GIC_ACCESSOR_RO_INTR_BIT(off, name) \ +#define _GIC_ACCESSOR_RW_INTR_BIT(off, name) \ + _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ \ static inline void write_gic_##name(unsigned int intr) \ { \ @@ -146,6 +156,14 @@ static inline void change_gic_##name(unsigned int intr, \ } \ } +#define GIC_ACCESSOR_RO_INTR_BIT(off, name) \ + _GIC_ACCESSOR_RO_INTR_BIT(off, name) \ + _GIC_ACCESSOR_RO_INTR_BIT(MIPS_GIC_REDIR_OFS + off, redir_##name) + +#define GIC_ACCESSOR_RW_INTR_BIT(off, name) \ + _GIC_ACCESSOR_RW_INTR_BIT(off, name) \ + _GIC_ACCESSOR_RW_INTR_BIT(MIPS_GIC_REDIR_OFS + off, redir_##name) + /* For read-only local bit-per-interrupt registers */ #define GIC_VX_ACCESSOR_RO_INTR_BIT(sz, off, name) \ GIC_ACCESSOR_RO_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ @@ -155,10 +173,10 @@ static inline void change_gic_##name(unsigned int intr, \ /* For read-write local bit-per-interrupt registers */ #define GIC_VX_ACCESSOR_RW_INTR_BIT(sz, off, name) \ - GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ - vl_##name) \ - GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_REDIR_OFS + off, \ - vo_##name) + _GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_LOCAL_OFS + off, \ + vl_##name) \ + _GIC_ACCESSOR_RW_INTR_BIT(sz, MIPS_GIC_REDIR_OFS + off, \ + vo_##name) /* GIC_SH_CONFIG - Information about the GIC configuration */ GIC_ACCESSOR_RW(32, 0x000, config) -- 2.25.1