Re: [PATCH v4.7-rc] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes

2016-06-18 Thread Olof Johansson
On Fri, Jun 17, 2016 at 01:44:18PM +0200, Maxime Coquelin wrote:
> From: Lee Jones 
> 
> This patch fixes a non-booting issue in Mainline.
> 
> When booting with a compressed kernel, we need to be careful how we
> populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
> in multi-arch enabled configurations, which place some restrictions on
> where the kernel is placed and where it will be uncompressed to on boot.
> 
> AUTO_ZRELADDR takes the decompressor code's start address and masks out
> the bottom 28 bits to obtain an address to uncompress the kernel to
> (thus a load address of 0x4200 means that the kernel will be
> uncompressed to 0x4000 i.e. DDR START on this platform).
> 
> Even changing the load address to after the co-processor's shared memory
> won't render a booting platform, since the AUTO_ZRELADDR algorithm still
> ensures the kernel is uncompressed into memory shared with the first
> co-processor (0x4000).
> 
> Another option would be to move loading to 0x4A00, since this will
> mean the decompressor will decompress the kernel to 0x4800. However,
> this would mean a large chunk (0x4400 => 0x4800 (64MB)) of
> memory would essentially be wasted for no good reason.
> 
> Until we can work with ST to find a suitable memory location to
> relocate co-processor shared memory, let's disable the shared memory
> nodes.  This will ensure a working platform in the mean time.
> 
> NB: The more observant of you will notice that we're leaving the DMU
> shared memory node enabled; this is because a) it is the only one in
> active use at the time of this writing and b) it is not affected by
> the current default behaviour which is causing issues.
> 
> Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' 
> API for obtaining DMA memory)
> Signed-off-by: Lee Jones 
> Reviewed-by Peter Griffin 
> Signed-off-by: Maxime Coquelin 

Applied, thanks.

-Olof


Re: [PATCH v4.7-rc] ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes

2016-06-18 Thread Olof Johansson
On Fri, Jun 17, 2016 at 01:44:18PM +0200, Maxime Coquelin wrote:
> From: Lee Jones 
> 
> This patch fixes a non-booting issue in Mainline.
> 
> When booting with a compressed kernel, we need to be careful how we
> populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
> in multi-arch enabled configurations, which place some restrictions on
> where the kernel is placed and where it will be uncompressed to on boot.
> 
> AUTO_ZRELADDR takes the decompressor code's start address and masks out
> the bottom 28 bits to obtain an address to uncompress the kernel to
> (thus a load address of 0x4200 means that the kernel will be
> uncompressed to 0x4000 i.e. DDR START on this platform).
> 
> Even changing the load address to after the co-processor's shared memory
> won't render a booting platform, since the AUTO_ZRELADDR algorithm still
> ensures the kernel is uncompressed into memory shared with the first
> co-processor (0x4000).
> 
> Another option would be to move loading to 0x4A00, since this will
> mean the decompressor will decompress the kernel to 0x4800. However,
> this would mean a large chunk (0x4400 => 0x4800 (64MB)) of
> memory would essentially be wasted for no good reason.
> 
> Until we can work with ST to find a suitable memory location to
> relocate co-processor shared memory, let's disable the shared memory
> nodes.  This will ensure a working platform in the mean time.
> 
> NB: The more observant of you will notice that we're leaving the DMU
> shared memory node enabled; this is because a) it is the only one in
> active use at the time of this writing and b) it is not affected by
> the current default behaviour which is causing issues.
> 
> Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' 
> API for obtaining DMA memory)
> Signed-off-by: Lee Jones 
> Reviewed-by Peter Griffin 
> Signed-off-by: Maxime Coquelin 

Applied, thanks.

-Olof


[rcu:rcu/next 16/16] ERROR: "__udivdi3" [kernel/torture.ko] undefined!

2016-06-18 Thread kbuild test robot
Hi,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
rcu/next
head:   b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
commit: b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9 [16/16] torture: Convert 
torture_shutdown() to hrtimer
config: m32r-allmodconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/atmel/snd-soc-atmel-pcm-pdc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!
   ERROR: "dma_common_mmap" [sound/core/snd-pcm.ko] undefined!
   ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>> ERROR: "__udivdi3" [kernel/torture.ko] undefined!
   ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


[rcu:rcu/next 16/16] ERROR: "__udivdi3" [kernel/torture.ko] undefined!

2016-06-18 Thread kbuild test robot
Hi,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
rcu/next
head:   b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
commit: b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9 [16/16] torture: Convert 
torture_shutdown() to hrtimer
config: m32r-allmodconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/atmel/snd-soc-atmel-pcm-pdc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!
   ERROR: "dma_common_mmap" [sound/core/snd-pcm.ko] undefined!
   ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>> ERROR: "__udivdi3" [kernel/torture.ko] undefined!
   ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
   ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH] net: rds: fix coding style issues

2016-06-18 Thread David Miller
From: Joshua Houghton 
Date: Sat, 18 Jun 2016 15:46:31 +

> Fix coding style issues in the following files:
> 
> ib_cm.c:  add space
> loop.c:   convert spaces to tabs
> sysctl.c: add space
> tcp.h:convert spaces to tabs
> tcp_connect.c:remove extra indentation in switch statement
> tcp_recv.c:   convert spaces to tabs
> tcp_send.c:   convert spaces to tabs
> transport.c:  move brace up one line on for statement
> 
> Signed-off-by: Joshua Houghton 

Applied.


Re: [PATCH] net: rds: fix coding style issues

2016-06-18 Thread David Miller
From: Joshua Houghton 
Date: Sat, 18 Jun 2016 15:46:31 +

> Fix coding style issues in the following files:
> 
> ib_cm.c:  add space
> loop.c:   convert spaces to tabs
> sysctl.c: add space
> tcp.h:convert spaces to tabs
> tcp_connect.c:remove extra indentation in switch statement
> tcp_recv.c:   convert spaces to tabs
> tcp_send.c:   convert spaces to tabs
> transport.c:  move brace up one line on for statement
> 
> Signed-off-by: Joshua Houghton 

Applied.


Re: [PATCH 1/3] ARM: dts: imx7d: create i.MX 7Solo base device tree

2016-06-18 Thread Stefan Agner
On 2016-06-11 18:35, Shawn Guo wrote:
> On Tue, Jun 07, 2016 at 07:37:07PM -0700, Stefan Agner wrote:
>> The i.MX 7 series currently consists of two SoCs: i.MX 7Solo and
>> 7Dual. The i.MX 7Solo implements a subset of features available on
>> i.MX 7Dual, hence create imx7s.dtsi as the base device tree. The
>> i.MX 7Dual's additional features over i.MX 7Solo are:
>> - Second Cortex-A7 core
>> - Second Gigabit Ethernet controller
>> - EPD (Electronc Paper Display, not yet part of the device tree)
>> - PCIe (not yet part of the device tree)
>> - Additional USB2.0 OTG controller
>>
>> Signed-off-by: Stefan Agner 
>> ---
>>  arch/arm/boot/dts/imx7d.dtsi | 923 
>> +++
>>  arch/arm/boot/dts/imx7s.dtsi | 880 +
>>  2 files changed, 928 insertions(+), 875 deletions(-)
> 
> We should probably have a beforehand patch to rename the file, so that
> we can avoid this dramatic diffstat.

If I delete imx7d.dtsi and add imx7s.dtsi in a single commit, and then
readd imx7d.dtsi in a second commit, it would break bisect-ability. All
existing device trees which include imx7d.dtsi would fail to build.

As soon as I keep imx7d.dtsi around, even if it only includes
imx7s.dtsi, git diff stats look dramatic with git default options.

Using -B -M makes the diff stat a bit less dramatic:

 arch/arm/boot/dts/imx7d.dtsi | 1083
+++---
 arch/arm/boot/dts/{imx7d.dtsi => imx7s.dtsi} |   79 +--
 2 files changed, 130 insertions(+), 1032 deletions(-)

However, that is only for stats, and only when using those options...

I would rather prefer to keep it in a single commit. What do you think?

--
Stefan


Re: [PATCH 1/3] ARM: dts: imx7d: create i.MX 7Solo base device tree

2016-06-18 Thread Stefan Agner
On 2016-06-11 18:35, Shawn Guo wrote:
> On Tue, Jun 07, 2016 at 07:37:07PM -0700, Stefan Agner wrote:
>> The i.MX 7 series currently consists of two SoCs: i.MX 7Solo and
>> 7Dual. The i.MX 7Solo implements a subset of features available on
>> i.MX 7Dual, hence create imx7s.dtsi as the base device tree. The
>> i.MX 7Dual's additional features over i.MX 7Solo are:
>> - Second Cortex-A7 core
>> - Second Gigabit Ethernet controller
>> - EPD (Electronc Paper Display, not yet part of the device tree)
>> - PCIe (not yet part of the device tree)
>> - Additional USB2.0 OTG controller
>>
>> Signed-off-by: Stefan Agner 
>> ---
>>  arch/arm/boot/dts/imx7d.dtsi | 923 
>> +++
>>  arch/arm/boot/dts/imx7s.dtsi | 880 +
>>  2 files changed, 928 insertions(+), 875 deletions(-)
> 
> We should probably have a beforehand patch to rename the file, so that
> we can avoid this dramatic diffstat.

If I delete imx7d.dtsi and add imx7s.dtsi in a single commit, and then
readd imx7d.dtsi in a second commit, it would break bisect-ability. All
existing device trees which include imx7d.dtsi would fail to build.

As soon as I keep imx7d.dtsi around, even if it only includes
imx7s.dtsi, git diff stats look dramatic with git default options.

Using -B -M makes the diff stat a bit less dramatic:

 arch/arm/boot/dts/imx7d.dtsi | 1083
+++---
 arch/arm/boot/dts/{imx7d.dtsi => imx7s.dtsi} |   79 +--
 2 files changed, 130 insertions(+), 1032 deletions(-)

However, that is only for stats, and only when using those options...

I would rather prefer to keep it in a single commit. What do you think?

--
Stefan


ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!

2016-06-18 Thread kbuild test robot
Hi,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c141afd1a28793c08c88325aa64b773be6f79ccf
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   5 months ago
config: m32r-allmodconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 420520766a796d3607639ba1e4fb1aadeadd
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   ERROR: "bad_dma_ops" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined!
   ERROR: "dma_common_mmap" [sound/soc/qcom/snd-soc-lpass-platform.ko] 
undefined!
   ERROR: "bad_dma_ops" [sound/soc/kirkwood/snd-soc-kirkwood.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/atmel/snd-soc-atmel-pcm-pdc.ko] undefined!
>> ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!
>> ERROR: "dma_common_mmap" [sound/core/snd-pcm.ko] undefined!
>> ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>> ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-plat-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-mtk.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ohci-platform.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ehci-platform.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_free" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_create" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th.ko] undefined!
>> ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!

2016-06-18 Thread kbuild test robot
Hi,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c141afd1a28793c08c88325aa64b773be6f79ccf
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   5 months ago
config: m32r-allmodconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 420520766a796d3607639ba1e4fb1aadeadd
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   ERROR: "bad_dma_ops" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined!
   ERROR: "dma_common_mmap" [sound/soc/qcom/snd-soc-lpass-platform.ko] 
undefined!
   ERROR: "bad_dma_ops" [sound/soc/kirkwood/snd-soc-kirkwood.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!
   ERROR: "bad_dma_ops" [sound/soc/atmel/snd-soc-atmel-pcm-pdc.ko] undefined!
>> ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!
>> ERROR: "dma_common_mmap" [sound/core/snd-pcm.ko] undefined!
>> ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>> ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-plat-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-mtk.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/xhci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ohci-platform.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/ohci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/fotg210-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ehci-platform.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/host/ehci-hcd.ko] undefined!
   ERROR: "usb_gadget_map_request" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "usb_gadget_unmap_request" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/dwc2/dwc2.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_free" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_create" [drivers/usb/core/usbcore.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/scsi/hisi_sas/hisi_sas_v1_hw.ko] undefined!
   ERROR: "dma_pool_destroy" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_free" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_alloc" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "dma_pool_create" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
   ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined!
   ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th.ko] undefined!
>> ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


[PATCH/RFC 3/3] arm64: dts: r8a7795: Support shared irq for thermal sensors

2016-06-18 Thread Khiem Nguyen
This patch adds the shared interrupts for thermal sensors
TSC1/TSC2/TSC3.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index db203db..761df2b 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -1628,7 +1628,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe6198000 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
@@ -1639,7 +1640,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe61a 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
@@ -1650,7 +1652,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe61a8000 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
-- 
1.9.1



[PATCH/RFC 3/3] arm64: dts: r8a7795: Support shared irq for thermal sensors

2016-06-18 Thread Khiem Nguyen
This patch adds the shared interrupts for thermal sensors
TSC1/TSC2/TSC3.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index db203db..761df2b 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -1628,7 +1628,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe6198000 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
@@ -1639,7 +1640,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe61a 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
@@ -1650,7 +1652,8 @@
compatible = "renesas,thermal-r8a7795",
"renesas,rcar-gen3-thermal";
reg = <0 0xe61a8000 0 0x5c>;
-   interrupts = ;
+   interrupts = ,
+;
clocks = < CPG_MOD 522>;
power-domains = < R8A7795_PD_ALWAYS_ON>;
#thermal-sensor-cells = <0>;
-- 
1.9.1



[PATCH/RFC 2/3] thermal: rcar_gen3_thermal: Modify the way to detect the interrupts

2016-06-18 Thread Khiem Nguyen
The current implementation is that the interrupt I/F and thermal
sensor are assigned with one-to-one. So it can't be set the more
interrupt trigger to one thermal sensor. Also, the interrupt is
detected by a little bit change in temperature.

In order to solve the above problems, the interrupt of thermal
sensor is changed as below.
  - Change the shared interrupt in each thermal sensors.
  - Detect the interrupt when the temperature is changed
