public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: David Howells <dhowells@redhat.com>,
	torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org,
	uclinux-dev@uclinux.org
Subject: Re: [PATCH 2/3] FRV: Permit __do_IRQ() to be dispensed with
Date: Sat, 09 Sep 2006 17:26:41 +1000	[thread overview]
Message-ID: <1157786802.31071.171.camel@localhost.localdomain> (raw)
In-Reply-To: <20060909051211.GA6922@elte.hu>

On Sat, 2006-09-09 at 07:12 +0200, Ingo Molnar wrote:
> * David Howells <dhowells@redhat.com> wrote:
> 
> > +#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> 
> > +#ifdef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> 
> > +#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
> 
> I think the myriad of arch switches and the resulting #ifdef noise, just 
> to get rid of a _single_ unused global function, is pretty lame. (and 
> that's of course not your fault)
> 
> The real solution would be to use gcc -ffunction-sections plus ld 
> --gc-sections to automatically get rid of unused global functions, at 
> link time. I'm wondering how hard it would be to enhance kbuild to do 
> that - x86_64 already uses -ffunction-sections (if CONFIG_REORDER), so 
> the big question is how usable is ld --gc-sections. Such a feature would 
> be quite important for embedded systems (and for RAM footprint in 
> general) as it would save a significant amount of .text and .data.

It can't optimize __do_IRQ() out in any case if one uses
generic_handle_irq() because of the test in there which can't be
predicted at compile time. My fault ... Maybe we should go back to
having generic_handle_irq() not do the NULL test and not call __do_IRQ()
and have another generic_handle_irq_compat() or some stupid name like
that do what the current generic_handle_irq() does. I added that to
handle the case of partial conversion (which we still have to deal with
on powerpc as arch/ppc hasn't been converted).

Ben.



  reply	other threads:[~2006-09-09  7:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-08 15:32 [PATCH 1/3] FRV: Improve FRV's use of generic IRQ handling David Howells
2006-09-08 15:32 ` [PATCH 2/3] FRV: Permit __do_IRQ() to be dispensed with David Howells
2006-09-09  5:12   ` Ingo Molnar
2006-09-09  7:26     ` Benjamin Herrenschmidt [this message]
2006-09-21 13:12       ` David Howells
2006-09-21 21:59         ` Benjamin Herrenschmidt
2006-09-10 14:34     ` Daniel Walker
2006-09-11  5:33       ` Ingo Molnar
2006-09-11  9:47     ` David Howells
2006-09-11 15:33       ` Daniel Walker
2006-09-08 15:32 ` [PATCH 3/3] FRV: Mark __do_IRQ() deprecated David Howells

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=1157786802.31071.171.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    --cc=uclinux-dev@uclinux.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