<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/of/base.c, branch v3.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-03-23T20:55:55Z</updated>
<entry>
<title>dt: protect against NULL matches passed to of_match_node()</title>
<updated>2011-03-23T20:55:55Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-03-18T16:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a52f07ecd143baee51623b063be5007585748a4f'/>
<id>urn:sha1:a52f07ecd143baee51623b063be5007585748a4f</id>
<content type='text'>
There are a few use cases where it is convenient to pass NULL to
of_match_node() and have it fail gracefully.  The patch adds a null
check to the beginning so taht it does so.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: use __be32 types for big-endian device tree data</title>
<updated>2010-10-13T03:58:42Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jeremy.kerr@canonical.com</email>
</author>
<published>2010-10-11T03:24:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9fadeefdc869ff792591f57a9e33d8790d63292'/>
<id>urn:sha1:a9fadeefdc869ff792591f57a9e33d8790d63292</id>
<content type='text'>
Use the sparse annotations so we can keep track of endianness.

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: Fix phandle endian issues</title>
<updated>2010-07-24T22:51:52Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-07-23T07:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a6b2e588c7809e86161236da3d29581bf5f8402'/>
<id>urn:sha1:9a6b2e588c7809e86161236da3d29581bf5f8402</id>
<content type='text'>
The flat tree code wasn't fixing the endianness on phandle values when
unflattening the tree, and the code in drivers/of wasn't always doing a
be32_to_cpu before trying to dereference the phandle values.  This patch
fixes them.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: refactor of_modalias_node() and remove explicit match table.</title>
<updated>2010-07-05T22:14:52Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15'/>
<id>urn:sha1:2ffe8c5f323c3b9749bf7bc2375d909d20bdbb15</id>
<content type='text'>
This patch tightens up the behaviour of of_modalias_node() to be more
predicatable and to eliminate the explicit of_modalias_tablep[] that
is currently used to override the first entry in the compatible list
of a device.  The override table was needed originally because spi
and i2c drivers had no way to do of-style matching.  Now that all
devices can have an of_node pointer, and all drivers can have an
of_match_table, the explicit override table is no longer needed
because each driver can specify its own OF-style match data.

The mpc8349emitx-mcu driver is modified to explicitly specify the
correct device to bind against.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>of: move definition of of_chosen into common code.</title>
<updated>2010-02-14T14:13:55Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-02-14T14:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc0bdae49d810e4cb32d7b547bc6d4dfb08f9e2e'/>
<id>urn:sha1:fc0bdae49d810e4cb32d7b547bc6d4dfb08f9e2e</id>
<content type='text'>
Rather than defining of_chosen in each arch, it can be defined for all
in driver/of/base.c

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
</entry>
<entry>
<title>of: assume big-endian properties, adding conversions where necessary</title>
<updated>2010-02-09T15:34:10Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jeremy.kerr@canonical.com</email>
</author>
<published>2010-01-30T08:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=337148812f97368a8ec4a69f1691e4c5ce3af494'/>
<id>urn:sha1:337148812f97368a8ec4a69f1691e4c5ce3af494</id>
<content type='text'>
Properties in the device tree are specified as big-endian. At present,
the only platforms to support device trees are also big-endian, so we've
been acessing the properties as raw values.

We'd like to add device tree support to little-endian platforms too, so
add endian conversion to the sites where we access property values in
the common of code.

Compiled on powerpc (ppc44x_defconfig &amp; ppc64_defconfig) and arm (fdt
support only for now).

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: include linux/proc_fs.h</title>
<updated>2010-02-09T15:34:09Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jeremy.kerr@canonical.com</email>
</author>
<published>2010-02-02T04:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9f2f63a671d5e91ed89ade408d87f1692a373de'/>
<id>urn:sha1:a9f2f63a671d5e91ed89ade408d87f1692a373de</id>
<content type='text'>
We use a few procfs-specific functions (eg, proc_device_tree_*) which
aren't covered by the current includes. This causes the following build
error on arm:

drivers/of/base.c: In function 'prom_add_property':
drivers/of/base.c:861: error: implicit declaration of function 'proc_device_tree_add_prop'
drivers/of/base.c: In function 'prom_remove_property':
drivers/of/base.c:902: error: implicit declaration of function 'proc_device_tree_remove_prop'
drivers/of/base.c: In function 'prom_update_property':
drivers/of/base.c:946: error: implicit declaration of function 'proc_device_tree_update_prop'

Add proc_fs.h for these prototypes.

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of: add 'of_' prefix to machine_is_compatible()</title>
<updated>2010-02-09T15:33:00Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-02-02T04:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71a157e8edca55198e808f8561dd49017a54ee34'/>
<id>urn:sha1:71a157e8edca55198e808f8561dd49017a54ee34</id>
<content type='text'>
machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
</entry>
<entry>
<title>of: merge of_find_node_by_phandle</title>
<updated>2010-02-09T15:32:48Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jeremy.kerr@canonical.com</email>
</author>
<published>2010-02-02T04:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89751a7cb70a20f0d604dd7c4be29dd7b0011718'/>
<id>urn:sha1:89751a7cb70a20f0d604dd7c4be29dd7b0011718</id>
<content type='text'>
Merge common function between powerpc, sparc and microblaze. Code is
identical for powerpc and microblaze, but adds a lock (and release) of
the devtree_lock on sparc.

Signed-off-by: Jeremy Kerr &lt;jeremy.kerr@canonical.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
</feed>
