[PATCH v2] libfs: fix error cast of negative value in simple_attr_write()

2020-11-13 Thread Yicong Yang
VAL' if it gets a negetive value, but the latter can't handle the situation correctly. Fixes: f7b88631a897 ("fs/libfs.c: fix simple_attr_write() on 32bit machines") Signed-off-by: Yicong Yang --- Change since v1: - address the compile warning for non-64 bit platform fs/libfs.c | 4 +++- 1

[PATCH v3] libfs: fix error cast of negative value in simple_attr_write()

2020-11-14 Thread Yicong Yang
;) Signed-off-by: Yicong Yang --- Change since v1: - address the compile warning for non-64 bit platform. Change since v2: Link: https://lore.kernel.org/linux-fsdevel/1605000324-7428-1-git-send-email-yangyic...@hisilicon.com/ - make 'val' unsigned long long and mentioned in the commit Link: https://lo

[RESEND PATCH] libfs: fix error cast of negative value in simple_attr_write()

2020-11-10 Thread Yicong Yang
VAL' if it gets a negetive value, but the latter can't handle the situation correctly. Fixes: f7b88631a897 ("fs/libfs.c: fix simple_attr_write() on 32bit machines") Signed-off-by: Yicong Yang --- fs/libfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/libfs.c

Re: [RESEND PATCH] libfs: fix error cast of negative value in simple_attr_write()

2020-11-11 Thread Yicong Yang
Hi, Thanks for reviewing this. On 2020/11/11 3:18, Andrew Morton wrote: > On Tue, 10 Nov 2020 17:25:24 +0800 Yicong Yang > wrote: > >> The attr->set() receive a value of u64, but simple_strtoll() is used >> for doing the conversion. It will lead to the error cast if u

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-26 Thread Yicong Yang
On 2020/11/26 17:50, Christoph Hellwig wrote: > On Thu, Nov 26, 2020 at 05:48:25PM +0800, Yicong Yang wrote: >> Sorry for not describing the issues I met correctly in the commit message. >> Actually we're using inline function vfs_stat() for getting the >> attributes, wh

[PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-25 Thread Yicong Yang
;) Reported-by: Yang Shen Signed-off-by: Yicong Yang --- fs/stat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/stat.c b/fs/stat.c index dacecdd..7d690c6 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -147,6 +147,7 @@ int vfs_fstat(int fd, struct kstat *stat) fdput(f);

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-26 Thread Yicong Yang
Hi Christoph, On 2020/11/26 15:18, Christoph Hellwig wrote: > On Thu, Nov 26, 2020 at 03:15:48PM +0800, Yicong Yang wrote: >> The public function vfs_stat() and vfs_fstatat() are >> unexported after moving out of line in >> commit 09f1bde4017e ("fs: move vfs_fstat

Re: [PATCH] fs: export vfs_stat() and vfs_fstatat()

2020-11-26 Thread Yicong Yang
On 2020/11/26 17:15, Christoph Hellwig wrote: > On Thu, Nov 26, 2020 at 05:08:26PM +0800, Yicong Yang wrote: >>> And why would you want to use them in kernel module? Please explain >>> that in the patch that exports them, and please send that patch in the >>> sam

[PATCH] PCI: Factor functions of PCI function reset

2020-09-07 Thread Yicong Yang
Previosly we use pci_probe_reset_function() to probe whehter a function can be reset and use __pci_reset_function_locked() to perform a function reset. These two functions have lots of common lines. Factor the two functions and reduce the redundancy. Signed-off-by: Yicong Yang --- drivers/pci

[PATCH] PCI: Fix race condition between block_cfg_access and msi_enabled/msix_enabled

2020-09-07 Thread Yicong Yang
. Move the block_cfg_access to the pci_dev->priv_flags and use atomic bit operations to avoid the race condition. Signed-off-by: Yicong Yang --- drivers/pci/access.c | 20 ++-- drivers/pci/pci.h| 11 +++ include/linux/pci.h | 1 - 3 files changed, 21 insertions(

Re: [PATCH] PCI: Factor functions of PCI function reset

2020-09-07 Thread Yicong Yang
+cc linux-pci as I forgot to On 2020/9/7 19:16, Yicong Yang wrote: > Previosly we use pci_probe_reset_function() to probe whehter a function > can be reset and use __pci_reset_function_locked() to perform a function > reset. These two functions have lots of common lines. > >

Re: [PATCH] PCI: Fix race condition between block_cfg_access and msi_enabled/msix_enabled

2020-09-07 Thread Yicong Yang
+cc linux-pci as I forgot. On 2020/9/7 19:06, Yicong Yang wrote: > Previously we use bit field for block_cfg_access and > msi_enabled/msix_enabled, which is non-atomic and they may race > each other as they share the same memory region. A race condition > is met between driver

Re: [PATCH -next] i2c: efm32: Use devm_platform_get_and_ioremap_resource()

2020-09-18 Thread Yicong Yang
On 2020/9/18 16:25, Wang ShaoBo wrote: > Make use of devm_platform_get_and_ioremap_resource() provided by > driver core platform instead of duplicated analogue. dev_err() is > removed because it has been done in devm_ioremap_resource(). > > Signed-off-by: Wang ShaoBo > --- >

[PATCH] libfs: fix error cast of negative value in simple_attr_write()

2020-09-25 Thread Yicong Yang
/libfs.c: fix simple_attr_write() on 32bit machines") Signed-off-by: Yicong Yang --- fs/libfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/libfs.c b/fs/libfs.c index e0d42e9..803c439 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -975,7 +975,9 @@ ssize_t simple_attr

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-20 Thread Yicong Yang
On 2020/5/7 11:32, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > If there are non-hotplug capable devices connected to a given > port, then during the fatal error recovery(triggered by DPC or > AER), after calling reset_link() function, we cannot rely on

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-26 Thread Yicong Yang
Hi, On 2020/5/27 9:31, Kuppuswamy, Sathyanarayanan wrote: > Hi, > > On 5/21/20 7:56 PM, Yicong Yang wrote: >> >> >> On 2020/5/22 3:31, Kuppuswamy, Sathyanarayanan wrote: >>> >>> >>> On 5/21/20 3:58 AM, Yicong Yang wrote: >

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-27 Thread Yicong Yang
On 2020/5/27 12:04, Kuppuswamy, Sathyanarayanan wrote: > > > On 5/26/20 8:50 PM, Yicong Yang wrote: >> Hi, >> >> >> On 2020/5/27 9:31, Kuppuswamy, Sathyanarayanan wrote: >>> Hi, >>> >>> On 5/21/20 7:56 PM, Yicong Yang wrote: >>

Re: [RFC PATCH] hwtracing: Add HiSilicon PCIe Tune and Trace device driver

2020-06-24 Thread Yicong Yang
Hi all, As it's a new tracing device for PCIe traffic, any comments about the driver or the user interface is appreciated. Thanks. On 2020/6/13 17:32, Yicong Yang wrote: > HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex > integrated Endpoint(RCiEP) device, pro

Re: [PATCH v12 2/2] PCI: hip: Add handling of HiSilicon HIP PCIe controller errors

2020-07-15 Thread Yicong Yang
Hi Bjorn, Thanks for the comments. On 2020/7/15 5:10, Bjorn Helgaas wrote: > [+cc Lorenzo] > > On Mon, Jul 13, 2020 at 03:10:19PM +0100, Shiju Jose wrote: >> From: Yicong Yang >> >> The HiSilicon HIP PCIe controller is capable of handling errors >> on

Re: [RFC PATCH] hwtracing: Add HiSilicon PCIe Tune and Trace device driver

2020-07-20 Thread Yicong Yang
On 2020/7/17 5:31, Bjorn Helgaas wrote: > On Thu, Jul 16, 2020 at 05:06:19PM +0800, Yicong Yang wrote: >> On 2020/7/11 7:09, Bjorn Helgaas wrote: >>> On Sat, Jun 13, 2020 at 05:32:13PM +0800, Yicong Yang wrote: >>>> HiSilicon PCIe tune and trace device(PTT) is a PCI

Re: [RFC PATCH] hwtracing: Add HiSilicon PCIe Tune and Trace device driver

2020-07-16 Thread Yicong Yang
Hi Bjorn, Thanks for reviewing this. Some replies below. Thanks, Yicong On 2020/7/11 7:09, Bjorn Helgaas wrote: > On Sat, Jun 13, 2020 at 05:32:13PM +0800, Yicong Yang wrote: >> HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex >> integrated Endpoint(RCiEP) de

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-12 Thread Yicong Yang
On 2020/5/13 3:20, Jay Vosburgh wrote: > sathyanarayanan.kuppusw...@linux.intel.com wrote: > >> From: Kuppuswamy Sathyanarayanan >> >> If there are non-hotplug capable devices connected to a given >> port, then during the fatal error recovery(triggered by DPC or >> AER), after calling

Re: [PATCH v2 2/2] PCI/ERR: Add reset support for non fatal errors

2020-06-28 Thread Yicong Yang
Hi Sathy, one minor comments below. On 2020/6/5 5:50, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > PCI_ERS_RESULT_NEED_RESET error status implies the device is > requesting a slot reset and a notification about slot reset > completion via

Re: [PATCH v2 1/2] PCI/ERR: Fix fatal error recovery for non-hotplug capable devices

2020-06-28 Thread Yicong Yang
Hi Jay, I've tested the patches on my board, and they work well. Thanks, Yicong On 2020/6/25 2:52, Jay Vosburgh wrote: > Jay Vosburgh wrote: > >> sathyanarayanan.kuppusw...@linux.intel.com wrote: >> >> From: Kuppuswamy Sathyanarayanan >>> Fatal (DPC) error recovery is currently broken for

[RFC PATCH] hwtracing: Add HiSilicon PCIe Tune and Trace device driver

2020-06-13 Thread Yicong Yang
. - The driver is intended to be put under drivers/hwtracing, where we think best match the device's function. Signed-off-by: Yicong Yang --- Documentation/trace/hisi-ptt.rst | 272 drivers/hwtracing/Kconfig |2 + drivers/hwtracing/hisilicon/Kconfig|8

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-21 Thread Yicong Yang
On 2020/5/21 1:04, Kuppuswamy, Sathyanarayanan wrote: > > > On 5/20/20 1:28 AM, Yicong Yang wrote: >> On 2020/5/7 11:32, sathyanarayanan.kuppusw...@linux.intel.com wrote: >>> From: Kuppuswamy Sathyanarayanan >>> >>> >>> If there are non-ho

Re: [PATCH v1 1/1] PCI/ERR: Handle fatal error recovery for non-hotplug capable devices

2020-05-21 Thread Yicong Yang
On 2020/5/22 3:31, Kuppuswamy, Sathyanarayanan wrote: > > > On 5/21/20 3:58 AM, Yicong Yang wrote: >> On 2020/5/21 1:04, Kuppuswamy, Sathyanarayanan wrote: >>> >>> >>> On 5/20/20 1:28 AM, Yicong Yang wrote: >>>> On 2020/5/7 11:32, sathya

Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-08 Thread Yicong Yang
On 2021/2/6 4:08, Bjorn Helgaas wrote: > On Fri, Feb 05, 2021 at 10:28:32AM -0800, Guenter Roeck wrote: >> On Fri, Feb 05, 2021 at 05:44:13PM +0800, Yicong Yang wrote: >>> From: Junhao He >>> >>> Use subdir-ccflags-* instead of ccflags-* to inherit the

Re: [PATCH 1/4] driver core: Use subdir-ccflags-* to inherit debug flag

2021-02-08 Thread Yicong Yang
Hi Greg, On 2021/2/5 17:53, Greg KH wrote: > On Fri, Feb 05, 2021 at 05:44:12PM +0800, Yicong Yang wrote: >> From: Junhao He >> >> Use subdir-ccflags-* instead of ccflags-* to inherit the debug >> settings from Kconfig when traversing subdirectories. > > That sa

Re: [PATCH 1/4] driver core: Use subdir-ccflags-* to inherit debug flag

2021-02-08 Thread Yicong Yang
On 2021/2/8 18:47, Greg KH wrote: > On Mon, Feb 08, 2021 at 06:44:52PM +0800, Yicong Yang wrote: >> Hi Greg, >> >> On 2021/2/5 17:53, Greg KH wrote: >>> On Fri, Feb 05, 2021 at 05:44:12PM +0800, Yicong Yang wrote: >>>> From: Junhao He >>>> >

Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag

2021-02-04 Thread Yicong Yang
On 2021/2/5 0:10, Bjorn Helgaas wrote: > [+cc Masahiro, Michal, linux-kbuild, linux-kernel] > > On Thu, Feb 04, 2021 at 07:30:15PM +0800, Yicong Yang wrote: >> From: Junhao He >> >> Use subdir-ccflags-* instead of ccflags-* to inherit the debug >> sett

[PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Yicong Yang
From: Junhao He Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/hwmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/4] pps: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Yicong Yang
From: Junhao He Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/pps/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/4] driver core: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Yicong Yang
From: Junhao He Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/base/Makefile | 2 +- drivers/base/power/Makefile | 2 -- 2

[PATCH 0/4] Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Yicong Yang
Few drivers use ccflags-* in their top directory to enable -DDEBUG, but don't have config options to enable debug in the sub-directories. They should want the subdirectories inherit the debug flag from the top. Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig

[PATCH 4/4] staging: comedi: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Yicong Yang
From: Junhao He Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/staging/comedi/Makefile | 2 +- drivers/staging

[PATCH v2 0/4] Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Yicong Yang
Few drivers use ccflags-* in their top directory to enable -DDEBUG, but don't have config options to enable debug in the sub-directories, or they use per subdirectory ccflags-* to have DEBUG with the same kconfig option. Considering they intends to enable debug for all the files under the

[PATCH v2 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Yicong Yang
of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories, and it will avoid omittance of DEBUG define when debug messages added in the subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/hwmon/Makefile | 2 +- 1

[PATCH v2 3/4] pps: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Yicong Yang
of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/pps/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pps/Makefile b/drivers/pps

[PATCH v2 4/4] staging: comedi: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Yicong Yang
He Signed-off-by: Yicong Yang --- drivers/staging/comedi/Makefile | 2 +- drivers/staging/comedi/drivers/Makefile | 1 - drivers/staging/comedi/drivers/tests/Makefile | 2 -- drivers/staging/comedi/kcomedilib/Makefile| 2 -- 4 files changed, 1 insertion(+), 6 deletions

[PATCH v2 1/4] driver core: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Yicong Yang
in the subdirectory. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/base/Makefile | 2 +- drivers/base/power/Makefile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/base/Makefile b/drivers/base/Makefile index 5e7bf96

Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag

2021-02-10 Thread Yicong Yang
On 2021/2/10 5:25, Bjorn Helgaas wrote: > [+cc Masahiro, Michal, linux-kbuild, linux-kernel] > > On Thu, Feb 04, 2021 at 07:30:15PM +0800, Yicong Yang wrote: >> From: Junhao He >> >> Use subdir-ccflags-* instead of ccflags-* to inherit the debug >> sett

Re: [PATCH v2 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-10 Thread Yicong Yang
On 2021/2/9 23:06, Guenter Roeck wrote: > On Tue, Feb 09, 2021 at 07:08:17PM +0800, Yicong Yang wrote: >> From: Junhao He >> >> We use ccflags-$(CONFIG_HWMON_DEBUG_CHIP) for the debug >> message in drivers/hwmon, but the DEBUG flag will not pass to >> th

[PATCH v5 1/5] i2c: core: add managed function for adding i2c adapters

2021-03-30 Thread Yicong Yang
Some I2C controller drivers will only unregister the I2C adapter in their .remove() callback, which can be done by simply using a managed variant to add the I2C adapter. So add the managed functions for adding the I2C adapter. Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang

[PATCH v5 3/5] i2c: add support for HiSilicon I2C controller

2021-03-30 Thread Yicong Yang
-by: Yicong Yang --- drivers/i2c/busses/Kconfig| 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hisi.c | 506 ++ 3 files changed, 517 insertions(+) create mode 100644 drivers/i2c/busses/i2c-hisi.c diff --git a/drivers/i2c/busses/Kconfig b

[PATCH 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-30 Thread Yicong Yang
From: Andy Shevchenko Use generic i2c_freq_mode_string() helper to print chosen bus speed. Signed-off-by: Andy Shevchenko Signed-off-by: Yicong Yang --- drivers/i2c/busses/i2c-designware-master.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git

[PATCH v5 4/5] MAINTAINERS: Add maintainer for HiSilicon I2C driver

2021-03-30 Thread Yicong Yang
Add maintainer for HiSilicon I2C driver. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d23b0e..da2754a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8040,6 +8040,13 @@ F: drivers/crypto/hisilicon

[PATCH v5 0/5] Add support for HiSilicon I2C controller

2021-03-30 Thread Yicong Yang
in probe function. Link:https://lore.kernel.org/linux-i2c/1615016946-55670-1-git-send-email-yangyic...@hisilicon.com/ Andy Shevchenko (1): i2c: designware: Switch over to i2c_freq_mode_string() Yicong Yang (4): i2c: core: add managed function for adding i2c adapters i2c: core: add api to provide

[PATCH v5 2/5] i2c: core: add api to provide frequency mode strings

2021-03-30 Thread Yicong Yang
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang --- include/linux/i2c.h | 20 1 file changed, 20 insertions(+) diff

[PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

2021-03-31 Thread Yicong Yang
-by: Dmitry Osipenko Signed-off-by: Yicong Yang --- drivers/i2c/busses/Kconfig| 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hisi.c | 505 ++ 3 files changed, 516 insertions(+) create mode 100644 drivers/i2c/busses/i2c-hisi.c diff --git

[PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-03-31 Thread Yicong Yang
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: Jarkko Nikula Reviewed-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang --- include/linux/i2c.h | 20

[PATCH v6 1/5] i2c: core: add managed function for adding i2c adapters

2021-03-31 Thread Yicong Yang
-off-by: Yicong Yang --- drivers/i2c/i2c-core-base.c | 26 ++ include/linux/i2c.h | 1 + 2 files changed, 27 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 63ebf72..de9402c 100644 --- a/drivers/i2c/i2c-core-base.c +++ b

[PATCH v6 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-31 Thread Yicong Yang
From: Andy Shevchenko Use generic i2c_freq_mode_string() helper to print chosen bus speed. Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko Signed-off-by: Yicong Yang --- drivers/i2c/busses/i2c-designware-master.c | 20 1 file changed, 4 insertions(+), 16

[PATCH v6 4/5] MAINTAINERS: Add maintainer for HiSilicon I2C driver

2021-03-31 Thread Yicong Yang
Add maintainer for HiSilicon I2C driver. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d23b0e..da2754a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8040,6 +8040,13 @@ F: drivers/crypto/hisilicon

[PATCH v6 0/5] Add support for HiSilicon I2C controller

2021-03-31 Thread Yicong Yang
function. Link:https://lore.kernel.org/linux-i2c/1615016946-55670-1-git-send-email-yangyic...@hisilicon.com/ Andy Shevchenko (1): i2c: designware: Switch over to i2c_freq_mode_string() Yicong Yang (4): i2c: core: add managed function for adding i2c adapters i2c: core: add api to provide

Re: [PATCH 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-03-31 Thread Yicong Yang
On 2021/3/31 18:37, Andy Shevchenko wrote: > On Tue, Mar 30, 2021 at 10:19:26PM +0800, Yicong Yang wrote: >> From: Andy Shevchenko >> >> Use generic i2c_freq_mode_string() helper to print chosen bus speed. > > Since it will be a new version (based on Jarkko's comments)

Re: [PATCH v5 2/5] i2c: core: add api to provide frequency mode strings

2021-03-31 Thread Yicong Yang
On 2021/3/31 16:35, Jarkko Nikula wrote: > Hi > > On 3/30/21 5:19 PM, Yicong Yang wrote: >> Some I2C drivers like Designware and HiSilicon will print the >> bus frequency mode information, so add a public one that everyone >> can make use of. >> >> Revi

Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

2021-04-07 Thread Yicong Yang
On 2021/4/7 4:02, Wolfram Sang wrote: > > Only super minor stuff. Thanks to all the contributors and reviewers! > >> +#define HZ_PER_KHZ 1000 > > KHZ_PER_HZ? that doesn't match what we want. we want the count of HZs per one KHZ. > >> +ret = devm_i2c_add_adapter(dev, adapter); >> +if

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Yicong Yang
On 2021/4/7 3:54, Wolfram Sang wrote: > >> diff --git a/include/linux/i2c.h b/include/linux/i2c.h >> index 10bd0b0..7268180 100644 >> --- a/include/linux/i2c.h >> +++ b/include/linux/i2c.h >> @@ -47,6 +47,26 @@ typedef int (*i2c_slave_cb_t)(struct i2c_client *client, >> #define

Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

2021-04-07 Thread Yicong Yang
On 2021/4/7 16:32, Jarkko Nikula wrote: > Hi > > On 3/31/21 4:36 PM, Yicong Yang wrote: >> +    ret = device_property_read_u64(dev, "clk_rate", >clk_rate_khz); >> +    if (ret) { >> +    dev_err(dev, "failed to get clock frequen

Re: [PATCH v6 2/5] i2c: core: add api to provide frequency mode strings

2021-04-07 Thread Yicong Yang
On 2021/4/7 18:08, Andy Shevchenko wrote: > On Wed, Apr 07, 2021 at 04:29:29PM +0800, Yicong Yang wrote: >> On 2021/4/7 3:54, Wolfram Sang wrote: >>> >>>> diff --git a/include/linux/i2c.h b/include/linux/i2c.h >>>> index 10bd0b0..7268180 100644 >>

Re: [PATCH 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-07 Thread Yicong Yang
On 2021/4/6 21:49, Greg KH wrote: > On Tue, Apr 06, 2021 at 08:45:50PM +0800, Yicong Yang wrote: >> HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex >> integrated Endpoint(RCiEP) device, providing the capability >> to dynamically monitor and tune

[PATCH 2/4] hwtracing: Add tune function support for HiSilicon PCIe Tune and Trace device

2021-04-06 Thread Yicong Yang
Add tune function for the HiSilicon Tune and Trace device. The interface of tune is also exposed through debugfs. Signed-off-by: Yicong Yang --- drivers/hwtracing/hisilicon/hisi_ptt.c | 187 + 1 file changed, 187 insertions(+) diff --git a/drivers/hwtracing

[PATCH 1/4] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device

2021-04-06 Thread Yicong Yang
debugfs directory for each PTT device, and users can operate the device through the files under its directory. Signed-off-by: Yicong Yang --- drivers/Makefile |1 + drivers/hwtracing/Kconfig |2 + drivers/hwtracing/hisilicon/Kconfig|8 + drivers

[PATCH 3/4] docs: Add documentation for HiSilicon PTT device driver

2021-04-06 Thread Yicong Yang
Document the introduction and usage of HiSilicon PTT device driver. Signed-off-by: Yicong Yang --- Documentation/trace/hisi-ptt.rst | 316 +++ 1 file changed, 316 insertions(+) create mode 100644 Documentation/trace/hisi-ptt.rst diff --git a/Documentation

[PATCH 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-06 Thread Yicong Yang
space tools. The usage is described in the document. Yicong Yang (4): hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device hwtracing: Add tune function support for HiSilicon PCIe Tune and Trace device docs: Add documentation for HiSilicon PTT device driver

[PATCH 4/4] MAINTAINERS: Add maintainer for HiSilicon PTT driver

2021-04-06 Thread Yicong Yang
Add maintainer for driver and documentation of HiSilicon PTT device. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d23b0e..61b793b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8078,6 +8078,13 @@ W

Re: [PATCH 2/2] mtd: spi-nor: add initial sysfs support

2021-03-19 Thread Yicong Yang
On 2021/3/18 17:24, Michael Walle wrote: > Add support to show the name and JEDEC identifier as well as to dump the > SFDP table. Not all flashes list their SFDP table contents in their > datasheet. So having that is useful. It might also be helpful in bug > reports from users. > > The idea

Re: [PATCH 1/4] driver core: Use subdir-ccflags-* to inherit debug flag

2021-02-24 Thread Yicong Yang
On 2021/2/10 19:42, Daniel Thompson wrote: > On Mon, Feb 08, 2021 at 09:09:20PM +0800, Yicong Yang wrote: >> On 2021/2/8 18:47, Greg KH wrote: >>> On Mon, Feb 08, 2021 at 06:44:52PM +0800, Yicong Yang wrote: >>>> On 2021/2/5 17:53, Greg KH wrote: >>

Re: [PATCH] sched/topology: Fix a typo in pr_err()

2021-03-08 Thread Yicong Yang
On 2021/3/8 19:32, Peter Zijlstra wrote: > On Mon, Mar 08, 2021 at 05:24:56PM +0800, Yicong Yang wrote: >> Fix a typo 'borken' to 'broken' in pr_err(). > > It was not a typo.. > got it already. terribly sorry to bother and please ignore this. > . >

[PATCH] sched/topology: Fix a typo in pr_err()

2021-03-08 Thread Yicong Yang
Fix a typo 'borken' to 'broken' in pr_err(). Signed-off-by: Yicong Yang --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 09d3504..c42e388 100644 --- a/kernel/sched/topology.c +++ b/kernel

Re: [PATCH v7 2/5] i2c: core: add api to provide frequency mode strings

2021-04-09 Thread Yicong Yang
kay to go as is. > sorry for the late reply. we can have this series applied if possible, or you may apply the changed patch below (please let me know if you want the whole series updated). I didn't realize this, sorry. our two users don't have this situation. thanks Wolfram and Andy! Yicong

Re: [PATCH 3/4] docs: Add documentation for HiSilicon PTT device driver

2021-04-09 Thread Yicong Yang
On 2021/4/9 0:57, Bjorn Helgaas wrote: > On Thu, Apr 08, 2021 at 09:22:52PM +0800, Yicong Yang wrote: >> On 2021/4/8 2:55, Bjorn Helgaas wrote: >>> On Tue, Apr 06, 2021 at 08:45:53PM +0800, Yicong Yang wrote: > >>>> +On Kunpeng 930 SoC, the PCIe root complex

Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

2021-04-08 Thread Yicong Yang
e plain '1000' as a factor/divider because > it then becomes obvious. I still find the define more confusing than > helpful TBH. But I'll leave the final decision to Yicong Yang. > HZ_PER_KHZ macro are defined separately in other places of the kernel. Andy suggested to have this defined and us

Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI

2021-04-15 Thread Yicong Yang
On 2021/4/15 2:06, Geert Uytterhoeven wrote: > Hi Yicong, > > On Wed, Apr 14, 2021 at 11:24 AM Yicong Yang wrote: >> On 2021/4/13 20:26, Geert Uytterhoeven wrote: >>> The HiSilicon Kunpeng I2C controller is only present on HiSilicon >>> Kunpeng SoCs, and i

Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI

2021-04-15 Thread Yicong Yang
On 2021/4/15 16:18, Yicong Yang wrote: > On 2021/4/15 2:06, Geert Uytterhoeven wrote: >> Hi Yicong, >> >> On Wed, Apr 14, 2021 at 11:24 AM Yicong Yang >> wrote: >>> On 2021/4/13 20:26, Geert Uytterhoeven wrote: >>>> The HiSilicon Kunpeng I2C cont

Re: [PATCH RESEND 3/4] docs: Add HiSilicon PTT device driver documentation

2021-04-19 Thread Yicong Yang
On 2021/4/19 17:07, Daniel Thompson wrote: > On Sat, Apr 17, 2021 at 06:17:10PM +0800, Yicong Yang wrote: >> Document the introduction and usage of HiSilicon PTT device driver. >> >> Signed-off-by: Yicong Yang >> --- >> Docum

Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-19 Thread Yicong Yang
On 2021/4/19 19:17, Suzuki K Poulose wrote: > On 17/04/2021 11:17, Yicong Yang wrote: >> [RESEND with perf and coresight folks Cc'ed] >> >> HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex >> integrated Endpoint (RCiEP) device, providing the capabilit

Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-19 Thread Yicong Yang
On 2021/4/17 21:56, Alexander Shishkin wrote: > Yicong Yang writes: > >> The reason for not using perf is because there is no current support >> for uncore tracing in the perf facilities. > > Not unless you count > > $ perf list|grep -ic uncore > 77 >

Re: [PATCH] i2c: I2C_HISI should depend on ARCH_HISI && ACPI

2021-04-14 Thread Yicong Yang
On 2021/4/13 20:26, Geert Uytterhoeven wrote: > The HiSilicon Kunpeng I2C controller is only present on HiSilicon > Kunpeng SoCs, and its driver relies on ACPI to probe for its presence. > Hence add dependencies on ARCH_HISI and ACPI, to prevent asking the user > about this driver when configuring

[PATCH v7 4/5] MAINTAINERS: Add maintainer for HiSilicon I2C driver

2021-04-08 Thread Yicong Yang
Add maintainer for HiSilicon I2C driver. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d23b0e..da2754a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8040,6 +8040,13 @@ F: drivers/crypto/hisilicon

[PATCH v7 3/5] i2c: add support for HiSilicon I2C controller

2021-04-08 Thread Yicong Yang
-by: Dmitry Osipenko Signed-off-by: Yicong Yang --- drivers/i2c/busses/Kconfig| 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hisi.c | 504 ++ 3 files changed, 515 insertions(+) create mode 100644 drivers/i2c/busses/i2c-hisi.c diff --git

[PATCH v7 5/5] i2c: designware: Switch over to i2c_freq_mode_string()

2021-04-08 Thread Yicong Yang
From: Andy Shevchenko Use generic i2c_freq_mode_string() helper to print chosen bus speed. Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko Signed-off-by: Yicong Yang --- drivers/i2c/busses/i2c-designware-master.c | 20 1 file changed, 4 insertions(+), 16

[PATCH v7 1/5] i2c: core: add managed function for adding i2c adapters

2021-04-08 Thread Yicong Yang
-off-by: Yicong Yang --- drivers/i2c/i2c-core-base.c | 26 ++ include/linux/i2c.h | 1 + 2 files changed, 27 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 63ebf72..de9402c 100644 --- a/drivers/i2c/i2c-core-base.c +++ b

[PATCH v7 2/5] i2c: core: add api to provide frequency mode strings

2021-04-08 Thread Yicong Yang
Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: Jarkko Nikula Reviewed-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang --- drivers/i2c/i2c-core-base.c | 21

[PATCH v7 0/5] Add support for HiSilicon I2C controller

2021-04-08 Thread Yicong Yang
over to i2c_freq_mode_string() Yicong Yang (4): i2c: core: add managed function for adding i2c adapters i2c: core: add api to provide frequency mode strings i2c: add support for HiSilicon I2C controller MAINTAINERS: Add maintainer for HiSilicon I2C driver MAINTAINERS

Re: [PATCH 3/4] docs: Add documentation for HiSilicon PTT device driver

2021-04-08 Thread Yicong Yang
On 2021/4/8 2:55, Bjorn Helgaas wrote: > Move important info in the subject earlier, e.g., > > docs: Add HiSilicon PTT device documentation > > On Tue, Apr 06, 2021 at 08:45:53PM +0800, Yicong Yang wrote: >> Document the introduction and usage of HiSilicon PTT device dri

Re: [PATCH 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-08 Thread Yicong Yang
On 2021/4/7 18:25, Greg KH wrote: > On Wed, Apr 07, 2021 at 06:03:11PM +0800, Yicong Yang wrote: >> On 2021/4/6 21:49, Greg KH wrote: >>> On Tue, Apr 06, 2021 at 08:45:50PM +0800, Yicong Yang wrote: >>>> HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Co

[PATCH RESEND 1/4] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device

2021-04-17 Thread Yicong Yang
debugfs directory for each PTT device, and users can operate the device through the files under its directory. Signed-off-by: Yicong Yang --- drivers/Makefile |1 + drivers/hwtracing/Kconfig |2 + drivers/hwtracing/hisilicon/Kconfig| 11 + drivers

[PATCH RESEND 3/4] docs: Add HiSilicon PTT device driver documentation

2021-04-17 Thread Yicong Yang
Document the introduction and usage of HiSilicon PTT device driver. Signed-off-by: Yicong Yang --- Documentation/trace/hisi-ptt.rst | 326 +++ 1 file changed, 326 insertions(+) create mode 100644 Documentation/trace/hisi-ptt.rst diff --git a/Documentation

[PATCH RESEND 4/4] MAINTAINERS: Add maintainer for HiSilicon PTT driver

2021-04-17 Thread Yicong Yang
Add maintainer for driver and documentation of HiSilicon PTT device. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7fdc513..647f0bf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8084,6 +8084,13 @@ W

[PATCH RESEND 2/4] hwtracing: Add tune function support for HiSilicon PCIe Tune and Trace device

2021-04-17 Thread Yicong Yang
Add tune function for the HiSilicon Tune and Trace device. The interface of tune is also exposed through debugfs. Signed-off-by: Yicong Yang --- drivers/hwtracing/hisilicon/hisi_ptt.c | 187 + 1 file changed, 187 insertions(+) diff --git a/drivers/hwtracing

[PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device

2021-04-17 Thread Yicong Yang
+ character device like ETM and use perf tools for decoding it? Any comments is welcomed. [1] https://lore.kernel.org/linux-pci/1617713154-35533-1-git-send-email-yangyic...@hisilicon.com/ Yicong Yang (4): hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device