linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: dhowells@redhat.com, Rusty Russell <rusty@rustcorp.com.au>,
	linux-arch@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH] Make most arch asm/module.h files use asm-generic/module.h
Date: Wed, 18 Jul 2012 14:33:12 +0100	[thread overview]
Message-ID: <2722.1342618392@warthog.procyon.org.uk> (raw)
In-Reply-To: <201207181320.35807.arnd@arndb.de>

Arnd Bergmann <arnd@arndb.de> wrote:

> The method I try to use for architectures overriding asm-generic definitions
> is to make the architecture define the same symbol, like
> 
> #ifdef CONFIG_ARM_UNWIND
> struct mod_arch_specific {
> 	struct unwind_table *unwind[ARM_SEC_MAX];
> };
> #define mod_arch_specific mod_arch_specific
> #endif
> 
> and then let the asm-generic version test that using
> 
> #ifndef mod_arch_specific
> struct mod_arch_specific {};
> #endif

Ewww.  That's even ickier.

> I believe all architectures have either one or the other, but never both or
> neither of the two, right? If so, we only need one symbol here.

That's probably the case, but I don't know which it is for which arch, or
whether it has changed during the lifetime of an arch, requiring both to be
supported for that arch.

> some time back to provide a default so architectures no longer need
> to provide the apply_relocate function for both cases. If we have the
> Kconfig symbol you introduce, we can turn this into an nice inline
> function and do
> 
> #ifdef CONFIG_MODULES_USE_RELA_ONLY
> static inline int __weak apply_relocate(Elf_Shdr *sechdrs,

You don't then need the __weak attributes.

> and consequently kill off the remaining empty functions.

:-)

David

  parent reply	other threads:[~2012-07-18 13:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 12:46 [PATCH] Make most arch asm/module.h files use asm-generic/module.h David Howells
2012-07-18 13:20 ` Arnd Bergmann
2012-07-18 14:21   ` Ralf Baechle
2012-07-18 13:24 ` David Howells
2012-07-18 13:41   ` Sam Ravnborg
2012-07-19  1:45   ` Rusty Russell
2012-07-19  1:45     ` Rusty Russell
2012-07-19  6:23     ` Paul Mundt
2012-07-19 11:53     ` David Howells
2012-07-18 13:33 ` David Howells [this message]
2012-07-18 13:56 ` Mike Frysinger

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=2722.1342618392@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=rusty@rustcorp.com.au \
    /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).