one degree up and down.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/rcar_gen3_thermal.c | 69 +++--
 1 file changed, 44 insertions(+), 25 deletions(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
index e640a14..dc5f231 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -63,6 +63,11 @@
 
 #define CTEMP_MASK 0xFFF
 
+#define IRQ_TEMP1_BIT  (0x1 << 0)
+#define IRQ_TEMP2_BIT  (0x1 << 1)
+#define IRQ_TEMPD1_BIT (0x1 << 3)
+#define IRQ_TEMPD2_BIT (0x1 << 4)
+
 #define MCELSIUS(temp) ((temp) * 1000)
 #define TEMP_IRQ_SHIFT(tsc_id) (0x1 << tsc_id)
 #define TEMPD_IRQ_SHIFT(tsc_id)(0x1 << (tsc_id + 3))
@@ -216,28 +221,42 @@ int _linear_temp_converter(struct equation_coefs coef,
return _round_temp(temp);
 }
 
+int _linear_celsius_to_temp(struct equation_coefs coef,
+   int ctemp)
+{
+   int temp_code, temp1, temp2;
+
+   temp1 = (ctemp * coef.a1 / 1000 + coef.b1) / 1000;
+   temp2 = (ctemp * coef.a2 / 1000 + coef.b2) / 1000;
+   temp_code = (temp1 + temp2) / 2;
+
+   return temp_code;
+}
+
 /*
  * Zone device functions
  */
 static int rcar_gen3_thermal_update_temp(struct rcar_gen3_thermal_priv *priv)
 {
u32 ctemp;
-   int i;
unsigned long flags;
-   u32 reg = REG_GEN3_IRQTEMP1 + (priv->id * 4);
+   int temp_cel, temp_code;
 
spin_lock_irqsave(>lock, flags);
 
-   for (i = 0; i < 256; i++) {
-   ctemp = thermal_reg_read(priv, REG_GEN3_TEMP) & CTEMP_MASK;
-   if (rcar_has_irq_support(priv)) {
-   thermal_reg_write(priv, reg, ctemp);
-   if (thermal_reg_read(priv, REG_GEN3_IRQSTR) != 0)
-   break;
-   } else
-   break;
+   ctemp = thermal_reg_read(priv, REG_GEN3_TEMP) & CTEMP_MASK;
+   if (rcar_has_irq_support(priv)) {
+   temp_cel = _linear_temp_converter(priv->coef, ctemp);
+
+   /* set the interrupts to exceed the temperature */
+   temp_code = _linear_celsius_to_temp(priv->coef,
+   temp_cel + MCELSIUS(1));
+   thermal_reg_write(priv, REG_GEN3_IRQTEMP1, temp_code);
 
-   udelay(150);
+   /* set the interrupts to fall below the temperature */
+   temp_code = _linear_celsius_to_temp(priv->coef,
+   temp_cel - MCELSIUS(1));
+   thermal_reg_write(priv, REG_GEN3_IRQTEMP2, temp_code);
}
 
priv->ctemp = ctemp;
@@ -283,14 +302,14 @@ static int r8a7795_thermal_init(struct 
rcar_gen3_thermal_priv *priv)
 
thermal_reg_write(priv, REG_GEN3_CTSR, PONM);
thermal_reg_write(priv, REG_GEN3_IRQCTL, 0x3F);
-   thermal_reg_write(priv, REG_GEN3_IRQEN, TEMP_IRQ_SHIFT(priv->id) |
-   TEMPD_IRQ_SHIFT(priv->id));
+   thermal_reg_write(priv, REG_GEN3_IRQEN,
+  IRQ_TEMP1_BIT | IRQ_TEMPD2_BIT);
thermal_reg_write(priv, REG_GEN3_CTSR,
-   PONM | AOUT | THBGR | VMEN);
+  PONM | AOUT | THBGR | VMEN);
udelay(100);
 
thermal_reg_write(priv, REG_GEN3_CTSR,
-   PONM | AOUT | THBGR | VMEN | VMST | THSST);
+  PONM | AOUT | THBGR | VMEN | VMST | THSST);
 
spin_unlock_irqrestore(>lock, flags);
 
@@ -305,11 +324,11 @@ static int r8a7796_thermal_init(struct 
rcar_gen3_thermal_priv *priv)
spin_lock_irqsave(>lock, flags);
thermal_reg_write(priv, REG_GEN3_THCTR,  0x0);
udelay(1000);
+
thermal_reg_write(priv, REG_GEN3_IRQCTL, 0x3F);
-   thermal_reg_write(priv, REG_GEN3_IRQEN, TEMP_IRQ_SHIFT(priv->id) |
-   TEMPD_IRQ_SHIFT(priv->id));
-   thermal_reg_write(priv, REG_GEN3_THCTR,
-   CTCTL | THCNTSEN(BIT_LEN_12));
+   thermal_reg_write(priv, REG_GEN3_IRQEN,
+  IRQ_TEMP1_BIT | IRQ_TEMPD2_BIT);
+   thermal_reg_write(priv, REG_GEN3_THCTR, CTCTL | THCNTSEN(BIT_LEN_12));
reg_val = thermal_reg_read(priv, REG_GEN3_THCTR);
reg_val &= ~CTCTL;
reg_val |= 

[PATCH/RFC 2/3] thermal: rcar_gen3_thermal: Modify the way to detect the interrupts

2016-06-18 Thread Khiem Nguyen
The current implementation is that the interrupt I/F and thermal
sensor are assigned with one-to-one. So it can't be set the more
interrupt trigger to one thermal sensor. Also, the interrupt is
detected by a little bit change in temperature.

In order to solve the above problems, the interrupt of thermal
sensor is changed as below.
  - Change the shared interrupt in each thermal sensors.
  - Detect the interrupt when the temperature is changed
one degree up and down.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/rcar_gen3_thermal.c | 69 +++--
 1 file changed, 44 insertions(+), 25 deletions(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
index e640a14..dc5f231 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -63,6 +63,11 @@
 
 #define CTEMP_MASK 0xFFF
 
+#define IRQ_TEMP1_BIT  (0x1 << 0)
+#define IRQ_TEMP2_BIT  (0x1 << 1)
+#define IRQ_TEMPD1_BIT (0x1 << 3)
+#define IRQ_TEMPD2_BIT (0x1 << 4)
+
 #define MCELSIUS(temp) ((temp) * 1000)
 #define TEMP_IRQ_SHIFT(tsc_id) (0x1 << tsc_id)
 #define TEMPD_IRQ_SHIFT(tsc_id)(0x1 << (tsc_id + 3))
@@ -216,28 +221,42 @@ int _linear_temp_converter(struct equation_coefs coef,
return _round_temp(temp);
 }
 
+int _linear_celsius_to_temp(struct equation_coefs coef,
+   int ctemp)
+{
+   int temp_code, temp1, temp2;
+
+   temp1 = (ctemp * coef.a1 / 1000 + coef.b1) / 1000;
+   temp2 = (ctemp * coef.a2 / 1000 + coef.b2) / 1000;
+   temp_code = (temp1 + temp2) / 2;
+
+   return temp_code;
+}
+
 /*
  * Zone device functions
  */
 static int rcar_gen3_thermal_update_temp(struct rcar_gen3_thermal_priv *priv)
 {
u32 ctemp;
-   int i;
unsigned long flags;
-   u32 reg = REG_GEN3_IRQTEMP1 + (priv->id * 4);
+   int temp_cel, temp_code;
 
spin_lock_irqsave(>lock, flags);
 
-   for (i = 0; i < 256; i++) {
-   ctemp = thermal_reg_read(priv, REG_GEN3_TEMP) & CTEMP_MASK;
-   if (rcar_has_irq_support(priv)) {
-   thermal_reg_write(priv, reg, ctemp);
-   if (thermal_reg_read(priv, REG_GEN3_IRQSTR) != 0)
-   break;
-   } else
-   break;
+   ctemp = thermal_reg_read(priv, REG_GEN3_TEMP) & CTEMP_MASK;
+   if (rcar_has_irq_support(priv)) {
+   temp_cel = _linear_temp_converter(priv->coef, ctemp);
+
+   /* set the interrupts to exceed the temperature */
+   temp_code = _linear_celsius_to_temp(priv->coef,
+   temp_cel + MCELSIUS(1));
+   thermal_reg_write(priv, REG_GEN3_IRQTEMP1, temp_code);
 
-   udelay(150);
+   /* set the interrupts to fall below the temperature */
+   temp_code = _linear_celsius_to_temp(priv->coef,
+   temp_cel - MCELSIUS(1));
+   thermal_reg_write(priv, REG_GEN3_IRQTEMP2, temp_code);
}
 
priv->ctemp = ctemp;
@@ -283,14 +302,14 @@ static int r8a7795_thermal_init(struct 
rcar_gen3_thermal_priv *priv)
 
thermal_reg_write(priv, REG_GEN3_CTSR, PONM);
thermal_reg_write(priv, REG_GEN3_IRQCTL, 0x3F);
-   thermal_reg_write(priv, REG_GEN3_IRQEN, TEMP_IRQ_SHIFT(priv->id) |
-   TEMPD_IRQ_SHIFT(priv->id));
+   thermal_reg_write(priv, REG_GEN3_IRQEN,
+  IRQ_TEMP1_BIT | IRQ_TEMPD2_BIT);
thermal_reg_write(priv, REG_GEN3_CTSR,
-   PONM | AOUT | THBGR | VMEN);
+  PONM | AOUT | THBGR | VMEN);
udelay(100);
 
thermal_reg_write(priv, REG_GEN3_CTSR,
-   PONM | AOUT | THBGR | VMEN | VMST | THSST);
+  PONM | AOUT | THBGR | VMEN | VMST | THSST);
 
spin_unlock_irqrestore(>lock, flags);
 
@@ -305,11 +324,11 @@ static int r8a7796_thermal_init(struct 
rcar_gen3_thermal_priv *priv)
spin_lock_irqsave(>lock, flags);
thermal_reg_write(priv, REG_GEN3_THCTR,  0x0);
udelay(1000);
+
thermal_reg_write(priv, REG_GEN3_IRQCTL, 0x3F);
-   thermal_reg_write(priv, REG_GEN3_IRQEN, TEMP_IRQ_SHIFT(priv->id) |
-   TEMPD_IRQ_SHIFT(priv->id));
-   thermal_reg_write(priv, REG_GEN3_THCTR,
-   CTCTL | THCNTSEN(BIT_LEN_12));
+   thermal_reg_write(priv, REG_GEN3_IRQEN,
+  IRQ_TEMP1_BIT | IRQ_TEMPD2_BIT);
+   thermal_reg_write(priv, REG_GEN3_THCTR, CTCTL | THCNTSEN(BIT_LEN_12));
reg_val = thermal_reg_read(priv, REG_GEN3_THCTR);
reg_val &= ~CTCTL;
reg_val |= THSST;
@@ -334,8 +353,7 @@ static void _thermal_irq_ctrl(struct 

[PATCH/RFC 1/3] thermal: rcar_gen3_thermal: Modify the shared irq with initialization

2016-06-18 Thread Khiem Nguyen
In R-CAR Gen3 series, it has some thermal sensors. The interrupt I/F
that can be used in thermal sensors is three. So it should be used
the interrupt I/F as shared.

This patch changes the shared settings for the thermal interrupts.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/rcar_gen3_thermal.c | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
index a9a372b..e640a14 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -416,6 +416,7 @@ static int rcar_gen3_thermal_probe(struct platform_device 
*pdev)
int ret = -ENODEV;
int idle;
struct device_node *tz_nd, *tmp_nd;
+   int i, irq_cnt;
 
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -489,13 +490,18 @@ static int rcar_gen3_thermal_probe(struct platform_device 
*pdev)
rcar_gen3_thermal_irq_enable(priv);
 
/* Interrupt */
-   if (irq) {
-   ret = devm_request_irq(dev, irq->start,
-   rcar_gen3_thermal_irq, 0,
-  dev_name(dev), priv);
-   if (ret) {
-   dev_err(dev, "IRQ request failed\n ");
-   goto error_unregister;
+   if (rcar_has_irq_support(priv)) {
+   irq_cnt = platform_irq_count(pdev);
+   for (i = 0; i < irq_cnt; i++) {
+   irq = platform_get_resource(pdev, IORESOURCE_IRQ, i);
+   ret = devm_request_irq(dev, irq->start,
+  rcar_gen3_thermal_irq,
+  IRQF_SHARED,
+  dev_name(dev), priv);
+   if (ret) {
+   dev_err(dev, "IRQ request failed\n ");
+   goto error_unregister;
+   }
}
}
 
-- 
1.9.1



[PATCH/RFC 1/3] thermal: rcar_gen3_thermal: Modify the shared irq with initialization

2016-06-18 Thread Khiem Nguyen
In R-CAR Gen3 series, it has some thermal sensors. The interrupt I/F
that can be used in thermal sensors is three. So it should be used
the interrupt I/F as shared.

This patch changes the shared settings for the thermal interrupts.

Signed-off-by: Gaku Inami 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/rcar_gen3_thermal.c | 20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
index a9a372b..e640a14 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -416,6 +416,7 @@ static int rcar_gen3_thermal_probe(struct platform_device 
*pdev)
int ret = -ENODEV;
int idle;
struct device_node *tz_nd, *tmp_nd;
+   int i, irq_cnt;
 
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -489,13 +490,18 @@ static int rcar_gen3_thermal_probe(struct platform_device 
*pdev)
rcar_gen3_thermal_irq_enable(priv);
 
/* Interrupt */
-   if (irq) {
-   ret = devm_request_irq(dev, irq->start,
-   rcar_gen3_thermal_irq, 0,
-  dev_name(dev), priv);
-   if (ret) {
-   dev_err(dev, "IRQ request failed\n ");
-   goto error_unregister;
+   if (rcar_has_irq_support(priv)) {
+   irq_cnt = platform_irq_count(pdev);
+   for (i = 0; i < irq_cnt; i++) {
+   irq = platform_get_resource(pdev, IORESOURCE_IRQ, i);
+   ret = devm_request_irq(dev, irq->start,
+  rcar_gen3_thermal_irq,
+  IRQF_SHARED,
+  dev_name(dev), priv);
+   if (ret) {
+   dev_err(dev, "IRQ request failed\n ");
+   goto error_unregister;
+   }
}
}
 
-- 
1.9.1



[PATCH/RFC 0/3] thermal: rcar_gen3_thermal: Apply shared interrupts for thermal sensors

2016-06-18 Thread Khiem Nguyen
This patchset intents to improve thermal driver operation in interrupt mode,
which has been introduced in [1].

The original idea is using 1 interrupt for each thermal sensor, to detect both 
up
and down temperature. It caused issue when the temperature is changing rapidly.

The new idea is about using shared interrupt I/F for all three sensors.
Two interrupts will be set to detect temperature up and down. When interrupt 
occurs,
the temperature will be updated in all 3 sensors, if the temperature value is 
changed. 

All comments are welcome.

[1]
[PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support
https://www.spinics.net/lists/kernel/msg2282663.html

--
Gaku Inami (3):
  thermal: rcar_gen3_thermal: Modify the shared irq with initialization
  thermal: rcar_gen3_thermal: Modify the way to detect the interrupts
  arm64: dts: r8a7795: Support shared irq for thermal sensors

 arch/arm64/boot/dts/renesas/r8a7795.dtsi |  9 ++--
 drivers/thermal/rcar_gen3_thermal.c  | 89 
 2 files changed, 63 insertions(+), 35 deletions(-)

-- 
1.9.1



[PATCH/RFC 0/3] thermal: rcar_gen3_thermal: Apply shared interrupts for thermal sensors

2016-06-18 Thread Khiem Nguyen
This patchset intents to improve thermal driver operation in interrupt mode,
which has been introduced in [1].

The original idea is using 1 interrupt for each thermal sensor, to detect both 
up
and down temperature. It caused issue when the temperature is changing rapidly.

The new idea is about using shared interrupt I/F for all three sensors.
Two interrupts will be set to detect temperature up and down. When interrupt 
occurs,
the temperature will be updated in all 3 sensors, if the temperature value is 
changed. 

All comments are welcome.

[1]
[PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support
https://www.spinics.net/lists/kernel/msg2282663.html

--
Gaku Inami (3):
  thermal: rcar_gen3_thermal: Modify the shared irq with initialization
  thermal: rcar_gen3_thermal: Modify the way to detect the interrupts
  arm64: dts: r8a7795: Support shared irq for thermal sensors

 arch/arm64/boot/dts/renesas/r8a7795.dtsi |  9 ++--
 drivers/thermal/rcar_gen3_thermal.c  | 89 
 2 files changed, 63 insertions(+), 35 deletions(-)

-- 
1.9.1



Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-18 Thread David Miller
From: Anatoly Pugachev 
Date: Thu, 16 Jun 2016 13:02:07 +0300

> bisected to git commit 63e3027

That's a merge commit that adds 100 different commits, and this happened
way back in March.

Please find the exact dword access in:

drivers/pci/pcie/portdrv_{core,pci,bus}.c

that triggers this unaligned access so we can debug this further.

Thanks.


Re: 4.6-rc*: Kernel unaligned access at pci_bus_read_config_dword+0x64/0x80

2016-06-18 Thread David Miller
From: Anatoly Pugachev 
Date: Thu, 16 Jun 2016 13:02:07 +0300

> bisected to git commit 63e3027

That's a merge commit that adds 100 different commits, and this happened
way back in March.

Please find the exact dword access in:

drivers/pci/pcie/portdrv_{core,pci,bus}.c

that triggers this unaligned access so we can debug this further.

Thanks.


Re: PATCH 1/1] AX.25: Close socket connection on session completion

2016-06-18 Thread David Miller
From: Basil Gunn 
Date: Thu, 16 Jun 2016 09:42:30 -0700

> A socket connection made in ax.25 is not closed when session is
> completed.  The heartbeat timer is stopped prematurely and this is
> where the socket gets closed. Allow heatbeat timer to run to close
> socket. Symptom occurs in kernels >= 4.2.0
> 
> Originally sent 6/15/2016. Resend with distribution list matching
> scripts/maintainer.pl output.
> 
> Signed-off-by: Basil Gunn 

Applied.


Re: PATCH 1/1] AX.25: Close socket connection on session completion

2016-06-18 Thread David Miller
From: Basil Gunn 
Date: Thu, 16 Jun 2016 09:42:30 -0700

> A socket connection made in ax.25 is not closed when session is
> completed.  The heartbeat timer is stopped prematurely and this is
> where the socket gets closed. Allow heatbeat timer to run to close
> socket. Symptom occurs in kernels >= 4.2.0
> 
> Originally sent 6/15/2016. Resend with distribution list matching
> scripts/maintainer.pl output.
> 
> Signed-off-by: Basil Gunn 

Applied.


[PATCH 3/4] staging/lustre: Remove unnecessary space after a cast

2016-06-18 Thread Oleg Drokin
This patch fixes all checkpatch occurences of
"CHECK: No space is necessary after a cast"
in Lustre code.

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/include/linux/lnet/lib-dlc.h   |  2 +-
 drivers/staging/lustre/include/linux/lnet/types.h |  4 ++--
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h   |  2 +-
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c|  2 +-
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c   |  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c|  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c |  6 +++---
 drivers/staging/lustre/lnet/lnet/api-ni.c |  2 +-
 drivers/staging/lustre/lnet/lnet/module.c |  2 +-
 drivers/staging/lustre/lustre/include/lustre_sec.h|  6 +++---
 drivers/staging/lustre/lustre/llite/file.c|  2 +-
 drivers/staging/lustre/lustre/llite/vvp_dev.c |  2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/obdclass/cl_object.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/nrs.c|  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c|  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c   |  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c  | 10 +-
 22 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h 
b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
index 6ce9acc..dfff170 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
@@ -35,7 +35,7 @@
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN   128
 #define LNET_MAX_SHOW_NUM_CPT  128
-#define LNET_UNDEFINED_HOPS((__u32) -1)
+#define LNET_UNDEFINED_HOPS((__u32)(-1))
 
 struct lnet_ioctl_config_lnd_cmn_tunables {
__u32 lct_version;
diff --git a/drivers/staging/lustre/include/linux/lnet/types.h 
b/drivers/staging/lustre/include/linux/lnet/types.h
index 1c679cb..e098b6c 100644
--- a/drivers/staging/lustre/include/linux/lnet/types.h
+++ b/drivers/staging/lustre/include/linux/lnet/types.h
@@ -68,9 +68,9 @@ typedef __u64 lnet_nid_t;
 typedef __u32 lnet_pid_t;
 
 /** wildcard NID that matches any end-point address */
-#define LNET_NID_ANY   ((lnet_nid_t) -1)
+#define LNET_NID_ANY   ((lnet_nid_t)(-1))
 /** wildcard PID that matches any lnet_pid_t */
-#define LNET_PID_ANY   ((lnet_pid_t) -1)
+#define LNET_PID_ANY   ((lnet_pid_t)(-1))
 
 #define LNET_PID_RESERVED 0xf000 /* reserved bits in PID */
 #define LNET_PID_USERFLAG 0x8000 /* set in userspace peers */
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index b66ab79..078a0c3 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -98,7 +98,7 @@ extern struct kib_tunables  kiblnd_tunables;
 #define IBLND_CREDIT_HIGHWATER_V1 7 /* V1 only : when eagerly to return 
credits */
 
 #define IBLND_CREDITS_DEFAULT 8 /* default # of peer credits */
-#define IBLND_CREDITS_MAX((typeof(((struct kib_msg *) 
0)->ibm_credits)) - 1)  /* Max # of peer credits */
+#define IBLND_CREDITS_MAX((typeof(((struct kib_msg *)0)->ibm_credits)) 
- 1)  /* Max # of peer credits */
 
 /* when eagerly to return credits */
 #define IBLND_CREDITS_HIGHWATER(t, v)  ((v) == IBLND_MSG_VERSION_1 ? \
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index adc346a..e32e43b 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1103,7 +1103,7 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx 
*tx, int type,
 
wrknob = min(min(kiblnd_rd_frag_size(srcrd, srcidx),
 kiblnd_rd_frag_size(dstrd, dstidx)),
-(__u32) resid);
+(__u32)resid);
 
sge = >tx_sge[tx->tx_nwrq];
sge->addr   = kiblnd_rd_frag_addr(srcrd, srcidx);
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index d4e7dae..07ec540 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -475,7 +475,7 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, 
__u32 ipaddr, int port)

[PATCH 3/4] staging/lustre: Remove unnecessary space after a cast

2016-06-18 Thread Oleg Drokin
This patch fixes all checkpatch occurences of
"CHECK: No space is necessary after a cast"
in Lustre code.

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/include/linux/lnet/lib-dlc.h   |  2 +-
 drivers/staging/lustre/include/linux/lnet/types.h |  4 ++--
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h   |  2 +-
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c|  2 +-
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c   |  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c|  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c |  6 +++---
 drivers/staging/lustre/lnet/lnet/api-ni.c |  2 +-
 drivers/staging/lustre/lnet/lnet/module.c |  2 +-
 drivers/staging/lustre/lustre/include/lustre_sec.h|  6 +++---
 drivers/staging/lustre/lustre/llite/file.c|  2 +-
 drivers/staging/lustre/lustre/llite/vvp_dev.c |  2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/obdclass/cl_object.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/nrs.c|  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c|  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c   |  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c  | 10 +-
 22 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h 
b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
index 6ce9acc..dfff170 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h
@@ -35,7 +35,7 @@
 #define MAX_NUM_SHOW_ENTRIES   32
 #define LNET_MAX_STR_LEN   128
 #define LNET_MAX_SHOW_NUM_CPT  128
-#define LNET_UNDEFINED_HOPS((__u32) -1)
+#define LNET_UNDEFINED_HOPS((__u32)(-1))
 
 struct lnet_ioctl_config_lnd_cmn_tunables {
__u32 lct_version;
diff --git a/drivers/staging/lustre/include/linux/lnet/types.h 
b/drivers/staging/lustre/include/linux/lnet/types.h
index 1c679cb..e098b6c 100644
--- a/drivers/staging/lustre/include/linux/lnet/types.h
+++ b/drivers/staging/lustre/include/linux/lnet/types.h
@@ -68,9 +68,9 @@ typedef __u64 lnet_nid_t;
 typedef __u32 lnet_pid_t;
 
 /** wildcard NID that matches any end-point address */
-#define LNET_NID_ANY   ((lnet_nid_t) -1)
+#define LNET_NID_ANY   ((lnet_nid_t)(-1))
 /** wildcard PID that matches any lnet_pid_t */
-#define LNET_PID_ANY   ((lnet_pid_t) -1)
+#define LNET_PID_ANY   ((lnet_pid_t)(-1))
 
 #define LNET_PID_RESERVED 0xf000 /* reserved bits in PID */
 #define LNET_PID_USERFLAG 0x8000 /* set in userspace peers */
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
index b66ab79..078a0c3 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
@@ -98,7 +98,7 @@ extern struct kib_tunables  kiblnd_tunables;
 #define IBLND_CREDIT_HIGHWATER_V1 7 /* V1 only : when eagerly to return 
credits */
 
 #define IBLND_CREDITS_DEFAULT 8 /* default # of peer credits */
-#define IBLND_CREDITS_MAX((typeof(((struct kib_msg *) 
0)->ibm_credits)) - 1)  /* Max # of peer credits */
+#define IBLND_CREDITS_MAX((typeof(((struct kib_msg *)0)->ibm_credits)) 
- 1)  /* Max # of peer credits */
 
 /* when eagerly to return credits */
 #define IBLND_CREDITS_HIGHWATER(t, v)  ((v) == IBLND_MSG_VERSION_1 ? \
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index adc346a..e32e43b 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1103,7 +1103,7 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx 
*tx, int type,
 
wrknob = min(min(kiblnd_rd_frag_size(srcrd, srcidx),
 kiblnd_rd_frag_size(dstrd, dstidx)),
-(__u32) resid);
+(__u32)resid);
 
sge = >tx_sge[tx->tx_nwrq];
sge->addr   = kiblnd_rd_frag_addr(srcrd, srcidx);
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c 
b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index d4e7dae..07ec540 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -475,7 +475,7 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, 
__u32 ipaddr, int port)
write_lock_bh(_data.ksnd_global_lock);
 
/* always 

[PATCH 4/4] staging/lustre: Update FID documentation link.

2016-06-18 Thread Oleg Drokin
When OpenSFS took over lustre.org, there was some reshuffling.
FIDs on ZFS document is now at
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
instead of the old location, so update comments accordingly.

Signed-off-by: Oleg Drokin 
Reported-by: Xose Vazquez Perez 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 drivers/staging/lustre/lustre/include/lustre_fid.h| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index bf8a0cd..fac7215 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -382,7 +382,7 @@ static inline __u64 fid_ver_oid(const struct lu_fid *fid)
  * used for other purposes and not risk collisions with existing inodes.
  *
  * Different FID Format
- * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs#NEW.0
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  */
 enum fid_seq {
FID_SEQ_OST_MDT0= 0,
@@ -700,7 +700,7 @@ static inline int fid_set_id(struct lu_fid *fid, __u64 oid)
  * be passed through unchanged.  Only legacy OST objects in "group 0"
  * will be mapped into the IDIF namespace so that they can fit into the
  * struct lu_fid fields without loss.  For reference see:
- * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  */
 static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid,
   __u32 ost_idx)
diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h 
b/drivers/staging/lustre/lustre/include/lustre_fid.h
index cbdd91a..743671a 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -41,7 +41,7 @@
  *
  * @{
  *
- * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  * describes the FID namespace and interoperability requirements for FIDs.
  * The important parts of that document are included here for reference.
  *
-- 
2.7.4



[PATCH 4/4] staging/lustre: Update FID documentation link.

2016-06-18 Thread Oleg Drokin
When OpenSFS took over lustre.org, there was some reshuffling.
FIDs on ZFS document is now at
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
instead of the old location, so update comments accordingly.

Signed-off-by: Oleg Drokin 
Reported-by: Xose Vazquez Perez 
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 drivers/staging/lustre/lustre/include/lustre_fid.h| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h 
b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index bf8a0cd..fac7215 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -382,7 +382,7 @@ static inline __u64 fid_ver_oid(const struct lu_fid *fid)
  * used for other purposes and not risk collisions with existing inodes.
  *
  * Different FID Format
- * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs#NEW.0
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  */
 enum fid_seq {
FID_SEQ_OST_MDT0= 0,
@@ -700,7 +700,7 @@ static inline int fid_set_id(struct lu_fid *fid, __u64 oid)
  * be passed through unchanged.  Only legacy OST objects in "group 0"
  * will be mapped into the IDIF namespace so that they can fit into the
  * struct lu_fid fields without loss.  For reference see:
- * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  */
 static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid,
   __u32 ost_idx)
diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h 
b/drivers/staging/lustre/lustre/include/lustre_fid.h
index cbdd91a..743671a 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -41,7 +41,7 @@
  *
  * @{
  *
- * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
+ * 
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
  * describes the FID namespace and interoperability requirements for FIDs.
  * The important parts of that document are included here for reference.
  *
-- 
2.7.4



[PATCH 0/4] Some Lustre style cleanups

2016-06-18 Thread Oleg Drokin
These are just some more cleanups in Lustre styel and comments

Emoly Liu (2):
  staging/lustre: Fix blank line before EXPORT_SYMBOL()
  staging/lustre: Keep logical continuations on the previous line

Oleg Drokin (2):
  staging/lustre: Remove unnecessary space after a cast
  staging/lustre: Update FID documentation link.

 drivers/staging/lustre/include/linux/lnet/lib-dlc.h   |  2 +-
 drivers/staging/lustre/include/linux/lnet/types.h |  4 ++--
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h   |  2 +-
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c|  2 +-
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c   |  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c|  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c |  6 +++---
 drivers/staging/lustre/lnet/lnet/api-ni.c |  2 +-
 drivers/staging/lustre/lnet/lnet/module.c |  2 +-
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h |  4 ++--
 drivers/staging/lustre/lustre/include/lustre_fid.h|  2 +-
 drivers/staging/lustre/lustre/include/lustre_sec.h|  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c   |  9 -
 drivers/staging/lustre/lustre/llite/file.c|  2 +-
 drivers/staging/lustre/lustre/llite/vvp_dev.c |  2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/obdclass/cl_object.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c   |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c   |  1 -
 drivers/staging/lustre/lustre/ptlrpc/nrs.c|  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c|  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c   |  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c  | 10 +-
 26 files changed, 48 insertions(+), 50 deletions(-)

-- 
2.7.4



[PATCH 1/4] staging/lustre: Fix blank line before EXPORT_SYMBOL()

2016-06-18 Thread Oleg Drokin
From: Emoly Liu 

This patch fixes one checkpatch warning in lustre:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c 
b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index fe6f7a6..bc93b75 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
@@ -1158,7 +1158,6 @@ void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int 
bytes)
 
lprocfs_counter_add(svc_stats, idx, bytes);
 }
