From patchwork Sun Jul 18 20:36:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 1506653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=xYhhIwFb; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GScFx5fh5z9sS8 for ; Mon, 19 Jul 2021 06:36:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ngf+xC1OqKl9Di8MxP1SbCyRLbwbgq4IQUeV4PPZIBk=; b=xYhhIwFbt8mCRX FzYaTks046SCvKuY/EJckmQvWSZaaVqSp1isj8ZIY+SeCf7AAoWcyTN6BoSDh9Xjb6zZMJgw02Wrm 3cSj7FvaWgcjlxpoqQ1PpZ/o+RJr6DNfVawgTsF3z/Zsaz0gP/J1rG4Q/tOMxWH3nPg4Co4xHmpn3 yfYE+BFdC/tzjHl3JxPqwK1fz8u3zg6W7y2qTupIiZp5Lcybhk34vFsjKSs0jDgwKT+x+WZhXCQPb pibM5Pljz0F4Y5L5qem98Bbdfp+LzxF85hxwWKAwl+RZHBUz9+rqkiUjcA50F3r6gzQEMCqheCX51 qWG4XKrPN1N5STs8H+Wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5DWd-0080Jc-Jg; Sun, 18 Jul 2021 20:36:35 +0000 Received: from [2601:1c0:6280:3f0::aefb] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5DWc-0080J7-ME; Sun, 18 Jul 2021 20:36:34 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH] arc: rename arc_timer's TIMER_CTRL_IE to avoid redefinition Date: Sun, 18 Jul 2021 13:36:32 -0700 Message-Id: <20210718203632.3982-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org There are 2 other clocksource drivers that use the symbol (macro/define) TIMER_CTRL_IE (in 3 files). Change the ARC timer symbol "TIMER_CTRL_IE" to "TIMER_CTRL_IEN" to resolve the symbol collision (redefinition). In file included from ../drivers/clocksource/timer-integrator-ap.c:17: ../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined 25 | #define TIMER_CTRL_IE (1 << 5) /* VR */ ../include/soc/arc/timers.h:20: note: this is the location of the previous definition 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */ ../drivers/clocksource/mps2-timer.c:25: warning: "TIMER_CTRL_IE" redefined 25 | #define TIMER_CTRL_IE BIT(3) ../include/soc/arc/timers.h:20: note: this is the location of the previous definition 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */ In file included from ../drivers/clocksource/timer-sp804.c:24: ../drivers/clocksource/timer-sp.h:25: warning: "TIMER_CTRL_IE" redefined 25 | #define TIMER_CTRL_IE (1 << 5) /* VR */ ../include/soc/arc/timers.h:20: note: this is the location of the previous definition 20 | #define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */ Fixes: b26c2e3823ba ("ARC: breakout timer include code into separate header") Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Acked-by: Vineet Gupta --- drivers/clocksource/arc_timer.c | 2 +- include/soc/arc/timers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- linux-next-20210716.orig/drivers/clocksource/arc_timer.c +++ linux-next-20210716/drivers/clocksource/arc_timer.c @@ -245,7 +245,7 @@ static void arc_timer_event_setup(unsign write_aux_reg(ARC_REG_TIMER0_LIMIT, cycles); write_aux_reg(ARC_REG_TIMER0_CNT, 0); /* start from 0 */ - write_aux_reg(ARC_REG_TIMER0_CTRL, TIMER_CTRL_IE | TIMER_CTRL_NH); + write_aux_reg(ARC_REG_TIMER0_CTRL, TIMER_CTRL_IEN | TIMER_CTRL_NH); } --- linux-next-20210716.orig/include/soc/arc/timers.h +++ linux-next-20210716/include/soc/arc/timers.h @@ -17,7 +17,7 @@ #define ARC_REG_TIMER1_CNT 0x100 /* timer 1 count */ /* CTRL reg bits */ -#define TIMER_CTRL_IE (1 << 0) /* Interrupt when Count reaches limit */ +#define TIMER_CTRL_IEN (1 << 0) /* Interrupt when Count reaches limit */ #define TIMER_CTRL_NH (1 << 1) /* Count only when CPU NOT halted */ #define ARC_TIMERN_MAX 0xFFFFFFFF