From patchwork Wed Jan 13 02:00:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: john stultz X-Patchwork-Id: 42782 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id F3789B7C88 for ; Wed, 13 Jan 2010 13:01:21 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752022Ab0AMCBU (ORCPT ); Tue, 12 Jan 2010 21:01:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751535Ab0AMCBU (ORCPT ); Tue, 12 Jan 2010 21:01:20 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:59938 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500Ab0AMCBU (ORCPT ); Tue, 12 Jan 2010 21:01:20 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0D1xtcn006654 for ; Tue, 12 Jan 2010 18:59:55 -0700 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0D210jl169016 for ; Tue, 12 Jan 2010 19:01:01 -0700 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0D232FJ006266 for ; Tue, 12 Jan 2010 19:03:02 -0700 Received: from [9.47.21.16] (cog.beaverton.ibm.com [9.47.21.16]) by d03av06.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o0D231Dn006242; Tue, 12 Jan 2010 19:03:01 -0700 Subject: Re: [patch 1/1] sparc: convert to arch_gettimeoffset() From: john stultz To: David Miller Cc: akpm@linux-foundation.org, sparclinux@vger.kernel.org In-Reply-To: <20100112.004235.234303007.davem@davemloft.net> References: <200912220028.nBM0S5uX005437@imap1.linux-foundation.org> <20100112.004235.234303007.davem@davemloft.net> Date: Tue, 12 Jan 2010 18:00:57 -0800 Message-ID: <1263348057.2306.26.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Tue, 2010-01-12 at 00:42 -0800, David Miller wrote: > From: akpm@linux-foundation.org > Date: Mon, 21 Dec 2009 16:28:05 -0800 > > > +extern u32 (*do_arch_gettimeoffset)(void); > > + > > Please put this declaration into a header file that both > pcic.c and time_32.c can include, rather than pcic.c > > Otherwise sparse will complain, time_32.c's definition > can get out of sync, etc. Would this do it? thanks -john Move do_arch_gettimeoffset function pointer declaration to a timex_32.h Uncompiled/Untested Signed-off-by: John Stultz --- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sparc/include/asm/timex_32.h b/arch/sparc/include/asm/timex_32.h index b6ccdb0..a254750 100644 --- a/arch/sparc/include/asm/timex_32.h +++ b/arch/sparc/include/asm/timex_32.h @@ -12,4 +12,5 @@ typedef unsigned long cycles_t; #define get_cycles() (0) +extern u32 (*do_arch_gettimeoffset)(void); #endif diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 8ff470c..4e2724e 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -714,8 +715,6 @@ static irqreturn_t pcic_timer_handler (int irq, void *h) #define USECS_PER_JIFFY 10000 /* We have 100HZ "standard" timer for sparc */ #define TICK_TIMER_LIMIT ((100*1000000/4)/100) -extern u32 (*do_arch_gettimeoffset)(void); - u32 pci_gettimeoffset(void) { /* diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 9b440c0..0d4c09b 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include