-
 EXPORT_SYMBOL(ptlrpc_lprocfs_brw);
 
 void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc)
-- 
2.7.4



[PATCH 2/4] staging/lustre: Keep logical continuations on the previous line

2016-06-18 Thread Oleg Drokin
From: Emoly Liu 

This patch fixes all checkpatch occurences of
"CHECK: Logical continuations should be on the previous line"
in Lustre code.

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 9 -
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index 38c507f..d6b61bc 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -255,14 +255,13 @@ reprocess:
 * overflow and underflow.
 */
if ((new->l_policy_data.l_flock.start >
-(lock->l_policy_data.l_flock.end + 1))
-   && (lock->l_policy_data.l_flock.end !=
-   OBD_OBJECT_EOF))
+(lock->l_policy_data.l_flock.end + 1)) &&
+   (lock->l_policy_data.l_flock.end != OBD_OBJECT_EOF))
continue;
 
if ((new->l_policy_data.l_flock.end <
-(lock->l_policy_data.l_flock.start - 1))
-   && (lock->l_policy_data.l_flock.start != 0))
+(lock->l_policy_data.l_flock.start - 1)) &&
+   (lock->l_policy_data.l_flock.start != 0))
break;
 
if (new->l_policy_data.l_flock.start <
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 694c58e..f1c41a1 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1017,8 +1017,8 @@ int class_process_proc_param(char *prefix, struct 
lprocfs_vars *lvars,
/* Search proc entries */
while (lvars[j].name) {
var = [j];
-   if (!class_match_param(key, var->name, NULL)
-   && keylen == strlen(var->name)) {
+   if (!class_match_param(key, var->name, NULL) &&
+   keylen == strlen(var->name)) {
matched++;
rc = -EROFS;
if (var->fops && var->fops->write) {
-- 
2.7.4



[PATCH 1/4] staging/lustre: Fix blank line before EXPORT_SYMBOL()

2016-06-18 Thread Oleg Drokin
From: Emoly Liu 

This patch fixes one checkpatch warning in lustre:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c 
b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index fe6f7a6..bc93b75 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
@@ -1158,7 +1158,6 @@ void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int 
bytes)
 
lprocfs_counter_add(svc_stats, idx, bytes);
 }
-
 EXPORT_SYMBOL(ptlrpc_lprocfs_brw);
 
 void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc)
-- 
2.7.4



[PATCH 2/4] staging/lustre: Keep logical continuations on the previous line

2016-06-18 Thread Oleg Drokin
From: Emoly Liu 

This patch fixes all checkpatch occurences of
"CHECK: Logical continuations should be on the previous line"
in Lustre code.

Signed-off-by: Emoly Liu 
Signed-off-by: Oleg Drokin 
---
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 9 -
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c 
b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index 38c507f..d6b61bc 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -255,14 +255,13 @@ reprocess:
 * overflow and underflow.
 */
if ((new->l_policy_data.l_flock.start >
-(lock->l_policy_data.l_flock.end + 1))
-   && (lock->l_policy_data.l_flock.end !=
-   OBD_OBJECT_EOF))
+(lock->l_policy_data.l_flock.end + 1)) &&
+   (lock->l_policy_data.l_flock.end != OBD_OBJECT_EOF))
continue;
 
if ((new->l_policy_data.l_flock.end <
-(lock->l_policy_data.l_flock.start - 1))
-   && (lock->l_policy_data.l_flock.start != 0))
+(lock->l_policy_data.l_flock.start - 1)) &&
+   (lock->l_policy_data.l_flock.start != 0))
break;
 
if (new->l_policy_data.l_flock.start <
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c 
b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 694c58e..f1c41a1 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1017,8 +1017,8 @@ int class_process_proc_param(char *prefix, struct 
lprocfs_vars *lvars,
/* Search proc entries */
while (lvars[j].name) {
var = [j];
-   if (!class_match_param(key, var->name, NULL)
-   && keylen == strlen(var->name)) {
+   if (!class_match_param(key, var->name, NULL) &&
+   keylen == strlen(var->name)) {
matched++;
rc = -EROFS;
if (var->fops && var->fops->write) {
-- 
2.7.4



[PATCH 0/4] Some Lustre style cleanups

2016-06-18 Thread Oleg Drokin
These are just some more cleanups in Lustre styel and comments

Emoly Liu (2):
  staging/lustre: Fix blank line before EXPORT_SYMBOL()
  staging/lustre: Keep logical continuations on the previous line

Oleg Drokin (2):
  staging/lustre: Remove unnecessary space after a cast
  staging/lustre: Update FID documentation link.

 drivers/staging/lustre/include/linux/lnet/lib-dlc.h   |  2 +-
 drivers/staging/lustre/include/linux/lnet/types.h |  4 ++--
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h   |  2 +-
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c|  2 +-
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c   |  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c|  4 ++--
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c |  6 +++---
 drivers/staging/lustre/lnet/lnet/api-ni.c |  2 +-
 drivers/staging/lustre/lnet/lnet/module.c |  2 +-
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h |  4 ++--
 drivers/staging/lustre/lustre/include/lustre_fid.h|  2 +-
 drivers/staging/lustre/lustre/include/lustre_sec.h|  6 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c   |  9 -
 drivers/staging/lustre/lustre/llite/file.c|  2 +-
 drivers/staging/lustre/lustre/llite/vvp_dev.c |  2 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/mgc/mgc_request.c   |  4 ++--
 drivers/staging/lustre/lustre/obdclass/cl_object.c|  6 +++---
 drivers/staging/lustre/lustre/obdclass/obd_config.c   |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c   |  1 -
 drivers/staging/lustre/lustre/ptlrpc/nrs.c|  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c|  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c   |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c |  2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c   |  4 ++--
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c  | 10 +-
 26 files changed, 48 insertions(+), 50 deletions(-)

-- 
2.7.4



[PATCH 4/4] arm64: defconfig: Enable R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Khiem Nguyen 
---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 4f3e1f6..b5551d9 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -200,8 +200,10 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_INA2XX=m
 CONFIG_THERMAL=y
+CONFIG_THERMAL_OF=y
 CONFIG_THERMAL_EMULATION=y
 CONFIG_EXYNOS_THERMAL=y
+CONFIG_RCAR_GEN3_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_RENESAS_WDT=y
 CONFIG_MFD_SPMI_PMIC=y
-- 
1.9.1



[PATCH 4/4] arm64: defconfig: Enable R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Khiem Nguyen 
---
 arch/arm64/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 4f3e1f6..b5551d9 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -200,8 +200,10 @@ CONFIG_POWER_RESET_SYSCON=y
 CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_INA2XX=m
 CONFIG_THERMAL=y
+CONFIG_THERMAL_OF=y
 CONFIG_THERMAL_EMULATION=y
 CONFIG_EXYNOS_THERMAL=y
+CONFIG_RCAR_GEN3_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_RENESAS_WDT=y
 CONFIG_MFD_SPMI_PMIC=y
-- 
1.9.1



[PATCH 3/4] arm64: dts: r8a7795: Add R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Thao Nguyen 
Signed-off-by: Khiem Nguyen 
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 86 
 1 file changed, 86 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index c14e89a..db203db 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -25,6 +25,9 @@
i2c4 = 
i2c5 = 
i2c6 = 
+   tsc0 = 
+   tsc1 = 
+   tsc2 = 
};
 
psci {
@@ -1620,5 +1623,88 @@
clocks = < CPG_MOD 613>;
power-domains = < R8A7795_PD_A3VP>;
};
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   tsc2: thermal@e61a {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe61a 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   tsc3: thermal@e61a8000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe61a8000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   sensor_thermal2: sensor-thermal2 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor2_crit: sensor2-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   sensor_thermal3: sensor-thermal3 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor3_crit: sensor3-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
};
 };
-- 
1.9.1



[PATCH 3/4] arm64: dts: r8a7795: Add R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Thao Nguyen 
Signed-off-by: Khiem Nguyen 
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 86 
 1 file changed, 86 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index c14e89a..db203db 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -25,6 +25,9 @@
i2c4 = 
i2c5 = 
i2c6 = 
+   tsc0 = 
+   tsc1 = 
+   tsc2 = 
};
 
psci {
@@ -1620,5 +1623,88 @@
clocks = < CPG_MOD 613>;
power-domains = < R8A7795_PD_A3VP>;
};
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   tsc2: thermal@e61a {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe61a 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   tsc3: thermal@e61a8000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe61a8000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   sensor_thermal2: sensor-thermal2 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor2_crit: sensor2-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   sensor_thermal3: sensor-thermal3 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor3_crit: sensor3-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
};
 };
-- 
1.9.1



[PATCH 2/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Thao Nguyen 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/Kconfig |   9 +
 drivers/thermal/Makefile|   1 +
 drivers/thermal/rcar_gen3_thermal.c | 524 
 3 files changed, 534 insertions(+)
 create mode 100644 drivers/thermal/rcar_gen3_thermal.c

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 2d702ca..151feb7 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -223,6 +223,15 @@ config RCAR_THERMAL
  Enable this to plug the R-Car thermal sensor driver into the Linux
  thermal framework.
 
+config RCAR_GEN3_THERMAL
+   tristate "Renesas R-Car Gen3 thermal driver"
+   depends on ARCH_RENESAS || COMPILE_TEST
+   depends on HAS_IOMEM
+   depends on OF
+   help
+ Enable this to plug the R-Car Gen3 thermal sensor driver into the 
Linux
+ thermal framework.
+
 config KIRKWOOD_THERMAL
tristate "Temperature sensor on Marvell Kirkwood SoCs"
depends on MACH_KIRKWOOD || COMPILE_TEST
diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index cded802..3ac9186 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM)+= 
qcom-spmi-temp-alarm.o
 obj-$(CONFIG_SPEAR_THERMAL)+= spear_thermal.o
 obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
 obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o
+obj-$(CONFIG_RCAR_GEN3_THERMAL)+= rcar_gen3_thermal.o
 obj-$(CONFIG_KIRKWOOD_THERMAL)  += kirkwood_thermal.o
 obj-y  += samsung/
 obj-$(CONFIG_DOVE_THERMAL) += dove_thermal.o
diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
new file mode 100644
index 000..a9a372b
--- /dev/null
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -0,0 +1,524 @@
+/*
+ *  R-Car Gen3 THS/CIVM thermal sensor driver
+ *  Based on drivers/thermal/rcar_thermal.c
+ *
+ * Copyright (C) 2016 Renesas Electronics Corporation.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* Register offset */
+#define REG_GEN3_CTSR  0x20
+#define REG_GEN3_THCTR 0x20
+#define REG_GEN3_IRQSTR0x04
+#define REG_GEN3_IRQMSK0x08
+#define REG_GEN3_IRQCTL0x0C
+#define REG_GEN3_IRQEN 0x10
+#define REG_GEN3_IRQTEMP1  0x14
+#define REG_GEN3_IRQTEMP2  0x18
+#define REG_GEN3_IRQTEMP3  0x1C
+#define REG_GEN3_TEMP  0x28
+#define REG_GEN3_THCODE1   0x50
+#define REG_GEN3_THCODE2   0x54
+#define REG_GEN3_THCODE3   0x58
+
+#define PTAT_BASE  0xE6198000
+#define REG_GEN3_PTAT1 0x5C
+#define REG_GEN3_PTAT2 0x60
+#define REG_GEN3_PTAT3 0x64
+#define PTAT_SIZE  REG_GEN3_PTAT3
+
+/* CTSR bit */
+#define PONM(0x1 << 8)
+#define AOUT(0x1 << 7)
+#define THBGR   (0x1 << 5)
+#define VMEN(0x1 << 4)
+#define VMST(0x1 << 1)
+#define THSST   (0x1 << 0)
+
+/* THCTR bit */
+#define CTCTL  (0x1 << 24)
+#define THCNTSEN(x)(x << 16)
+
+#define BIT_LEN_12 0x1
+
+#define CTEMP_MASK 0xFFF
+
+#define MCELSIUS(temp) ((temp) * 1000)
+#define TEMP_IRQ_SHIFT(tsc_id) (0x1 << tsc_id)
+#define TEMPD_IRQ_SHIFT(tsc_id)(0x1 << (tsc_id + 3))
+#define GEN3_FUSE_MASK 0xFFF
+
+/* Structure for thermal temperature calculation */
+struct equation_coefs {
+   long a1;
+   long b1;
+   long a2;
+   long b2;
+};
+
+struct fuse_factors {
+   int thcode_1;
+   int thcode_2;
+   int thcode_3;
+   int ptat_1;
+   int ptat_2;
+   int ptat_3;
+};
+
+struct rcar_gen3_thermal_priv {
+   void __iomem *base;
+   struct device *dev;
+   struct thermal_zone_device *zone;
+   struct delayed_work work;
+   struct fuse_factors factor;
+   struct equation_coefs coef;
+   spinlock_t lock;
+   int id;
+   int irq;
+   u32 ctemp;
+   const struct rcar_gen3_thermal_data *data;
+};
+
+struct rcar_gen3_thermal_data {
+   int (*thermal_init)(struct rcar_gen3_thermal_priv *priv);
+};
+
+#define rcar_priv_to_dev(priv) ((priv)->dev)
+#define rcar_has_irq_support(priv) ((priv)->irq)
+
+/* Temperature calculation 

[PATCH 2/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Thao Nguyen 
Signed-off-by: Khiem Nguyen 
---
 drivers/thermal/Kconfig |   9 +
 drivers/thermal/Makefile|   1 +
 drivers/thermal/rcar_gen3_thermal.c | 524 
 3 files changed, 534 insertions(+)
 create mode 100644 drivers/thermal/rcar_gen3_thermal.c

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 2d702ca..151feb7 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -223,6 +223,15 @@ config RCAR_THERMAL
  Enable this to plug the R-Car thermal sensor driver into the Linux
  thermal framework.
 
+config RCAR_GEN3_THERMAL
+   tristate "Renesas R-Car Gen3 thermal driver"
+   depends on ARCH_RENESAS || COMPILE_TEST
+   depends on HAS_IOMEM
+   depends on OF
+   help
+ Enable this to plug the R-Car Gen3 thermal sensor driver into the 
Linux
+ thermal framework.
+
 config KIRKWOOD_THERMAL
tristate "Temperature sensor on Marvell Kirkwood SoCs"
depends on MACH_KIRKWOOD || COMPILE_TEST
diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index cded802..3ac9186 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_QCOM_SPMI_TEMP_ALARM)+= 
qcom-spmi-temp-alarm.o
 obj-$(CONFIG_SPEAR_THERMAL)+= spear_thermal.o
 obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
 obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o
+obj-$(CONFIG_RCAR_GEN3_THERMAL)+= rcar_gen3_thermal.o
 obj-$(CONFIG_KIRKWOOD_THERMAL)  += kirkwood_thermal.o
 obj-y  += samsung/
 obj-$(CONFIG_DOVE_THERMAL) += dove_thermal.o
diff --git a/drivers/thermal/rcar_gen3_thermal.c 
b/drivers/thermal/rcar_gen3_thermal.c
new file mode 100644
index 000..a9a372b
--- /dev/null
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -0,0 +1,524 @@
+/*
+ *  R-Car Gen3 THS/CIVM thermal sensor driver
+ *  Based on drivers/thermal/rcar_thermal.c
+ *
+ * Copyright (C) 2016 Renesas Electronics Corporation.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; version 2 of the License.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  General Public License for more details.
+ *
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* Register offset */
+#define REG_GEN3_CTSR  0x20
+#define REG_GEN3_THCTR 0x20
+#define REG_GEN3_IRQSTR0x04
+#define REG_GEN3_IRQMSK0x08
+#define REG_GEN3_IRQCTL0x0C
+#define REG_GEN3_IRQEN 0x10
+#define REG_GEN3_IRQTEMP1  0x14
+#define REG_GEN3_IRQTEMP2  0x18
+#define REG_GEN3_IRQTEMP3  0x1C
+#define REG_GEN3_TEMP  0x28
+#define REG_GEN3_THCODE1   0x50
+#define REG_GEN3_THCODE2   0x54
+#define REG_GEN3_THCODE3   0x58
+
+#define PTAT_BASE  0xE6198000
+#define REG_GEN3_PTAT1 0x5C
+#define REG_GEN3_PTAT2 0x60
+#define REG_GEN3_PTAT3 0x64
+#define PTAT_SIZE  REG_GEN3_PTAT3
+
+/* CTSR bit */
+#define PONM(0x1 << 8)
+#define AOUT(0x1 << 7)
+#define THBGR   (0x1 << 5)
+#define VMEN(0x1 << 4)
+#define VMST(0x1 << 1)
+#define THSST   (0x1 << 0)
+
+/* THCTR bit */
+#define CTCTL  (0x1 << 24)
+#define THCNTSEN(x)(x << 16)
+
+#define BIT_LEN_12 0x1
+
+#define CTEMP_MASK 0xFFF
+
+#define MCELSIUS(temp) ((temp) * 1000)
+#define TEMP_IRQ_SHIFT(tsc_id) (0x1 << tsc_id)
+#define TEMPD_IRQ_SHIFT(tsc_id)(0x1 << (tsc_id + 3))
+#define GEN3_FUSE_MASK 0xFFF
+
+/* Structure for thermal temperature calculation */
+struct equation_coefs {
+   long a1;
+   long b1;
+   long a2;
+   long b2;
+};
+
+struct fuse_factors {
+   int thcode_1;
+   int thcode_2;
+   int thcode_3;
+   int ptat_1;
+   int ptat_2;
+   int ptat_3;
+};
+
+struct rcar_gen3_thermal_priv {
+   void __iomem *base;
+   struct device *dev;
+   struct thermal_zone_device *zone;
+   struct delayed_work work;
+   struct fuse_factors factor;
+   struct equation_coefs coef;
+   spinlock_t lock;
+   int id;
+   int irq;
+   u32 ctemp;
+   const struct rcar_gen3_thermal_data *data;
+};
+
+struct rcar_gen3_thermal_data {
+   int (*thermal_init)(struct rcar_gen3_thermal_priv *priv);
+};
+
+#define rcar_priv_to_dev(priv) ((priv)->dev)
+#define rcar_has_irq_support(priv) ((priv)->irq)
+
+/* Temperature calculation  */
+#define CODETSD(x) ((x) * 1000)
+#define TJ_1 96000L
+#define TJ_3 (-41000L)

[PATCH 1/4] thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal bindings

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Khiem Nguyen 
---
 .../bindings/thermal/rcar-gen3-thermal.txt | 79 ++
 1 file changed, 79 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt

diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt 
b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
new file mode 100644
index 000..ed6ce45
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
@@ -0,0 +1,79 @@
+* DT bindings for Renesas R-Car Gen3 Thermal Sensor driver
+
+Required properties:
+- compatible   : "renesas,thermal-",
+ Examples with soctypes are:
+   - "renesas,thermal-r8a7795" (R-Car H3)
+   - "renesas,thermal-r8a7796" (R-Car M3)
+   - "renesas,rcar-gen3-thermal" as fallback
+- reg  : Address range of the thermal registers.
+- clocks   : Must contain a reference to the functional clock.
+- #thermal-sensor-cells : Please see ./thermal.txt
+
+Option properties:
+
+- interrupts   : Use interrupt
+- power-domain : Must contain a reference to the power domain. This 
property is
+ mandatory if the thermal sensor instance is part of a 
controllable power
+ domain.
+
+Example (non interrupt support):
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
+
+Example (interrupt support):
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
-- 
1.9.1



[PATCH 1/4] thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal bindings

2016-06-18 Thread Khiem Nguyen

Signed-off-by: Hien Dang 
Signed-off-by: Khiem Nguyen 
---
 .../bindings/thermal/rcar-gen3-thermal.txt | 79 ++
 1 file changed, 79 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt

diff --git a/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt 
b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
new file mode 100644
index 000..ed6ce45
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
@@ -0,0 +1,79 @@
+* DT bindings for Renesas R-Car Gen3 Thermal Sensor driver
+
+Required properties:
+- compatible   : "renesas,thermal-",
+ Examples with soctypes are:
+   - "renesas,thermal-r8a7795" (R-Car H3)
+   - "renesas,thermal-r8a7796" (R-Car M3)
+   - "renesas,rcar-gen3-thermal" as fallback
+- reg  : Address range of the thermal registers.
+- clocks   : Must contain a reference to the functional clock.
+- #thermal-sensor-cells : Please see ./thermal.txt
+
+Option properties:
+
+- interrupts   : Use interrupt
+- power-domain : Must contain a reference to the power domain. This 
property is
+ mandatory if the thermal sensor instance is part of a 
controllable power
+ domain.
+
+Example (non interrupt support):
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
+
+Example (interrupt support):
+
+   tsc1: thermal@e6198000 {
+   compatible = "renesas,thermal-r8a7795",
+   "renesas,rcar-gen3-thermal";
+   reg = <0 0xe6198000 0 0x5c>;
+   interrupts = ;
+   clocks = < CPG_MOD 522>;
+   power-domains = < R8A7795_PD_ALWAYS_ON>;
+   #thermal-sensor-cells = <0>;
+   status = "okay";
+   };
+
+   thermal-zones {
+   sensor_thermal1: sensor-thermal1 {
+   polling-delay-passive = <250>;
+   polling-delay = <0>;
+
+   /* sensor ID */
+   thermal-sensors = <>;
+
+   trips {
+   sensor1_crit: sensor1-crit {
+   temperature = <9>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+   };
-- 
1.9.1



undefined reference to `bad_dma_ops'

2016-06-18 Thread kbuild test robot
Hi,

It's probably a bug fix that unveils the link errors.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c141afd1a28793c08c88325aa64b773be6f79ccf
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   5 months ago
config: m32r-allyesconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 420520766a796d3607639ba1e4fb1aadeadd
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `hisi_sas_slot_task_free':
>> (.text+0x219238): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21923c): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `hisi_sas_free':
   hisi_sas_main.c:(.text+0x2194cc): undefined reference to `bad_dma_ops'
   hisi_sas_main.c:(.text+0x2194d0): undefined reference to `bad_dma_ops'
   hisi_sas_main.c:(.text+0x219530): undefined reference to `bad_dma_ops'
   drivers/built-in.o:hisi_sas_main.c:(.text+0x219534): more undefined 
references to `bad_dma_ops' follow
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219260): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219260): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219278): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219278): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21928c): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21928c): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_free':
   hisi_sas_main.c:(.text+0x219560): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219560): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x21956c): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x21956c): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219574): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219574): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fa4): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fa4): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fcc): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fcc): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x21a0fc): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x21a0fc): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_task_exec.isra.9':
   hisi_sas_main.c:(.text+0x21a834): undefined reference to `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a834): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a860): undefined reference to `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a860): additional relocation overflows omitted 
from the output
   hisi_sas_main.c:(.text+0x21a990): undefined reference to `dma_pool_free'
   hisi_sas_main.c:(.text+0x21a9a8): undefined reference to `dma_pool_free'
   hisi_sas_main.c:(.text+0x21a9c8): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `prep_smp_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21b660): undefined reference to `bad_dma_ops'
   hisi_sas_v1_hw.c:(.text+0x21b668): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `slot_complete_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21c80c): undefined reference to `bad_dma_ops'
   hisi_sas_v1_hw.c:(.text+0x21c810): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `prep_ssp_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21ba0c): undefined reference to 

