mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: Jack Steiner <steiner@sgi.com>
Cc: davidm@hpl.hp.com, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] - Eliminate machvec calls to null functions
Date: Thu, 8 Jul 2004 16:07:36 -0700	[thread overview]
Message-ID: <16621.54200.67552.21524@napali.hpl.hp.com> (raw)
In-Reply-To: <20040707201716.GA14015@sgi.com>

>>>>> On Wed, 7 Jul 2004 15:17:16 -0500, Jack Steiner <steiner@sgi.com> said:

  Jack> Here is a patch to eliminate calls to null platform vectors for
  Jack> non-GENERIC kernels.

  Jack> If this looks ok, then I'll update the tlb_migrate patch & resubmit
  Jack> it. (Apply this machvec patch first...)

I was about to check this in when it occurred to me that it should be
possible to simply define the no-ops as "static inline".  If you take
the address of these functions, the compiler will instantiate the
function automatically, so this ought to work both for GENERIC and
non-GENERIC kernels.  The only downside is that for GENERIC, each
machvec definition will get its own definition of the
no-op-function(s), but that seems like an acceptable cost to me.

I tried the patch below both for zx1 and GENERIC and it does seem to
work as expected.  If nobody has a problem with the patch, I'll go
ahead and check it in.

	--david

===== arch/ia64/kernel/machvec.c 1.8 vs edited =====
--- 1.8/arch/ia64/kernel/machvec.c	Fri May 21 14:01:23 2004
+++ edited/arch/ia64/kernel/machvec.c	Thu Jul  8 15:34:20 2004
@@ -44,12 +44,6 @@
 #endif /* CONFIG_IA64_GENERIC */
 
 void
-machvec_noop (void)
-{
-}
-EXPORT_SYMBOL(machvec_noop);
-
-void
 machvec_setup (char **arg)
 {
 }
===== include/asm-ia64/machvec.h 1.23 vs edited =====
--- 1.23/include/asm-ia64/machvec.h	Thu Mar 25 11:54:44 2004
+++ edited/include/asm-ia64/machvec.h	Thu Jul  8 15:34:06 2004
@@ -69,7 +69,11 @@
 typedef unsigned int ia64_mv_readl_relaxed_t (void *);
 typedef unsigned long ia64_mv_readq_relaxed_t (void *);
 
-extern void machvec_noop (void);
+static inline void
+machvec_noop (void)
+{
+}
+
 extern void machvec_setup (char **);
 extern void machvec_timer_interrupt (int, void *, struct pt_regs *);
 extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);

      reply	other threads:[~2004-07-08 23:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07 20:17 Jack Steiner
2004-07-08 23:07 ` David Mosberger [this message]

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=16621.54200.67552.21524@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=akpm@osdl.org \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steiner@sgi.com \
    /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

all inboxes | Powered by JetHome®