[PATCH net-next 12/12] rocker, dsa, ethsw: Don't filter VLAN events on bridge itself

2018-11-22 Thread Petr Machata
Due to an explicit check in rocker_world_port_obj_vlan_add(), dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects that are added to a device that is not a front-panel port device are ignored. Therefore this check is immaterial. Signed-off-by: Petr Machata Acked-by: Jiri Pirko

Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Gao Xiang
Hi Andrea, On 2018/11/23 2:50, Andrea Parri wrote: > On Thu, Nov 22, 2018 at 06:56:32PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 18:22, Greg Kroah-Hartman wrote: >>> Please document this memory barrier. It does not make much sense to >>> me... >> >> Because we need to make the

Re: [PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
Petr Machata writes: > An offloading driver may need to have access to switchdev events on > ports that aren't directly under its control. An example is a VXLAN port > attached to a bridge offloaded by a driver. The driver needs to know > about VLANs configured on the VXLAN device. However the

[PATCH net-next 11/12] switchdev: Replace port obj add/del SDO with a notification

2018-11-22 Thread Petr Machata
Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_obj_notify() that sends the switchdev notifications SWITCHDEV_PORT_OBJ_ADD and _DEL.

[PATCH net-next 09/12] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 07/12] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 10/12] ocelot: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 06/12] staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check()

2018-11-22 Thread Petr Machata
ethsw currently uses an open-coded comparison of netdev_ops to determine whether whether a device represents a front panel port. Wrap this into a named function to simplify reuse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 7 ++- 1 file

[PATCH net-next 08/12] switchdev: Add helpers to aid traversal through lower devices

2018-11-22 Thread Petr Machata
After the transition from switchdev operations to notifier chain (which will take place in following patches), the onus is on the driver to find its own devices below possible layer of LAG or other uppers. The logic to do so is fairly repetitive: each driver is looking for its own devices among

[PATCH net-next 05/12] net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

[PATCH net-next 03/12] switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed

[PATCH net-next 02/12] switchdev: Add a blocking notifier chain

2018-11-22 Thread Petr Machata
In general one can't assume that a switchdev notifier is called in a non-atomic context, and correspondingly, the switchdev notifier chain is an atomic one. However, port object addition and deletion messages are delivered from a process context. Even the MDB addition messages, whose delivery is

[PATCH net-next 01/12] switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize

2018-11-22 Thread Petr Machata
The two macros SWITCHDEV_OBJ_PORT_VLAN() and SWITCHDEV_OBJ_PORT_MDB() expand to a container_of() call, yielding an appropriate container of their sole argument. However, due to a name collision, the first argument, i.e. the contained object pointer, is not the only one to get expanded. The third

[PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
An offloading driver may need to have access to switchdev events on ports that aren't directly under its control. An example is a VXLAN port attached to a bridge offloaded by a driver. The driver needs to know about VLANs configured on the VXLAN device. However the VXLAN device isn't stashed

[PATCH net-next 04/12] rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent

Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Andrea Parri
On Thu, Nov 22, 2018 at 06:56:32PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:22, Greg Kroah-Hartman wrote: > > Please document this memory barrier. It does not make much sense to > > me... > > Because we need to make the other observers noticing the latest values > modified > in

[PATCH v2 10/10] staging: erofs: rename strange variable names in z_erofs_vle_frontend

2018-11-22 Thread Gao Xiang
From: Gao Xiang Previously, 2 members called `initial' and `cachedzone_la' are used for applying caching policy (whether the workgroup is at either end), which are hard to understand, rename them to `backmost' and `headoffset'. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang ---

[PATCH v2 09/10] staging: erofs: decompress asynchronously if PG_readahead page at first

2018-11-22 Thread Gao Xiang
From: Gao Xiang For the case of nr_to_read == lookahead_size, it is better to decompress asynchronously as well since no page will be needed immediately. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 9 - 1 file changed, 8 insertions(+), 1

[PATCH v2 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
From: Gao Xiang `z_erofs_vle_workgroup' is heavily generated in the decompression, for example, it resets 32 bytes redundantly for 64-bit platforms even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES, default 4, pages are stored in `z_erofs_vle_workgroup'. As an another

[PATCH v2 08/10] staging: erofs: locked before registering for all new workgroups

2018-11-22 Thread Gao Xiang
From: Gao Xiang Let's make sure that the one registering a workgroup will also take the primary work lock at first for two reasons: 1) There's no need to introduce such a race window (and consequently overhead) between registering and locking, other tasks could break in by chance,

[PATCH v2 06/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Gao Xiang
From: Gao Xiang Just like other generic locks, insert a full barrier in case of memory reorder. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/erofs/internal.h

[PATCH v2 03/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
From: Gao Xiang When the managed cache is enabled, the last reference count of a workgroup must be used for its workstation. Otherwise, it could lead to incorrect (un)freezes in the reclaim path, and it would be harmful. A typical race as follows: Thread 1 (In the reclaim path) Thread 2

[PATCH v2 04/10] staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup

2018-11-22 Thread Gao Xiang
From: Gao Xiang It's better to use atomic_cond_read_relaxed, which is implemented in hardware instructions to monitor a variable changes currently for ARM64, instead of open-coded busy waiting. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 30

[PATCH v2 05/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Gao Xiang
From: Gao Xiang There are two minor issues in the current freeze interface: 1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, therefore fix the incorrect conditions; 2) For SMP platforms, it should also disable preemption before doing atomic_cmpxchg in case

[PATCH v2 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-22 Thread Gao Xiang
From: Gao Xiang `trace_erofs_readpage' was designed for .readpage() interface hook in order to trace the detailed synchronized read rather than the internal implementation `z_erofs_do_read_page' which both .readpage() and .readpages() use. It seems the tracepoint was placed to a wrong place by

[PATCH v2 02/10] staging: erofs: fix the definition of DBG_BUGON

2018-11-22 Thread Gao Xiang
From: Gao Xiang It's better not to positively BUG_ON the kernel, however developers need a way to locate issues as soon as possible. DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG (EROFS developping feature) is on. It is helpful for developers to find and solve bugs quickly

[PATCH v2 00/10] staging: erofs: decompression stability enhancement

2018-11-22 Thread Gao Xiang
Hi, This patchset mainly focuses on erofs decompression stability, most of them are found in the internal beta test. Some patches which are still in testing or reviewing aren't included in this patchset and will be sent after carefully testing. Thanks, Gao Xiang Changelog from v1 === o fix a

[PATCH v3 3/3] staging: greybus: arche-platform: Switch to the gpio descriptor interface

2018-11-22 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v2: - Move comment to the same line as to what it applies to. --- drivers/staging/greybus/arche-platform.c | 119 --- 1 file changed, 41

[PATCH v3 2/3] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface

2018-11-22 Thread Nishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v2: - Resolved compilation errors. --- drivers/staging/greybus/arche-apb-ctrl.c | 159 +-- 1 file changed, 65 insertions(+), 94 deletions(-) diff

[PATCH v3 1/3] staging: greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP

2018-11-22 Thread Nishad Kamdar
Convert the GPIO driver to use the GPIO irqchip library GPIOLIB_IRQCHIP instead of reimplementing the same. Signed-off-by: Nishad Kamdar --- Changes in v2: - Retained irq.h and irqdomain.h headers. - Dropped function gb_gpio_irqchip_add() and called gpiochip_irqchip_add() from probe(). -

[PATCH v3 0/3] greybus: gpio: Switch to the gpio descriptor interface

2018-11-22 Thread Nishad Kamdar
This patch series converts uses of the old GPIO API to the GPIO descriptor API. It also converts the GPIO driver to use the GPIO irqchip library GPIOLIB_IRQCHIP instead of repimplementing the same. Changes in v3: - Combines the latest versions of the three greybus patches together in a patch

Re: [PATCH] staging: greybus: arche-platform: Switch to the gpio descriptor interface

2018-11-22 Thread Nishad Kamdar
On Tue, Nov 20, 2018 at 10:49:54AM +0100, Greg Kroah-Hartman wrote: > On Sat, Nov 17, 2018 at 04:40:27PM +0100, Johan Hovold wrote: > > On Sat, Nov 17, 2018 at 12:41:11PM +0530, Nishad Kamdar wrote: > > > On Fri, Nov 16, 2018 at 05:06:22PM +0100, Johan Hovold wrote: > > > > On Fri, Nov 16, 2018 at

[PATCH v9 06/13] ARM: dts: imx7s: add mipi phy power domain

2018-11-22 Thread Rui Miguel Silva
Add power domain index 0 related with mipi-phy to imx7s. While at it rename pcie power-domain node to remove pgc prefix. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s.dtsi | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7s.dtsi

[PATCH v9 03/13] media: staging/imx7: add imx7 CSI subdev driver

2018-11-22 Thread Rui Miguel Silva
This add the media entity subdevice and control driver for the i.MX7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Kconfig |9 +- drivers/staging/media/imx/Makefile |2 + drivers/staging/media/imx/imx7-media-csi.c | 1354

[PATCH v9 02/13] media: staging/imx: rearrange group id to take in account IPU

2018-11-22 Thread Rui Miguel Silva
Some imx system do not have IPU, so prepare the imx media drivers to support this kind of devices. Rename the group ids to include an _IPU_ prefix, add a new group id to support systems with only a CSI without IPU, and also rename the create internal links to make it clear that only systems with

[PATCH v9 11/13] media: staging/imx: add i.MX7 entries to TODO file

2018-11-22 Thread Rui Miguel Silva
Add some i.MX7 related entries to TODO file. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/TODO | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/imx/TODO b/drivers/staging/media/imx/TODO index aeeb15494a49..6f29b5ca5324 100644 ---

[PATCH v9 07/13] ARM: dts: imx7s: add multiplexer controls

2018-11-22 Thread Rui Miguel Silva
The IOMUXC General Purpose Register has bitfield to control video bus multiplexer to control the CSI input between the MIPI-CSI2 and parallel interface. Add that register and mask. Signed-off-by: Rui Miguel Silva Reviewed-by: Philipp Zabel --- arch/arm/boot/dts/imx7s.dtsi | 9 - 1 file

[PATCH v9 13/13] media: MAINTAINERS: add entry for Freescale i.MX7 media driver

2018-11-22 Thread Rui Miguel Silva
Add maintainer entry for the imx7 media csi, mipi csis driver, dt-bindings and documentation. Signed-off-by: Rui Miguel Silva --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0abecc528dac..afa2ad3c5600 100644 --- a/MAINTAINERS +++

[PATCH v9 08/13] ARM: dts: imx7: Add video mux, csi and mipi_csi and connections

2018-11-22 Thread Rui Miguel Silva
This patch adds the device tree nodes for csi, video multiplexer and mipi-csi besides the graph connecting the necessary endpoints to make the media capture entities to work in imx7 Warp board. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s-warp.dts | 51

[PATCH v9 10/13] media: imx7.rst: add documentation for i.MX7 media driver

2018-11-22 Thread Rui Miguel Silva
Add rst document to describe the i.MX7 media driver and also a working example from the Warp7 board usage with a OV2680 sensor. Signed-off-by: Rui Miguel Silva --- Documentation/media/v4l-drivers/imx7.rst | 157 ++ Documentation/media/v4l-drivers/index.rst | 1 + 2 files

[PATCH v9 12/13] media: video-mux: add bayer formats

2018-11-22 Thread Rui Miguel Silva
Add non vendor bayer formats to the allowed format array. Signed-off-by: Rui Miguel Silva --- drivers/media/platform/video-mux.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/media/platform/video-mux.c b/drivers/media/platform/video-mux.c index

[PATCH v9 05/13] media: dt-bindings: add bindings for i.MX7 media driver

2018-11-22 Thread Rui Miguel Silva
Add bindings documentation for i.MX7 media drivers. The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva Reviewed-by: Rob Herring Acked-by: Sakari Ailus --- .../devicetree/bindings/media/imx7-csi.txt| 45 ++ .../bindings/media/imx7-mipi-csi2.txt

[PATCH v9 04/13] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2018-11-22 Thread Rui Miguel Silva
Adds MIPI CSI-2 subdev for i.MX7 to connect with sensors with a MIPI CSI-2 interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Makefile |1 + drivers/staging/media/imx/imx7-mipi-csis.c | 1135 2 files changed, 1136 insertions(+) create mode

[PATCH v9 09/13] ARM: dts: imx7s-warp: add ov2680 sensor node

2018-11-22 Thread Rui Miguel Silva
Warp7 comes with a Omnivision OV2680 sensor, add the node here to make complete the camera data path for this system. Add the needed regulator to the analog voltage supply, the port and endpoints in mipi_csi node and the pinctrl for the reset gpio. Signed-off-by: Rui Miguel Silva ---

[PATCH v9 00/13] media: staging/imx7: add i.MX7 media driver

2018-11-22 Thread Rui Miguel Silva
Hi, This series introduces the Media driver to work with the i.MX7 SoC. it uses the already existing imx media core drivers but since the i.MX7, contrary to i.MX5/6, do not have an IPU and because of that some changes in the imx media core are made along this series to make it support that case.

[PATCH v9 01/13] media: staging/imx: refactor imx media device probe

2018-11-22 Thread Rui Miguel Silva
Refactor and move media device initialization code to a new common module, so it can be used by other devices, this will allow for example a near to introduce imx7 CSI driver, to use this media device. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Makefile| 1 +

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 21:23, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 09:01:31PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 20:00, Gao Xiang wrote: >>> Hi Greg, >>> >>> On 2018/11/22 19:26, Greg Kroah-Hartman wrote: Don't make people rebuild your code with different

[PATCH 6/8] staging: rtl8188eu: add spaces around '>>' and '&'

2018-11-22 Thread Michael Straube
Add spaces around '>>' and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 8/8] staging: rtl8188eu: remove variable from rtl8188eu_xmit_tasklet()

2018-11-22 Thread Michael Straube
The local variable ret is only used to test the return value of the call to rtl8188eu_xmitframe_complete(). Use the function directly in the if test and remove the variable ret. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 5 + 1 file changed, 1

[PATCH 5/8] staging: rtl8188eu: remove unnecessary parentheses

2018-11-22 Thread Michael Straube
Remove unnecessary parentheses in usb_ops_linux.c. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

[PATCH 3/8] staging: rtl8188eu: remove braces from single if else statement

2018-11-22 Thread Michael Straube
Remove braces from single line if else statement. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

[PATCH 4/8] staging: rtl8188eu: correct spelling mistake in a comment

2018-11-22 Thread Michael Straube
Correct spelling mistake in a comment reported by checkpatch. checksumed -> checksummed Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

[PATCH 7/8] staging: rtl8188eu: cleanup declarations in usb_ops_linux.c

2018-11-22 Thread Michael Straube
Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git

[PATCH 1/8] staging: rtl8188eu: use __func__ in usb_ops_linux.c

2018-11-22 Thread Michael Straube
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 84 --- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

[PATCH 2/8] staging: rtl8188eu: cleanup line ending with a '('

2018-11-22 Thread Michael Straube
Cleanup line ending with a '(' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 09:01:31PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 20:00, Gao Xiang wrote: > > Hi Greg, > > > > On 2018/11/22 19:26, Greg Kroah-Hartman wrote: > >> Don't make people rebuild your code with different options for > >> debugging. That will never work in the

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 08:41:15PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 20:26, Greg Kroah-Hartman wrote: > > Ugh, every page? Ok, nevermind, I take back my objections. You all are > > crazy and need to do crazy things like this :) > > ...Do you have some idea about this? ... I

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 20:00, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 19:26, Greg Kroah-Hartman wrote: >> Don't make people rebuild your code with different options for >> debugging. That will never work in the 'real world' when people start >> using the code. You need to have things

[PATCH] staging: iio: ad5933: replaced kfifo by triggered_buffer

2018-11-22 Thread Marcelo Schmitt
Previously, there was an implicit creation of a kfifo which was replaced by a call to triggered_buffer_setup, which is already implemented in iio infrastructure. Signed-off-by: Marcelo Schmitt --- .../staging/iio/impedance-analyzer/Kconfig| 2 +- .../staging/iio/impedance-analyzer/ad5933.c

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 20:26, Greg Kroah-Hartman wrote: > Ugh, every page? Ok, nevermind, I take back my objections. You all are > crazy and need to do crazy things like this :) ...Do you have some idea about this? ... I think it is fairly normal... :( We have a large number of managed

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 07:43:50PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 19:06, Greg Kroah-Hartman wrote: > > On Thu, Nov 22, 2018 at 06:42:52PM +0800, Gao Xiang wrote: > >> Hi Greg, > >> > >> On 2018/11/22 18:17, Greg Kroah-Hartman wrote: > >>> Any specific reason why you are not

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:26, Greg Kroah-Hartman wrote: > Don't make people rebuild your code with different options for > debugging. That will never work in the 'real world' when people start > using the code. You need to have things enabled for people all the > time, which is why we have

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:06, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 06:42:52PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 18:17, Greg Kroah-Hartman wrote: >>> Any specific reason why you are not using the refcount.h api instead of >>> "doing it yourself" with

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:26, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 07:11:08PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 19:05, Greg Kroah-Hartman wrote: >>> On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: Hi Greg, On 2018/11/22 18:23, Greg

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 07:11:08PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 19:05, Greg Kroah-Hartman wrote: > > On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: > >> Hi Greg, > >> > >> On 2018/11/22 18:23, Greg Kroah-Hartman wrote: > + > +

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:05, Greg Kroah-Hartman wrote: > As I said in another email, doing two things with one variable is odd as > those are two different types of functions. I think lockref_put_or_lock do the similar thing, it is heavily used in dcache.c, but 1) 0 is special for us, we need

Re: [PATCH] staging: iio: ad7780: Add gain & filter gpio support

2018-11-22 Thread Popa, Stefan Serban
On Mi, 2018-11-21 at 16:04 -0200, Giuliano Belinassi wrote: > Previously, the AD7780 driver only supported gpio for the 'powerdown' > pin. This commit adds suppport for the 'gain' and 'filter' pin. Hey, Comments inline. > > Signed-off-by: Giuliano Belinassi > --- >  

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 19:05, Greg Kroah-Hartman wrote: > On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/11/22 18:23, Greg Kroah-Hartman wrote: + + DBG_BUGON(work->nr_pages); + DBG_BUGON(work->vcnt); >>> How can these ever be triggered? I

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 06:42:52PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:17, Greg Kroah-Hartman wrote: > > Any specific reason why you are not using the refcount.h api instead of > > "doing it yourself" with atomic_inc/dec()? > > > > I'm not rejecting this, just curious. > >

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 06:29:34PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:21, Greg Kroah-Hartman wrote: > > On Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: > >> There are two minor issues in the current freeze interface: > >> > >>1) Freeze interfaces have not

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 06:34:10PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:23, Greg Kroah-Hartman wrote: > >> + > >> + DBG_BUGON(work->nr_pages); > >> + DBG_BUGON(work->vcnt); > > How can these ever be triggered? I understand the need for debugging > > code when you are writing

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 06:29:34PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:21, Greg Kroah-Hartman wrote: > > On Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: > >> There are two minor issues in the current freeze interface: > >> > >>1) Freeze interfaces have not