undefined reference to `bad_dma_ops'

2016-06-18 Thread kbuild test robot
Hi,

It's probably a bug fix that unveils the link errors.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c141afd1a28793c08c88325aa64b773be6f79ccf
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   5 months ago
config: m32r-allyesconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 420520766a796d3607639ba1e4fb1aadeadd
# save the attached .config to linux build tree
make.cross ARCH=m32r 

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `hisi_sas_slot_task_free':
>> (.text+0x219238): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21923c): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `hisi_sas_free':
   hisi_sas_main.c:(.text+0x2194cc): undefined reference to `bad_dma_ops'
   hisi_sas_main.c:(.text+0x2194d0): undefined reference to `bad_dma_ops'
   hisi_sas_main.c:(.text+0x219530): undefined reference to `bad_dma_ops'
   drivers/built-in.o:hisi_sas_main.c:(.text+0x219534): more undefined 
references to `bad_dma_ops' follow
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219260): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219260): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219278): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x219278): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21928c): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_slot_task_free':
   (.text+0x21928c): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_free'
   drivers/built-in.o: In function `hisi_sas_free':
   hisi_sas_main.c:(.text+0x219560): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219560): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x21956c): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x21956c): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219574): undefined reference to `dma_pool_destroy'
   hisi_sas_main.c:(.text+0x219574): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_destroy'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fa4): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fa4): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fcc): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x219fcc): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x21a0fc): undefined reference to `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_probe':
   (.text+0x21a0fc): relocation truncated to fit: R_M32R_26_PCREL_RELA against 
undefined symbol `dma_pool_create'
   drivers/built-in.o: In function `hisi_sas_task_exec.isra.9':
   hisi_sas_main.c:(.text+0x21a834): undefined reference to `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a834): relocation truncated to fit: 
R_M32R_26_PCREL_RELA against undefined symbol `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a860): undefined reference to `dma_pool_alloc'
   hisi_sas_main.c:(.text+0x21a860): additional relocation overflows omitted 
from the output
   hisi_sas_main.c:(.text+0x21a990): undefined reference to `dma_pool_free'
   hisi_sas_main.c:(.text+0x21a9a8): undefined reference to `dma_pool_free'
   hisi_sas_main.c:(.text+0x21a9c8): undefined reference to `dma_pool_free'
   drivers/built-in.o: In function `prep_smp_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21b660): undefined reference to `bad_dma_ops'
   hisi_sas_v1_hw.c:(.text+0x21b668): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `slot_complete_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21c80c): undefined reference to `bad_dma_ops'
   hisi_sas_v1_hw.c:(.text+0x21c810): undefined reference to `bad_dma_ops'
   drivers/built-in.o: In function `prep_ssp_v1_hw':
   hisi_sas_v1_hw.c:(.text+0x21ba0c): undefined reference to 

[PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen
This patchset adds new thermal sensor driver to support 3 sensors
found in R-Car Gen3 series.

It has been decided to create new driver, instead of using the existing
thermal driver due to many differences in HW setting flows, the method
to calculate temperatures value and some newly supported features.

The new driver can support both polling mode and interrupt mode.
It has been tested with R-Car H3.

This driver is developed based on early work of Hien Dang and Thao Nguyen.
All comments are welcome.

Khiem Nguyen (4):
  thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal bindings
  thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support
  arm64: dts: r8a7795: Add R-Car Gen3 thermal support
  arm64: defconfig: Enable R-Car Gen3 thermal support

 .../bindings/thermal/rcar-gen3-thermal.txt |  79 
 arch/arm64/boot/dts/renesas/r8a7795.dtsi   |  86 
 arch/arm64/configs/defconfig   |   2 +
 drivers/thermal/Kconfig|   9 +
 drivers/thermal/Makefile   |   1 +
 drivers/thermal/rcar_gen3_thermal.c| 524 +
 6 files changed, 701 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
 create mode 100644 drivers/thermal/rcar_gen3_thermal.c

-- 
1.9.1



[PATCH 0/4] thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal support

2016-06-18 Thread Khiem Nguyen
This patchset adds new thermal sensor driver to support 3 sensors
found in R-Car Gen3 series.

It has been decided to create new driver, instead of using the existing
thermal driver due to many differences in HW setting flows, the method
to calculate temperatures value and some newly supported features.

The new driver can support both polling mode and interrupt mode.
It has been tested with R-Car H3.

This driver is developed based on early work of Hien Dang and Thao Nguyen.
All comments are welcome.

Khiem Nguyen (4):
  thermal: rcar_gen3_thermal: Document the R-Car Gen3 thermal bindings
  thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver support
  arm64: dts: r8a7795: Add R-Car Gen3 thermal support
  arm64: defconfig: Enable R-Car Gen3 thermal support

 .../bindings/thermal/rcar-gen3-thermal.txt |  79 
 arch/arm64/boot/dts/renesas/r8a7795.dtsi   |  86 
 arch/arm64/configs/defconfig   |   2 +
 drivers/thermal/Kconfig|   9 +
 drivers/thermal/Makefile   |   1 +
 drivers/thermal/rcar_gen3_thermal.c| 524 +
 6 files changed, 701 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt
 create mode 100644 drivers/thermal/rcar_gen3_thermal.c

-- 
1.9.1



[rcu:rcu/next 16/16] torture.c:undefined reference to `__udivdi3'

2016-06-18 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
rcu/next
head:   b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
commit: b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9 [16/16] torture: Convert 
torture_shutdown() to hrtimer
config: i386-randconfig-b0-06190930 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
git checkout b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/built-in.o: In function `torture_shutdown':
>> torture.c:(.text+0xd01b5): undefined reference to `__udivdi3'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


[rcu:rcu/next 16/16] torture.c:undefined reference to `__udivdi3'

2016-06-18 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
rcu/next
head:   b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
commit: b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9 [16/16] torture: Convert 
torture_shutdown() to hrtimer
config: i386-randconfig-b0-06190930 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
git checkout b4aa201e0c7c73a9f4fee7d82d4ff46b85feeea9
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   kernel/built-in.o: In function `torture_shutdown':
>> torture.c:(.text+0xd01b5): undefined reference to `__udivdi3'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: kernel, mm: NULL deref in copy_process while OOMing

2016-06-18 Thread Tetsuo Handa
On 2016/06/16 18:39, Michal Hocko wrote:
> On Wed 15-06-16 12:50:43, Sasha Levin wrote:
>> Hi all,
>>
>> I'm seeing the following NULL ptr deref in copy_process right after a bunch
>> of OOM killing activity on -next kernels:
>>
>> Out of memory (oom_kill_allocating_task): Kill process 3477 (trinity-c159) 
>> score 0 or sacrifice child
>> Killed process 3477 (trinity-c159) total-vm:3226820kB, anon-rss:36832kB, 
>> file-rss:1640kB, shmem-rss:444kB
>> oom_reaper: reaped process 3477 (trinity-c159), now anon-rss:0kB, 
>> file-rss:0kB, shmem-rss:444kB
>> Out of memory (oom_kill_allocating_task): Kill process 3450 (trinity-c156) 
>> score 0 or sacrifice child
>> Killed process 3450 (trinity-c156) total-vm:3769768kB, anon-rss:36832kB, 
>> file-rss:1652kB, shmem-rss:508kB
>> oom_reaper: reaped process 3450 (trinity-c156), now anon-rss:0kB, 
>> file-rss:0kB, shmem-rss:572kB
>> BUG: unable to handle kernel NULL pointer dereference at 0150
>> IP: copy_process (./arch/x86/include/asm/atomic.h:103 kernel/fork.c:484 
>> kernel/fork.c:964 kernel/fork.c:1018 kernel/fork.c:1484)
>> PGD 1ff944067 PUD 1ff929067 PMD 0
>> Oops: 0002 [#1] PREEMPT SMP KASAN
>> Modules linked in:
>> CPU: 18 PID: 8761 Comm: trinity-main Not tainted 
>> 4.7.0-rc3-sasha-02101-g1e1b9fa #3108
> 
> Is this a common parent of the oom killed children?
> 
>> task: 880165564000 ti: 880337ad task.ti: 880337ad
>> RIP: copy_process (./arch/x86/include/asm/atomic.h:103 kernel/fork.c:484 
>> kernel/fork.c:964 kernel/fork.c:1018 kernel/fork.c:1484)
> 
> IIUC this should be:
> _do_fork
>   copy_process
> copy_mm
>   dup_mm
> dup_mmap
> if (tmp->vm_flags & VM_DENYWRITE)
>   atomic_dec(>i_writecount);
> 
> I am not really sure how f->f_inode can become NULL when file should pin
> the inode AFAIR, and VMA should pin the file. Anyway this shouldn't be
> directly related to the OOM killer or at least the recent changes
> in that area because the oom reaper doesn't touch VMAs file.

These OOM messages say that oom_kill_allocating_task != 0 is used.
That is, a __GFP_FS allocation by a child process which is trying to
duplicate the parent's mm_struct was killed by the OOM killer and
reaped by the OOM reaper. I guess that mmap related stuff are not
fully initialized (or consistent) yet while the OOM reaper assumed
that it is safe to access such child's mmap related stuff.

So, if this bug is reproducible (I thing it is), first try to reproduce
this bug without the OOM reaper enabled (i.e. comment out the

subsys_initcall(oom_init)

line in mm/oom_kill.c ).



Re: kernel, mm: NULL deref in copy_process while OOMing

2016-06-18 Thread Tetsuo Handa
On 2016/06/16 18:39, Michal Hocko wrote:
> On Wed 15-06-16 12:50:43, Sasha Levin wrote:
>> Hi all,
>>
>> I'm seeing the following NULL ptr deref in copy_process right after a bunch
>> of OOM killing activity on -next kernels:
>>
>> Out of memory (oom_kill_allocating_task): Kill process 3477 (trinity-c159) 
>> score 0 or sacrifice child
>> Killed process 3477 (trinity-c159) total-vm:3226820kB, anon-rss:36832kB, 
>> file-rss:1640kB, shmem-rss:444kB
>> oom_reaper: reaped process 3477 (trinity-c159), now anon-rss:0kB, 
>> file-rss:0kB, shmem-rss:444kB
>> Out of memory (oom_kill_allocating_task): Kill process 3450 (trinity-c156) 
>> score 0 or sacrifice child
>> Killed process 3450 (trinity-c156) total-vm:3769768kB, anon-rss:36832kB, 
>> file-rss:1652kB, shmem-rss:508kB
>> oom_reaper: reaped process 3450 (trinity-c156), now anon-rss:0kB, 
>> file-rss:0kB, shmem-rss:572kB
>> BUG: unable to handle kernel NULL pointer dereference at 0150
>> IP: copy_process (./arch/x86/include/asm/atomic.h:103 kernel/fork.c:484 
>> kernel/fork.c:964 kernel/fork.c:1018 kernel/fork.c:1484)
>> PGD 1ff944067 PUD 1ff929067 PMD 0
>> Oops: 0002 [#1] PREEMPT SMP KASAN
>> Modules linked in:
>> CPU: 18 PID: 8761 Comm: trinity-main Not tainted 
>> 4.7.0-rc3-sasha-02101-g1e1b9fa #3108
> 
> Is this a common parent of the oom killed children?
> 
>> task: 880165564000 ti: 880337ad task.ti: 880337ad
>> RIP: copy_process (./arch/x86/include/asm/atomic.h:103 kernel/fork.c:484 
>> kernel/fork.c:964 kernel/fork.c:1018 kernel/fork.c:1484)
> 
> IIUC this should be:
> _do_fork
>   copy_process
> copy_mm
>   dup_mm
> dup_mmap
> if (tmp->vm_flags & VM_DENYWRITE)
>   atomic_dec(>i_writecount);
> 
> I am not really sure how f->f_inode can become NULL when file should pin
> the inode AFAIR, and VMA should pin the file. Anyway this shouldn't be
> directly related to the OOM killer or at least the recent changes
> in that area because the oom reaper doesn't touch VMAs file.

These OOM messages say that oom_kill_allocating_task != 0 is used.
That is, a __GFP_FS allocation by a child process which is trying to
duplicate the parent's mm_struct was killed by the OOM killer and
reaped by the OOM reaper. I guess that mmap related stuff are not
fully initialized (or consistent) yet while the OOM reaper assumed
that it is safe to access such child's mmap related stuff.

So, if this bug is reproducible (I thing it is), first try to reproduce
this bug without the OOM reaper enabled (i.e. comment out the

subsys_initcall(oom_init)

line in mm/oom_kill.c ).



Fwd: [RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page directly to the allocator

2016-06-18 Thread Wenwei Tao
Hi,
The original message is somehow determined to be junk mail and
rejected by the system.
Forward this message.

-- Forwarded message --
From: Wenwei Tao 
Date: 2016-06-19 10:40 GMT+08:00
Subject: Re: [RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page
directly to the allocator
To: Vlastimil Babka 
抄送: Wenwei Tao , a...@linux-foundation.org,
mgor...@techsingularity.net, mho...@suse.com, rient...@google.com,
kirill.shute...@linux.intel.com, iamjoonsoo@lge.com,
izumi.t...@jp.fujitsu.com, Johannes Weiner ,
linux-kernel@vger.kernel.org, linux...@kvack.org


2016-06-18 18:14 GMT+08:00 Vlastimil Babka :
> On 06/18/2016 11:34 AM, Wenwei Tao wrote:
>> From: Wenwei Tao 
>>
>> Some pages might have already been allocated before reserve
>> the pageblock as HIGHATOMIC. When free these pages, put them
>> directly to the allocator instead of the pcp lists since they
>> might have the chance to be merged to high order pages.
>
> Are there some data showing the improvement, or just theoretical?
>

It's just theoretical. I read the mm code and try to understand it,
think this might be an optimization.

>> Signed-off-by: Wenwei Tao 
>> ---
>>  mm/page_alloc.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 6903b69..19f9e76 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -2412,7 +2412,8 @@ void free_hot_cold_page(struct page *page, bool cold)
>
> The full comment that's here for context:
>
> /*
>  * We only track unmovable, reclaimable and movable on pcp lists.
>  * Free ISOLATE pages back to the allocator because they are being
>  * offlined but treat RESERVE as movable pages so we can get those
>  * areas back if necessary. Otherwise, we may have to free
>  * excessively into the page allocator
>  */
>
> That comment looks outdated as it refers to RESERVE, which was replaced
> by HIGHATOMIC. But there's some reasoning why these pages go to
> pcplists. I'd expect the "free excessively" part isn't as bad as
> highatomic reserves are quite limited. They also shouldn't be used for
> order-0 allocations, which is what this function is about, so I would
> expect both the impact on "free excessively" and the improvement of
> merging to be minimal?
>
>>* excessively into the page allocator
>>*/
>>   if (migratetype >= MIGRATE_PCPTYPES) {
>> - if (unlikely(is_migrate_isolate(migratetype))) {
>> + if (unlikely(is_migrate_isolate(migratetype) ||
>> + migratetype == MIGRATE_HIGHATOMIC)) {
>>   free_one_page(zone, page, pfn, 0, migratetype);
>>   goto out;
>>   }
>
> In any case your patch highlighted that this code could be imho
> optimized like below.
>
> if (unlikely(migratetype >= MIGRATE_PCPTYPES))
>if (is_migrate_cma(migratetype)) {
>migratetype = MIGRATE_MOVABLE;
>} else {
>free_one_page(zone, page, pfn, 0, migratetype);
>goto out;
>}
> }
>
> That's less branches than your patch, and even less than originally if
> CMA is not enabled (or with ZONE_CMA).

Yeah, this looks better.


Fwd: [RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page directly to the allocator

2016-06-18 Thread Wenwei Tao
Hi,
The original message is somehow determined to be junk mail and
rejected by the system.
Forward this message.

-- Forwarded message --
From: Wenwei Tao 
Date: 2016-06-19 10:40 GMT+08:00
Subject: Re: [RFC PATCH 1/3] mm, page_alloc: free HIGHATOMIC page
directly to the allocator
To: Vlastimil Babka 
抄送: Wenwei Tao , a...@linux-foundation.org,
mgor...@techsingularity.net, mho...@suse.com, rient...@google.com,
kirill.shute...@linux.intel.com, iamjoonsoo@lge.com,
izumi.t...@jp.fujitsu.com, Johannes Weiner ,
linux-kernel@vger.kernel.org, linux...@kvack.org


2016-06-18 18:14 GMT+08:00 Vlastimil Babka :
> On 06/18/2016 11:34 AM, Wenwei Tao wrote:
>> From: Wenwei Tao 
>>
>> Some pages might have already been allocated before reserve
>> the pageblock as HIGHATOMIC. When free these pages, put them
>> directly to the allocator instead of the pcp lists since they
>> might have the chance to be merged to high order pages.
>
> Are there some data showing the improvement, or just theoretical?
>

It's just theoretical. I read the mm code and try to understand it,
think this might be an optimization.

>> Signed-off-by: Wenwei Tao 
>> ---
>>  mm/page_alloc.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 6903b69..19f9e76 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -2412,7 +2412,8 @@ void free_hot_cold_page(struct page *page, bool cold)
>
> The full comment that's here for context:
>
> /*
>  * We only track unmovable, reclaimable and movable on pcp lists.
>  * Free ISOLATE pages back to the allocator because they are being
>  * offlined but treat RESERVE as movable pages so we can get those
>  * areas back if necessary. Otherwise, we may have to free
>  * excessively into the page allocator
>  */
>
> That comment looks outdated as it refers to RESERVE, which was replaced
> by HIGHATOMIC. But there's some reasoning why these pages go to
> pcplists. I'd expect the "free excessively" part isn't as bad as
> highatomic reserves are quite limited. They also shouldn't be used for
> order-0 allocations, which is what this function is about, so I would
> expect both the impact on "free excessively" and the improvement of
> merging to be minimal?
>
>>* excessively into the page allocator
>>*/
>>   if (migratetype >= MIGRATE_PCPTYPES) {
>> - if (unlikely(is_migrate_isolate(migratetype))) {
>> + if (unlikely(is_migrate_isolate(migratetype) ||
>> + migratetype == MIGRATE_HIGHATOMIC)) {
>>   free_one_page(zone, page, pfn, 0, migratetype);
>>   goto out;
>>   }
>
> In any case your patch highlighted that this code could be imho
> optimized like below.
>
> if (unlikely(migratetype >= MIGRATE_PCPTYPES))
>if (is_migrate_cma(migratetype)) {
>migratetype = MIGRATE_MOVABLE;
>} else {
>free_one_page(zone, page, pfn, 0, migratetype);
>goto out;
>}
> }
>
> That's less branches than your patch, and even less than originally if
> CMA is not enabled (or with ZONE_CMA).

Yeah, this looks better.


Re: [RFC][PATCH] ftracetest: Fix hist unsupported result in hist selftests

2016-06-18 Thread Masami Hiramatsu
On Fri, 17 Jun 2016 17:28:47 -0400
Steven Rostedt  wrote:

> On Tue, 24 May 2016 12:02:35 +0900
> Namhyung Kim  wrote:
> 
> > On Mon, May 23, 2016 at 10:32:43PM -0400, Steven Rostedt wrote:
> > > On Tue, 24 May 2016 11:16:31 +0900
> > > Namhyung Kim  wrote:
> > > 
> > >   
> > > > Why not checking "hist" file then?  
> > > 
> > > I guess that could be done too, but is there anything wrong with my
> > > current solution? Or is it just too hacky? How would one check if
> > > something exists in a file or not? Say, I want to detect if
> > > preemptirqsoff tracer exists or not, and that only happens if I do a
> > > grep of current_tracer (I have tests coming that will need to do that)?  
> > 
> > There's nothing wrong with your approach IMHO.  But I think checking
> > existence of a file is clearer and consistent to other tests.
> > 
> > For the preemptirqsoff tracer case, it seems there's no other way to
> > check it simply.  It's not hacky to me grep-ing contents to check
> > availability of some option.
> > 
> 
> Ah, due to traveling I never got around to finishing this. What about
> this patch?
> 
> From 7bf19b58ba02e66014efce6c051acba2c6cbd861 Mon Sep 17 00:00:00 2001
> From: "Steven Rostedt (Red Hat)" 
> Date: Mon, 23 May 2016 15:06:30 -0400
> Subject: [PATCH] ftracetest: Fix hist unsupported result in hist selftests
> 
> When histograms are not configured in the kernel, the ftracetest histogram
> selftests should return "unsupported" and not "Failed". To detect this, the
> test scripts have:
> 
>  FEATURE=`grep hist events/sched/sched_process_fork/trigger`
>  if [ -z "$FEATURE" ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
> 
> The problem is that '-e' is in effect and any error will cause the program
> to terminate. The grep for 'hist' fails, because it is not compiled it (thus
> unsupported), but because grep has an error code for failing to find the
> string, it causes the program to terminate, and is marked as a failed test.
> 
> Namhyung Kim recommended to test for the "hist" file located in
> events/sched/sched_process_fork/hist instead, as it is more inline with the
> other checks. As the hist file is only created if the histogram feature is
> enabled, that is a valid check.

Looks good to me :)
Thanks Namhyung and Steve for fixing that!

Acked-by: Masami Hiramatsu 


> 
> Link: http://lkml.kernel.org/r/20160523151538.4ea9c...@gandalf.local.home
> 
> Suggested-by: Namhyung Kim 
> Fixes: 76929ab51f0ee ("kselftests/ftrace: Add hist trigger testcases")
> Signed-off-by: Steven Rostedt 
> ---
>  .../testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc  | 9 
> -
>  tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc| 9 
> -
>  .../testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 9 
> -
>  3 files changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git 
> a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> index c2b61c4fda11..0bf5085281f3 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> @@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then
>  exit_unsupported
>  fi
>  
> -reset_tracer
> -do_reset
> -
> -FEATURE=`grep hist events/sched/sched_process_fork/trigger`
> -if [ -z "$FEATURE" ]; then
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
>  
> +reset_tracer
> +do_reset
> +
>  echo "Test histogram with execname modifier"
>  
>  echo 'hist:keys=common_pid.execname' > 
> events/sched/sched_process_fork/trigger
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> index b2902d42a537..a00184cd9c95 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> @@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then
>  exit_unsupported
>  fi
>  
> -reset_tracer
> -do_reset
> -
> -FEATURE=`grep hist events/sched/sched_process_fork/trigger`
> -if [ -z "$FEATURE" ]; then
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
>  
> +reset_tracer
> +do_reset
> +
>  echo "Test histogram basic tigger"
>  
>  echo 'hist:keys=parent_pid:vals=child_pid' > 
> events/sched/sched_process_fork/trigger
> diff --git 
> a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
> index 03c4a46561fc..3478b00ead57 100644
> --- 

Re: [RFC][PATCH] ftracetest: Fix hist unsupported result in hist selftests

2016-06-18 Thread Masami Hiramatsu
On Fri, 17 Jun 2016 17:28:47 -0400
Steven Rostedt  wrote:

> On Tue, 24 May 2016 12:02:35 +0900
> Namhyung Kim  wrote:
> 
> > On Mon, May 23, 2016 at 10:32:43PM -0400, Steven Rostedt wrote:
> > > On Tue, 24 May 2016 11:16:31 +0900
> > > Namhyung Kim  wrote:
> > > 
> > >   
> > > > Why not checking "hist" file then?  
> > > 
> > > I guess that could be done too, but is there anything wrong with my
> > > current solution? Or is it just too hacky? How would one check if
> > > something exists in a file or not? Say, I want to detect if
> > > preemptirqsoff tracer exists or not, and that only happens if I do a
> > > grep of current_tracer (I have tests coming that will need to do that)?  
> > 
> > There's nothing wrong with your approach IMHO.  But I think checking
> > existence of a file is clearer and consistent to other tests.
> > 
> > For the preemptirqsoff tracer case, it seems there's no other way to
> > check it simply.  It's not hacky to me grep-ing contents to check
> > availability of some option.
> > 
> 
> Ah, due to traveling I never got around to finishing this. What about
> this patch?
> 
> From 7bf19b58ba02e66014efce6c051acba2c6cbd861 Mon Sep 17 00:00:00 2001
> From: "Steven Rostedt (Red Hat)" 
> Date: Mon, 23 May 2016 15:06:30 -0400
> Subject: [PATCH] ftracetest: Fix hist unsupported result in hist selftests
> 
> When histograms are not configured in the kernel, the ftracetest histogram
> selftests should return "unsupported" and not "Failed". To detect this, the
> test scripts have:
> 
>  FEATURE=`grep hist events/sched/sched_process_fork/trigger`
>  if [ -z "$FEATURE" ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
> 
> The problem is that '-e' is in effect and any error will cause the program
> to terminate. The grep for 'hist' fails, because it is not compiled it (thus
> unsupported), but because grep has an error code for failing to find the
> string, it causes the program to terminate, and is marked as a failed test.
> 
> Namhyung Kim recommended to test for the "hist" file located in
> events/sched/sched_process_fork/hist instead, as it is more inline with the
> other checks. As the hist file is only created if the histogram feature is
> enabled, that is a valid check.

Looks good to me :)
Thanks Namhyung and Steve for fixing that!

Acked-by: Masami Hiramatsu 


> 
> Link: http://lkml.kernel.org/r/20160523151538.4ea9c...@gandalf.local.home
> 
> Suggested-by: Namhyung Kim 
> Fixes: 76929ab51f0ee ("kselftests/ftrace: Add hist trigger testcases")
> Signed-off-by: Steven Rostedt 
> ---
>  .../testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc  | 9 
> -
>  tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc| 9 
> -
>  .../testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 9 
> -
>  3 files changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git 
> a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> index c2b61c4fda11..0bf5085281f3 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
> @@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then
>  exit_unsupported
>  fi
>  
> -reset_tracer
> -do_reset
> -
> -FEATURE=`grep hist events/sched/sched_process_fork/trigger`
> -if [ -z "$FEATURE" ]; then
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
>  
> +reset_tracer
> +do_reset
> +
>  echo "Test histogram with execname modifier"
>  
>  echo 'hist:keys=common_pid.execname' > 
> events/sched/sched_process_fork/trigger
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> index b2902d42a537..a00184cd9c95 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc
> @@ -23,15 +23,14 @@ if [ ! -f events/sched/sched_process_fork/trigger ]; then
>  exit_unsupported
>  fi
>  
> -reset_tracer
> -do_reset
> -
> -FEATURE=`grep hist events/sched/sched_process_fork/trigger`
> -if [ -z "$FEATURE" ]; then
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
>  echo "hist trigger is not supported"
>  exit_unsupported
>  fi
>  
> +reset_tracer
> +do_reset
> +
>  echo "Test histogram basic tigger"
>  
>  echo 'hist:keys=parent_pid:vals=child_pid' > 
> events/sched/sched_process_fork/trigger
> diff --git 
> a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc 
> b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
> index 03c4a46561fc..3478b00ead57 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
> 

[PATCH] drm/fsl-dcu: use drm_mode_config_cleanup on initialization errors

2016-06-18 Thread Stefan Agner
Commit 7566e247672d ("drm/fsl-dcu: handle initialization errors properly")
introduced error handling during initialization, but with a wrong cleanup
order.

Replace the error handling with the generic cleanup function
drm_mode_config_cleanup.

Signed-off-by: Stefan Agner 
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c 
b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
index c564ec6..a6e4cd5 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
@@ -37,23 +37,22 @@ int fsl_dcu_drm_modeset_init(struct fsl_dcu_drm_device 
*fsl_dev)
 
ret = fsl_dcu_drm_crtc_create(fsl_dev);
if (ret)
-   return ret;
+   goto err;
 
ret = fsl_dcu_drm_encoder_create(fsl_dev, _dev->crtc);
if (ret)
-   goto fail_encoder;
+   goto err;
 
ret = fsl_dcu_drm_connector_create(fsl_dev, _dev->encoder);
if (ret)
-   goto fail_connector;
+   goto err;
 
drm_mode_config_reset(fsl_dev->drm);
drm_kms_helper_poll_init(fsl_dev->drm);
 
return 0;
-fail_encoder:
-   fsl_dev->crtc.funcs->destroy(_dev->crtc);
-fail_connector:
-   fsl_dev->encoder.funcs->destroy(_dev->encoder);
+
+err:
+   drm_mode_config_cleanup(fsl_dev->drm);
return ret;
 }
-- 
2.8.3



[PATCH] drm/fsl-dcu: use drm_mode_config_cleanup on initialization errors

2016-06-18 Thread Stefan Agner
Commit 7566e247672d ("drm/fsl-dcu: handle initialization errors properly")
introduced error handling during initialization, but with a wrong cleanup
order.

Replace the error handling with the generic cleanup function
drm_mode_config_cleanup.

Signed-off-by: Stefan Agner 
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c 
b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
index c564ec6..a6e4cd5 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
@@ -37,23 +37,22 @@ int fsl_dcu_drm_modeset_init(struct fsl_dcu_drm_device 
*fsl_dev)
 
ret = fsl_dcu_drm_crtc_create(fsl_dev);
if (ret)
-   return ret;
+   goto err;
 
ret = fsl_dcu_drm_encoder_create(fsl_dev, _dev->crtc);
if (ret)
-   goto fail_encoder;
+   goto err;
 
ret = fsl_dcu_drm_connector_create(fsl_dev, _dev->encoder);
if (ret)
-   goto fail_connector;
+   goto err;
 
drm_mode_config_reset(fsl_dev->drm);
drm_kms_helper_poll_init(fsl_dev->drm);
 
return 0;
-fail_encoder:
-   fsl_dev->crtc.funcs->destroy(_dev->crtc);
-fail_connector:
-   fsl_dev->encoder.funcs->destroy(_dev->encoder);
+
+err:
+   drm_mode_config_cleanup(fsl_dev->drm);
return ret;
 }
-- 
2.8.3



Re: [PATCH v3 3/5] i.MX: system.c: Replace magic numbers

2016-06-18 Thread kbuild test robot
Hi,

[auto build test ERROR on shawnguo/for-next]
[also build test ERROR on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Andrey-Smirnov/i-MX-L2-cache-code-cleanups-and-performance-tweaks/20160619-083620
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git 
for-next
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/mach-imx/system.c: In function 'imx_init_l2cache':
>> arch/arm/mach-imx/system.c:112:10: error: implicit declaration of function 
>> 'L310_PREFETCH_CTRL_DBL_' [-Werror=implicit-function-declaration]
  val |= L310_PREFETCH_CTRL_DBL_
 ^
   cc1: some warnings being treated as errors

vim +/L310_PREFETCH_CTRL_DBL_ +112 arch/arm/mach-imx/system.c

   106  goto out;
   107  }
   108  
   109  if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
   110  /* Configure the L2 PREFETCH and POWER registers */
   111  val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
 > 112  val |= L310_PREFETCH_CTRL_DBL_
   113  L310_PREFETCH_CTRL_INSTR_PREFETCH |
   114  L310_PREFETCH_CTRL_DATA_PREFETCH |
   115  L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH v3 3/5] i.MX: system.c: Replace magic numbers

2016-06-18 Thread kbuild test robot
Hi,

[auto build test ERROR on shawnguo/for-next]
[also build test ERROR on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Andrey-Smirnov/i-MX-L2-cache-code-cleanups-and-performance-tweaks/20160619-083620
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git 
for-next
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   arch/arm/mach-imx/system.c: In function 'imx_init_l2cache':
>> arch/arm/mach-imx/system.c:112:10: error: implicit declaration of function 
>> 'L310_PREFETCH_CTRL_DBL_' [-Werror=implicit-function-declaration]
  val |= L310_PREFETCH_CTRL_DBL_
 ^
   cc1: some warnings being treated as errors

vim +/L310_PREFETCH_CTRL_DBL_ +112 arch/arm/mach-imx/system.c

   106  goto out;
   107  }
   108  
   109  if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
   110  /* Configure the L2 PREFETCH and POWER registers */
   111  val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
 > 112  val |= L310_PREFETCH_CTRL_DBL_
   113  L310_PREFETCH_CTRL_INSTR_PREFETCH |
   114  L310_PREFETCH_CTRL_DATA_PREFETCH |
   115  L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH 3/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:26:08PM +0100, Craig Inches wrote:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

You can't send 3 different patches all with the same subject line :(



Re: [PATCH 3/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:26:08PM +0100, Craig Inches wrote:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

You can't send 3 different patches all with the same subject line :(



Re: [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:25:42PM +0100, Craig Inches wrote:
> Line length greater than 80 char.

What does that mean?

What does your subject mean?

Please be more descriptive, again, look at other patches that have been
merged for examples...

greg k-h


Re: [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:25:42PM +0100, Craig Inches wrote:
> Line length greater than 80 char.

What does that mean?

What does your subject mean?

Please be more descriptive, again, look at other patches that have been
merged for examples...

greg k-h


Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote:
> Macros with complex values should be enclosed in parenthesis
> 
> Signed-off-by: Craig Inches 
> ---
>  drivers/staging/lustre/lustre/include/cl_object.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ALWAYS test build your patches, to not do so just makes maintainers
grumpy...

Remember, checkpatch is a _hint_, it's not always right.

greg k-h


Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread Greg Kroah-Hartman
On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote:
> Macros with complex values should be enclosed in parenthesis
> 
> Signed-off-by: Craig Inches 
> ---
>  drivers/staging/lustre/lustre/include/cl_object.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ALWAYS test build your patches, to not do so just makes maintainers
grumpy...

Remember, checkpatch is a _hint_, it's not always right.

greg k-h


[RFC PATCH 3/3] mm, page_alloc: prevent merge freepages between highatomic and others

2016-06-18 Thread Wenwei Tao
From: Wenwei Tao 

We might not want other migrate types pin highatomic pageblock
away since it's reserved for high order use. And also we might
not want reserve high atomic pages out of limit, we can add
check in __free_one_page but this might be costly, so just stop
the merging.

Signed-off-by: Wenwei Tao 
---
 mm/page_alloc.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b72b771..ffce9b5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -832,7 +832,8 @@ continue_merging:
 * We don't want to hit this code for the more frequent
 * low-order merging.
 */
-   if (unlikely(has_isolate_pageblock(zone))) {
+   if (unlikely(has_isolate_pageblock(zone) ||
+   zone->nr_reserved_highatomic)) {
int buddy_mt;
 
buddy_idx = __find_buddy_index(page_idx, order);
@@ -841,7 +842,9 @@ continue_merging:
 
if (migratetype != buddy_mt
&& (is_migrate_isolate(migratetype) ||
-   is_migrate_isolate(buddy_mt)))
+   is_migrate_isolate(buddy_mt) ||
+   migratetype == MIGRATE_HIGHATOMIC ||
+   buddy_mt == MIGRATE_HIGHATOMIC))
goto done_merging;
}
max_order++;
-- 
1.8.3.1




[RFC PATCH 3/3] mm, page_alloc: prevent merge freepages between highatomic and others

2016-06-18 Thread Wenwei Tao
From: Wenwei Tao 

We might not want other migrate types pin highatomic pageblock
away since it's reserved for high order use. And also we might
not want reserve high atomic pages out of limit, we can add
check in __free_one_page but this might be costly, so just stop
the merging.

Signed-off-by: Wenwei Tao 
---
 mm/page_alloc.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b72b771..ffce9b5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -832,7 +832,8 @@ continue_merging:
 * We don't want to hit this code for the more frequent
 * low-order merging.
 */
-   if (unlikely(has_isolate_pageblock(zone))) {
+   if (unlikely(has_isolate_pageblock(zone) ||
+   zone->nr_reserved_highatomic)) {
int buddy_mt;
 
buddy_idx = __find_buddy_index(page_idx, order);
@@ -841,7 +842,9 @@ continue_merging:
 
if (migratetype != buddy_mt
&& (is_migrate_isolate(migratetype) ||
-   is_migrate_isolate(buddy_mt)))
+   is_migrate_isolate(buddy_mt) ||
+   migratetype == MIGRATE_HIGHATOMIC ||
+   buddy_mt == MIGRATE_HIGHATOMIC))
goto done_merging;
}
max_order++;
-- 
1.8.3.1




[RFC PATCH 2/3] mm, page_alloc: get page migreate type again when related to highatomic

2016-06-18 Thread Wenwei Tao
From: Wenwei Tao 

The migratetype might get staled, pages might have become highatomic when
we try to free them to the allocator, we might not want to put highatomic
pages into other buddy lists, since they are reserved only for atomic high
order use. And also highatomic pages could have been unreserved,
put them into the hightatomic buddy list might exceed the limit of
highatomic pages. So get the pages migreate type again to put them into
the right lists.

Signed-off-by: Wenwei Tao 
---
 mm/page_alloc.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 19f9e76..b72b771 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1079,9 +1079,11 @@ static void free_pcppages_bulk(struct zone *zone, int 
count,
int batch_free = 0;
unsigned long nr_scanned;
bool isolated_pageblocks;
+   bool reserved_highatomic;
 
spin_lock(>lock);
isolated_pageblocks = has_isolate_pageblock(zone);
+   reserved_highatomic = !!zone->nr_reserved_highatomic;
nr_scanned = zone_page_state(zone, NR_PAGES_SCANNED);
if (nr_scanned)
__mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
@@ -1118,8 +1120,10 @@ static void free_pcppages_bulk(struct zone *zone, int 
count,
mt = get_pcppage_migratetype(page);
/* MIGRATE_ISOLATE page should not go to pcplists */
VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
+   VM_BUG_ON_PAGE(mt == MIGRATE_HIGHATOMIC, page);
/* Pageblock could have been isolated meanwhile */
-   if (unlikely(isolated_pageblocks))
+   if (unlikely(isolated_pageblocks ||
+   reserved_highatomic))
mt = get_pageblock_migratetype(page);
 
if (bulkfree_pcp_prepare(page))
@@ -1144,7 +1148,9 @@ static void free_one_page(struct zone *zone,
__mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
 
if (unlikely(has_isolate_pageblock(zone) ||
-   is_migrate_isolate(migratetype))) {
+   zone->nr_reserved_highatomic ||
+   is_migrate_isolate(migratetype) ||
+   migratetype == MIGRATE_HIGHATOMIC)) {
migratetype = get_pfnblock_migratetype(page, pfn);
}
__free_one_page(page, pfn, zone, order, migratetype);
-- 
1.8.3.1




[RFC PATCH 2/3] mm, page_alloc: get page migreate type again when related to highatomic

2016-06-18 Thread Wenwei Tao
From: Wenwei Tao 

The migratetype might get staled, pages might have become highatomic when
we try to free them to the allocator, we might not want to put highatomic
pages into other buddy lists, since they are reserved only for atomic high
order use. And also highatomic pages could have been unreserved,
put them into the hightatomic buddy list might exceed the limit of
highatomic pages. So get the pages migreate type again to put them into
the right lists.

Signed-off-by: Wenwei Tao 
---
 mm/page_alloc.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 19f9e76..b72b771 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1079,9 +1079,11 @@ static void free_pcppages_bulk(struct zone *zone, int 
count,
int batch_free = 0;
unsigned long nr_scanned;
bool isolated_pageblocks;
+   bool reserved_highatomic;
 
spin_lock(>lock);
isolated_pageblocks = has_isolate_pageblock(zone);
+   reserved_highatomic = !!zone->nr_reserved_highatomic;
nr_scanned = zone_page_state(zone, NR_PAGES_SCANNED);
if (nr_scanned)
__mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
@@ -1118,8 +1120,10 @@ static void free_pcppages_bulk(struct zone *zone, int 
count,
mt = get_pcppage_migratetype(page);
/* MIGRATE_ISOLATE page should not go to pcplists */
VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
+   VM_BUG_ON_PAGE(mt == MIGRATE_HIGHATOMIC, page);
/* Pageblock could have been isolated meanwhile */
-   if (unlikely(isolated_pageblocks))
+   if (unlikely(isolated_pageblocks ||
+   reserved_highatomic))
mt = get_pageblock_migratetype(page);
 
if (bulkfree_pcp_prepare(page))
@@ -1144,7 +1148,9 @@ static void free_one_page(struct zone *zone,
__mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
 
if (unlikely(has_isolate_pageblock(zone) ||
-   is_migrate_isolate(migratetype))) {
+   zone->nr_reserved_highatomic ||
+   is_migrate_isolate(migratetype) ||
+   migratetype == MIGRATE_HIGHATOMIC)) {
migratetype = get_pfnblock_migratetype(page, pfn);
}
__free_one_page(page, pfn, zone, order, migratetype);
-- 
1.8.3.1




Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread kbuild test robot
Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: tile-allyesconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 
'cl_lock_descr_print':
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%s' 
>> expects argument of type 'char *', but argument 4 has type '__u32' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%d' 
>> expects argument of type 'int', but argument 5 has type '__u64' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
>> '%lu' expects argument of type 'long unsigned int', but argument 6 has type 
>> '__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
'%lu' expects argument of type 'long unsigned int', but argument 7 has type 
'__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
'%llx' expects a matching 'long long unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  else
d7e09d039 Peng Tao 2013-05-02  235  return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of 
a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct 
lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243   lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244   const struct 
cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  fid = 
lu_object_fid(>cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  (*printer)(env, cookie, DDESCR"@"DFID, 
PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of 
\a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env 
*env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257 lu_printer_t printer, const 
struct cl_lock *lock)

:: The code at line 249 was first introduced by commit
:: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system 
client support

:: TO: Peng Tao 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread kbuild test robot
Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: tile-allyesconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 
'cl_lock_descr_print':
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value 
computed is not used [-Wunused-value]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%s' 
>> expects argument of type 'char *', but argument 4 has type '__u32' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%d' 
>> expects argument of type 'int', but argument 5 has type '__u64' [-Wformat]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
>> '%lu' expects argument of type 'long unsigned int', but argument 6 has type 
>> '__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
'%lu' expects argument of type 'long unsigned int', but argument 7 has type 
'__u32' [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format 
'%llx' expects a matching 'long long unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' 
expects a matching 'unsigned int' argument [-Wformat]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  else
d7e09d039 Peng Tao 2013-05-02  235  return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of 
a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct 
lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243   lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244   const struct 
cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  fid = 
lu_object_fid(>cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  (*printer)(env, cookie, DDESCR"@"DFID, 
PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of 
\a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env 
*env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257 lu_printer_t printer, const 
struct cl_lock *lock)

:: The code at line 249 was first introduced by commit
:: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system 
client support

:: TO: Peng Tao 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread kbuild test robot
Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 
'cl_lock_descr_print':
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:113: warning: 
>> right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:132: warning: 
right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

   ^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:152: warning: 
right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka 
>> const unsigned int}' [-Wformat=]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
 ^~
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka 
>> const long long unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%lu' expects argument of type 'long unsigned int', but argument 6 has type 
>> '__u32 {aka const unsigned int}' [-Wformat=]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
'%lu' expects argument of type 'long unsigned int', but argument 7 has type 
'__u32 {aka const unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%llx' expects a matching 'long long unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  else
d7e09d039 Peng Tao 2013-05-02  235  return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of 
a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct 
lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243   lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244   const struct 
cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  fid = 
lu_object_fid(>cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  (*printer)(env, cookie, DDESCR"@"DFID, 
PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of 
\a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env 
*env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257 lu_printer_t printer, const 
struct cl_lock *lock)

:: The code at line 249 was first introduced by commit
:: d7e09d0397e84eefbabfd9cb353221f3c6448d83 

Re: [PATCH 2/3] staging: luster: Checkpatch Cleanup

2016-06-18 Thread kbuild test robot
Hi,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.7-rc3 next-20160617]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 
'cl_lock_descr_print':
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:113: warning: 
>> right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:132: warning: 
right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

   ^
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:152: warning: 
right-hand operand of comma expression has no effect [-Wunused-value]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));

   ^
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka 
>> const unsigned int}' [-Wformat=]
 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid));
 ^~
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka 
>> const long long unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%lu' expects argument of type 'long unsigned int', but argument 6 has type 
>> '__u32 {aka const unsigned int}' [-Wformat=]
   drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
'%lu' expects argument of type 'long unsigned int', but argument 7 has type 
'__u32 {aka const unsigned int}' [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%llx' expects a matching 'long long unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]
>> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format 
>> '%x' expects a matching 'unsigned int' argument [-Wformat=]

vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c

d7e09d039 Peng Tao 2013-05-02  233  return names[mode];
d7e09d039 Peng Tao 2013-05-02  234  else
d7e09d039 Peng Tao 2013-05-02  235  return "U";
d7e09d039 Peng Tao 2013-05-02  236  }
d7e09d039 Peng Tao 2013-05-02  237  EXPORT_SYMBOL(cl_lock_mode_name);
d7e09d039 Peng Tao 2013-05-02  238  
d7e09d039 Peng Tao 2013-05-02  239  /**
d7e09d039 Peng Tao 2013-05-02  240   * Prints human readable representation of 
a lock description.
d7e09d039 Peng Tao 2013-05-02  241   */
d7e09d039 Peng Tao 2013-05-02  242  void cl_lock_descr_print(const struct 
lu_env *env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  243   lu_printer_t printer,
d7e09d039 Peng Tao 2013-05-02  244   const struct 
cl_lock_descr *descr)
d7e09d039 Peng Tao 2013-05-02  245  {
d7e09d039 Peng Tao 2013-05-02  246  const struct lu_fid  *fid;
d7e09d039 Peng Tao 2013-05-02  247  
d7e09d039 Peng Tao 2013-05-02  248  fid = 
lu_object_fid(>cld_obj->co_lu);
d7e09d039 Peng Tao 2013-05-02 @249  (*printer)(env, cookie, DDESCR"@"DFID, 
PDESCR(descr), PFID(fid));
d7e09d039 Peng Tao 2013-05-02  250  }
d7e09d039 Peng Tao 2013-05-02  251  EXPORT_SYMBOL(cl_lock_descr_print);
d7e09d039 Peng Tao 2013-05-02  252  
d7e09d039 Peng Tao 2013-05-02  253  /**
d7e09d039 Peng Tao 2013-05-02  254   * Prints human readable representation of 
\a lock to the \a f.
d7e09d039 Peng Tao 2013-05-02  255   */
d7e09d039 Peng Tao 2013-05-02  256  void cl_lock_print(const struct lu_env 
*env, void *cookie,
d7e09d039 Peng Tao 2013-05-02  257 lu_printer_t printer, const 
struct cl_lock *lock)

:: The code at line 249 was first introduced by commit
:: d7e09d0397e84eefbabfd9cb353221f3c6448d83 

Re: [PATCH v2 4/5] mfd: rn5t618: register power off callback optionally

2016-06-18 Thread Stefan Agner
On 2016-06-16 07:59, Lee Jones wrote:
> On Tue, 07 Jun 2016, Stefan Agner wrote:
> 
>> Only register power off if the PMIC is defined as system power
>> controller (see Documentation/devicetree/bindings/power/
>> power-controller.txt).
>>
>> Reviewed-by: Marcel Ziswiler 
>> Signed-off-by: Stefan Agner 
> 
> These should be chronological.
> 

Has been discussed already here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/345835.html

It's an artifact of my development process, I keep the commits in my
local branches without signed off lines and add them before sending out
patches. So whenever I prepare a new revision, collected acks, sobs are
chronological, but end up before my sob.

But since you are the second maintainer which has objection to that
style I probably should change that...

>> ---
>>  drivers/mfd/rn5t618.c | 10 +++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
>> index 7607ced..d9b4d40 100644
>> --- a/drivers/mfd/rn5t618.c
>> +++ b/drivers/mfd/rn5t618.c
>> @@ -103,9 +103,13 @@ static int rn5t618_i2c_probe(struct i2c_client *i2c,
>>  return ret;
>>  }
>>
>> -if (!pm_power_off) {
>> -rn5t618_pm_power_off = priv;
>> -pm_power_off = rn5t618_power_off;
>> +if (of_device_is_system_power_controller(i2c->dev.of_node)) {
>> +if (!pm_power_off) {
>> +rn5t618_pm_power_off = priv;
>> +pm_power_off = rn5t618_power_off;
>> +} else {
>> +dev_err(>dev, "Failed to set poweroff capability, 
>> already defined\n");
> 
> This is not an error.  Please use dev_warn() instead.
> 

Hm, I agree... FWIW, I copied the code (and that message) from here,
where dev_err is probably also not appropriate:
drivers/regulator/act8865-regulator.c


> Also, is this message actually accurate?  Your commit message would
> indicate that it's not.

Hm, maybe we should bail out with an error in that case since DT
explicitly asks to be power controller... Is that what you mean?

--
Stefan

> 
>> +}
>>  }
>>
>>  return 0;


Re: [PATCH v2 4/5] mfd: rn5t618: register power off callback optionally

2016-06-18 Thread Stefan Agner
On 2016-06-16 07:59, Lee Jones wrote:
> On Tue, 07 Jun 2016, Stefan Agner wrote:
> 
>> Only register power off if the PMIC is defined as system power
>> controller (see Documentation/devicetree/bindings/power/
>> power-controller.txt).
>>
>> Reviewed-by: Marcel Ziswiler 
>> Signed-off-by: Stefan Agner 
> 
> These should be chronological.
> 

Has been discussed already here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/345835.html

It's an artifact of my development process, I keep the commits in my
local branches without signed off lines and add them before sending out
patches. So whenever I prepare a new revision, collected acks, sobs are
chronological, but end up before my sob.

But since you are the second maintainer which has objection to that
style I probably should change that...

>> ---
>>  drivers/mfd/rn5t618.c | 10 +++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
>> index 7607ced..d9b4d40 100644
>> --- a/drivers/mfd/rn5t618.c
>> +++ b/drivers/mfd/rn5t618.c
>> @@ -103,9 +103,13 @@ static int rn5t618_i2c_probe(struct i2c_client *i2c,
>>  return ret;
>>  }
>>
>> -if (!pm_power_off) {
>> -rn5t618_pm_power_off = priv;
>> -pm_power_off = rn5t618_power_off;
>> +if (of_device_is_system_power_controller(i2c->dev.of_node)) {
>> +if (!pm_power_off) {
>> +rn5t618_pm_power_off = priv;
>> +pm_power_off = rn5t618_power_off;
>> +} else {
>> +dev_err(>dev, "Failed to set poweroff capability, 
>> already defined\n");
> 
> This is not an error.  Please use dev_warn() instead.
> 

Hm, I agree... FWIW, I copied the code (and that message) from here,
where dev_err is probably also not appropriate:
drivers/regulator/act8865-regulator.c


> Also, is this message actually accurate?  Your commit message would
> indicate that it's not.

Hm, maybe we should bail out with an error in that case since DT
explicitly asks to be power controller... Is that what you mean?

--
Stefan

> 
>> +}
>>  }
>>
>>  return 0;


[PATCH v4 1/5] i.MX: system.c: Convert goto to if statement

2016-06-18 Thread Andrey Smirnov
Using goto here doesn't bring any advantages and only makes the code
flow less clear. No functional changes.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 36 +---
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 105d1ce..d9f8b0e 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -106,26 +106,24 @@ void __init imx_init_l2cache(void)
goto out;
}
 
-   if (readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)
-   goto skip_if_enabled;
-
-   /* Configure the L2 PREFETCH and POWER registers */
-   val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
-   val |= 0x7080;
-   /*
-* The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
-* The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2
-* But according to ARM PL310 errata: 752271
-* ID: 752271: Double linefill feature can cause data corruption
-* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2
-* Workaround: The only workaround to this erratum is to disable the
-* double linefill feature. This is the default behavior.
-*/
-   if (cpu_is_imx6q())
-   val &= ~(1 << 30 | 1 << 23);
-   writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
+   if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
+   /* Configure the L2 PREFETCH and POWER registers */
+   val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
+   val |= 0x7080;
+   /*
+* The L2 cache controller(PL310) version on the i.MX6D/Q is 
r3p1-50rel0
+* The L2 cache controller(PL310) version on the 
i.MX6DL/SOLO/SL is r3p2
+* But according to ARM PL310 errata: 752271
+* ID: 752271: Double linefill feature can cause data corruption
+* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in 
r3p2
+* Workaround: The only workaround to this erratum is to 
disable the
+* double linefill feature. This is the default behavior.
+*/
+   if (cpu_is_imx6q())
+   val &= ~(1 << 30 | 1 << 23);
+   writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
+   }
 
-skip_if_enabled:
iounmap(l2x0_base);
of_node_put(np);
 
-- 
2.5.5



[PATCH v4 1/5] i.MX: system.c: Convert goto to if statement

2016-06-18 Thread Andrey Smirnov
Using goto here doesn't bring any advantages and only makes the code
flow less clear. No functional changes.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 36 +---
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 105d1ce..d9f8b0e 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -106,26 +106,24 @@ void __init imx_init_l2cache(void)
goto out;
}
 
-   if (readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)
-   goto skip_if_enabled;
-
-   /* Configure the L2 PREFETCH and POWER registers */
-   val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
-   val |= 0x7080;
-   /*
-* The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
-* The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2
-* But according to ARM PL310 errata: 752271
-* ID: 752271: Double linefill feature can cause data corruption
-* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in r3p2
-* Workaround: The only workaround to this erratum is to disable the
-* double linefill feature. This is the default behavior.
-*/
-   if (cpu_is_imx6q())
-   val &= ~(1 << 30 | 1 << 23);
-   writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
+   if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
+   /* Configure the L2 PREFETCH and POWER registers */
+   val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
+   val |= 0x7080;
+   /*
+* The L2 cache controller(PL310) version on the i.MX6D/Q is 
r3p1-50rel0
+* The L2 cache controller(PL310) version on the 
i.MX6DL/SOLO/SL is r3p2
+* But according to ARM PL310 errata: 752271
+* ID: 752271: Double linefill feature can cause data corruption
+* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in 
r3p2
+* Workaround: The only workaround to this erratum is to 
disable the
+* double linefill feature. This is the default behavior.
+*/
+   if (cpu_is_imx6q())
+   val &= ~(1 << 30 | 1 << 23);
+   writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
+   }
 
-skip_if_enabled:
iounmap(l2x0_base);
of_node_put(np);
 
-- 
2.5.5



[PATCH v4 3/5] i.MX: system.c: Replace magic numbers

2016-06-18 Thread Andrey Smirnov
Replace magic numbers used to form L310 Prefetch Control Register value.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index b153376..76d7ebe 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -109,7 +109,10 @@ void __init imx_init_l2cache(void)
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
/* Configure the L2 PREFETCH and POWER registers */
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
-   val |= 0x7080;
+   val |= L310_PREFETCH_CTRL_DBL_LINEFILL |
+   L310_PREFETCH_CTRL_INSTR_PREFETCH |
+   L310_PREFETCH_CTRL_DATA_PREFETCH |
+   L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 3/5] i.MX: system.c: Replace magic numbers

2016-06-18 Thread Andrey Smirnov
Replace magic numbers used to form L310 Prefetch Control Register value.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index b153376..76d7ebe 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -109,7 +109,10 @@ void __init imx_init_l2cache(void)
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
/* Configure the L2 PREFETCH and POWER registers */
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
-   val |= 0x7080;
+   val |= L310_PREFETCH_CTRL_DBL_LINEFILL |
+   L310_PREFETCH_CTRL_INSTR_PREFETCH |
+   L310_PREFETCH_CTRL_DATA_PREFETCH |
+   L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 4/5] i.MX: system.c: Tweak prefetch settings for performance

2016-06-18 Thread Andrey Smirnov
Update Prefetch Control Register settings to match that of Freescale's
Linux tree. As the commit e3addf1b773964eac7f797e8538c69481be4279c
states (author Nitin Garg):

"... set Prefetch offset to 15, since it improves memcpy performance by
35%. Don't enable Incr double Linefill enable since it adversely affects
memcpy performance by about 32MB/s and reads by 90MB/s. Tested with 4K
to 16MB sized src and dst aligned buffer..."

Those results are also corroborated by our own testing.

Acked-by: Arnd Bergmann 
Tested-by: Chris Healy 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 76d7ebe..bf7ab77 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -111,8 +111,12 @@ void __init imx_init_l2cache(void)
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= L310_PREFETCH_CTRL_DBL_LINEFILL |
L310_PREFETCH_CTRL_INSTR_PREFETCH |
-   L310_PREFETCH_CTRL_DATA_PREFETCH |
-   L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;
+   L310_PREFETCH_CTRL_DATA_PREFETCH;
+
+   /* Set perfetch offset to improve performance */
+   val &= ~L310_PREFETCH_CTRL_OFFSET_MASK;
+   val |= 15;
+
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 2/5] i.MX: system.c: Remove redundant errata 752271 code

2016-06-18 Thread Andrey Smirnov
Applying a fix for ARM errata 752271 would already be taken care by a
call to a 'fixup' hook as a part of l2x0_of_init() -> __l2c_init() call
chain. Moreso the code in 'fixup' function would do that based on the
PL310's revsion information, whereas removed code does so based on SoC
version which does not work very well on i.MX6Q+ which identifies itself
as i.MX6Q as well but is not affected by 752271.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index d9f8b0e..b153376 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -110,17 +110,6 @@ void __init imx_init_l2cache(void)
/* Configure the L2 PREFETCH and POWER registers */
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= 0x7080;
-   /*
-* The L2 cache controller(PL310) version on the i.MX6D/Q is 
r3p1-50rel0
-* The L2 cache controller(PL310) version on the 
i.MX6DL/SOLO/SL is r3p2
-* But according to ARM PL310 errata: 752271
-* ID: 752271: Double linefill feature can cause data corruption
-* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in 
r3p2
-* Workaround: The only workaround to this erratum is to 
disable the
-* double linefill feature. This is the default behavior.
-*/
-   if (cpu_is_imx6q())
-   val &= ~(1 << 30 | 1 << 23);
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 4/5] i.MX: system.c: Tweak prefetch settings for performance

2016-06-18 Thread Andrey Smirnov
Update Prefetch Control Register settings to match that of Freescale's
Linux tree. As the commit e3addf1b773964eac7f797e8538c69481be4279c
states (author Nitin Garg):

"... set Prefetch offset to 15, since it improves memcpy performance by
35%. Don't enable Incr double Linefill enable since it adversely affects
memcpy performance by about 32MB/s and reads by 90MB/s. Tested with 4K
to 16MB sized src and dst aligned buffer..."

Those results are also corroborated by our own testing.

Acked-by: Arnd Bergmann 
Tested-by: Chris Healy 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 76d7ebe..bf7ab77 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -111,8 +111,12 @@ void __init imx_init_l2cache(void)
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= L310_PREFETCH_CTRL_DBL_LINEFILL |
L310_PREFETCH_CTRL_INSTR_PREFETCH |
-   L310_PREFETCH_CTRL_DATA_PREFETCH |
-   L310_PREFETCH_CTRL_DBL_LINEFILL_INCR;
+   L310_PREFETCH_CTRL_DATA_PREFETCH;
+
+   /* Set perfetch offset to improve performance */
+   val &= ~L310_PREFETCH_CTRL_OFFSET_MASK;
+   val |= 15;
+
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 2/5] i.MX: system.c: Remove redundant errata 752271 code

2016-06-18 Thread Andrey Smirnov
Applying a fix for ARM errata 752271 would already be taken care by a
call to a 'fixup' hook as a part of l2x0_of_init() -> __l2c_init() call
chain. Moreso the code in 'fixup' function would do that based on the
PL310's revsion information, whereas removed code does so based on SoC
version which does not work very well on i.MX6Q+ which identifies itself
as i.MX6Q as well but is not affected by 752271.

Acked-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/system.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index d9f8b0e..b153376 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -110,17 +110,6 @@ void __init imx_init_l2cache(void)
/* Configure the L2 PREFETCH and POWER registers */
val = readl_relaxed(l2x0_base + L310_PREFETCH_CTRL);
val |= 0x7080;
-   /*
-* The L2 cache controller(PL310) version on the i.MX6D/Q is 
r3p1-50rel0
-* The L2 cache controller(PL310) version on the 
i.MX6DL/SOLO/SL is r3p2
-* But according to ARM PL310 errata: 752271
-* ID: 752271: Double linefill feature can cause data corruption
-* Fault Status: Present in: r3p0, r3p1, r3p1-50rel0. Fixed in 
r3p2
-* Workaround: The only workaround to this erratum is to 
disable the
-* double linefill feature. This is the default behavior.
-*/
-   if (cpu_is_imx6q())
-   val &= ~(1 << 30 | 1 << 23);
writel_relaxed(val, l2x0_base + L310_PREFETCH_CTRL);
}
 
