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:	Tue, 28 Apr 2015 18:22:35 +0900
From:	Yoshinori Sato <ysato@...rs.sourceforge.jp>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH v9 06/17] h8300: CPU depend helpers

At Mon, 27 Apr 2015 10:54:24 +0200,
Arnd Bergmann wrote:
> 
> On Monday 27 April 2015 14:35:13 Yoshinori Sato wrote:
> > +static struct platform_device sci0_device = {
> > +	.name		= "sh-sci",
> > +	.id		= 0,
> > +	.resource	= sci0_resources,
> > +	.num_resources	= ARRAY_SIZE(sci0_resources),
> > +	.dev		= {
> > +		.platform_data	= &sci0_platform_data,
> > +	},
> > +};
> > +
> > +static struct platform_device sci1_device = {
> > +	.name		= "sh-sci",
> > +	.id		= 1,
> > +	.resource	= sci1_resources,
> > +	.num_resources	= ARRAY_SIZE(sci1_resources),
> > +	.dev		= {
> > +		.platform_data	= &sci1_platform_data,
> > +	},
> > +};
> 
> You should generally not define 'platform_device' structure statically.
> Generally, all new architectures should pass a dtb blob from the
> boot loader that contains the device definitions outside of the
> kernel binary.
> 
> If you don't expect to use h8300 with a lot of external peripherals,
> you can also use platform_device_register_simple() and related functions
> to register the platform device here, which lets you remove the
> static definition.

OK.

> > +void __init early_device_init(void)
> > +{
> > +	early_platform_add_devices(early_devices,
> > +				   ARRAY_SIZE(early_devices));
> > +}
> 
> I would like to eventually remove the early_platform_add_devices()
> interface, and use some other mechanism here. Can you try either using
> devicetree to probe those devices like ARM does, or just calling into
> the drivers manually?

I think it's better to do after a while to DT, so it's considered.

> In case of the sci, using the new 'earlycon' framework is probably the
> best idea, and for the timer, just call the probe() function directly
> instead of going through the whole early_platform_add_devices
> and early_platform_driver_probe() dance.
> 
> 	Arnd
> 

OK.
Thanks.

-- 
Yoshinori Sato
<ysato@...rs.sourceforge.jp>
--
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