LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH/RFC] Hookable IO operations
Date: Sat, 04 Nov 2006 09:56:29 +1100	[thread overview]
Message-ID: <1162594589.10630.135.camel@localhost.localdomain> (raw)
In-Reply-To: <200611032348.38402.arnd@arndb.de>

]
> Actually I meant all of the I/O pointers, not just these three. When
> you were describing your idea to me, I was thinking of something like
> 
> struct ppc_io {
> 	void (*writeb)(u8 val);
> 	void (*writew)(u16 val);
> 	void (*writel)(u32 val);
> 	void (*writeq)(u64 val);
> 	...
> 	void (*memset_io)(volatile void __iomem *addr, int c,
> 				 unsigned long n);
> 	void (*__memcpy_fromio)(void *dest,
> 			const volatile void __iomem *src, unsigned long n);
> 	void (*__memcpy_toio)(volatile void __iomem *dest,
> 			const void *src, unsigned long n);
> } *ppc_io;
> 
> Did you never consider this, or did you make your mind up in the
> process?

I considered this and decided against it while doing the macro since I
could get the hooks auto-generated easier as globals, but I can still
change it, it's not that much bloat and might indeed look nicer.

> Is your current code more efficient?

I don't think there is a difference is ppc_io is a global struct rather
than a pointer, like ppc_md.

Ben.

  reply	other threads:[~2006-11-03 22:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03 21:12 [PATCH/RFC] Hookable IO operations Benjamin Herrenschmidt
2006-11-03 22:20 ` Arnd Bergmann
2006-11-03 22:32   ` Benjamin Herrenschmidt
2006-11-03 22:48     ` Arnd Bergmann
2006-11-03 22:56       ` Benjamin Herrenschmidt [this message]
2006-11-04  0:15         ` Arnd Bergmann
2006-11-04  1:06           ` Benjamin Herrenschmidt
2006-11-04 16:28 ` Segher Boessenkool
2006-11-04 22:05   ` Benjamin Herrenschmidt
2006-11-04 22:33     ` Segher Boessenkool

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=1162594589.10630.135.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=linuxppc-dev@ozlabs.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