-- 
2.5.5



[PATCH v4 5/5] i.MX: Do not explicitly call l2x0_of_init()

2016-06-18 Thread Andrey Smirnov
There's no need to explicitly call l2x0_of_init() since it will be
called as a part of init_IRQ() (see arch/arm/kernel/irq.c for
details). This way we can simplify imx_init_l2cache() and ditch the call
to it on i.MX35 (which does not claim compatibility with
"arm,pl310-cache") alltogether.

Acked-by: Arnd Bergmann 
Suggested-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/imx35-dt.c| 10 +++---
 arch/arm/mach-imx/mach-imx6q.c  |  2 ++
 arch/arm/mach-imx/mach-imx6sl.c |  2 ++
 arch/arm/mach-imx/mach-imx6sx.c |  2 ++
 arch/arm/mach-imx/system.c  | 12 
 5 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c
index e939603..99bb63d 100644
--- a/arch/arm/mach-imx/imx35-dt.c
+++ b/arch/arm/mach-imx/imx35-dt.c
@@ -20,20 +20,16 @@
 #include "common.h"
 #include "mx35.h"
 
-static void __init imx35_irq_init(void)
-{
-   imx_init_l2cache();
-   mx35_init_irq();
-}
-
 static const char * const imx35_dt_board_compat[] __initconst = {
"fsl,imx35",
NULL
 };
 
 DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.map_io = mx35_map_io,
