[PATCH v4 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

2021-04-08 Thread frowand . list
From: Frank Rowand The Devicetree standard specifies an 8 byte alignment of the FDT. Code in libfdt expects this alignment for an FDT image in memory. kmemdup() returns 4 byte alignment on openrisc. Replace kmemdup() with kmalloc(), align pointer, memcpy() to get proper alignment. The 4 byte

[PATCH v3 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

2021-04-08 Thread frowand . list
From: Frank Rowand The Devicetree standard specifies an 8 byte alignment of the FDT. Code in libfdt expects this alignment for an FDT image in memory. kmemdup() returns 4 byte alignment on openrisc. Replace kmemdup() with kmalloc(), align pointer, memcpy() to get proper alignment. The 4 byte

[PATCH v2 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

2021-04-08 Thread frowand . list
From: Frank Rowand The Devicetree standard specifies an 8 byte alignment of the FDT. Code in libfdt expects this alignment for an FDT image in memory. kmemdup() returns 4 byte alignment on openrisc. Replace kmemdup() with kmalloc(), align pointer, memcpy() to get proper alignment. The 4 byte

[PATCH 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

2021-04-07 Thread frowand . list
From: Frank Rowand The Devicetree standard specifies an 8 byte alignment of the FDT. Code in libfdt expects this alignment for an FDT image in memory. kmemdup() returns 4 byte alignment on openrisc. Replace kmemdup() with kmalloc(), align pointer, memcpy() to get proper alignment. The 4 byte

[PATCH 1/1] of: properly check for error returned by fdt_get_name()

2021-04-04 Thread frowand . list
From: Frank Rowand fdt_get_name() returns error values via a parameter pointer instead of in function return. Fix check for this error value in populate_node() and callers of populate_node(). Chasing up the caller tree showed callers of various functions failing to initialize the value of

[PATCH 1/1] of: unittest: rename overlay source files from .dts to .dtso

2021-03-24 Thread frowand . list
From: Frank Rowand Add Makefile rule to build .dtbo.o assembly file from overlay .dtso source file. Rename unittest .dts overlay source files to use .dtso suffix. Update Makefile to build .dtbo.o objects instead of .dtb.o from unittest overlay source files. Modify unitest.c to use .dtbo.o

re: [PATCH] of: unittest: Statically apply overlays using fdtoverlay

2021-01-18 Thread frowand . list
From: Frank Rowand These changes apply on top of the patches in: [PATCH] of: unittest: Statically apply overlays using fdtoverlay Message-Id: <1e42183ccafa1afba33b3e79a4e3efd3329fd133.1610095159.git.viresh.ku...@linaro.org> There are still some issues to be cleaned up, so not ready for

[PATCH v2] tracing: initialize variable in create_dyn_event()

2019-03-22 Thread frowand . list
From: Frank Rowand Fix compile warning in create_dyn_event(): 'ret' may be used uninitialized in this function [-Wuninitialized]. Fixes: 5448d44c3855 ("tracing: Add unified dynamic event framework") Signed-off-by: Frank Rowand --- changes since v1: - initialize to -ENODEV instead of 0, as

[PATCH] docs: kernel-doc: typo "if ... if" -> "if ... is"

2019-02-11 Thread frowand . list
From: Frank Rowand "If no *function* if specified" should instead be "If no *function* is specified". Reported-by: Matthew Wilcox Signed-off-by: Frank Rowand --- Documentation/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] docs: kernel-doc: typo "documentaion"

2019-02-01 Thread frowand . list
From: Frank Rowand Fix a typo in kernel-doc.rst Signed-off-by: Frank Rowand --- Documentation/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst index

[PATCH] docs: kernel-doc: update commands to generate man page

2019-02-01 Thread frowand . list
From: Frank Rowand (1) The command to generate man pages is truncated in the pdf version of the document. Reformat the command into multiple lines to prevent the truncation. (2) Older versions of git do not support all variants of pathspec syntax. Provide commands to generate man pages for

[PATCH] tracing: initialize variable in create_dyn_event()

2019-01-24 Thread frowand . list
From: Frank Rowand Fix compile warning in create_dyn_event(): 'ret' may be used uninitialized in this function [-Wuninitialized]. Fixes: 5448d44c3855 ("tracing: Add unified dynamic event framework") Signed-off-by: Frank Rowand --- Compile and boot tested only. Please verify the

[PATCH 1/2] of: unittest: remove report of expected error

2019-01-24 Thread frowand . list
From: Frank Rowand update_node_properties() reports an error when the test data contains a node (such as "/aliases") that already exists in the base devicetree. The error is caused by of_fdt_unflatten_tree() autogenerating the "name" property, thus both the existing node and the new node will

[PATCH 2/2] of: unittest: add caution to function header comment

2019-01-24 Thread frowand . list
From: Frank Rowand Name of function attach_node_and_children() is misleading because if the node already exists in the livetree then only the node's properties are attached. This works for the existing test data, but add comment warning of this misleading name. Signed-off-by: Frank Rowand ---

[PATCH 0/2] of: unittest: minor cleanups

2019-01-24 Thread frowand . list
From: Frank Rowand 1) Suppress expected error message when adding unittest data to livetree. 2) While writing patch 1, noted a misleading function name. Add comment to the function header warning about possible unexpected results. Frank Rowand (2): of: unittest: remove report of

[PATCH RESEND] of: add dtc annotations functionality to dtx_diff

2019-01-17 Thread frowand . list
From: Frank Rowand Add -T and --annotations command line arguments to dtx_diff. These arguments will be passed through to dtc. dtc will then add source location annotations to its output. Signed-off-by: Frank Rowand --- If dtx_diff is provided with a single devicetree source file then that

[PATCH v3 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-18 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of

[PATCH v3 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-18 Thread frowand . list
From: Frank Rowand The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e90fc ("of: cache

[PATCH v3 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-18 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. This bug exposed the foloowing phandle cache refcount bug. The refcount of phandle_cache entries is not

[PATCH v2 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-16 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of

[PATCH v2 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-16 Thread frowand . list
From: Frank Rowand The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e90fc ("of: cache

[PATCH v2 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-16 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. This bug exposed the foloowing phandle cache refcount bug. The refcount of phandle_cache entries is not

[PATCH 2/2] of: __of_detach_node() - remove node from phandle cache

2018-12-13 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. Remove the node from the cache. Add paranoia checks in of_find_node_by_phandle() as a second level of

[PATCH 0/2] of: phandle_cache, fix refcounts, remove stale entry

2018-12-13 Thread frowand . list
From: Frank Rowand Non-overlay dynamic devicetree node removal may leave the node in the phandle cache. Subsequent calls to of_find_node_by_phandle() will incorrectly find the stale entry. This bug exposed the foloowing phandle cache refcount bug. The refcount of phandle_cache entries is not

[PATCH 1/2] of: of_node_get()/of_node_put() nodes held in phandle cache

2018-12-13 Thread frowand . list
From: Frank Rowand The phandle cache contains struct device_node pointers. The refcount of the pointers was not incremented while in the cache, allowing use after free error after kfree() of the node. Add the proper increment and decrement of the use count. Fixes: 0b3ce78e90fc ("of: cache

[PATCH] of: add dtc annotations functionality to dtx_diff

2018-11-26 Thread frowand . list
From: Frank Rowand Add -T and --annotations command line arguments to dtx_diff. These arguments will be passed through to dtc. dtc will then add source location annotations to its output. Signed-off-by: Frank Rowand --- This feature depends upon commit 5667e7ef9a9a ("annotations: add the

[PATCH] of: add dtc annotations functionality to dtx_diff

2018-11-26 Thread frowand . list
From: Frank Rowand Add -T and --annotations command line arguments to dtx_diff. These arguments will be passed through to dtc. dtc will then add source location annotations to its output. Signed-off-by: Frank Rowand --- This feature depends upon commit 5667e7ef9a9a ("annotations: add the

[PATCH v4] of: overlay: user space synchronization

2018-11-02 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH v4] of: overlay: user space synchronization

2018-11-02 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH v3] of: overlay: user space synchronization

2018-10-16 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH v3] of: overlay: user space synchronization

2018-10-16 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH v4 15/18] of: overlay: set node fields from properties when add new overlay node

2018-10-15 Thread frowand . list
From: Frank Rowand Overlay nodes added by add_changeset_node() do not have the node fields name, phandle, and type set. The node passed to __of_attach_node() when the add node changeset entry is processed does not contain any properties. The node's properties are located in add property

[PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-15 Thread frowand . list
From: Frank Rowand If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry

[PATCH v4 15/18] of: overlay: set node fields from properties when add new overlay node

2018-10-15 Thread frowand . list
From: Frank Rowand Overlay nodes added by add_changeset_node() do not have the node fields name, phandle, and type set. The node passed to __of_attach_node() when the add node changeset entry is processed does not contain any properties. The node's properties are located in add property

[PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-15 Thread frowand . list
From: Frank Rowand If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry

[PATCH v2] of: overlay: user space synchronization

2018-10-15 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH v2] of: overlay: user space synchronization

2018-10-15 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH] of: Documentation: remove unmaintained todo file

2018-10-14 Thread frowand . list
From: Frank Rowand The todo.txt file was created by a previous maintainer and has never been updated by the current OPEN FIRMWARE AND FLATTENED DEVICE TREE maintainers. Remove the out of date file. Signed-off-by: Frank Rowand --- Documentation/devicetree/todo.txt | 10 -- 1 file

[PATCH] of: Documentation: remove unmaintained todo file

2018-10-14 Thread frowand . list
From: Frank Rowand The todo.txt file was created by a previous maintainer and has never been updated by the current OPEN FIRMWARE AND FLATTENED DEVICE TREE maintainers. Remove the out of date file. Signed-off-by: Frank Rowand --- Documentation/devicetree/todo.txt | 10 -- 1 file

[PATCH] of: overlay: update documentation to match current implementation

2018-10-14 Thread frowand . list
From: Frank Rowand The overlay information in Documentation/devicetree/ is out of date. Signed-off-by: Frank Rowand --- .../devicetree/dynamic-resolution-notes.txt| 24 -- Documentation/devicetree/overlay-notes.txt | 93 ++ 2 files changed, 42

[PATCH] of: overlay: update documentation to match current implementation

2018-10-14 Thread frowand . list
From: Frank Rowand The overlay information in Documentation/devicetree/ is out of date. Signed-off-by: Frank Rowand --- .../devicetree/dynamic-resolution-notes.txt| 24 -- Documentation/devicetree/overlay-notes.txt | 93 ++ 2 files changed, 42

[PATCH] of: overlay: user space synchronization

2018-10-14 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH] of: overlay: user space synchronization

2018-10-14 Thread frowand . list
From: Frank Rowand When an overlay is applied or removed, the live devicetree visible in /proc/device-tree/, aka /sys/firmware/devicetree/base/, reflects the changes. There is no method for user space to determine whether the live devicetree was modified by overlay actions. Provide a sysfs

[PATCH 6/6] ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value

2018-09-06 Thread frowand . list
From: Frank Rowand Change the third field of the "interrupts" property from IRQ_TYPE_NONE to the correct value. I do not have hardware documentation for these devices, so I followed a mail list suggestion to copy the flag values from the same type of node in

[PATCH 2/6] ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_SPI

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "0" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 56 +++-- 1 file changed, 29 insertions(+), 27

[PATCH 1/6] ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_PPI

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "1" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 0/6] ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value

2018-09-06 Thread frowand . list
From: Frank Rowand A boot time warning of devicetree interrupts types set to the invalid value of none was added by 83a86fbb5b56 ("irqchip/gic: Loudly complain about the use of IRQ_TYPE_NONE"). This patch series fixes the devicetree source to replace IRQ_TYPE_NONE with the appropriate value.

[PATCH 6/6] ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value

2018-09-06 Thread frowand . list
From: Frank Rowand Change the third field of the "interrupts" property from IRQ_TYPE_NONE to the correct value. I do not have hardware documentation for these devices, so I followed a mail list suggestion to copy the flag values from the same type of node in

[PATCH 2/6] ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_SPI

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "0" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 56 +++-- 1 file changed, 29 insertions(+), 27

[PATCH 1/6] ARM: dts: qcom-msm8974: use named constant for interrupt type GIC_PPI

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "1" in the first field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 0/6] ARM: dts: qcom-msm8974: change invalid flag IRQ NONE to valid value

2018-09-06 Thread frowand . list
From: Frank Rowand A boot time warning of devicetree interrupts types set to the invalid value of none was added by 83a86fbb5b56 ("irqchip/gic: Loudly complain about the use of IRQ_TYPE_NONE"). This patch series fixes the devicetree source to replace IRQ_TYPE_NONE with the appropriate value.

[PATCH 4/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag LEVEL HIGH

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "4" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 5/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag NONE

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "0" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 3/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag EDGE RISING

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "1" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 4/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag LEVEL HIGH

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "4" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 5/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag NONE

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "0" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 3/6] ARM: dts: qcom-msm8974: use named constant for interrupt flag EDGE RISING

2018-09-06 Thread frowand . list
From: Frank Rowand Cosmetic change of integer value "1" in the third field of the "interrupts" property to the correct named constant. Signed-off-by: Frank Rowand --- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] ARM: qcom_defconfig: Enable MAILBOX

2018-09-06 Thread frowand . list
From: Frank Rowand Problem: ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" added a "depends on MAILBOX") to RPMSG_QCOM_SMD, thus RPMSG_QCOM_SMD becomes unset since MAILBOX was not enabled in qcom_defconfig and is not otherwise selected for the dragonboard. When the

[PATCH] ARM: qcom_defconfig: Enable MAILBOX

2018-09-06 Thread frowand . list
From: Frank Rowand Problem: ab460a2e72da ("rpmsg: qcom_smd: Access APCS through mailbox framework" added a "depends on MAILBOX") to RPMSG_QCOM_SMD, thus RPMSG_QCOM_SMD becomes unset since MAILBOX was not enabled in qcom_defconfig and is not otherwise selected for the dragonboard. When the

[PATCH] of: overlay: update phandle cache on overlay apply and remove

2018-07-12 Thread frowand . list
From: Frank Rowand A comment in the review of the patch adding the phandle cache said that the cache would have to be updated when modules are applied and removed. This patch implements the cache updates. Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of

[PATCH] of: overlay: update phandle cache on overlay apply and remove

2018-07-12 Thread frowand . list
From: Frank Rowand A comment in the review of the patch adding the phandle cache said that the cache would have to be updated when modules are applied and removed. This patch implements the cache updates. Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of

[RFC PATCH] of: overlay: update phandle cache on overlay apply and remove

2018-06-17 Thread frowand . list
From: Frank Rowand A comment in the review of the patch adding the phandle cache said that the cache would have to be updated when modules are applied and removed. This patch implements the cache updates. Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of

[RFC PATCH] of: overlay: update phandle cache on overlay apply and remove

2018-06-17 Thread frowand . list
From: Frank Rowand A comment in the review of the patch adding the phandle cache said that the cache would have to be updated when modules are applied and removed. This patch implements the cache updates. Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of

[PATCH] of: overlay: validate offset from property fixups

2018-05-16 Thread frowand . list
From: Frank Rowand The smatch static checker marks the data in offset as untrusted, leading it to warn: drivers/of/resolver.c:125 update_usages_of_a_phandle_reference() error: buffer underflow 'prop->value' 's32min-s32max' Add check to verify that offset is within

[PATCH] of: overlay: validate offset from property fixups

2018-05-16 Thread frowand . list
From: Frank Rowand The smatch static checker marks the data in offset as untrusted, leading it to warn: drivers/of/resolver.c:125 update_usages_of_a_phandle_reference() error: buffer underflow 'prop->value' 's32min-s32max' Add check to verify that offset is within the property data.

[PATCH v2] MAINTAINERS: add keyword for devicetree overlay notifiers

2018-04-27 Thread frowand . list
From: Frank Rowand Devicetree overlay notifiers have a chance to potentially get pointers into the overlay unflattened devicetree and overlay FDT. The only protection against these pointers being accessed after the underlying data has been released by kfree() is by source

[PATCH v2] MAINTAINERS: add keyword for devicetree overlay notifiers

2018-04-27 Thread frowand . list
From: Frank Rowand Devicetree overlay notifiers have a chance to potentially get pointers into the overlay unflattened devicetree and overlay FDT. The only protection against these pointers being accessed after the underlying data has been released by kfree() is by source code review of patches.

[PATCH] MAINTAINERS: add keyword for devicetree overlay notifiers

2018-04-27 Thread frowand . list
From: Frank Rowand From: Frank Rowand Devicetree overlay notifiers have a chance to potentially get pointers into the overlay unflattened devicetree and overlay FDT. The only protection against these pointers being accessed after the underlying

[PATCH] MAINTAINERS: add keyword for devicetree overlay notifiers

2018-04-27 Thread frowand . list
From: Frank Rowand From: Frank Rowand Devicetree overlay notifiers have a chance to potentially get pointers into the overlay unflattened devicetree and overlay FDT. The only protection against these pointers being accessed after the underlying data has been released by kfree() is by source

[PATCH 1/2] of: unittest: remove unneeded local return value variables

2018-03-08 Thread frowand . list
From: Frank Rowand A common pattern in many unittest functions is to save the return value of a function in a local variable, then test the value of the local variable, without using that return value for any further purpose. Remove the local return value variable for

[PATCH 1/2] of: unittest: remove unneeded local return value variables

2018-03-08 Thread frowand . list
From: Frank Rowand A common pattern in many unittest functions is to save the return value of a function in a local variable, then test the value of the local variable, without using that return value for any further purpose. Remove the local return value variable for these cases. A second

[PATCH 2/2] of: unittest: local return value variable related cleanups

2018-03-08 Thread frowand . list
From: Frank Rowand Several more style issues became apparent while creating "of: unittest: remove unneeded local return value variables". Correct those issues. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 22 ++ 1

[PATCH 2/2] of: unittest: local return value variable related cleanups

2018-03-08 Thread frowand . list
From: Frank Rowand Several more style issues became apparent while creating "of: unittest: remove unneeded local return value variables". Correct those issues. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-)

[PATCH v5 2/3] memblock: add memblock_free() alloc when CONFIG_HAVE_MEMBLOCK is not set

2018-03-04 Thread frowand . list
From: Frank Rowand When CONFIG_HAVE_MEMBLOCK is not set, an error version of memblock_alloc() exists. Add the matching memblock_free(). Signed-off-by: Frank Rowand --- Andrew or Michal, can you please ack this patch to be accepted by Rob? With

[PATCH v5 2/3] memblock: add memblock_free() alloc when CONFIG_HAVE_MEMBLOCK is not set

2018-03-04 Thread frowand . list
From: Frank Rowand When CONFIG_HAVE_MEMBLOCK is not set, an error version of memblock_alloc() exists. Add the matching memblock_free(). Signed-off-by: Frank Rowand --- Andrew or Michal, can you please ack this patch to be accepted by Rob? With "of: add early boot allocation of

[PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-03-04 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will

[PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-03-04 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will fall back to the tree

[PATCH v5 3/3] of: add early boot allocation of of_find_node_by_phandle() cache

2018-03-04 Thread frowand . list
From: Frank Rowand The initial implementation of the of_find_node_by_phandle() cache allocates the cache using kcalloc(). Add an early boot allocation of the cache so it will be usable during early boot. Switch over to the kcalloc() based cache once normal memory

[PATCH v5 3/3] of: add early boot allocation of of_find_node_by_phandle() cache

2018-03-04 Thread frowand . list
From: Frank Rowand The initial implementation of the of_find_node_by_phandle() cache allocates the cache using kcalloc(). Add an early boot allocation of the cache so it will be usable during early boot. Switch over to the kcalloc() based cache once normal memory allocation becomes available.

[PATCH v5 0/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-03-04 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will

[PATCH v5 0/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-03-04 Thread frowand . list
From: Frank Rowand Create a cache of the nodes that contain a phandle property. Use this cache to find the node for a given phandle value instead of scanning the devicetree to find the node. If the phandle value is not found in the cache, of_find_node_by_phandle() will fall back to the tree

[PATCH v7 2/5] of: change overlay apply input data from unflattened to FDT

2018-03-03 Thread frowand . list
From: Frank Rowand Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to

[PATCH v7 2/5] of: change overlay apply input data from unflattened to FDT

2018-03-03 Thread frowand . list
From: Frank Rowand Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to devicetree code, which is thus

[PATCH v7 3/5] of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()

2018-03-03 Thread frowand . list
From: Frank Rowand Signed-off-by: Frank Rowand --- Documentation/devicetree/overlay-notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/overlay-notes.txt

[PATCH v7 3/5] of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()

2018-03-03 Thread frowand . list
From: Frank Rowand Signed-off-by: Frank Rowand --- Documentation/devicetree/overlay-notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/overlay-notes.txt b/Documentation/devicetree/overlay-notes.txt index c4aa0adf13ec..5175a24d387e 100644

[PATCH v7 4/5] of: convert unittest overlay devicetree source to sugar syntax

2018-03-03 Thread frowand . list
From: Frank Rowand The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can

[PATCH v7 4/5] of: convert unittest overlay devicetree source to sugar syntax

2018-03-03 Thread frowand . list
From: Frank Rowand The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can not be converted because

[PATCH v7 0/5] of: change overlay apply input data from unflattened

2018-03-03 Thread frowand . list
From: Frank Rowand Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to

[PATCH v7 1/5] x86: devicetree: fix config option around x86_flattree_get_config()

2018-03-03 Thread frowand . list
From: Frank Rowand x86_flattree_get_config() is incorrectly protected by ifdef CONFIG_OF_FLATTREE. It uses of_get_flat_dt_size(), which only exists if CONFIG_OF_EARLY_FLATTREE. This issue has not been exposed previously because OF_FLATTREE did not occur unless it was

[PATCH v7 0/5] of: change overlay apply input data from unflattened

2018-03-03 Thread frowand . list
From: Frank Rowand Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to devicetree code, which is thus

[PATCH v7 1/5] x86: devicetree: fix config option around x86_flattree_get_config()

2018-03-03 Thread frowand . list
From: Frank Rowand x86_flattree_get_config() is incorrectly protected by ifdef CONFIG_OF_FLATTREE. It uses of_get_flat_dt_size(), which only exists if CONFIG_OF_EARLY_FLATTREE. This issue has not been exposed previously because OF_FLATTREE did not occur unless it was selected by

[PATCH v7 5/5] of: improve reporting invalid overlay target path

2018-03-03 Thread frowand . list
From: Frank Rowand Errors while developing the patch to create of_overlay_fdt_apply() exposed inadequate error messages to debug problems when overlay devicetree fragment nodes contain an invalid target path. Improve the messages in find_target_node() to remedy this.

[PATCH v7 5/5] of: improve reporting invalid overlay target path

2018-03-03 Thread frowand . list
From: Frank Rowand Errors while developing the patch to create of_overlay_fdt_apply() exposed inadequate error messages to debug problems when overlay devicetree fragment nodes contain an invalid target path. Improve the messages in find_target_node() to remedy this. Signed-off-by: Frank

[PATCH] x86: devicetree: fix config option around x86_flattree_get_config()

2018-03-02 Thread frowand . list
From: Frank Rowand x86_flattree_get_config() is incorrectly protected by ifdef CONFIG_OF_FLATTREE. It uses of_get_flat_dt_size(), which only exists if CONFIG_OF_EARLY_FLATTREE. This issue has not been exposed previously because OF_FLATTREE did not occur unless it was

[PATCH] x86: devicetree: fix config option around x86_flattree_get_config()

2018-03-02 Thread frowand . list
From: Frank Rowand x86_flattree_get_config() is incorrectly protected by ifdef CONFIG_OF_FLATTREE. It uses of_get_flat_dt_size(), which only exists if CONFIG_OF_EARLY_FLATTREE. This issue has not been exposed previously because OF_FLATTREE did not occur unless it was selected by

[PATCH v6 4/4] of: improve reporting invalid overlay target path

2018-03-02 Thread frowand . list
From: Frank Rowand Errors while developing the patch to create of_overlay_fdt_apply() exposed inadequate error messages to debug problems when overlay devicetree fragment nodes contain an invalid target path. Improve the messages in find_target_node() to remedy this.

[PATCH v6 4/4] of: improve reporting invalid overlay target path

2018-03-02 Thread frowand . list
From: Frank Rowand Errors while developing the patch to create of_overlay_fdt_apply() exposed inadequate error messages to debug problems when overlay devicetree fragment nodes contain an invalid target path. Improve the messages in find_target_node() to remedy this. Signed-off-by: Frank

[PATCH v6 3/4] of: convert unittest overlay devicetree source to sugar syntax

2018-03-02 Thread frowand . list
From: Frank Rowand The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can

[PATCH v6 3/4] of: convert unittest overlay devicetree source to sugar syntax

2018-03-02 Thread frowand . list
From: Frank Rowand The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can not be converted because

[PATCH v6 0/4] of: change overlay apply input data from unflattened

2018-03-02 Thread frowand . list
From: Frank Rowand Move duplicating and unflattening of an overlay flattened devicetree (FDT) into the overlay application code. To accomplish this, of_overlay_apply() is replaced by of_overlay_fdt_apply(). The copy of the FDT (aka "duplicate FDT") now belongs to

  1   2   3   4   5   6   >