<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/of/selftest.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2014-11-04T16:43:07Z</updated>
<entry>
<title>of/unittest: Rename selftest.c to unittest.c</title>
<updated>2014-11-04T16:43:07Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-11-04T13:24:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=19fd74879a32fb10357e0cda9c8050f01bb3eeb8'/>
<id>urn:sha1:19fd74879a32fb10357e0cda9c8050f01bb3eeb8</id>
<content type='text'>
This is unit testing code. It should use that name because it makes more
sense than 'selftest'. Rename the files to match and rename the config
variable.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of/unittest: Remove test devices after adding them</title>
<updated>2014-11-04T16:43:04Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-11-04T13:14:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=851da976dc1d72becc03e144b38c4efab9e7b361'/>
<id>urn:sha1:851da976dc1d72becc03e144b38c4efab9e7b361</id>
<content type='text'>
The of_platform_populate() test cases don't remove the test devices
after they are added. Fix this by adding tests for
of_platform_depopulate().

At the same time rework the selftest() macro to return the test result
value. This makes it easy to use the macro inside an if() condition.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of: Eliminate of_allnodes list</title>
<updated>2014-11-04T13:29:38Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-03T15:28:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5063e25a302e6a83f6590d9a06bd5f6400b17430'/>
<id>urn:sha1:5063e25a302e6a83f6590d9a06bd5f6400b17430</id>
<content type='text'>
The device tree structure is composed of two lists; the 'allnodes' list
which is a singly linked list containing every node in the tree, and the
child-&gt;parent structure where each parent node has a singly linked list
of children. All of the data in the allnodes list can be easily
reproduced with the parent-child lists, so of_allnodes is actually
unnecessary. Remove it entirely which saves a bit of memory and
simplifies the data structure quite a lot.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Gaurav Minocha &lt;gaurav.minocha.os@gmail.com&gt;
Cc: Pantelis Antoniou &lt;pantelis@pantelis.antoniou@konsulko.com&gt;
</content>
</entry>
<entry>
<title>of: Fix overflow bug in string property parsing functions</title>
<updated>2014-11-04T10:19:48Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-11-03T15:15:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a87fa1d81a9fb5e9adca9820e16008c40ad09f33'/>
<id>urn:sha1:a87fa1d81a9fb5e9adca9820e16008c40ad09f33</id>
<content type='text'>
The string property read helpers will run off the end of the buffer if
it is handed a malformed string property. Rework the parsers to make
sure that doesn't happen. At the same time add new test cases to make
sure the functions behave themselves.

The original implementations of of_property_read_string_index() and
of_property_count_strings() both open-coded the same block of parsing
code, each with it's own subtly different bugs. The fix here merges
functions into a single helper and makes the original functions static
inline wrappers around the helper.

One non-bugfix aspect of this patch is the addition of a new wrapper,
of_property_read_string_array(). The new wrapper is needed by the
device_properties feature that Rafael is working on and planning to
merge for v3.19. The implementation is identical both with and without
the new static inline wrapper, so it just got left in to reduce the
churn on the header file.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Darren Hart &lt;darren.hart@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;  # v3.3+: Drop selftest hunks that don't apply
</content>
</entry>
<entry>
<title>of/selftest: Move hash table off stack to fix large frame size</title>
<updated>2014-10-07T10:30:31Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-07T10:30:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2118f4b8dfc666c3e4a9e262beca79636a0852fe'/>
<id>urn:sha1:2118f4b8dfc666c3e4a9e262beca79636a0852fe</id>
<content type='text'>
The new testcase that checks phandle consistency was using a hash table
on the stack which made the frame size much large than it should be. Fix
the problem by moving the hash table into the file scope.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>of/selftest: Use the resolver to fixup phandles</title>
<updated>2014-10-04T20:24:35Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-02T13:36:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2eb46da2a760e5764c48b752a5ef320e02b96b21'/>
<id>urn:sha1:2eb46da2a760e5764c48b752a5ef320e02b96b21</id>
<content type='text'>
The selftest data ends up causing duplicate phandles in the live tree
for the time that the testcase data is inserted into the live tree. This
is obviously a bad situation because anything attempting to read the
tree while the selftests are running make resolve phandles to one of the
testcase data nodes. Fix the problem by using the of_resolve_phandles()
function to eliminate duplicates.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
Cc: Gaurav Minocha &lt;gaurav.minocha.os@gmail.com&gt;
</content>
</entry>
<entry>
<title>of/selftest: Add a test for duplicate phandles</title>
<updated>2014-10-04T20:20:19Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-02T12:09:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=841ec21357eee222416e3b7f1b6ef23cfc6ee43f'/>
<id>urn:sha1:841ec21357eee222416e3b7f1b6ef23cfc6ee43f</id>
<content type='text'>
All phandles in the tree should be unique. Add a testcase to make sure
that this is so.

Note: this testcase fails on the current kernel because the selftest
code itself ends up adding duplicate phandles. Before this testcase is
merged the selftest code needs to be modified to resolve phandles before
adding them.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Pantelis Antoniou &lt;pantelis.antoniou@konsulko.com&gt;
</content>
</entry>
<entry>
<title>of/selftest: Test structure of device tree</title>
<updated>2014-10-04T20:20:13Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-01T16:40:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f2051d6a88cd03f74221da887f56d778a1b2f1f1'/>
<id>urn:sha1:f2051d6a88cd03f74221da887f56d778a1b2f1f1</id>
<content type='text'>
Add a testcase to verify that the device tree is properly constructed
and the lists are in a correct order. The new testcase gets run twice;
once after adding the testcase data, and once after removing it again.
It is run twice to make sure adding and removing the testcase data
doesn't corrupt the data structure.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Gaurav Minocha &lt;gaurav.minocha.os@gmail.com&gt;
</content>
</entry>
<entry>
<title>of: Fix NULL dereference in selftest removal code</title>
<updated>2014-10-01T16:01:43Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2014-10-01T15:57:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e66c98c7a0eacc33a9369a3ec086740044eb986c'/>
<id>urn:sha1:e66c98c7a0eacc33a9369a3ec086740044eb986c</id>
<content type='text'>
The selftest code removes its testcase data from the live tree when
exiting, but if the testcases data tree contains an empty child of the
root, then it causes an oops due to a NULL dereference. The reason is
that the code tries to directly dereference the child pointer without
checking first if a child is actually there.

The solution is to pass the parent node into detach_node_and_children()
instead of trying to pass the child. This required removing the code
that attempts to remove all of the sibling nodes in
detach_node_and_children(), which was never sensible in the first place.

At the same time add a check to make sure the bounds of the nodes list
are not exceeded by the testdata tree. If they are then abort.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Gaurav Minocha &lt;gaurav.minocha.os@gmail.com&gt;
</content>
</entry>
<entry>
<title>Enabling OF selftest to run without machine's devicetree</title>
<updated>2014-08-16T08:03:56Z</updated>
<author>
<name>Gaurav Minocha</name>
<email>gaurav.minocha.os@gmail.com</email>
</author>
<published>2014-07-26T19:48:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b951f9dc7f25fc1e39aafda5edb4b47b38285d9f'/>
<id>urn:sha1:b951f9dc7f25fc1e39aafda5edb4b47b38285d9f</id>
<content type='text'>
If there is no devicetree present, this patch adds the selftest
data as a live devicetree. It also removes the same after the
testcase execution is complete.

Tested with and without machine's devicetree.

Signed-off-by: Gaurav Minocha &lt;gaurav.minocha.os@gmail.com&gt;
Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
</feed>