.init_early = imx35_init_early,
-   .init_irq   = imx35_irq_init,
+   .init_irq   = mx35_init_irq,
.dt_compat  = imx35_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index cb27d56..b31890f 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.smp= smp_ops(imx_smp_ops),
.map_io = imx6q_map_io,
.init_irq   = imx6q_init_irq,
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 3003263..f9a9a36 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.init_irq   = imx6sl_init_irq,
.init_machine   = imx6sl_init_machine,
.init_late  = imx6sl_init_late,
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 6a0b061..07a3a34 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.init_irq   = imx6sx_init_irq,
.init_machine   = imx6sx_init_machine,
.dt_compat  = imx6sx_dt_compat,
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index bf7ab77..e442ed7 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -98,13 +98,11 @@ void __init imx_init_l2cache(void)
 
np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache");
if (!np)
-   goto out;
+   return;
 
l2x0_base = of_iomap(np, 0);
-   if (!l2x0_base) {
-   of_node_put(np);
-   goto out;
-   }
+   if (!l2x0_base)
+   goto put_node;
 
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
/* Configure the L2 PREFETCH and POWER registers */
@@ -121,9 +119,7 @@ void __init imx_init_l2cache(void)
}
 
iounmap(l2x0_base);
+put_node:
of_node_put(np);
-
-out:
-   l2x0_of_init(0, ~0);
 }
 #endif
-- 
2.5.5



[PATCH v3 1/3] arm: tegra: initial support for apalis tk1

2016-06-18 Thread Marcel Ziswiler
This patch adds the device tree to support Toradex Apalis TK1 a
computer on module which can be used on different carrier boards.

The module consists of a Tegra TK1 SoC, a PMIC solution, 2 GB of DDR3L
RAM, a bunch of level shifters, an eMMC, a TMP451 temperature sensor
chip and an I210 gigabit Ethernet controller. Furthermore, there is an
SGTL5000 audio codec plus a Kinetis MK20DN512 companion micro
controller for analogue, CAN and resistive touch functionality which
are not yet supported. Anything that is not self contained on the
module is disabled by default.

The device tree for the Evaluation Board includes the module's device
tree and enables the supported peripherals of the carrier board (the
Evaluation Board supports almost all of them).

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- fix glitch on reg_3v3 during boot by explicitly specifying reg_3v3_mxm
  and reg_3v3 to be always-on as well as boot-on
- don't tri-state dap2 fs and sclk pins to allow being used as outputs as
  required for HDA
- configure level-shifter as output for HDA
- integrate SGTL5000 audio codec support
- fix comments concerning AS3722 PMIC GPIO usage
- indicate regulator-boot-on for vddio_1v8 on sd5
- limit speed of GEN2_I2C aka I2C2_SDA/SCL being used for DDC/EDID to
  100 kHz
- move dr_mode property from usb-phy to usb node for correctness

Changes in v2:
- split device tree binding documentation update into 2 separate
  patches one for Colibri T30 where it was missing so far and another
  one for Apalis TK1
- using dashes aka '-' in compatible strings as suggested by Rob
- remove commas from unit addresses as suggested by Rob (this requires
  the separate patch to clean up tegra124.dtsi as well as all the other
  boards basing on it to be applied first)
- doing multiple values per line for nvidia,emc-configuration as
  suggested by Rob
- change from boot to default pinctrl-name in order for it to actually
  be used
- add a note to pin ph3 for PWM3 is actually active on pu6 being Apalis
  BKL1_PWM, configure function gmi, pull it down and tristate it
- change the note on pn2 to read SATA1_ACT# and configure it for
  function gmi (typically to be used as LED GPIO)
- remove the bogus open-drain property on pi5, pj0, pj2, pk2 and po5
  causing pinctrl not to be applied properly
- pull all SHIFT_CTRL_OE pins down in order for the level shifter
  outputs to actually be driven properly
- change ahub i2s instance to the one at base address 70301200 as on
  our design that connects to the audio codec (further audio
  integration left for future patches)

 arch/arm/boot/dts/Makefile |1 +
 arch/arm/boot/dts/tegra124-apalis-emc.dtsi | 1502 
 arch/arm/boot/dts/tegra124-apalis-eval.dts |  284 
 arch/arm/boot/dts/tegra124-apalis.dtsi | 2084 
 4 files changed, 3871 insertions(+)
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-emc.dtsi
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-eval.dts
 create mode 100644 arch/arm/boot/dts/tegra124-apalis.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 435bf6b..7a86756 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -802,6 +802,7 @@ dtb-$(CONFIG_ARCH_TEGRA_114_SOC) += \
tegra114-roth.dtb \
tegra114-tn7.dtb
 dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \
+   tegra124-apalis-eval.dtb \
tegra124-jetson-tk1.dtb \
tegra124-nyan-big.dtb \
tegra124-nyan-blaze.dtb \
diff --git a/arch/arm/boot/dts/tegra124-apalis-emc.dtsi 
b/arch/arm/boot/dts/tegra124-apalis-emc.dtsi
new file mode 100644
index 000..ca2c3a5
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-apalis-emc.dtsi
@@ -0,0 +1,1502 @@
+/*
+ * Copyright 2016 Toradex AG
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This file is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the 

[PATCH v4 0/5] i.MX L2-cache code cleanups and performance tweaks

2016-06-18 Thread Andrey Smirnov
Hi everyone,

Here's the fourth (aka v3 with patch 3/5 not broken) version of i.MX
L2-cache related patches. Here's what's new from v2:

   - Generic ARM patches were split into a separte series

   - Typo and whitespace fixes (as per Uwe's suggestions)

   - Re-ordered l2c_aux_val, and l2c_aux_mask such that
 initializers are placed in the order of their declaration.

Let me know if any more changes to the series are needed.

Andrey Smirnov

Andrey Smirnov (5):
  i.MX: system.c: Convert goto to if statement
  i.MX: system.c: Remove redundant errata 752271 code
  i.MX: system.c: Replace magic numbers
  i.MX: system.c: Tweak prefetch settings for performance
  i.MX: Do not explicitly call l2x0_of_init()

 arch/arm/mach-imx/imx35-dt.c| 10 +++---
 arch/arm/mach-imx/mach-imx6q.c  |  2 ++
 arch/arm/mach-imx/mach-imx6sl.c |  2 ++
 arch/arm/mach-imx/mach-imx6sx.c |  2 ++
 arch/arm/mach-imx/system.c  | 42 -
 5 files changed, 25 insertions(+), 33 deletions(-)

-- 
2.5.5



[PATCH v4 5/5] i.MX: Do not explicitly call l2x0_of_init()

2016-06-18 Thread Andrey Smirnov
There's no need to explicitly call l2x0_of_init() since it will be
called as a part of init_IRQ() (see arch/arm/kernel/irq.c for
details). This way we can simplify imx_init_l2cache() and ditch the call
to it on i.MX35 (which does not claim compatibility with
"arm,pl310-cache") alltogether.

Acked-by: Arnd Bergmann 
Suggested-by: Arnd Bergmann 
Signed-off-by: Andrey Smirnov 
---
 arch/arm/mach-imx/imx35-dt.c| 10 +++---
 arch/arm/mach-imx/mach-imx6q.c  |  2 ++
 arch/arm/mach-imx/mach-imx6sl.c |  2 ++
 arch/arm/mach-imx/mach-imx6sx.c |  2 ++
 arch/arm/mach-imx/system.c  | 12 
 5 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c
index e939603..99bb63d 100644
--- a/arch/arm/mach-imx/imx35-dt.c
+++ b/arch/arm/mach-imx/imx35-dt.c
@@ -20,20 +20,16 @@
 #include "common.h"
 #include "mx35.h"
 
-static void __init imx35_irq_init(void)
-{
-   imx_init_l2cache();
-   mx35_init_irq();
-}
-
 static const char * const imx35_dt_board_compat[] __initconst = {
"fsl,imx35",
NULL
 };
 
 DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.map_io = mx35_map_io,
.init_early = imx35_init_early,
-   .init_irq   = imx35_irq_init,
+   .init_irq   = mx35_init_irq,
.dt_compat  = imx35_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index cb27d56..b31890f 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.smp= smp_ops(imx_smp_ops),
.map_io = imx6q_map_io,
.init_irq   = imx6q_init_irq,
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 3003263..f9a9a36 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.init_irq   = imx6sl_init_irq,
.init_machine   = imx6sl_init_machine,
.init_late  = imx6sl_init_late,
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 6a0b061..07a3a34 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = {
 };
 
 DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
+   .l2c_aux_val= 0,
+   .l2c_aux_mask   = ~0,
.init_irq   = imx6sx_init_irq,
.init_machine   = imx6sx_init_machine,
.dt_compat  = imx6sx_dt_compat,
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index bf7ab77..e442ed7 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -98,13 +98,11 @@ void __init imx_init_l2cache(void)
 
np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache");
if (!np)
-   goto out;
+   return;
 
l2x0_base = of_iomap(np, 0);
-   if (!l2x0_base) {
-   of_node_put(np);
-   goto out;
-   }
+   if (!l2x0_base)
+   goto put_node;
 
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
/* Configure the L2 PREFETCH and POWER registers */
@@ -121,9 +119,7 @@ void __init imx_init_l2cache(void)
}
 
iounmap(l2x0_base);
+put_node:
of_node_put(np);
-
-out:
-   l2x0_of_init(0, ~0);
 }
 #endif
-- 
2.5.5



[PATCH v3 1/3] arm: tegra: initial support for apalis tk1

2016-06-18 Thread Marcel Ziswiler
This patch adds the device tree to support Toradex Apalis TK1 a
computer on module which can be used on different carrier boards.

The module consists of a Tegra TK1 SoC, a PMIC solution, 2 GB of DDR3L
RAM, a bunch of level shifters, an eMMC, a TMP451 temperature sensor
chip and an I210 gigabit Ethernet controller. Furthermore, there is an
SGTL5000 audio codec plus a Kinetis MK20DN512 companion micro
controller for analogue, CAN and resistive touch functionality which
are not yet supported. Anything that is not self contained on the
module is disabled by default.

The device tree for the Evaluation Board includes the module's device
tree and enables the supported peripherals of the carrier board (the
Evaluation Board supports almost all of them).

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- fix glitch on reg_3v3 during boot by explicitly specifying reg_3v3_mxm
  and reg_3v3 to be always-on as well as boot-on
- don't tri-state dap2 fs and sclk pins to allow being used as outputs as
  required for HDA
- configure level-shifter as output for HDA
- integrate SGTL5000 audio codec support
- fix comments concerning AS3722 PMIC GPIO usage
- indicate regulator-boot-on for vddio_1v8 on sd5
- limit speed of GEN2_I2C aka I2C2_SDA/SCL being used for DDC/EDID to
  100 kHz
- move dr_mode property from usb-phy to usb node for correctness

Changes in v2:
- split device tree binding documentation update into 2 separate
  patches one for Colibri T30 where it was missing so far and another
  one for Apalis TK1
- using dashes aka '-' in compatible strings as suggested by Rob
- remove commas from unit addresses as suggested by Rob (this requires
  the separate patch to clean up tegra124.dtsi as well as all the other
  boards basing on it to be applied first)
- doing multiple values per line for nvidia,emc-configuration as
  suggested by Rob
- change from boot to default pinctrl-name in order for it to actually
  be used
- add a note to pin ph3 for PWM3 is actually active on pu6 being Apalis
  BKL1_PWM, configure function gmi, pull it down and tristate it
- change the note on pn2 to read SATA1_ACT# and configure it for
  function gmi (typically to be used as LED GPIO)
- remove the bogus open-drain property on pi5, pj0, pj2, pk2 and po5
  causing pinctrl not to be applied properly
- pull all SHIFT_CTRL_OE pins down in order for the level shifter
  outputs to actually be driven properly
- change ahub i2s instance to the one at base address 70301200 as on
  our design that connects to the audio codec (further audio
  integration left for future patches)

 arch/arm/boot/dts/Makefile |1 +
 arch/arm/boot/dts/tegra124-apalis-emc.dtsi | 1502 
 arch/arm/boot/dts/tegra124-apalis-eval.dts |  284 
 arch/arm/boot/dts/tegra124-apalis.dtsi | 2084 
 4 files changed, 3871 insertions(+)
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-emc.dtsi
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-eval.dts
 create mode 100644 arch/arm/boot/dts/tegra124-apalis.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 435bf6b..7a86756 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -802,6 +802,7 @@ dtb-$(CONFIG_ARCH_TEGRA_114_SOC) += \
tegra114-roth.dtb \
tegra114-tn7.dtb
 dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \
+   tegra124-apalis-eval.dtb \
tegra124-jetson-tk1.dtb \
tegra124-nyan-big.dtb \
tegra124-nyan-blaze.dtb \
diff --git a/arch/arm/boot/dts/tegra124-apalis-emc.dtsi 
b/arch/arm/boot/dts/tegra124-apalis-emc.dtsi
new file mode 100644
index 000..ca2c3a5
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-apalis-emc.dtsi
@@ -0,0 +1,1502 @@
+/*
+ * Copyright 2016 Toradex AG
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This file is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * 

[PATCH v4 0/5] i.MX L2-cache code cleanups and performance tweaks

2016-06-18 Thread Andrey Smirnov
Hi everyone,

Here's the fourth (aka v3 with patch 3/5 not broken) version of i.MX
L2-cache related patches. Here's what's new from v2:

   - Generic ARM patches were split into a separte series

   - Typo and whitespace fixes (as per Uwe's suggestions)

   - Re-ordered l2c_aux_val, and l2c_aux_mask such that
 initializers are placed in the order of their declaration.

Let me know if any more changes to the series are needed.

Andrey Smirnov

Andrey Smirnov (5):
  i.MX: system.c: Convert goto to if statement
  i.MX: system.c: Remove redundant errata 752271 code
  i.MX: system.c: Replace magic numbers
  i.MX: system.c: Tweak prefetch settings for performance
  i.MX: Do not explicitly call l2x0_of_init()

 arch/arm/mach-imx/imx35-dt.c| 10 +++---
 arch/arm/mach-imx/mach-imx6q.c  |  2 ++
 arch/arm/mach-imx/mach-imx6sl.c |  2 ++
 arch/arm/mach-imx/mach-imx6sx.c |  2 ++
 arch/arm/mach-imx/system.c  | 42 -
 5 files changed, 25 insertions(+), 33 deletions(-)

-- 
2.5.5



[PATCH v3 2/3] arm: tegra: add colibri t30 device tree binding documentation

2016-06-18 Thread Marcel Ziswiler
Add the device tree binding documentation for Colibri T30 which was
missing so far.

Signed-off-by: Marcel Ziswiler 
Acked-by: Rob Herring 
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/arm/tegra.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt 
b/Documentation/devicetree/bindings/arm/tegra.txt
index 73278c6..428e098 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -33,6 +33,8 @@ board-specific compatible values:
   toradex,apalis_t30
   toradex,apalis_t30-eval
   toradex,colibri_t20-512
+  toradex,colibri_t30
+  toradex,colibri_t30-eval-v3
   toradex,iris
 
 Trusted Foundations
-- 
2.5.5



[PATCH v3 3/3] arm: tegra: add apalis tk1 device tree binding documentation

2016-06-18 Thread Marcel Ziswiler
Add the device tree binding documentation for Apalis TK1.

Note that this is using dashes aka '-' in compatible strings as
previously suggested by Rob.

Signed-off-by: Marcel Ziswiler 
Acked-by: Rob Herring 
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/arm/tegra.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt 
b/Documentation/devicetree/bindings/arm/tegra.txt
index 428e098..b5a4342 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -32,6 +32,8 @@ board-specific compatible values:
   nvidia,whistler
   toradex,apalis_t30
   toradex,apalis_t30-eval
+  toradex,apalis-tk1
+  toradex,apalis-tk1-eval
   toradex,colibri_t20-512
   toradex,colibri_t30
   toradex,colibri_t30-eval-v3
-- 
2.5.5



[PATCH v3 2/3] arm: tegra: add colibri t30 device tree binding documentation

2016-06-18 Thread Marcel Ziswiler
Add the device tree binding documentation for Colibri T30 which was
missing so far.

Signed-off-by: Marcel Ziswiler 
Acked-by: Rob Herring 
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/arm/tegra.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt 
b/Documentation/devicetree/bindings/arm/tegra.txt
index 73278c6..428e098 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -33,6 +33,8 @@ board-specific compatible values:
   toradex,apalis_t30
   toradex,apalis_t30-eval
   toradex,colibri_t20-512
+  toradex,colibri_t30
+  toradex,colibri_t30-eval-v3
   toradex,iris
 
 Trusted Foundations
-- 
2.5.5



[PATCH v3 3/3] arm: tegra: add apalis tk1 device tree binding documentation

2016-06-18 Thread Marcel Ziswiler
Add the device tree binding documentation for Apalis TK1.

Note that this is using dashes aka '-' in compatible strings as
previously suggested by Rob.

Signed-off-by: Marcel Ziswiler 
Acked-by: Rob Herring 
---

Changes in v3: None
Changes in v2: None

 Documentation/devicetree/bindings/arm/tegra.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/tegra.txt 
b/Documentation/devicetree/bindings/arm/tegra.txt
index 428e098..b5a4342 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -32,6 +32,8 @@ board-specific compatible values:
   nvidia,whistler
   toradex,apalis_t30
   toradex,apalis_t30-eval
+  toradex,apalis-tk1
+  toradex,apalis-tk1-eval
   toradex,colibri_t20-512
   toradex,colibri_t30
   toradex,colibri_t30-eval-v3
-- 
2.5.5



[PATCH v2] arm: tegra124: remove commas from unit addresses

2016-06-18 Thread Marcel Ziswiler
Remove commas from unit addresses as suggested by Rob Herring upon me
posting initial Apalis TK1 support:

http://article.gmane.org/gmane.linux.ports.tegra/26608

Signed-off-by: Marcel Ziswiler 

---

Changes in v2:
- leave gpu node untouched as fix-ups done by older U-Boot version
  otherwise may fail as pointed out by Stephen Warren

 arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-jetson-tk1.dts  |  70 +++
 arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi   |   6 +-
 arch/arm/boot/dts/tegra124-nyan-big.dts|   4 +-
 arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-nyan-blaze.dts  |   2 +-
 arch/arm/boot/dts/tegra124-nyan.dtsi   |  60 ++---
 arch/arm/boot/dts/tegra124-venice2.dts |  70 +++
 arch/arm/boot/dts/tegra124.dtsi| 120 -
 9 files changed, 172 insertions(+), 172 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi 
b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
index 2c5cede..accb705 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
@@ -1,5 +1,5 @@
 / {
-   clock@0,60006000 {
+   clock@60006000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
@@ -78,7 +78,7 @@
};
};
 
-   emc@0,7001b000 {
+   emc@7001b000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
@@ -2101,7 +2101,7 @@
};
};
 
-   memory-controller@0,70019000 {
+   memory-controller@70019000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts 
b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index f6f5d3c..a020e76 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -10,8 +10,8 @@
compatible = "nvidia,jetson-tk1", "nvidia,tegra124";
 
aliases {
-   rtc0 = "/i2c@0,7000d000/pmic@40";
-   rtc1 = "/rtc@0,7000e000";
+   rtc0 = "/i2c@7000d000/pmic@40";
+   rtc1 = "/rtc@7000e000";
 
/* This order keeps the mapping DB9 connector <-> ttyS0 */
serial0 = 
@@ -27,7 +27,7 @@
reg = <0x0 0x8000 0x0 0x8000>;
};
 
