Re: [PATCH v3 1/7] ACPI/PPTT: Add Processor Properties Topology Table parsing

2017-10-17 Thread Xiongfeng Wang
other versions of this, including a nice > cute version which is about 1/8 this size of this and really easy to > understand but of course is recursive... > > Maybe you can see my version below. It is similar to what you said above. It may give some help. https://

Re: [PATCH 0/5] crypto: add IV generation templates

2018-07-19 Thread Xiongfeng Wang
Hi, On 2018/7/18 23:34, Ard Biesheuvel wrote: > On 18 July 2018 at 19:59, Arnd Bergmann wrote: >> On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang >> wrote: >>> >>> I tested the performance of software implemented ciphers before and after >>> applying th

Re: [PATCH v6 11/12] arm64: topology: enable ACPI/PPTT based CPU topology

2018-01-25 Thread Xiongfeng Wang
Hi Jeremy, I have tested the patch with the newest UEFI. It prints the below error: [4.017371] BUG: arch topology borken [4.021069] BUG: arch topology borken [4.024764] BUG: arch topology borken [4.028460] BUG: arch topology borken [4.032153] BUG: arch topology borken [4.0

Re: [PATCH v6 11/12] arm64: topology: enable ACPI/PPTT based CPU topology

2018-01-25 Thread Xiongfeng Wang
Hi Jeremy, On 2018/1/25 23:56, Jeremy Linton wrote: > Hi, > > On 01/25/2018 06:15 AM, Xiongfeng Wang wrote: >> Hi Jeremy, >> >> I have tested the patch with the newest UEFI. It prints the below error: >> >> [4.017371] BUG: arch topology borken >

[PATCH] Kbuild: suppress packed-not-aligned warning for default setting only

2018-01-11 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports many -Wpacked-not-aligned warnings. The below are some examples. ./include/linux/ceph/msgr.h:67:1: warning: alignment 1 of 'struct ceph_entity_addr' is less than 8 [-Wpacked-not-aligned] } __attribute__ ((packed)); ./include/linux/ceph/msgr.h:67:

[PATCH] iio: accel: use strlcpy() instead of strncpy()

2018-01-11 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/iio/accel/st_accel_i2c.c: In function 'st_accel_i2c_probe': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 20 equals destination size [-Wstringop-truncation] The compiler require that the length o

[PATCH] IB/cma: use strlcpy() instead of strncpy()

2018-01-11 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/infiniband/core/cma_configfs.c: In function 'make_cma_dev': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 64 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make su

[PATCH] drm/nouveau/core/client: use strlcpy() instead of strncpy()

2018-01-11 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/gpu/drm/nouveau/nvif/client.c: In function 'nvif_client_init': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure th

[PATCH] net: caif: use strlcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports net/caif/caif_dev.c: In function 'caif_enroll_dev': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] net/caif/cfctrl.c: In function &#

[PATCH] btrfs: use correct string length

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports fs/btrfs/ioctl.c: In function 'btrfs_ioctl': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 1024 equals destination size [-Wstringop-truncation] We need one less byte or call strlcpy() to make it a nul-termin

[PATCH] ipmi: use correct string length

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/char/ipmi/ipmi_msghandler.c: In function 'panic_op_write_handler': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 16 equals destination size [-Wstringop-truncation] drivers/char/ipmi/ipmi_wat

[PATCH] auxdisplay: use correct string length

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/auxdisplay/panel.c: In function 'panel_attach': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 12 equals destination size [-Wstringop-truncation] We need one less byte or call strlcpy() to make it a n

[PATCH] fs/hfsplus: use memcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports inlined from 'copy_name' at fs/hfsplus/xattr.c:416:3: ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] Since we do

[PATCH] orangefs: use correct string length

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports fs/orangefs/dcache.c: In function 'orangefs_d_revalidate': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 256 equals destination size [-Wstringop-truncation] fs/orangefs/namei.c: In function 'orangefs

[PATCH] test_hexdump: use memcpy() to avoid warning print

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports lib/test_hexdump.c: In function 'test_hexdump_prepare_test.isra.0': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output truncated copying between 0 and 32 bytes from a string of length 32 [-Wstringop-truncation] Since w

[PATCH] media: media-device: use strlcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/media/media-device.c: In function 'media_device_get_topology': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 64 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sure th

[PATCH] scsi: mptfusion: use strlcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 100 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make sur

[PATCH] [media] dibx000_common: use strlcpy() instead of strncpy()

2018-01-08 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/media/dvb-frontends/dibx000_common.c: In function 'i2c_adapter_init': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 48 equals destination size [-Wstringop-truncation] We need to use strlcpy() to make

[PATCH] caif_usb: use strlcpy() instead of strncpy()

2018-01-09 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports net/caif/caif_usb.c: In function 'cfusbl_device_notify': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] The compiler require that

[PATCH] HID: uhid: use strlcpy() instead of strncpy()

2018-01-09 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/hid/uhid.c: In function 'uhid_dev_create2': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 127 bytes from a string of length 127 [-Wstringop-truncation] The compiler require that the

Re: [PATCH] auxdisplay: use correct string length

2018-01-16 Thread Xiongfeng Wang
https://github.com/0day-ci/linux/commits/Xiongfeng-Wang/auxdisplay-use-correct-string-length/20180110-180916 > > # > https://github.com/0day-ci/linux/commit/eab240fbc00377bf3e18428b401e651bd6296da0 > git remote add linux-review https://github.com/0day-ci/linux >

[PATCH V2] auxdisplay: use correct string length

2018-01-16 Thread Xiongfeng Wang
From: Xiongfeng Wang gcc-8 reports drivers/auxdisplay/panel.c: In function 'panel_attach': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified bound 12 equals destination size [-Wstringop-truncation] We need one less byte or call strlcpy() to make it a n

Re: [PATCH 4/5] crypto: Add IV generation templates

2018-07-18 Thread Xiongfeng Wang
On 2018/7/18 16:16, Milan Broz wrote: > On 18/07/18 09:30, Xiongfeng Wang wrote: >> Currently, the IV generation algorithms are implemented in dm-crypt.c. >> This patch implement these algorithms as template ciphers, so that >> dm-crypt layer can be simplified, and also th

[PATCH] firmware: arm_sdei: Prohibit probing in '_sdei_handler'

2019-04-25 Thread Xiongfeng Wang
Functions called in '_sdei_handler' are needed to be marked as 'nokprobe'. Because these functions are called in NMI context and neither the arch-code's debug infrastructure nor kprobes core supports this. Signed-off-by: Xiongfeng Wang Reviewed-by: James Morse --- dr

Re: [RFC PATCH 0/3] Enable kprobe to monitor sdei event handler

2019-04-26 Thread Xiongfeng Wang
Hi James, Thanks for your reply! On 2019/4/25 0:20, James Morse wrote: > Hi Xiongfeng Wang, > > On 12/04/2019 13:04, Xiongfeng Wang wrote: >> When I use kprobe to monitor a sdei event handler, > > Don't do this! SDEI is like an NMI, it isn't safe to kprob

Re: [RFC PATCH] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-01-26 Thread Xiongfeng Wang
amiliar with this stuff and it would be good to get some >> feedback from you guys. >> >> @Rafael: Do you have any comments on this ? >> >> On 17-01-19, 19:00, Xiongfeng Wang wrote: >>> Hisilicon chips do not support delivered performance counter register >>

[RFC PATCH] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
This patch use 'timespec64_to_ktime()' to limit 'tv_sec' to avoid overflow. Signed-off-by: Xiongfeng Wang --- kernel/time/posix-cpu-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [RFC PATCH] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
On 2019/2/27 10:38, Deepa Dinamani wrote: > On Tue, Feb 26, 2019 at 6:07 PM Xiongfeng Wang > wrote: >> >> When I ran Syzkaller testsuite, I got the following call trace. >> >>

[PATCH v2] posix-cpu-timers: Avoid undefined behaviour in timespec64_to_ns()

2019-02-26 Thread Xiongfeng Wang
d_restrict()' to check whether 'it_interval.tv_sec' is larger than 'KTIME_SEC_MAX'. Signed-off-by: Xiongfeng Wang --- kernel/time/posix-timers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c

[RFC PATCH] timekeeping: Avoid undefined behaviour in 'ktime_get_with_offset()'

2019-02-27 Thread Xiongfeng Wang
se 'ktime_get_with_offset()' is a frequently used function, it may effect the performance if we use 'ktime_add_safe()' to avoid this undefined behaviour, so we use 'ktime_add_unsafe()' instead. Signed-off-by: Xiongfeng Wang --- kernel/time/timekeeping.c

[Question]: about 'cpuinfo_cur_freq' shown in sysfs when the CPU is in idle state

2020-06-01 Thread Xiongfeng Wang
Hi Viresh, Sorry to disturb you about another problem as follows. CPPC use the increment of Desired Performance counter and Reference Performance counter to get the CPU frequency and show it in sysfs through 'cpuinfo_cur_freq'. But ACPI CPPC doesn't specifically define the behavior of these two c

Re: [RFC PATCH 2/3] cpufreq: Add SW BOOST support for drivers without frequency table

2020-05-18 Thread Xiongfeng Wang
Hi Viresh, Thanks for your reply ! On 2020/5/18 15:53, Viresh Kumar wrote: > Sorry for the delay from my side in replying to this thread. > > On 15-05-20, 09:49, Xiongfeng Wang wrote: >> On 2020/5/14 22:16, Rafael J. Wysocki wrote: >>> On Friday, May 8, 2020 11:11:0

Re: [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly

2020-05-18 Thread Xiongfeng Wang
Hi Viresh, On 2020/5/18 19:43, Viresh Kumar wrote: > On 18-05-20, 13:16, Viresh Kumar wrote: >> On 18-05-20, 15:10, Xiongfeng Wang wrote: >>> 'freq_qos_update_request()' called by 'cpufreq_boost_set_sw()' reutrns 1 >>> when the effective constraint v

Re: [PATCH v2 20/20] cpufreq: Return zero on success in boost sw setting

2020-05-18 Thread Xiongfeng Wang
Hi Rafael, On 2020/5/18 19:05, Rafael J. Wysocki wrote: > On Mon, May 18, 2020 at 12:56 PM Serge Semin > wrote: >> >> On Mon, May 18, 2020 at 12:51:15PM +0200, Rafael J. Wysocki wrote: >>> On Mon, May 18, 2020 at 12:46 PM Serge Semin >>> wrote: On Mon, May 18, 2020 at 12:41:19PM +0200,

[RFC PATCH v3 2/2] CPPC: add support for SW BOOST

2020-05-19 Thread Xiongfeng Wang
n Nominal Performance, boost feature is enabled by default. Because SW BOOST is disabled by default, so, after this patch, boost feature is disabled by default even if boost is enabled by firmware. Signed-off-by: Xiongfeng Wang --- drivers/cpufreq/cppc_cpufreq.c | 39 ++

[RFC PATCH v3 0/2] add SW BOOST support for CPPC

2020-05-19 Thread Xiongfeng Wang
nce in non-boost mode. If the Highest Performance is greater than the Nominal Performance, we assume SW BOOST is supported. Xiongfeng Wang (2): cpufreq: change '.set_boost' to act on only one policy CPPC: add support for SW BOOST drivers/cpufreq/acpi-cpufreq.c | 4 ++-- drivers/cp

[RFC PATCH v3 1/2] cpufreq: change '.set_boost' to act on only one policy

2020-05-19 Thread Xiongfeng Wang
t_trigger_state()' iterate over all the policies to set boost for the system. This is preparation for adding SW BOOST support for CPPC. Signed-off-by: Xiongfeng Wang --- drivers/cpufreq/acpi-cpufreq.c | 4 ++-- drivers/cpufreq/cpufreq.c | 53 +--

Re: [RFC PATCH v3 1/2] cpufreq: change '.set_boost' to act on only one policy

2020-05-19 Thread Xiongfeng Wang
On 2020/5/19 19:41, Xiongfeng Wang wrote: > Macro 'for_each_active_policy()' is defined internally. To avoid some > cpufreq driver needing this macro to iterate over all the policies in > '.set_boost' callback, we redefine '.set_boost' to act on only

Re: [PATCH] firmware: arm_sdei: remove unused interfaces

2020-05-19 Thread Xiongfeng Wang
Hi James, On 2020/5/19 23:47, James Morse wrote: > Hi Xiongfeng, > > On 05/05/2020 03:08, Xiongfeng Wang wrote: >> On 2020/5/5 1:14, James Morse wrote: >>> Hi Christoph, >>> >>> (CC: +Xiongfeng) >>> >>> Thanks for the reminder - I was j

Re: [RFC PATCH v3 2/2] CPPC: add support for SW BOOST

2020-05-20 Thread Xiongfeng Wang
Hi Viresh, On 2020/5/20 13:00, Viresh Kumar wrote: > On 19-05-20, 19:41, Xiongfeng Wang wrote: >> To add SW BOOST support for CPPC, we need to get the max frequency of >> boost mode and non-boost mode. ACPI spec 6.2 section 8.4.7.1 describe >> the following two CPC regi

[PATCH 1/4] PCI: acpi_pcihp: Correct acpi_pci_check_ejectable() function name in the header

2021-03-25 Thread Xiongfeng Wang
Fixes the following W=1 kernel build warning(s): drivers/pci/hotplug/acpi_pcihp.c:167: warning: expecting prototype for acpi_pcihp_check_ejectable(). Prototype was for acpi_pci_check_ejectable() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/pci/hotplug

[PATCH 2/4] PCI/AER: Correct function names in the header

2021-03-25 Thread Xiongfeng Wang
disable_ecrc_checking() instead drivers/pci/pcie/aer.c:1450: warning: expecting prototype for aer_service_init(). Prototype was for pcie_aer_init() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/pci/pcie/aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 0/4] PCI: Correct function names in the header

2021-03-25 Thread Xiongfeng Wang
Xiongfeng Wang (4): PCI: acpi_pcihp: Correct acpi_pci_check_ejectable() function name in the header PCI/AER: Correct function names in the header PCI/PME: Correct pcie_pme_init() function name in the header PCI/ATS: Correct pci_max_pasids() function name in header drivers/pci/ats.c

[PATCH 4/4] PCI/ATS: Correct pci_max_pasids() function name in header

2021-03-25 Thread Xiongfeng Wang
Fixes the following W=1 kernel build warning(s): drivers/pci/ats.c:490: warning: expecting prototype for pci_max_pasid(). Prototype was for pci_max_pasids() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/pci/ats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 3/4] PCI/PME: Correct pcie_pme_init() function name in the header

2021-03-25 Thread Xiongfeng Wang
Fixes the following W=1 kernel build warning(s): drivers/pci/pcie/pme.c:469: warning: expecting prototype for pcie_pme_service_init(). Prototype was for pcie_pme_init() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/pci/pcie/pme.c | 2 +- 1 file changed, 1

Re: [PATCH 2/4] PCI/AER: Correct function names in the header

2021-03-25 Thread Xiongfeng Wang
Hi Rafael, On 2021/3/26 1:30, Rafael J. Wysocki wrote: > On Thu, Mar 25, 2021 at 8:50 AM Xiongfeng Wang > wrote: >> >> Fixes the following W=1 kernel build warning(s): >> >> drivers/pci/pcie/aer.c:138: warning: expecting prototype for >> enabl

Re: [PATCH 0/4] PCI: Correct function names in the header

2021-03-27 Thread Xiongfeng Wang
Hi, Krzysztof On 2021/3/26 9:07, Krzysztof Wilczyński wrote: > Hi, > > [...] >> PCI: acpi_pcihp: Correct acpi_pci_check_ejectable() function name in >> the header >> PCI/AER: Correct function names in the header >> PCI/PME: Correct pcie_pme_init() function name in the header >> PCI/AT

Re: [PATCH v2] drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()

2020-11-17 Thread Xiongfeng Wang
On 2020/11/18 1:47, Jernej Škrabec wrote: > Dne ponedeljek, 16. november 2020 ob 02:09:29 CET je Xiongfeng Wang > napisal(a): >> Fix to return a negative error code from the error handling case instead >> of 0 in function sun8i_dw_hdmi_bind(). >> >> Fixes: b7c74

[PATCH] IB/mthca: fix return value of error branch in mthca_init_cq()

2020-11-19 Thread Xiongfeng Wang
We return 'err' in the error branch, but this variable may be set as zero by the above code. Fix it by setting 'err' as a negative value before we goto the error label. Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/infiniband/hw/mthca/mthca_cq.c | 5 +

[PATCH] misc: pci_endpoint_test: fix return value of error branch

2020-11-19 Thread Xiongfeng Wang
We return 'err' in the error branch, but this variable may be set as zero before. Fix it by setting 'err' as a negative value before we goto the error label. Fixes: e03327122e2c ("pci_endpoint_test: Add 2 ioctl commands") Reported-by: Hulk Robot Signed-off-by: Xio

Re: [PATCH] IB/mthca: fix return value of error branch in mthca_init_cq()

2020-11-19 Thread Xiongfeng Wang
Hi, Jason Thanks for your reply ! On 2020/11/19 23:30, Jason Gunthorpe wrote: > On Thu, Nov 19, 2020 at 08:38:49PM +0800, Xiongfeng Wang wrote: >> We return 'err' in the error branch, but this variable may be set as >> zero by the above code. Fix it by setting &

[PATCH v2] IB/mthca: fix return value of error branch in mthca_init_cq()

2020-11-19 Thread Xiongfeng Wang
.6.12-rc2") Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/infiniband/hw/mthca/mthca_cq.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index c3cfea2..119b257

Re: [PATCH v2] pciehp: fix a race between pciehp and removing operations by sysfs

2019-08-15 Thread Xiongfeng Wang
On 2019/8/11 16:07, Lukas Wunner wrote: > On Mon, Aug 05, 2019 at 08:32:58PM +0800, Xiongfeng Wang wrote: >> When we remove a slot by sysfs. >> 'pci_stop_and_remove_bus_device_locked()' will be called. This function >> will get the global mutex lock 'pci

[PATCH] pci: get pm runtime ref before resetting bus

2019-08-26 Thread Xiongfeng Wang
'pm_runtime_get' to avoid saving the configuration space of the bridge when the bus is being reset. Signed-off-by: Xiongfeng Wang --- drivers/pci/pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 9cae66c..0079

[RFC PATCH] cpufreq: add support for HiSilicon SoC HIP09

2020-04-29 Thread Xiongfeng Wang
e for OS to write frequency adjustment registers directly when CPU Boost is supported. So we add a new SoC implementation-specific(SiP) Service Call for this situation. Signed-off-by: Xiongfeng Wang --- drivers/cpufreq/Kconfig.arm| 7 + drivers/cpufreq/Makefile | 1 + drivers

[PATCH] platform/x86: thinkpad_acpi: Remove always false 'value < 0' statement

2020-04-29 Thread Xiongfeng Wang
Since 'value' is declared as unsigned long, the following statement is always false. value < 0 So let's remove it. Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] powerpc/ps3: Move static keyword to the front of declaration

2020-04-29 Thread Xiongfeng Wang
} static vuart_bus_priv; ^ Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/ps3/ps3-vuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index ddaa5ea..8e80e09 100644 --- a/drivers/ps3/ps3-vuart.c +++

[PATCH] scsi: dpt_i2o: Remove always false 'chan < 0' statement

2020-04-29 Thread Xiongfeng Wang
The channel index is represented by an unsigned variable 'u32 chan'. We don't need to check whether it is less than zero. The following statement is always false and let's remove it. 'chan < 0' Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang ---

[PATCH v2 0/2] Work around for Hisilicon CPPC cpufreq

2019-02-13 Thread Xiongfeng Wang
. We reuse the desired performance register to store the real performance calculated by the platform. After the platform finished the frequency adjust, it gets the real performance and writes it into desired performance register. OS can use it to calculate the real frequency. Xiongfeng Wang (2

[PATCH v2 2/2] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-02-13 Thread Xiongfeng Wang
. We reuse the desired performance register to store the real performance calculated by the platform. After the platform finished the frequency adjust, it gets the real performance and writes it into desired performance register. OS can use it to calculate the real frequency. Signed-off-by: Xiongfeng

[PATCH v2 1/2] ACPI / CPPC: Add a helper to get desired performance

2019-02-13 Thread Xiongfeng Wang
This patch add a helper to get the value of desired performance register. Signed-off-by: Xiongfeng Wang --- drivers/acpi/cppc_acpi.c | 38 ++ include/acpi/cppc_acpi.h | 1 + 2 files changed, 39 insertions(+) diff --git a/drivers/acpi/cppc_acpi.c b/drivers

Re: [PATCH v2 0/2] Work around for Hisilicon CPPC cpufreq

2019-02-14 Thread Xiongfeng Wang
On 2019/2/14 19:39, John Garry wrote: > On 14/02/2019 07:46, Xiongfeng Wang wrote: >> Hisilicon chips do not support delivered performance counter register >> and reference performance counter register. But the platform can >> calculate the real performance using its o

Re: [PATCH v2 2/2] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-02-14 Thread Xiongfeng Wang
On 2019/2/14 18:58, Rafael J. Wysocki wrote: > On Thu, Feb 14, 2019 at 8:46 AM Xiongfeng Wang > wrote: >> >> Hisilicon chips do not support delivered performance counter register >> and reference performance counter register. But the platform can >> calculate the

Re: [PATCH v2 2/2] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-02-14 Thread Xiongfeng Wang
On 2019/2/15 7:15, Rafael J. Wysocki wrote: > On Thursday, February 14, 2019 2:58:21 PM CET Xiongfeng Wang wrote: >> >> On 2019/2/14 18:58, Rafael J. Wysocki wrote: >>> On Thu, Feb 14, 2019 at 8:46 AM Xiongfeng Wang >>> wrote: >>>> >>>

[PATCH 1/5] crypto: api - add a helper to (un)register a array of templates

2019-01-15 Thread Xiongfeng Wang
This patch add a helper to (un)register a array of templates. The following patches will use this helper to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/algapi.c | 27 +++ include/crypto/algapi.h | 2 ++ 2 files changed, 29 insertions(+) diff

[PATCH 0/5] Crypto Cleanup

2019-01-15 Thread Xiongfeng Wang
The patchset introduce a helper to (un)register a array of crypto templates. The following patches use this helper to simplify the code. This is also a preparation for a coming patchset, which will register several crypto templates. Xiongfeng Wang (5): crypto: api - add a helper to (un)register

[PATCH 2/5] crypto: ccm - use template array registering API to simplify the code

2019-01-15 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/ccm.c | 81 +++- 1 file changed, 26 insertions(+), 55 deletions(-) diff --git a/crypto/ccm.c b/crypto/ccm.c index b242fd0..8949aa2

[PATCH 4/5] crypto: ctr - use template array registering API to simplify the code

2019-01-15 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/ctr.c | 46 +- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/crypto/ctr.c b/crypto/ctr.c index 30f3946..ef51099 100644 --- a

[PATCH 3/5] crypto: gcm - use template array registering API to simplify the code

2019-01-15 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/gcm.c | 76 +--- 1 file changed, 26 insertions(+), 50 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index e438492..c8d5fe3

[PATCH 5/5] crypto: chacha20poly1305 - use template array registering API to simplify the code

2019-01-15 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/chacha20poly1305.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c index

Re: [PATCH 0/5] Crypto Cleanup

2019-01-16 Thread Xiongfeng Wang
On 2019/1/17 1:49, Eric Biggers wrote: > On Wed, Jan 16, 2019 at 10:50:29AM +0800, Xiongfeng Wang wrote: >> The patchset introduce a helper to (un)register a array of crypto templates. >> The following patches use this helper to simplify the code. This is also >> a pre

[PATCH V2 2/5] crypto: ccm - use template array registering API to simplify the code

2019-01-16 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/ccm.c | 78 ++-- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git a/crypto/ccm.c b/crypto/ccm.c index b242fd0..50df8f0

[PATCH V2 1/5] crypto: api - add a helper to (un)register a array of templates

2019-01-16 Thread Xiongfeng Wang
This patch add a helper to (un)register a array of templates. The following patches will use this helper to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/algapi.c | 27 +++ include/crypto/algapi.h | 2 ++ 2 files changed, 29 insertions(+) diff

[PATCH V2 5/5] crypto: chacha20poly1305 - use template array registering API to simplify the code

2019-01-16 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/chacha20poly1305.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c index

[PATCH V2 3/5] crypto: gcm - use template array registering API to simplify the code

2019-01-16 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/gcm.c | 73 +++- 1 file changed, 23 insertions(+), 50 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index e438492..31eb694

[PATCH V2 0/5] Crypto Cleanup

2019-01-16 Thread Xiongfeng Wang
ome format issue Xiongfeng Wang (5): crypto: api - add a helper to (un)register a array of templates crypto: ccm - use template array registering API to simplify the code crypto: gcm - use template array registering API to simplify the code crypto: ctr - use template array registering API

[PATCH V2 4/5] crypto: ctr - use template array registering API to simplify the code

2019-01-16 Thread Xiongfeng Wang
Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang --- crypto/ctr.c | 43 +++ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/crypto/ctr.c b/crypto/ctr.c index 4c743a9..d9f9d65 100644 --- a/crypto

[RFC PATCH] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-01-17 Thread Xiongfeng Wang
. We reuse the desired performance register to store the real performance calculated by the platform. After the platform finished the frequency adjust, it gets the real performance and writes it into desired performance register. OS can use it to calculate the real frequency. Signed-off-by: Xiongfeng

[PATCH V3 0/5] Crypto Cleanup

2019-01-17 Thread Xiongfeng Wang
the fourth patch change author to Xiongfeng Wang v1 -> v2: rebased to cryptodev, fix some format issue Xiongfeng Wang (5): crypto: api - add a helper to (un)register a array of templates crypto: ccm - use template array registering API to simplify the code crypto: gcm

[PATCH V3 3/5] crypto: gcm - use template array registering API to simplify the code

2019-01-17 Thread Xiongfeng Wang
From: Xiongfeng Wang Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang Reviewed-by: Eric Biggers --- crypto/gcm.c | 73 +++- 1 file changed, 23 insertions(+), 50 deletions(-) diff --git a

[PATCH V3 4/5] crypto: ctr - use template array registering API to simplify the code

2019-01-17 Thread Xiongfeng Wang
From: Xiongfeng Wang Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang Reviewed-by: Eric Biggers --- crypto/ctr.c | 42 ++ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/crypto/ctr.c b/crypto

[PATCH V3 5/5] crypto: chacha20poly1305 - use template array registering API to simplify the code

2019-01-17 Thread Xiongfeng Wang
From: Xiongfeng Wang Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang Reviewed-by: Eric Biggers --- crypto/chacha20poly1305.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/crypto

[PATCH V3 2/5] crypto: ccm - use template array registering API to simplify the code

2019-01-17 Thread Xiongfeng Wang
From: Xiongfeng Wang Use crypto template array registering API to simplify the code. Signed-off-by: Xiongfeng Wang Reviewed-by: Eric Biggers --- crypto/ccm.c | 78 ++-- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git a

[PATCH V3 1/5] crypto: api - add a helper to (un)register a array of templates

2019-01-17 Thread Xiongfeng Wang
From: Xiongfeng Wang This patch add a helper to (un)register a array of templates. The following patches will use this helper to simplify the code. Signed-off-by: Xiongfeng Wang Reviewed-by: Eric Biggers --- crypto/algapi.c | 27 +++ include/crypto/algapi.h

Re: [RFC PATCH] cpufreq / cppc: Work around for Hisilicon CPPC cpufreq

2019-02-02 Thread Xiongfeng Wang
9 12:00:11 PM CET Xiongfeng Wang wrote: >> Hisilicon chips do not support delivered performance counter register >> and reference performance counter register. But the platform can >> calculate the real performance using its own method. This patch provide >> a workaround for

[RFC PATCH] kprobes/arm64: Blacklist functions called in '_sdei_handler'

2019-04-20 Thread Xiongfeng Wang
Functions called in '_sdei_handler' are needed to be marked as 'nokprobe'. Signed-off-by: Xiongfeng Wang --- When I kprobe 'sdei_smccc_smc', the cpu hungs. I am not sure if it is becase when SDEI events interrupt EL0, '__sdei_asm_entry_trampoline' didn&#x

Re: [PATCH] pciehp: fix a race between pciehp and removing operations by sysfs

2019-08-02 Thread Xiongfeng Wang
On 2019/8/2 8:36, Bjorn Helgaas wrote: > On Mon, Feb 26, 2018 at 08:41:15PM +0800, Xiongfeng Wang wrote: >> From: Xiongfeng Wang >> >> When I run a stress test about pcie hotplug and removing operations by >> sysfs, I got a hange task, and the following call trace is

[RFC PATCH] rtc: add a schedule point in 'rtc_timer_do_work'

2019-07-25 Thread Xiongfeng Wang
7; is far less than the current rtc time. This patch add a schedule point to avoid the RCU calltrace. Signed-off-by: Xiongfeng Wang --- drivers/rtc/interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 72b7ddc4..0c8339d 100644 -

[PATCH v2] pciehp: fix a race between pciehp and removing operations by sysfs

2019-08-05 Thread Xiongfeng Wang
t triggered by pciehp interrupt and removing through 'sysfs', should not be excuted at the same time. This patch add a global variable to mark that one of these operations is under processing. When this variable is set, if another operation is requested, it will be rejected. Si

Re: [RFC PATCH] pciehp: use completion to wait irq_thread 'pciehp_ist'

2019-08-07 Thread Xiongfeng Wang
Hi, Lukas On 2019/8/6 15:24, Lukas Wunner wrote: > On Thu, Jul 04, 2019 at 03:50:38PM +0800, Xiongfeng Wang wrote: >> When I use the following command to power on a slot which has been >> powered off already. >> echo 1 > /sys/bus/pci/slots/22/power >> It prints the f

Re: [PATCH RFC 0/3] Support CPU hotplug for ARM64

2019-07-03 Thread Xiongfeng Wang
e is to implement the vcpu hotplug in arm64 qemu. So that I can add or remove vcpu without shutting down the Guest OS. Thanks, Xiongfeng > > Thanks for the ellaboration > > --- > Cheers, > Justin (Jia He) > > On 2019/6/28 19:13, Xiongfeng Wang wrote: >> This patch

Re: [PATCH RFC 0/3] Support CPU hotplug for ARM64

2019-07-03 Thread Xiongfeng Wang
qemu and he is working on it. > > --- > Cheers, > Justin (Jia He) > > On 2019/7/4 11:26, Xiongfeng Wang wrote: >> Hi Justin, >> >> On 2019/7/4 11:00, Jia He wrote: >>> Hi Xiongfeng >>> >>> It is a little bit awkful that I am also  i

[RFC PATCH] pciehp: use completion to wait irq_thread 'pciehp_ist'

2019-07-04 Thread Xiongfeng Wang
s' is cleared before we go into sleep state. 'wait_event()' will check the condition before going into sleep. So we return immediately and '-ENODEV' is return. This patch use struct completion to wait until irq_thread 'pciehp_ist' is completed. Signed-off-by: Xiongfeng

Re: [RFC PATCH v2 2/3] arm64: mark all the GICC nodes in MADT as possible cpu

2019-07-04 Thread Xiongfeng Wang
On 2019/7/4 14:46, Jia He wrote: > > On 2019/6/29 10:42, Xiongfeng Wang wrote: >> We set 'cpu_possible_mask' based on the enabled GICC node in MADT. If >> the GICC node is disabled, we will skip initializing the kernel data >> structure for that CPU. >&g

[PATCH RFC 2/3] arm64: mark all the GICC nodes in MADT as possible cpu

2019-06-28 Thread Xiongfeng Wang
C nodes as possible CPU and only these enabled GICC nodes as present CPU. Signed-off-by: Xiongfeng Wang --- arch/arm64/kernel/setup.c | 2 +- arch/arm64/kernel/smp.c | 11 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/set

[PATCH RFC 3/3] arm64: Add CPU hotplug support

2019-06-28 Thread Xiongfeng Wang
To support CPU hotplug, we need to implement 'acpi_(un)map_cpu()' and 'arch_(un)register_cpu()' for ARM64. These functions are called in 'acpi_processor_hotadd_init()/acpi_processor_remove()' when the CPU is hot added into or hot removed from the system. Signed-off

[PATCH RFC 1/3] ACPI / scan: evaluate _STA for processors declared via ASL Device statement

2019-06-28 Thread Xiongfeng Wang
as default. This patch get the device status from '_STA' method for processors declared via ASL Device statement if it does have a '_STA' method. Signed-off-by: Xiongfeng Wang --- I am not sure if I should set 'type' as ACPI_BUS_TYPE_PROCESSOR rather than A

[PATCH RFC 0/3] Support CPU hotplug for ARM64

2019-06-28 Thread Xiongfeng Wang
e CPUs are marked as disabled in GICC nodes. Xiongfeng Wang (3): ACPI / scan: evaluate _STA for processors declared via ASL Device statement arm64: mark all the GICC nodes in MADT as possible cpu arm64: Add CPU hotplug support arch/arm64/kernel/acpi.c | 22 ++ arch/arm64

Re: [PATCH RFC 0/3] Support CPU hotplug for ARM64

2019-06-28 Thread Xiongfeng Wang
Sorry, the third patch can't be applied to the lastest kernel. I will send another version and attach the method to test this patchset. On 2019/6/28 19:13, Xiongfeng Wang wrote: > This patchset mark all the GICC node in MADT as possible CPUs even though it > is disabled. But only th

[RFC PATCH v2 0/3] Support CPU hotplug for ARM64

2019-06-28 Thread Xiongfeng Wang
e CPUs are marked as disabled in GICC nodes. Changelog: v1 -> v2: rebase the thrid patch to the lastest kernel Xiongfeng Wang (3): ACPI / scan: evaluate _STA for processors declared via ASL Device statement arm64: mark all the GICC nodes in MADT as possible cpu arm64: Add CPU hotpl

  1   2   3   >