Re: [PATCH v4 04/16] generic-sections: add section core helpers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Nicholas Piggin <npiggin@xxxxxxxxx>
- Subject: Re: [PATCH v4 04/16] generic-sections: add section core helpers
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Thu, 25 Aug 2016 19:52:39 +0200
- Cc: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, hpa@xxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, bp@xxxxxxxxx, linux@xxxxxxxxxxxxxxxx, mhiramat@xxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, x86@xxxxxxxxxx, luto@xxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, gnomes@xxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, arnd@xxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, ananth@xxxxxxxxxx, pebolle@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, david.vrabel@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, mcb30@xxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, mmarek@xxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, jkosina@xxxxxxx, korea.drzix@xxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, rostedt@xxxxxxxxxxx, jani.nikula@xxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, acme@xxxxxxxxxx, jolsa@xxxxxxxxxx, msalter@xxxxxxxxxx, chris@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, mpe@xxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <20160825165121.45d26fb0@roar.ozlabs.ibm.com>
- References: <1471642454-5679-1-git-send-email-mcgrof@kernel.org> <1471642454-5679-5-git-send-email-mcgrof@kernel.org> <20160823112633.7d482e62@roar.ozlabs.ibm.com> <20160823173306.GA3296@wotan.suse.de> <20160824135141.2c8f06ec@roar.ozlabs.ibm.com> <20160824201253.GS3296@wotan.suse.de> <20160825120633.057b2f6f@roar.ozlabs.ibm.com> <20160825060540.GX3296@wotan.suse.de> <20160825165121.45d26fb0@roar.ozlabs.ibm.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Aug 25, 2016 at 04:51:21PM +1000, Nicholas Piggin wrote:
> On Thu, 25 Aug 2016 08:05:40 +0200
> "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx> wrote:
> > > Oh, that makes more sense. The SECTION stuff and custom sections was
> > > confusing me. I would prefer just to drop all the LINUX_SECTION naming
> > > and make it match the functionality you're using. For example:
> > >
> > > +DEFINE_LINKTABLE(struct jump_entry, __jump_table);
> > > +
> > > /* mutex to protect coming/going of the the jump_label table */
> > > static DEFINE_MUTEX(jump_label_mutex);
> > >
> > > @@ -274,8 +277,6 @@ static void __jump_label_update(struct static_key *key,
> > >
> > > void __init jump_label_init(void)
> > > {
> > > - struct jump_entry *iter_start = __start___jump_table;
> > > - struct jump_entry *iter_stop = __stop___jump_table;
> > > struct static_key *key = NULL;
> > > struct jump_entry *iter;
> > >
> > > @@ -292,9 +293,10 @@ void __init jump_label_init(void)
> > > return;
> > >
> > > jump_label_lock();
> > > - jump_label_sort_entries(iter_start, iter_stop);
> > > + jump_label_sort_entries(LINUX_SECTION_START(__jump_table),
> > > + LINUX_SECTION_END(__jump_table));
> > >
> > > Now I think this is a fine abstraction to have.
> >
> > OK will keep this one.
> >
> > > I think it would look
> > > even cleaner if you had:
> > >
> > > LINKTABLE_START(__jump_table)
> > > LINKTABLE_END(__jump_table)
> > >
> > > Then do we need to even have the LINUX_SECTION middle man at all?
> >
> > Ah, thing is we use this for both linktables and section ranges.
> > Or do we want macros for both that do the same thing ?
>
> I think it would make the code using it more readable.
Alrighty... so:
LINKTABLE_START()
LINKTABLE_END()
SECTION_RANGE_START()
SECTION_RANGE_END()
And these macros do the exact same thing. Ie, nothing shared. Right?
Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]