linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: Where to define platform-specific ndelay
Date: Thu, 16 Jul 2015 14:41:23 +0200	[thread overview]
Message-ID: <55A7A673.50906@free.fr> (raw)

Hello,

arch/arm64 defines ndelay, but arch/arm does not.

With my current setup, ndelay resolves to the generic implementation
from include/linux/delay.h

#ifndef ndelay
static inline void ndelay(unsigned long x)
{
	udelay(DIV_ROUND_UP(x, 1000));
}
#define ndelay(x) ndelay(x)
#endif


I want to provide a different implementation for my platform.

Something along the lines of

#define NDELAY_MULT	((2199 * HZ) >> 11)
#define ndelay(n)	__const_udelay((n) * NDELAY_MULT)

Where should I put these definitions?

(I don't want to pollute the generic namespace, so it should
probably go inside platform-specific files, such as perhaps
mach-foo/include/mach/timex.h ??)

Although, I'm not sure how it would be supposed to work
with CONFIG_ARCH_MULTIPLATFORM (which is the default, IIUC?)

Regards.

                 reply	other threads:[~2015-07-16 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=55A7A673.50906@free.fr \
    --to=slash.tmp@free.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).