From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux-fusion: fix several build issues
Date: Wed, 13 Jan 2016 09:23:06 +0100 [thread overview]
Message-ID: <20160113092306.6e57b621@free-electrons.com> (raw)
In-Reply-To: <56957C2D.4060901@free.fr>
Hello,
On Tue, 12 Jan 2016 23:20:29 +0100, Mason wrote:
> > We need your real name here to accept your patches. See
> > http://lxr.free-electrons.com/source/Documentation/SubmittingPatches#L448.
>
> Do you mean my full name, not just my first name?
Yes, your full name (first name + last name).
> > Can you try instead to replace '%ld' by '%tu'. Apparently, according to
> > lib/vsprintf.c, %t is the proper format specifier for ptrdiff_t.
>
> Erf, I had missed that, as the documentation isn't up-to-date.
> https://www.kernel.org/doc/Documentation/printk-formats.txt
>
> However, if I do use a specific kernel feature, the module
> will no longer build for earlier kernels, while a cast
> works "everywhere".
>
> I tried tracing the history of the %t spec in printk.
> I found 4370aa4aa753 (dated 2009-03-06) i.e. since 2.6.30
>
> What do you think?
Keep your cast, it's simpler and will remain compatible with kernels
earlier than 2.6.30.
> >> +-#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_TINY_RCU) || defined(rcu_read_lock)
> >> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) || defined(rcu_read_lock)
> >
> > Are you sure it is good to keep the defined(rcu_read_lock) test ? This
> > only works if rcu_read_lock is a macro, not if it's an inline function.
> > If tasklisk_lock is available up to 2.6.18, then why not simply keep
> > the version-based condition?
>
> AFAICT, the rcu_read_lock macro was introduced in the 2.5 dev cycle.
> bc33f24bdca8 changed rcu_read_lock from a macro to an inline function
> since 2.6.32
>
> It's possible e.g. kernel 2.6.16 (one of the first LTS kernels IIUC)
> had both rcu_read_lock available, and tasklist_lock exported.
>
> On the other hand, if both methods are available, I'm not sure which
> was better. Do you have a strong opinion on the subject?
No, I don't have a strong opinion on this, since I don't fully grok the
details. Though I would assume that if tasklist_lock was changed to be
no longer exported, then presumably using rcu_read_lock() is a better
solution. But again I'm just guessing.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-01-13 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 15:09 [Buildroot] [PATCH] linux-fusion: fix several build issues Mason
2016-01-12 16:42 ` Thomas Petazzoni
2016-01-12 22:20 ` Mason
2016-01-13 8:23 ` Thomas Petazzoni [this message]
2016-01-15 16:12 ` [Buildroot] [PATCH v2] " Mason
2016-01-16 13:04 ` Thomas Petazzoni
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=20160113092306.6e57b621@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.