Re: [PATCH 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-22 Thread Greg Kroah-Hartman
On Thu, Nov 22, 2018 at 06:49:53PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/11/22 18:19, Greg Kroah-Hartman wrote: > > On Tue, Nov 20, 2018 at 10:34:16PM +0800, Gao Xiang wrote: > >> `trace_erofs_readpage' should be placed in .readpage() > >> rather than in the internal

Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:22, Greg Kroah-Hartman wrote: > Please document this memory barrier. It does not make much sense to > me... Because we need to make the other observers noticing the latest values modified in this locking period before unfreezing the whole workgroup, one way is to use a

Re: [PATCH 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:19, Greg Kroah-Hartman wrote: > On Tue, Nov 20, 2018 at 10:34:16PM +0800, Gao Xiang wrote: >> `trace_erofs_readpage' should be placed in .readpage() >> rather than in the internal `z_erofs_do_read_page'. > Why? What happens with the code today? trace_erofs_readpage is

[PATCH] staging: vboxvideo: Rename uint32_t type to u32

2018-11-22 Thread Ricardo Reis Marques Silva
Issue found by checkpatch. CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_cursor_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' +static const uint32_t vbox_primary_plane_formats[] = { CHECK: Prefer kernel type 'u32' over 'uint32_t' + const

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:17, Greg Kroah-Hartman wrote: > Any specific reason why you are not using the refcount.h api instead of > "doing it yourself" with atomic_inc/dec()? > > I'm not rejecting this, just curious. As I explained in the previous email, Re: [PATCH 04/10] staging: erofs: fix

Re: [PATCH 08/10] staging: erofs: locked before registering for all new workgroups

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:24, Greg Kroah-Hartman wrote: >> +/* lock all primary followed works before visible to others */ >> +if (unlikely(!mutex_trylock(>lock))) >> +/* for a new workgroup, try_lock *never* fails */ >> +DBG_BUGON(1); > Again, drop this, if it

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:23, Greg Kroah-Hartman wrote: >> + >> +DBG_BUGON(work->nr_pages); >> +DBG_BUGON(work->vcnt); > How can these ever be triggered? I understand the need for debugging > code when you are writing code, but at this point it shouldn't be needed > anymore, right? I

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Gao Xiang
Hi Greg, On 2018/11/22 18:21, Greg Kroah-Hartman wrote: > On Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: >> There are two minor issues in the current freeze interface: >> >>1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, >> therefore fix the incorrect

Re: [PATCH 08/10] staging: erofs: locked before registering for all new workgroups

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:23PM +0800, Gao Xiang wrote: > Let's make sure that the one registering a workgroup will also > take the primary work lock at first for two reasons: > 1) There's no need to introduce such a race window (and consequently > overhead) between registering and

Re: [PATCH 07/10] staging: erofs: separate into init_once / always

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:22PM +0800, Gao Xiang wrote: > `z_erofs_vle_workgroup' is heavily generated in the decompression, > for example, it resets 32 bytes redundantly for 64-bit platforms > even through Z_EROFS_VLE_INLINE_PAGEVECS + Z_EROFS_CLUSTER_MAX_PAGES, > default 4, pages are stored

Re: [PATCH 05/10] staging: erofs: add a full barrier in erofs_workgroup_unfreeze

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:20PM +0800, Gao Xiang wrote: > Just like other generic locks, insert a full barrier > in case of memory reorder. > > Reviewed-by: Chao Yu > Signed-off-by: Gao Xiang > --- > drivers/staging/erofs/internal.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH 04/10] staging: erofs: fix `erofs_workgroup_{try_to_freeze, unfreeze}'

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:19PM +0800, Gao Xiang wrote: > There are two minor issues in the current freeze interface: > >1) Freeze interfaces have not related with CONFIG_DEBUG_SPINLOCK, > therefore fix the incorrect conditions; > >2) For SMP platforms, it should also disable

