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:	Wed, 14 May 2014 10:20:43 +0200
From:	Alexander Holler <holler@...oftware.de>
To:	linux-kernel@...r.kernel.org
CC:	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Russell King <linux@....linux.org.uk>,
	Jon Loeliger <jdl@....com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>
Subject: dt: deps: some tips about how to debug/evaluate this feature

Hello,

to make it a bit more easier to evaluate or debug this new feature, here 
are some tips:

- To see the initialization order you can use dtc:

	CROSS_COMPILE=arm-linux-gnu- ARCH=arm make foo.dtb
	scripts/dtc/dtc -I dtb -t arch/arm/boot/dts/foo.dtb

- To see that order in dmesg, I've left a commented function
   in patch 2/9. Just enable of_init_print_order() in
   drivers/of/of_dependencies.c

- To see which drivers do call of_platform_populate() theirself
   (which is not necessary when using this new feature) uncomment the
   WARN_ON(np->dev_created); in drivers/of/platform.c (patch 2/9).

- To see which drivers are already "well done" or not, add a small
   debug line to of_init_register_platform_driver() in
   drivers/of/of_dependencies.c:

@@ -416,39 +416,41 @@ int of_init_register_platform_driver(struct 
platform_driver *drv)
  {
         BUG_ON(!is_recording);
         order.platform_drivers[order.count_drivers++] = drv;
+       pr_info("DEPS: recording of drv %s\n", drv->driver.name);
         return 0;
  }

   Now "well done" drivers linked to the kernel will be seen in dmesg as
   beeing recorded. This also shows most drivers which are not "well
   done", they will be started before the recording of drivers (except
   late ones).

- To see when "well done" drivers will be registered (in order) add
   something like that to drivers/of/of_dependencies.c:
@@ -445,8 +445,10 @@ void __init of_init_register_drivers(void)
                         if (of_driver_match_device(dev, &drv->driver)) {
                                 if (!driver_find(drv->driver.name,
-                                   drv->driver.bus))
+                                   drv->driver.bus)) {
                                         platform_driver_register(drv);
+                                       pr_info("DEPS: driver %s 
registered\n", drv->name);
+                               }
                                 if (dev->parent)
                                         device_lock(dev->parent);
                                 rc = device_attach(dev);


Regards,

Alexander Holler
--
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