-   pcie-controller@0,01003000 {
+   pcie-controller@01003000 {
status = "okay";
 
avddio-pex-supply = <_1v05_run>;
@@ -40,21 +40,21 @@
 
/* Mini PCIe */
pci@1,0 {
-   phys = <&{/padctl@0,7009f000/pads/pcie/lanes/pcie-4}>;
+   phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
phy-names = "pcie-0";
status = "okay";
};
 
/* Gigabit Ethernet */
pci@2,0 {
-   phys = <&{/padctl@0,7009f000/pads/pcie/lanes/pcie-2}>;
+   phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
phy-names = "pcie-0";
status = "okay";
};
};
 
-   host1x@0,5000 {
-   hdmi@0,5428 {
+   host1x@5000 {
+   hdmi@5428 {
status = "okay";
 
hdmi-supply = <_5v0_hdmi>;
@@ -75,7 +75,7 @@
vdd-supply = <_gpu>;
};
 
-   pinmux: pinmux@0,7868 {
+   pinmux: pinmux@7868 {
pinctrl-names = "boot";
pinctrl-0 = <_boot>;
 
@@ -1404,12 +1404,12 @@
};
 
/* DB9 serial port */
-   serial@0,70006300 {
+   serial@70006300 {
status = "okay";
};
 
/* Expansion GEN1_I2C_*, mini-PCIe I2C, on-board components */
-   i2c@0,7000c000 {
+   i2c@7000c000 {
status = "okay";
clock-frequency = <10>;
 
@@ -1437,25 +1437,25 @@
};
 
/* Expansion GEN2_I2C_* */
-   i2c@0,7000c400 {
+   i2c@7000c400 {
status = "okay";
clock-frequency = <10>;
};
 
/* Expansion CAM_I2C_* */
-   i2c@0,7000c500 {
+   i2c@7000c500 {
status = "okay";
clock-frequency = <10>;
};
 
/* HDMI DDC */
-   hdmi_ddc: i2c@0,7000c700 {
+   hdmi_ddc: i2c@7000c700 {
status = "okay";
clock-frequency = <10>;
};
 
/* Expansion PWR_I2C_*, on-board components */
-   i2c@0,7000d000 {
+   i2c@7000d000 {
status = "okay";
clock-frequency = <40>;
 
@@ -1646,12 +1646,12 @@
};
 
/* Expansion TS_SPI_* */
-   spi@0,7000d400 {
+   spi@7000d400 {

[PATCH v2] arm: tegra124: remove commas from unit addresses

2016-06-18 Thread Marcel Ziswiler
Remove commas from unit addresses as suggested by Rob Herring upon me
posting initial Apalis TK1 support:

http://article.gmane.org/gmane.linux.ports.tegra/26608

Signed-off-by: Marcel Ziswiler 

---

Changes in v2:
- leave gpu node untouched as fix-ups done by older U-Boot version
  otherwise may fail as pointed out by Stephen Warren

 arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-jetson-tk1.dts  |  70 +++
 arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi   |   6 +-
 arch/arm/boot/dts/tegra124-nyan-big.dts|   4 +-
 arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi |   6 +-
 arch/arm/boot/dts/tegra124-nyan-blaze.dts  |   2 +-
 arch/arm/boot/dts/tegra124-nyan.dtsi   |  60 ++---
 arch/arm/boot/dts/tegra124-venice2.dts |  70 +++
 arch/arm/boot/dts/tegra124.dtsi| 120 -
 9 files changed, 172 insertions(+), 172 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi 
b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
index 2c5cede..accb705 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
@@ -1,5 +1,5 @@
 / {
-   clock@0,60006000 {
+   clock@60006000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
@@ -78,7 +78,7 @@
};
};
 
-   emc@0,7001b000 {
+   emc@7001b000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
@@ -2101,7 +2101,7 @@
};
};
 
-   memory-controller@0,70019000 {
+   memory-controller@70019000 {
emc-timings-3 {
nvidia,ram-code = <3>;
 
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts 
b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index f6f5d3c..a020e76 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -10,8 +10,8 @@
compatible = "nvidia,jetson-tk1", "nvidia,tegra124";
 
aliases {
-   rtc0 = "/i2c@0,7000d000/pmic@40";
-   rtc1 = "/rtc@0,7000e000";
+   rtc0 = "/i2c@7000d000/pmic@40";
+   rtc1 = "/rtc@7000e000";
 
/* This order keeps the mapping DB9 connector <-> ttyS0 */
serial0 = 
@@ -27,7 +27,7 @@
reg = <0x0 0x8000 0x0 0x8000>;
};
 
-   pcie-controller@0,01003000 {
+   pcie-controller@01003000 {
status = "okay";
 
avddio-pex-supply = <_1v05_run>;
@@ -40,21 +40,21 @@
 
/* Mini PCIe */
pci@1,0 {
-   phys = <&{/padctl@0,7009f000/pads/pcie/lanes/pcie-4}>;
+   phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-4}>;
phy-names = "pcie-0";
status = "okay";
};
 
/* Gigabit Ethernet */
pci@2,0 {
-   phys = <&{/padctl@0,7009f000/pads/pcie/lanes/pcie-2}>;
+   phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
phy-names = "pcie-0";
status = "okay";
};
};
 
-   host1x@0,5000 {
-   hdmi@0,5428 {
+   host1x@5000 {
+   hdmi@5428 {
status = "okay";
 
hdmi-supply = <_5v0_hdmi>;
@@ -75,7 +75,7 @@
vdd-supply = <_gpu>;
};
 
-   pinmux: pinmux@0,7868 {
+   pinmux: pinmux@7868 {
pinctrl-names = "boot";
pinctrl-0 = <_boot>;
 
@@ -1404,12 +1404,12 @@
};
 
/* DB9 serial port */
-   serial@0,70006300 {
+   serial@70006300 {
status = "okay";
};
 
/* Expansion GEN1_I2C_*, mini-PCIe I2C, on-board components */
-   i2c@0,7000c000 {
+   i2c@7000c000 {
status = "okay";
clock-frequency = <10>;
 
@@ -1437,25 +1437,25 @@
};
 
/* Expansion GEN2_I2C_* */
-   i2c@0,7000c400 {
+   i2c@7000c400 {
status = "okay";
clock-frequency = <10>;
};
 
/* Expansion CAM_I2C_* */
-   i2c@0,7000c500 {
+   i2c@7000c500 {
status = "okay";
clock-frequency = <10>;
};
 
/* HDMI DDC */
-   hdmi_ddc: i2c@0,7000c700 {
+   hdmi_ddc: i2c@7000c700 {
status = "okay";
clock-frequency = <10>;
};
 
/* Expansion PWR_I2C_*, on-board components */
-   i2c@0,7000d000 {
+   i2c@7000d000 {
status = "okay";
clock-frequency = <40>;
 
@@ -1646,12 +1646,12 @@
};
 
/* Expansion TS_SPI_* */
-   spi@0,7000d400 {
+   spi@7000d400 {
status = "okay";
};
 
   

Re: PATCH 1/1] AX.25: Close socket connection on session completion

2016-06-18 Thread David Ranch
Hello David,

I don't have a specific commit # for you at the moment but there have been a 
few serious regressions since 4.1.x.  When new code gets commited, are there 
any systems to run regession tests on?  I'd be willing to build up a pair of 
VMs that can be run with scripts to verify say basic sanity for kissattach, 
ax.25, netrom, rose, etc.

Btw, once I get back, I hope to pursue some additional negative case fixes:  
(pulling a usb-to-serial adapter when used with kiss-attach will panic the 
kernel, ifconfig rose0 down will take the kernel to 100%, and a data corruption 
issue for large transfers (2MB+).

Thanks for your help!

--David
KI6ZHD
--David

On June 17, 2016 12:33:19 PM CST, David Miller  wrote:
>From: Basil Gunn 
>Date: Thu, 16 Jun 2016 09:42:30 -0700
>
>> A socket connection made in ax.25 is not closed when session is
>> completed.  The heartbeat timer is stopped prematurely and this is
>> where the socket gets closed. Allow heatbeat timer to run to close
>> socket. Symptom occurs in kernels >= 4.2.0
>> 
>> Originally sent 6/15/2016. Resend with distribution list matching
>> scripts/maintainer.pl output.
>> 
>> Signed-off-by: Basil Gunn 
>
>What changed in 4.2.x that broke this?
>--
>To unsubscribe from this list: send the line "unsubscribe linux-hams"
>in
>the body of a message to majord...@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html



Re: PATCH 1/1] AX.25: Close socket connection on session completion

2016-06-18 Thread David Ranch
Hello David,

I don't have a specific commit # for you at the moment but there have been a 
few serious regressions since 4.1.x.  When new code gets commited, are there 
any systems to run regession tests on?  I'd be willing to build up a pair of 
VMs that can be run with scripts to verify say basic sanity for kissattach, 
ax.25, netrom, rose, etc.

Btw, once I get back, I hope to pursue some additional negative case fixes:  
(pulling a usb-to-serial adapter when used with kiss-attach will panic the 
kernel, ifconfig rose0 down will take the kernel to 100%, and a data corruption 
issue for large transfers (2MB+).

Thanks for your help!

--David
KI6ZHD
--David

On June 17, 2016 12:33:19 PM CST, David Miller  wrote:
>From: Basil Gunn 
>Date: Thu, 16 Jun 2016 09:42:30 -0700
>
>> A socket connection made in ax.25 is not closed when session is
>> completed.  The heartbeat timer is stopped prematurely and this is
>> where the socket gets closed. Allow heatbeat timer to run to close
>> socket. Symptom occurs in kernels >= 4.2.0
>> 
>> Originally sent 6/15/2016. Resend with distribution list matching
>> scripts/maintainer.pl output.
>> 
>> Signed-off-by: Basil Gunn 
>
>What changed in 4.2.x that broke this?
>--
>To unsubscribe from this list: send the line "unsubscribe linux-hams"
>in
>the body of a message to majord...@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html



[PATCH v4 2/3] ARM: tegra: apalis/colibri t30: integrate audio

2016-06-18 Thread Marcel Ziswiler
Integrate Freescale SGTL5000 analogue audio codec support.

Signed-off-by: Marcel Ziswiler 
Reviewed-by: Stephen Warren 
Signed-off-by: Marcel Ziswiler 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/boot/dts/tegra30-apalis.dtsi  | 49 ++
 arch/arm/boot/dts/tegra30-colibri.dtsi | 49 ++
 2 files changed, 98 insertions(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi 
b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 192b951..96865ea 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -48,6 +48,24 @@
pinctrl-0 = <_default>;
 
state_default: pinmux {
+   /* Analogue Audio (On-module) */
+   clk1_out_pw4 {
+   nvidia,pins = "clk1_out_pw4";
+   nvidia,function = "extperiph1";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   nvidia,enable-input = ;
+   };
+   dap3_fs_pp0 {
+   nvidia,pins =   "dap3_fs_pp0",
+   "dap3_sclk_pp3",
+   "dap3_din_pp1",
+   "dap3_dout_pp2";
+   nvidia,function = "i2s2";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   };
+
/* Apalis BKL1_ON */
pv2 {
nvidia,pins = "pv2";
@@ -429,6 +447,15 @@
status = "okay";
clock-frequency = <10>;
 
+   /* SGTL5000 audio codec */
+   sgtl5000: codec@0a {
+   compatible = "fsl,sgtl5000";
+   reg = <0x0a>;
+   VDDA-supply = <_3v3_reg>;
+   VDDIO-supply = <_3v3_reg>;
+   clocks = <_car TEGRA30_CLK_EXTERN1>;
+   };
+
pmic: tps65911@2d {
compatible = "ti,tps65911";
reg = <0x2d>;
@@ -660,6 +687,12 @@
nvidia,sys-clock-req-active-high;
};
 
+   ahub@7008 {
+   i2s@70080500 {
+   status = "okay";
+   };
+   };
+
/* eMMC */
sdhci@78000600 {
status = "okay";
@@ -733,4 +766,20 @@
regulator-always-on;
};
};
+
+   sound {
+   compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
+"nvidia,tegra-audio-sgtl5000";
+   nvidia,model = "Toradex Apalis T30";
+   nvidia,audio-routing =
+   "Headphone Jack", "HP_OUT",
+   "LINE_IN", "Line In Jack",
+   "MIC_IN", "Mic Jack";
+   nvidia,i2s-controller = <_i2s2>;
+   nvidia,audio-codec = <>;
+   clocks = <_car TEGRA30_CLK_PLL_A>,
+<_car TEGRA30_CLK_PLL_A_OUT0>,
+<_car TEGRA30_CLK_EXTERN1>;
+   clock-names = "pll_a", "pll_a_out0", "mclk";
+   };
 };
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi 
b/arch/arm/boot/dts/tegra30-colibri.dtsi
index a265534..7b7af78 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -29,6 +29,24 @@
pinctrl-0 = <_default>;
 
state_default: pinmux {
+   /* Analogue Audio (On-module) */
+   clk1_out_pw4 {
+   nvidia,pins = "clk1_out_pw4";
+   nvidia,function = "extperiph1";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   nvidia,enable-input = ;
+   };
+   dap3_fs_pp0 {
+   nvidia,pins =   "dap3_fs_pp0",
+   "dap3_sclk_pp3",
+   "dap3_din_pp1",
+   "dap3_dout_pp2";
+   nvidia,function = "i2s2";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   };
+
/* Colibri BL_ON */
pv2 {
nvidia,pins = "pv2";
@@ -207,6 +225,15 @@
status = "okay";
clock-frequency = <10>;
 
+   /* SGTL5000 audio codec */
+   sgtl5000: 

[PATCH v4 2/3] ARM: tegra: apalis/colibri t30: integrate audio

2016-06-18 Thread Marcel Ziswiler
Integrate Freescale SGTL5000 analogue audio codec support.

Signed-off-by: Marcel Ziswiler 
Reviewed-by: Stephen Warren 
Signed-off-by: Marcel Ziswiler 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/boot/dts/tegra30-apalis.dtsi  | 49 ++
 arch/arm/boot/dts/tegra30-colibri.dtsi | 49 ++
 2 files changed, 98 insertions(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi 
b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 192b951..96865ea 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -48,6 +48,24 @@
pinctrl-0 = <_default>;
 
state_default: pinmux {
+   /* Analogue Audio (On-module) */
+   clk1_out_pw4 {
+   nvidia,pins = "clk1_out_pw4";
+   nvidia,function = "extperiph1";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   nvidia,enable-input = ;
+   };
+   dap3_fs_pp0 {
+   nvidia,pins =   "dap3_fs_pp0",
+   "dap3_sclk_pp3",
+   "dap3_din_pp1",
+   "dap3_dout_pp2";
+   nvidia,function = "i2s2";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   };
+
/* Apalis BKL1_ON */
pv2 {
nvidia,pins = "pv2";
@@ -429,6 +447,15 @@
status = "okay";
clock-frequency = <10>;
 
+   /* SGTL5000 audio codec */
+   sgtl5000: codec@0a {
+   compatible = "fsl,sgtl5000";
+   reg = <0x0a>;
+   VDDA-supply = <_3v3_reg>;
+   VDDIO-supply = <_3v3_reg>;
+   clocks = <_car TEGRA30_CLK_EXTERN1>;
+   };
+
pmic: tps65911@2d {
compatible = "ti,tps65911";
reg = <0x2d>;
@@ -660,6 +687,12 @@
nvidia,sys-clock-req-active-high;
};
 
+   ahub@7008 {
+   i2s@70080500 {
+   status = "okay";
+   };
+   };
+
/* eMMC */
sdhci@78000600 {
status = "okay";
@@ -733,4 +766,20 @@
regulator-always-on;
};
};
+
+   sound {
+   compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
+"nvidia,tegra-audio-sgtl5000";
+   nvidia,model = "Toradex Apalis T30";
+   nvidia,audio-routing =
+   "Headphone Jack", "HP_OUT",
+   "LINE_IN", "Line In Jack",
+   "MIC_IN", "Mic Jack";
+   nvidia,i2s-controller = <_i2s2>;
+   nvidia,audio-codec = <>;
+   clocks = <_car TEGRA30_CLK_PLL_A>,
+<_car TEGRA30_CLK_PLL_A_OUT0>,
+<_car TEGRA30_CLK_EXTERN1>;
+   clock-names = "pll_a", "pll_a_out0", "mclk";
+   };
 };
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi 
b/arch/arm/boot/dts/tegra30-colibri.dtsi
index a265534..7b7af78 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -29,6 +29,24 @@
pinctrl-0 = <_default>;
 
state_default: pinmux {
+   /* Analogue Audio (On-module) */
+   clk1_out_pw4 {
+   nvidia,pins = "clk1_out_pw4";
+   nvidia,function = "extperiph1";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   nvidia,enable-input = ;
+   };
+   dap3_fs_pp0 {
+   nvidia,pins =   "dap3_fs_pp0",
+   "dap3_sclk_pp3",
+   "dap3_din_pp1",
+   "dap3_dout_pp2";
+   nvidia,function = "i2s2";
+   nvidia,pull = ;
+   nvidia,tristate = ;
+   };
+
/* Colibri BL_ON */
pv2 {
nvidia,pins = "pv2";
@@ -207,6 +225,15 @@
status = "okay";
clock-frequency = <10>;
 
+   /* SGTL5000 audio codec */
+   sgtl5000: codec@0a {
+   compatible = "fsl,sgtl5000";
+ 

[PATCH v4 3/3] ARM: tegra: enable sgtl5000 audio

2016-06-18 Thread Marcel Ziswiler
The NVIDIA Tegra 3 aka T30 based Apalis T30 and Colibri T30 as well as
the new Tegra K1 aka TK1 based Apalis TK1 modules contain a Freescale
SGTL5000 analogue audio codec.

Signed-off-by: Marcel Ziswiler 
Reviewed-by: Stephen Warren 
Signed-off-by: Marcel Ziswiler 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/configs/tegra_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig
index bc80a47..c1d0f91 100644
--- a/arch/arm/configs/tegra_defconfig
+++ b/arch/arm/configs/tegra_defconfig
@@ -216,6 +216,7 @@ CONFIG_SND_SOC_TEGRA_WM9712=y
 CONFIG_SND_SOC_TEGRA_TRIMSLICE=y
 CONFIG_SND_SOC_TEGRA_ALC5632=y
 CONFIG_SND_SOC_TEGRA_MAX98090=y
+CONFIG_SND_SOC_TEGRA_SGTL5000=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_TEGRA=y
-- 
2.5.5



[PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

2016-06-18 Thread Marcel Ziswiler

This series adds/integrates Freescale SGTL5000 analogue audio codec
support.

Changes in v4:
- simple-audio-card does still not allow for more advanced use cases
  like Tegra SoCs
- further platform drivers have been accepted since my last attempt
  (e.g. rt5677 one)
- relevance for one further board the new Toradex Apalis TK1
- drop unused sound/jack.h include
- in tegra_sgtl5000_driver_remove() pass return value of
  snd_soc_unregister_card() on to caller
- no longer set owner property in platform_driver to THIS_MODULE
- re-based/resend

Changes in v3:
- revert to not using simple-audio-card being incompatible with tegra
- rebased to for-next

Changes in v2:
- using simple-audio-card as suggested by Fabio

Marcel Ziswiler (3):
  ASoC: tegra: add tegra sgtl5000 machine driver
  ARM: tegra: apalis/colibri t30: integrate audio
  ARM: tegra: enable sgtl5000 audio

 .../bindings/sound/nvidia,tegra-audio-sgtl5000.txt |  42 
 arch/arm/boot/dts/tegra30-apalis.dtsi  |  49 +
 arch/arm/boot/dts/tegra30-colibri.dtsi |  49 +
 arch/arm/configs/tegra_defconfig   |   1 +
 sound/soc/tegra/Kconfig|  11 ++
 sound/soc/tegra/Makefile   |   2 +
 sound/soc/tegra/tegra_sgtl5000.c   | 212 +
 7 files changed, 366 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt
 create mode 100644 sound/soc/tegra/tegra_sgtl5000.c

-- 
2.5.5



Re: [PATCH v3 0/5] i.MX L2-cache code cleanups and performance tweaks

2016-06-18 Thread Andrey Smirnov
Please ignore this version of the patch set, I just realized that I
screwed up patch 3/5. I'll be sending fixed v4 shortly.

Sorry for the noise,
Andrey Smirnov

On Sat, Jun 18, 2016 at 5:31 PM, Andrey Smirnov
 wrote:
> Hi everyone,
>
> Here's the second version of i.MX L2-cache related patches. Here's
> what's new from v2:
>
>- Generic ARM patches were split inot a separte series
>
>- Typo and whitespace fixes (as per Uwe's suggestions)
>
>- Re-ordered l2c_aux_val, and l2c_aux_mask are initializers are placed
>  in the order of their declaration
>
> Let me know if any more changes to the series are needed.
>
> Andrey Smirnov
>
> Andrey Smirnov (5):
>   i.MX: system.c: Convert goto to if statement
>   i.MX: system.c: Remove redundant errata 752271 code
>   i.MX: system.c: Replace magic numbers
>   i.MX: system.c: Tweak prefetch settings for performance
>   i.MX: Do not explicitly call l2x0_of_init()
>
>  arch/arm/mach-imx/imx35-dt.c| 10 +++---
>  arch/arm/mach-imx/mach-imx6q.c  |  2 ++
>  arch/arm/mach-imx/mach-imx6sl.c |  2 ++
>  arch/arm/mach-imx/mach-imx6sx.c |  2 ++
>  arch/arm/mach-imx/system.c  | 42 
> -
>  5 files changed, 25 insertions(+), 33 deletions(-)
>
> --
> 2.5.5
>


[PATCH v4 0/3] ASoC/ARM: tegra: apalis t30/tk1/colibri t30: sgtl5000 audio

2016-06-18 Thread Marcel Ziswiler

This series adds/integrates Freescale SGTL5000 analogue audio codec
support.

Changes in v4:
- simple-audio-card does still not allow for more advanced use cases
  like Tegra SoCs
- further platform drivers have been accepted since my last attempt
  (e.g. rt5677 one)
- relevance for one further board the new Toradex Apalis TK1
- drop unused sound/jack.h include
- in tegra_sgtl5000_driver_remove() pass return value of
  snd_soc_unregister_card() on to caller
- no longer set owner property in platform_driver to THIS_MODULE
- re-based/resend

Changes in v3:
- revert to not using simple-audio-card being incompatible with tegra
- rebased to for-next

Changes in v2:
- using simple-audio-card as suggested by Fabio

Marcel Ziswiler (3):
  ASoC: tegra: add tegra sgtl5000 machine driver
  ARM: tegra: apalis/colibri t30: integrate audio
  ARM: tegra: enable sgtl5000 audio

 .../bindings/sound/nvidia,tegra-audio-sgtl5000.txt |  42 
 arch/arm/boot/dts/tegra30-apalis.dtsi  |  49 +
 arch/arm/boot/dts/tegra30-colibri.dtsi |  49 +
 arch/arm/configs/tegra_defconfig   |   1 +
 sound/soc/tegra/Kconfig|  11 ++
 sound/soc/tegra/Makefile   |   2 +
 sound/soc/tegra/tegra_sgtl5000.c   | 212 +
 7 files changed, 366 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-sgtl5000.txt
 create mode 100644 sound/soc/tegra/tegra_sgtl5000.c

-- 
2.5.5



  1   2   3   4   5   6   >