Re: [PATCH 03/10] staging: erofs: atomic_cond_read_relaxed on ref-locked workgroup

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:18PM +0800, Gao Xiang wrote: > It's better to use atomic_cond_read_relaxed, which is implemented > in hardware instructions to monitor a variable changes currently > for ARM64, instead of open-coded busy waiting. > > Reviewed-by: Chao Yu > Signed-off-by: Gao Xiang

Re: [PATCH 01/10] staging: erofs: fix `trace_erofs_readpage' position

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:16PM +0800, Gao Xiang wrote: > `trace_erofs_readpage' should be placed in .readpage() > rather than in the internal `z_erofs_do_read_page'. Why? What happens with the code today? > > Fixes: 284db12cfda3 ("staging: erofs: add trace points for reading zipped >

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:17PM +0800, Gao Xiang wrote: > When the managed cache is enabled, the last reference count > of a workgroup must be used for its workstation. > > Otherwise, it could lead to incorrect (un)freezes in > the reclaim path, and it would be harmful. > > A typical race as

Re: [PATCH 02/10] staging: erofs: fix race when the managed cache is enabled

2018-11-22 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 10:34:17PM +0800, Gao Xiang wrote: > When the managed cache is enabled, the last reference count > of a workgroup must be used for its workstation. > > Otherwise, it could lead to incorrect (un)freezes in > the reclaim path, and it would be harmful. > > A typical race as

[PATCH v2] makedumpfile: exclude pages that are logically offline

2018-11-22 Thread David Hildenbrand
Linux marks pages that are logically offline via a page flag (map count). Such pages e.g. include pages infated as part of a balloon driver or pages that were not actually onlined when onlining the whole section. While the hypervisor usually allows to read such inflated memory, we basically read

[PATCH v2 6/8] vmw_balloon: mark inflated pages PG_offline

2018-11-22 Thread David Hildenbrand
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: Xavier Deguillard Cc: Nadav Amit Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Julien Freche Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S.

[PATCH v2 7/8] PM / Hibernate: use pfn_to_online_page()

2018-11-22 Thread David Hildenbrand
Let's use pfn_to_online_page() instead of pfn_to_page() when checking for saveable pages to not save/restore offline memory sections. Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Len Brown Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Suggested-by: Michal

[PATCH v2 4/8] xen/balloon: mark inflated pages PG_offline

2018-11-22 Thread David Hildenbrand
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David

[PATCH v2 8/8] PM / Hibernate: exclude all PageOffline() pages

2018-11-22 Thread David Hildenbrand
The content of pages that are marked PG_offline is not of interest (e.g. inflated by a balloon driver), let's skip these pages. In saveable_highmem_page(), move the PageReserved() check to a new check along with the PageOffline() check to separate it from the swsusp checks. Cc: "Rafael J.

[PATCH v2 5/8] hv_balloon: mark inflated pages PG_offline

2018-11-22 Thread David Hildenbrand
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Kairui Song Cc: Vitaly Kuznetsov Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S.

[PATCH v2 3/8] kexec: export PG_offline to VMCOREINFO

2018-11-22 Thread David Hildenbrand
Right now, pages inflated as part of a balloon driver will be dumped by dump tools like makedumpfile. While XEN is able to check in the crash kernel whether a certain pfn is actuall backed by memory in the hypervisor (see xen_oldmem_pfn_is_ram) and optimize this case, dumps of other balloon

[PATCH v2 1/8] mm: balloon: update comment about isolation/migration/compaction

2018-11-22 Thread David Hildenbrand
Commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature") reworked balloon handling to make use of the general non-lru movable page feature. The big comment block in balloon_compaction.h contains quite some outdated information. Let's fix this. Cc: Andrew Morton Cc: Matthew

[PATCH v2 0/8] mm/kdump: allow to exclude pages that are logically offline

2018-11-22 Thread David Hildenbrand
Right now, pages inflated as part of a balloon driver will be dumped by dump tools like makedumpfile. While XEN is able to check in the crash kernel whether a certain pfn is actually backed by memory in the hypervisor (see xen_oldmem_pfn_is_ram) and optimize this case, dumps of virtio-balloon,

[PATCH v2 2/8] mm: convert PG_balloon to PG_offline

2018-11-22 Thread David Hildenbrand
PG_balloon was introduced to implement page migration/compaction for pages inflated in virtio-balloon. Nowadays, it is only a marker that a page is part of virtio-balloon and therefore logically offline. We also want to make use of this flag in other balloon drivers - for inflated pages or when

Re: [PATCH v8 03/12] media: staging/imx7: add imx7 CSI subdev driver

2018-11-22 Thread Rui Miguel Silva
Hi Sakari, thanks for all the reviews. On Wed 21 Nov 2018 at 22:29, Sakari Ailus wrote: Hi Rui, On Wed, Nov 21, 2018 at 11:15:49AM +, Rui Miguel Silva wrote: This add the media entity subdevice and control driver for the i.MX7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva ---

Re: [PATCH v8 05/12] media: dt-bindings: add bindings for i.MX7 media driver

2018-11-22 Thread Rui Miguel Silva
Hi Sakari, On Wed 21 Nov 2018 at 22:16, Sakari Ailus wrote: Hi Rui, On Wed, Nov 21, 2018 at 11:15:51AM +, Rui Miguel Silva wrote: Add bindings documentation for i.MX7 media drivers. The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva Reviewed-by: Rob

  1   2   >