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:	Mon, 13 Oct 2008 14:34:47 +0200
From:	Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To:	Anders Blomdell <anders.blomdell@...trol.lth.se>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Make ATNGW100 serial ports configurable

Anders Blomdell <anders.blomdell@...trol.lth.se> wrote:
> Haavard Skinnemoen wrote:
> > Well, you could do it like that, but you could also just add another
> > postcore_initcall. The only hook which is really needed is the "setup"
> > part, and only if you have additional serial ports.
> Does that mean that 'at32_add_device_usart(...);' is not needed?

It's needed, but you don't need a hook in the main board code to do it.
You can simply do

static int __init my_expansion_board_init(void)
{
	at32_add_device_usart(...);
	/* more stuff */
}
postcore_initcall(my_expansion_board_init);

> >> An even nicer way of handling it (provided that initialization does not need to
> >> take place during boot), might be to do EXPORT_SYMBOL() on
> >> at32_add_device_usart, at32_map_usart, etc and then write a loadable module that
> >> handles the initialization.
> > 
> > Hmm...why would that be nicer exactly?
> You could compile your board specific inits outside the kernel tree, making it
> much easier to follow kernel versions (not everyone gets their board specific
> code into the kernel tree :-).

Adding EXPORT_SYMBOLs purely for use by out-of-tree modules is
generally frowned upon. And patching in an additional file to the build
is just about the easiest thing you can do.

> > What _I_ think would be a nicer way to do it is to implement support
> > for flattened device trees and get rid of the board code entirely. Or
> > almost entirely; it depends on how complete we can make the device tree.
> I don't understand the above paragraph, could you please elaborate?

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/powerpc/booting-without-of.txt;h=de4063cb4fdc0ad6abea29d766cae78616837311;hb=HEAD

Haavard
--
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