From patchwork Wed Mar 20 17:20:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 2309011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3F2C8DF24C for ; Wed, 20 Mar 2013 17:24:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIMhH-0002RM-3z; Wed, 20 Mar 2013 17:21:07 +0000 Received: from wolverine01.qualcomm.com ([199.106.114.254]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UIMhD-0002R3-W2 for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2013 17:21:04 +0000 X-IronPort-AV: E=Sophos;i="4.84,880,1355126400"; d="scan'208";a="31026159" Received: from pdmz-ns-snip_115_219.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.115.219]) by wolverine01.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Mar 2013 10:20:58 -0700 Received: from [10.46.166.8] (pdmz-ns-snip_218_1.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 7152510004B3; Wed, 20 Mar 2013 10:20:58 -0700 (PDT) Message-ID: <5149EFFA.1050408@codeaurora.org> Date: Wed, 20 Mar 2013 10:20:58 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Gregory CLEMENT Subject: Re: [PATCHv3 09/10] clocksource: time-armada-370-xp: Divorce from local timer API References: <1363198676-30417-1-git-send-email-sboyd@codeaurora.org> <1363198676-30417-10-git-send-email-sboyd@codeaurora.org> <5149ED53.5060002@free-electrons.com> In-Reply-To: <5149ED53.5060002@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130320_132104_194452_329EEA0F X-CRM114-Status: GOOD ( 15.11 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.254 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 03/20/13 10:09, Gregory CLEMENT wrote: > On 03/13/2013 07:17 PM, Stephen Boyd wrote: >> Separate the armada 370xp local timers from the local timer API. >> This will allow us to remove ARM local timer support in the near >> future and makes this driver multi-architecture friendly. > At first view the code looks good, but when I applied your patch set on > linux-next, build it and run it on a Armada XP based board (AX3 with 2 cores), > it crashed: [...] > Internal error: Oops - undefined instruction: 0 [#1] SMP ARM > Modules linked in: > CPU: 0 Not tainted (3.9.0-rc3-next-20130319-00010-g728b448 #153) > PC is at 0xe92d45f0 > LR is at armada_370_xp_timer_interrupt+0x3c/0x4c > pc : [] lr : [] psr: 600001d3 > sp : c0635eb8 ip : 00000000 fp : c063c3f0 > r10: 000003ff r9 : 00000000 r8 : 00000010 > r7 : c22b3c40 r6 : ef007c00 r5 : c0640fcc r4 : c0053e30 > r3 : e92d45f0 r2 : fffffffe r1 : c22b3c40 r0 : c0053e30 > Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel > Control: 10c53c7d Table: 0000406a DAC: 00000015 > Process swapper/0 (pid: 0, stack limit = 0xc0634238) > Stack: (0xc0635eb8 to 0xc0636000) > 5ea0: ef004c80 c0063224 > 5ec0: 00000010 00000010 00000000 c0660ac0 c0635f18 c005fcb8 c0632b90 c000ed94 > 5ee0: c0313c60 60000153 00000001 c00085a8 c0313c54 c0313c60 60000153 ffffffff > 5f00: c0635f4c 00000000 562f5842 c06360c0 00000000 c000db60 0000001a ffff8ad0 > 5f20: ffff8ad0 c06360c0 00000000 00000000 c04379c0 c22ad780 00000000 562f5842 > 5f40: c06360c0 00000000 60000153 c0635f60 c0313c54 c0313c60 60000153 ffffffff > 5f60: 00000021 00000000 00000003 00000004 0000006e c065fcc0 c067924c c063ceb8 > 5f80: c063cc84 c006d8c0 00000005 c065fcc0 c067924c c0421764 c22ad780 c063c42c > 5fa0: 562f5842 c063cca8 c06605c0 c04379c0 c22ad780 00000000 562f5842 00000000 > 5fc0: 00000000 c0417754 ffffffff ffffffff c04172dc 00000000 00000000 c04379c0 > 5fe0: 10c53c7d c063c414 c04379bc c063febc 0000406a 00008074 00000000 00000000 > [] (armada_370_xp_timer_interrupt+0x3c/0x4c) from [] (handle_percpu_devid_irq+0x64/0x80) > [] (handle_percpu_devid_irq+0x64/0x80) from [] (generic_handle_irq+0x20/0x30) > [] (generic_handle_irq+0x20/0x30) from [] (handle_IRQ+0x38/0x90) > [] (handle_IRQ+0x38/0x90) from [] (armada_370_xp_handle_irq+0xa4/0xb0) > [] (armada_370_xp_handle_irq+0xa4/0xb0) from [] (__irq_svc+0x40/0x50) > Exception stack(0xc0635f18 to 0xc0635f60) > 5f00: 0000001a ffff8ad0 > 5f20: ffff8ad0 c06360c0 00000000 00000000 c04379c0 c22ad780 00000000 562f5842 > 5f40: c06360c0 00000000 60000153 c0635f60 c0313c54 c0313c60 60000153 ffffffff > [] (__irq_svc+0x40/0x50) from [] (calibrate_delay+0x378/0x528) > [] (calibrate_delay+0x378/0x528) from [] (start_kernel+0x250/0x2dc) > [] (start_kernel+0x250/0x2dc) from [<00008074>] (0x8074) > Code: 1fe7deb7 cd5772dd fff5692e ed55f79e (7ed5a5f7) > > > > I am trying to figure out what happened. Argh. Stupid casting again. Can you try this? ---8<---- Acked-by: Gregory CLEMENT tested-by: Gregory CLEMENT diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c index ee2e50c5..a9bf37a 100644 --- a/drivers/clocksource/time-armada-370-xp.c +++ b/drivers/clocksource/time-armada-370-xp.c @@ -150,7 +150,7 @@ static irqreturn_t armada_370_xp_timer_interrupt(int irq, void *dev_id) /* * ACK timer interrupt and call event handler. */ - struct clock_event_device *evt = *(struct clock_event_device **)dev_id; + struct clock_event_device *evt = dev_id; writel(TIMER0_CLR_MASK, local_base + LCL_TIMER_EVENTS_STATUS); evt->event_handler(evt);