lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 8 Dec 2012 11:57:39 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	Michal Simek <monstr@...str.eu>, linux-arch@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	David Hinds <dahinds@...rs.sourceforge.net>
Subject: Re: Using IO functions across ARM, PPC and Microblaze architectures

On Fri, Dec 7, 2012 at 10:16 PM, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
>> Because I need to use IO functions which will behave
>> on arm as little endian and on powerpc as big endian
>> and on microblaze depends on endian setting.
>> I haven't found any IO function which I could use by 3 architectures
>> without using preprocessor macros or runtime detection
>
> Its a rather weird mix. We can do "always big" and "always little"
>
>> 1. Using helper function + preprocessor macros
>> (using static inline function also possible)
>
> Then someone comes along and sticks a daughterboard into the system with
> the same device the other way around and there are years
>
>> 2. Using function pointers
>
> Probably smarter. 8250.c works this way and it has to handle some
> extremely bizarre mappings.
>
>> b) Runtime initialization - here is the question if there is
>> any standard function which I could use.
>
> Set the pointers up and pass them as data with your platform device, that
> way the function definitions are buried in your platform code where they
> depend.

Or embed a struct io_ops * in struct device, to be set up by the bus driver?

Wasn't David Hinds working on something like this in the context of PCMCIA
a few decades ago?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