All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: davidm@hpl.hp.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: return-type for search_extable()
Date: Tue, 28 Jan 2003 15:53:20 +1100	[thread overview]
Message-ID: <20030128055643.BCB282C236@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 24 Jan 2003 10:23:31 -0800." <15921.33955.645830.709868@napali.hpl.hp.com>

In message <15921.33955.645830.709868@napali.hpl.hp.com> you write:
> Hi Rusty,
> 
> Could you please change the return-type of search_extable() to
> something that allows a bit more flexibility?  The value returned by
> this function is "something that lets architecture-specific code
> recover from a memory-managment-fault".  This may or may not be the
> same as an exception_table_entry.  For example, on ia64, I want to
> return an already-relocated fixup-word.  Perhaps the cleanest way to
> fix this would be to have:
> 
> 	exception_fixup_t search_extable (...);
> 
> By default, you could then use
> 
> 	typedef struct exception_table_entry *exception_fixup_t;
> 
> and on ia64 I could use:
> 
> 	typedef long exception_fixup_t.

Sure.  Of course, you could just cast the return value to a long
inside ia64, but that's pretty unclear.

Hmm, I actually just tried to do this, and like all typedefs, it's
icky.  search_exception_table() belongs in kernel.h, not module.h
where it is now.  But that means kernel.h has to include asm/uaccess.h
to get exception_fixup_t.

Maybe the cleanest way really is to simply document that your
search_extable() returns the fixup word... 8(

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-01-28  5:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-06  2:27 Userspace Test Framework for module loader porting Rusty Russell
2003-01-06 19:38 ` David Mosberger
2003-01-06 22:41   ` Richard Henderson
2003-01-07  0:37     ` David Mosberger
2003-01-08 11:44       ` Rusty Russell
2003-01-11  1:47         ` David Mosberger
2003-01-13  0:27           ` Rusty Russell
2003-01-13 13:20             ` Maciej W. Rozycki
2003-01-14  0:01               ` Rusty Russell
2003-01-24 18:23                 ` return-type for search_extable() David Mosberger
2003-01-28  4:53                   ` Rusty Russell [this message]
2003-01-28  6:14                     ` David Mosberger
2003-01-08 11:21   ` Userspace Test Framework for module loader porting Rusty Russell

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=20030128055643.BCB282C236@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.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 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.