From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 1/2] MIPS: make r4k clocksource/clockevent usable in other codepaths
Date: Sun, 01 Jun 2008 21:56:16 +0400 [thread overview]
Message-ID: <4842E2C0.1020106@ru.mvista.com> (raw)
In-Reply-To: <20080528122838.GA5976@roarinelk.homelinux.net>
Hello.
Manuel Lauss wrote:
> Make the r4k cp0 counter clocksource and clockevent modules
> library code so it may be used e.g. as a fallback in case other
> clocksources/events aren't available.
>
> Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
>
[...]
> diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h
> index d3bd5c5..01a4c93 100644
> --- a/include/asm-mips/time.h
> +++ b/include/asm-mips/time.h
> @@ -50,27 +50,35 @@ extern int (*perf_irq)(void);
> /*
> * Initialize the calling CPU's compare interrupt as clockevent device
> */
> -#ifdef CONFIG_CEVT_R4K
> -extern int mips_clockevent_init(void);
> +#ifdef CONFIG_CEVT_R4K_LIB
> extern unsigned int __weak get_c0_compare_int(void);
> -#else
> +extern int r4k_clockevent_init(void);
> +#endif
> +
> static inline int mips_clockevent_init(void)
> {
> +#ifdef CONFIG_CEVT_R4K
> + return r4k_clockevent_init();
> +#else
> return -ENXIO;
> -}
> #endif
> +}
>
> /*
> * Initialize the count register as a clocksource
> */
> -#ifdef CONFIG_CEVT_R4K
> -extern int init_mips_clocksource(void);
> -#else
> +#ifdef CONFIG_CSRC_R4K_LIB
> +extern int init_r4k_clocksource(void);
> +#endif
>
Hm, does it make sense to hedge ''extern' declaration by #ifdef's?
WBR, Sergei
next prev parent reply other threads:[~2008-06-01 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 12:28 [PATCH 1/2] MIPS: make r4k clocksource/clockevent usable in other codepaths Manuel Lauss
2008-06-01 17:56 ` Sergei Shtylyov [this message]
2008-06-03 14:12 ` Manuel Lauss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4842E2C0.1020106@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=mano@roarinelk.homelinux.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox