[git pull] Input updates for v4.12-rc6
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus to receive updates for the input subsystem. You will get: - a quirk to i8042 to ignore timeout bit on Lifebook AH544 - a fixup to Synaptics RMI function 54 that was breaking some Dells - a fix for memory leak in soc_button_array driver Changelog: - Andrew Duggan (1): Input: synaptics-rmi4 - only read the F54 query registers which are used Daniel Drake (1): Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Hans de Goede (1): Input: soc_button_array - fix leaking the ACPI button descriptor buffer Diffstat: drivers/input/misc/soc_button_array.c | 20 ++-- drivers/input/rmi4/rmi_f54.c | 17 +++-- drivers/input/serio/i8042-x86ia64io.h | 7 +++ 3 files changed, 28 insertions(+), 16 deletions(-) Thanks. -- Dmitry
[git pull] Input updates for v4.12-rc6
Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus to receive updates for the input subsystem. You will get: - a quirk to i8042 to ignore timeout bit on Lifebook AH544 - a fixup to Synaptics RMI function 54 that was breaking some Dells - a fix for memory leak in soc_button_array driver Changelog: - Andrew Duggan (1): Input: synaptics-rmi4 - only read the F54 query registers which are used Daniel Drake (1): Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list Hans de Goede (1): Input: soc_button_array - fix leaking the ACPI button descriptor buffer Diffstat: drivers/input/misc/soc_button_array.c | 20 ++-- drivers/input/rmi4/rmi_f54.c | 17 +++-- drivers/input/serio/i8042-x86ia64io.h | 7 +++ 3 files changed, 28 insertions(+), 16 deletions(-) Thanks. -- Dmitry
Re: [PATCH v8 3/3] mailbox: qcom: Add support for APCS clock controller
Hi Georgi, [auto build test ERROR on next-20170619] [cannot apply to clk/clk-next robh/for-next linus/master v4.12-rc6 v4.12-rc5 v4.12-rc4 v4.12-rc6] [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/Georgi-Djakov/Add-support-for-Qualcomm-A53-CPU-clock/20170625-063544 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "__mux_div_set_src_div" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] >> undefined! >> ERROR: "__clk_lookup" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] undefined! >> ERROR: "clk_regmap_mux_div_ops" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] >> undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v8 3/3] mailbox: qcom: Add support for APCS clock controller
Hi Georgi, [auto build test ERROR on next-20170619] [cannot apply to clk/clk-next robh/for-next linus/master v4.12-rc6 v4.12-rc5 v4.12-rc4 v4.12-rc6] [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/Georgi-Djakov/Add-support-for-Qualcomm-A53-CPU-clock/20170625-063544 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> ERROR: "__mux_div_set_src_div" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] >> undefined! >> ERROR: "__clk_lookup" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] undefined! >> ERROR: "clk_regmap_mux_div_ops" [drivers/mailbox/qcom-apcs-ipc-mailbox.ko] >> undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[GIT PULL] target fixes for v4.12-rc7
Hi Linus, Here are the target-pending fixes for v4.12-rc7 that have been queued up for the last 2 weeks. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes: - Fix a TMR related kref underflow detected by the recent refcount_t conversion in upstream. - Fix a iscsi-target corner case during explicit connection logout timeout failure. - Address last fallout in iscsi-target immediate data handling from v4.4 target-core now allowing control CDB payload underflow. Thank you, --nab Nicholas Bellinger (3): target: Fix kref->refcount underflow in transport_cmd_finish_abort iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP iscsi-target: Reject immediate data underflow larger than SCSI transfer length drivers/target/iscsi/iscsi_target.c| 22 -- drivers/target/target_core_internal.h | 2 +- drivers/target/target_core_tmr.c | 16 drivers/target/target_core_transport.c | 9 ++--- 4 files changed, 35 insertions(+), 14 deletions(-)
[GIT PULL] target fixes for v4.12-rc7
Hi Linus, Here are the target-pending fixes for v4.12-rc7 that have been queued up for the last 2 weeks. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes: - Fix a TMR related kref underflow detected by the recent refcount_t conversion in upstream. - Fix a iscsi-target corner case during explicit connection logout timeout failure. - Address last fallout in iscsi-target immediate data handling from v4.4 target-core now allowing control CDB payload underflow. Thank you, --nab Nicholas Bellinger (3): target: Fix kref->refcount underflow in transport_cmd_finish_abort iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP iscsi-target: Reject immediate data underflow larger than SCSI transfer length drivers/target/iscsi/iscsi_target.c| 22 -- drivers/target/target_core_internal.h | 2 +- drivers/target/target_core_tmr.c | 16 drivers/target/target_core_transport.c | 9 ++--- 4 files changed, 35 insertions(+), 14 deletions(-)
Re: [1/3] cgroup: "cgroup.subtree_control" should be writeable by delegatee
On Sun, Jun 25, 2017 at 12:27:17AM -0400, Tejun Heo wrote: > "cgroup.subtree_control" determines which resource types a cgroup > wants to control. Unlike actual resource knobs, this is an attribute > which belongs to the cgroup itself instead of its parent and thus > should be writeable by the delegatee in a delegated cgroup. > > Update delegation documentation accordingly. > > Signed-off-by: Tejun HeoApplying to cgroup/for-4.13. I've been thinking that the doc listed both files all along. Oh well, better late than never. Thanks. -- tejun
Re: [1/3] cgroup: "cgroup.subtree_control" should be writeable by delegatee
On Sun, Jun 25, 2017 at 12:27:17AM -0400, Tejun Heo wrote: > "cgroup.subtree_control" determines which resource types a cgroup > wants to control. Unlike actual resource knobs, this is an attribute > which belongs to the cgroup itself instead of its parent and thus > should be writeable by the delegatee in a delegated cgroup. > > Update delegation documentation accordingly. > > Signed-off-by: Tejun Heo Applying to cgroup/for-4.13. I've been thinking that the doc listed both files all along. Oh well, better late than never. Thanks. -- tejun
[PATCH 3/3] cgroup: implement "nsdelegate" mount option
Currently, cgroup only supports delegation to !root users and cgroup namespaces don't get any special treatments. This limits the usefulness of cgroup namespaces as they by themselves can't be safe delegation boundaries. A process inside a cgroup can change the resource control knobs of the parent in the namespace root and may move processes in and out of the namespace if cgroups outside its namespace are visible somehow. This patch adds a new mount option "nsdelegate" which makes cgroup namespaces delegation boundaries. If set, cgroup behaves as if write permission based delegation took place at namespace boundaries - writes to the resource control knobs from the namespace root are denied and migration crossing the namespace boundary aren't allowed from inside the namespace. This allows cgroup namespace to function as a delegation boundary by itself. Signed-off-by: Tejun HeoCc: Aravind Anbudurai Cc: Serge Hallyn Cc: Eric Biederman --- Documentation/cgroup-v2.txt | 60 +++ include/linux/cgroup-defs.h |9 kernel/cgroup/cgroup.c | 96 +--- 3 files changed, 142 insertions(+), 23 deletions(-) --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -149,6 +149,15 @@ during boot, before manual intervention and experimenting easier, the kernel parameter cgroup_no_v1= allows disabling controllers in v1 and make them always available in v2. +cgroup v2 currently supports the following mount options. + + nsdelegate + + Consider cgroup namespaces as delegation boundaries. This + option is system wide and can only be set on mount or modified + through remount from the init namespace. Please refer to the + Delegation section for details. + 2-2. Organizing Processes @@ -308,19 +317,27 @@ file. 2-5-1. Model of Delegation -A cgroup can be delegated to a less privileged user by granting write -access of the directory and its "cgroup.procs" and -"cgroup.subtree_control" files to the user. Note that resource -control interface files in a given directory control the distribution -of the parent's resources and thus must not be delegated along with -the directory. - -Once delegated, the user can build sub-hierarchy under the directory, -organize processes as it sees fit and further distribute the resources -it received from the parent. The limits and other settings of all -resource controllers are hierarchical and regardless of what happens -in the delegated sub-hierarchy, nothing can escape the resource -restrictions imposed by the parent. +A cgroup can be delegated in two ways. First, to a less privileged +user by granting write access of the directory and its "cgroup.procs" +and "cgroup.subtree_control" files to the user. Second, if the +"nsdelegate" mount option is set, automatically to a cgroup namespace +on namespace creation. + +Because the resource control interface files in a given directory +control the distribution of the parent's resources, the delegatee +shouldn't be allowed to write to them. For the first method, this is +achieved by not granting access to these files. For the second, the +kernel rejects writes to all files other than "cgroup.procs" and +"cgroup.subtree_control" on a namespace root from inside the +namespace. + +The end results are equivalent for both delegation types. Once +delegated, the user can build sub-hierarchy under the directory, +organize processes inside it as it sees fit and further distribute the +resources it received from the parent. The limits and other settings +of all resource controllers are hierarchical and regardless of what +happens in the delegated sub-hierarchy, nothing can escape the +resource restrictions imposed by the parent. Currently, cgroup doesn't impose any restrictions on the number of cgroups in or nesting depth of a delegated sub-hierarchy; however, @@ -330,10 +347,12 @@ this may be limited explicitly in the fu 2-5-2. Delegation Containment A delegated sub-hierarchy is contained in the sense that processes -can't be moved into or out of the sub-hierarchy by the delegatee. For -a process with a non-root euid to migrate a target process into a -cgroup by writing its PID to the "cgroup.procs" file, the following -conditions must be met. +can't be moved into or out of the sub-hierarchy by the delegatee. + +For delegations to a less privileged user, this is achieved by +requiring the following conditions for a process with a non-root euid +to migrate a target process into a cgroup by writing its PID to the +"cgroup.procs" file. - The writer must have write access to the "cgroup.procs" file. @@ -360,6 +379,11 @@ destination cgroup C00 is above the poin not have write access to its "cgroup.procs" files and thus the write will be denied with -EACCES. +For delegations to namespaces, containment is achieved by requiring +that
[PATCH 3/3] cgroup: implement "nsdelegate" mount option
Currently, cgroup only supports delegation to !root users and cgroup namespaces don't get any special treatments. This limits the usefulness of cgroup namespaces as they by themselves can't be safe delegation boundaries. A process inside a cgroup can change the resource control knobs of the parent in the namespace root and may move processes in and out of the namespace if cgroups outside its namespace are visible somehow. This patch adds a new mount option "nsdelegate" which makes cgroup namespaces delegation boundaries. If set, cgroup behaves as if write permission based delegation took place at namespace boundaries - writes to the resource control knobs from the namespace root are denied and migration crossing the namespace boundary aren't allowed from inside the namespace. This allows cgroup namespace to function as a delegation boundary by itself. Signed-off-by: Tejun Heo Cc: Aravind Anbudurai Cc: Serge Hallyn Cc: Eric Biederman --- Documentation/cgroup-v2.txt | 60 +++ include/linux/cgroup-defs.h |9 kernel/cgroup/cgroup.c | 96 +--- 3 files changed, 142 insertions(+), 23 deletions(-) --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -149,6 +149,15 @@ during boot, before manual intervention and experimenting easier, the kernel parameter cgroup_no_v1= allows disabling controllers in v1 and make them always available in v2. +cgroup v2 currently supports the following mount options. + + nsdelegate + + Consider cgroup namespaces as delegation boundaries. This + option is system wide and can only be set on mount or modified + through remount from the init namespace. Please refer to the + Delegation section for details. + 2-2. Organizing Processes @@ -308,19 +317,27 @@ file. 2-5-1. Model of Delegation -A cgroup can be delegated to a less privileged user by granting write -access of the directory and its "cgroup.procs" and -"cgroup.subtree_control" files to the user. Note that resource -control interface files in a given directory control the distribution -of the parent's resources and thus must not be delegated along with -the directory. - -Once delegated, the user can build sub-hierarchy under the directory, -organize processes as it sees fit and further distribute the resources -it received from the parent. The limits and other settings of all -resource controllers are hierarchical and regardless of what happens -in the delegated sub-hierarchy, nothing can escape the resource -restrictions imposed by the parent. +A cgroup can be delegated in two ways. First, to a less privileged +user by granting write access of the directory and its "cgroup.procs" +and "cgroup.subtree_control" files to the user. Second, if the +"nsdelegate" mount option is set, automatically to a cgroup namespace +on namespace creation. + +Because the resource control interface files in a given directory +control the distribution of the parent's resources, the delegatee +shouldn't be allowed to write to them. For the first method, this is +achieved by not granting access to these files. For the second, the +kernel rejects writes to all files other than "cgroup.procs" and +"cgroup.subtree_control" on a namespace root from inside the +namespace. + +The end results are equivalent for both delegation types. Once +delegated, the user can build sub-hierarchy under the directory, +organize processes inside it as it sees fit and further distribute the +resources it received from the parent. The limits and other settings +of all resource controllers are hierarchical and regardless of what +happens in the delegated sub-hierarchy, nothing can escape the +resource restrictions imposed by the parent. Currently, cgroup doesn't impose any restrictions on the number of cgroups in or nesting depth of a delegated sub-hierarchy; however, @@ -330,10 +347,12 @@ this may be limited explicitly in the fu 2-5-2. Delegation Containment A delegated sub-hierarchy is contained in the sense that processes -can't be moved into or out of the sub-hierarchy by the delegatee. For -a process with a non-root euid to migrate a target process into a -cgroup by writing its PID to the "cgroup.procs" file, the following -conditions must be met. +can't be moved into or out of the sub-hierarchy by the delegatee. + +For delegations to a less privileged user, this is achieved by +requiring the following conditions for a process with a non-root euid +to migrate a target process into a cgroup by writing its PID to the +"cgroup.procs" file. - The writer must have write access to the "cgroup.procs" file. @@ -360,6 +379,11 @@ destination cgroup C00 is above the poin not have write access to its "cgroup.procs" files and thus the write will be denied with -EACCES. +For delegations to namespaces, containment is achieved by requiring +that both the source and destination cgroups are reachable from the +namespace
[PATCH 2/3] cgroup: restructure cgroup_procs_write_permission()
Restructure cgroup_procs_write_permission() to make extending permission logic easier. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo--- kernel/cgroup/cgroup.c | 57 - 1 file changed, 33 insertions(+), 24 deletions(-) --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2363,27 +2363,12 @@ static int cgroup_procs_write_permission struct cgroup *dst_cgrp, struct kernfs_open_file *of) { - int ret = 0; + struct super_block *sb = of->file->f_path.dentry->d_sb; + struct cgroup *src_cgrp, *com_cgrp; + struct inode *inode; + int ret; - if (cgroup_on_dfl(dst_cgrp)) { - struct super_block *sb = of->file->f_path.dentry->d_sb; - struct cgroup *cgrp; - struct inode *inode; - - spin_lock_irq(_set_lock); - cgrp = task_cgroup_from_root(task, _dfl_root); - spin_unlock_irq(_set_lock); - - while (!cgroup_is_descendant(dst_cgrp, cgrp)) - cgrp = cgroup_parent(cgrp); - - ret = -ENOMEM; - inode = kernfs_get_inode(sb, cgrp->procs_file.kn); - if (inode) { - ret = inode_permission(inode, MAY_WRITE); - iput(inode); - } - } else { + if (!cgroup_on_dfl(dst_cgrp)) { const struct cred *cred = current_cred(); const struct cred *tcred = get_task_cred(task); @@ -2391,14 +2376,38 @@ static int cgroup_procs_write_permission * even if we're attaching all tasks in the thread group, * we only need to check permissions on one of them. */ - if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && - !uid_eq(cred->euid, tcred->uid) && - !uid_eq(cred->euid, tcred->suid)) + if (uid_eq(cred->euid, GLOBAL_ROOT_UID) || + uid_eq(cred->euid, tcred->uid) || + uid_eq(cred->euid, tcred->suid)) + ret = 0; + else ret = -EACCES; + put_cred(tcred); + return ret; } - return ret; + /* find the source cgroup */ + spin_lock_irq(_set_lock); + src_cgrp = task_cgroup_from_root(task, _dfl_root); + spin_unlock_irq(_set_lock); + + /* and the common ancestor */ + com_cgrp = src_cgrp; + while (!cgroup_is_descendant(dst_cgrp, com_cgrp)) + com_cgrp = cgroup_parent(com_cgrp); + + /* %current should be authorized to migrate to the common ancestor */ + inode = kernfs_get_inode(sb, com_cgrp->procs_file.kn); + if (!inode) + return -ENOMEM; + + ret = inode_permission(inode, MAY_WRITE); + iput(inode); + if (ret) + return ret; + + return 0; } /*
[PATCH 2/3] cgroup: restructure cgroup_procs_write_permission()
Restructure cgroup_procs_write_permission() to make extending permission logic easier. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo --- kernel/cgroup/cgroup.c | 57 - 1 file changed, 33 insertions(+), 24 deletions(-) --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2363,27 +2363,12 @@ static int cgroup_procs_write_permission struct cgroup *dst_cgrp, struct kernfs_open_file *of) { - int ret = 0; + struct super_block *sb = of->file->f_path.dentry->d_sb; + struct cgroup *src_cgrp, *com_cgrp; + struct inode *inode; + int ret; - if (cgroup_on_dfl(dst_cgrp)) { - struct super_block *sb = of->file->f_path.dentry->d_sb; - struct cgroup *cgrp; - struct inode *inode; - - spin_lock_irq(_set_lock); - cgrp = task_cgroup_from_root(task, _dfl_root); - spin_unlock_irq(_set_lock); - - while (!cgroup_is_descendant(dst_cgrp, cgrp)) - cgrp = cgroup_parent(cgrp); - - ret = -ENOMEM; - inode = kernfs_get_inode(sb, cgrp->procs_file.kn); - if (inode) { - ret = inode_permission(inode, MAY_WRITE); - iput(inode); - } - } else { + if (!cgroup_on_dfl(dst_cgrp)) { const struct cred *cred = current_cred(); const struct cred *tcred = get_task_cred(task); @@ -2391,14 +2376,38 @@ static int cgroup_procs_write_permission * even if we're attaching all tasks in the thread group, * we only need to check permissions on one of them. */ - if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && - !uid_eq(cred->euid, tcred->uid) && - !uid_eq(cred->euid, tcred->suid)) + if (uid_eq(cred->euid, GLOBAL_ROOT_UID) || + uid_eq(cred->euid, tcred->uid) || + uid_eq(cred->euid, tcred->suid)) + ret = 0; + else ret = -EACCES; + put_cred(tcred); + return ret; } - return ret; + /* find the source cgroup */ + spin_lock_irq(_set_lock); + src_cgrp = task_cgroup_from_root(task, _dfl_root); + spin_unlock_irq(_set_lock); + + /* and the common ancestor */ + com_cgrp = src_cgrp; + while (!cgroup_is_descendant(dst_cgrp, com_cgrp)) + com_cgrp = cgroup_parent(com_cgrp); + + /* %current should be authorized to migrate to the common ancestor */ + inode = kernfs_get_inode(sb, com_cgrp->procs_file.kn); + if (!inode) + return -ENOMEM; + + ret = inode_permission(inode, MAY_WRITE); + iput(inode); + if (ret) + return ret; + + return 0; } /*
[1/3] cgroup: "cgroup.subtree_control" should be writeable by delegatee
"cgroup.subtree_control" determines which resource types a cgroup wants to control. Unlike actual resource knobs, this is an attribute which belongs to the cgroup itself instead of its parent and thus should be writeable by the delegatee in a delegated cgroup. Update delegation documentation accordingly. Signed-off-by: Tejun Heo--- Documentation/cgroup-v2.txt |9 + 1 file changed, 5 insertions(+), 4 deletions(-) --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -309,10 +309,11 @@ file. 2-5-1. Model of Delegation A cgroup can be delegated to a less privileged user by granting write -access of the directory and its "cgroup.procs" file to the user. Note -that resource control interface files in a given directory control the -distribution of the parent's resources and thus must not be delegated -along with the directory. +access of the directory and its "cgroup.procs" and +"cgroup.subtree_control" files to the user. Note that resource +control interface files in a given directory control the distribution +of the parent's resources and thus must not be delegated along with +the directory. Once delegated, the user can build sub-hierarchy under the directory, organize processes as it sees fit and further distribute the resources
[1/3] cgroup: "cgroup.subtree_control" should be writeable by delegatee
"cgroup.subtree_control" determines which resource types a cgroup wants to control. Unlike actual resource knobs, this is an attribute which belongs to the cgroup itself instead of its parent and thus should be writeable by the delegatee in a delegated cgroup. Update delegation documentation accordingly. Signed-off-by: Tejun Heo --- Documentation/cgroup-v2.txt |9 + 1 file changed, 5 insertions(+), 4 deletions(-) --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -309,10 +309,11 @@ file. 2-5-1. Model of Delegation A cgroup can be delegated to a less privileged user by granting write -access of the directory and its "cgroup.procs" file to the user. Note -that resource control interface files in a given directory control the -distribution of the parent's resources and thus must not be delegated -along with the directory. +access of the directory and its "cgroup.procs" and +"cgroup.subtree_control" files to the user. Note that resource +control interface files in a given directory control the distribution +of the parent's resources and thus must not be delegated along with +the directory. Once delegated, the user can build sub-hierarchy under the directory, organize processes as it sees fit and further distribute the resources
Re: [PATCH v5 3/3] x86/build: Specify stack alignment for clang
2017-06-22 8:28 GMT+09:00 Matthias Kaehlcke: > For gcc stack alignment is configured with -mpreferred-stack-boundary=N, > clang has the option -mstack-alignment=N for that purpose. Use the same > alignment as with gcc. > > If the alignment is not specified clang assumes an alignment of > 16 bytes, as required by the standard ABI. However as mentioned in > d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if > supported") the standard kernel entry on x86-64 leaves the stack > on an 8-byte boundary, as a consequence clang will keep the stack > misaligned. > > Signed-off-by: Matthias Kaehlcke > --- > Changes in v5: > - Use cc-option to probe for a compiler option instead of selecting > it based on the compiler name. > > arch/x86/Makefile | 26 +- > 1 file changed, 21 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > index b2dae639f778..b32b32b422c2 100644 > --- a/arch/x86/Makefile > +++ b/arch/x86/Makefile > @@ -11,6 +11,14 @@ else > KBUILD_DEFCONFIG := $(ARCH)_defconfig > endif > > +# For gcc stack alignment is specified with -mpreferred-stack-boundary, > +# clang has the option -mstack-alignment for that purpose. > +ifneq ($(call cc-option, -mpreferred-stack-boundary=4,),) > +cc_stack_align_opt := -mpreferred-stack-boundary > +else ifneq ($(call cc-option, -mstack-alignment=4,),) > +cc_stack_align_opt := -mstack-alignment > +endif > + The commas after "=4" are redundant. I removed them when I applied this patch. -- Best Regards Masahiro Yamada
Re: [PATCH v5 3/3] x86/build: Specify stack alignment for clang
2017-06-22 8:28 GMT+09:00 Matthias Kaehlcke : > For gcc stack alignment is configured with -mpreferred-stack-boundary=N, > clang has the option -mstack-alignment=N for that purpose. Use the same > alignment as with gcc. > > If the alignment is not specified clang assumes an alignment of > 16 bytes, as required by the standard ABI. However as mentioned in > d9b0cde91c60 ("x86-64, gcc: Use -mpreferred-stack-boundary=3 if > supported") the standard kernel entry on x86-64 leaves the stack > on an 8-byte boundary, as a consequence clang will keep the stack > misaligned. > > Signed-off-by: Matthias Kaehlcke > --- > Changes in v5: > - Use cc-option to probe for a compiler option instead of selecting > it based on the compiler name. > > arch/x86/Makefile | 26 +- > 1 file changed, 21 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/Makefile b/arch/x86/Makefile > index b2dae639f778..b32b32b422c2 100644 > --- a/arch/x86/Makefile > +++ b/arch/x86/Makefile > @@ -11,6 +11,14 @@ else > KBUILD_DEFCONFIG := $(ARCH)_defconfig > endif > > +# For gcc stack alignment is specified with -mpreferred-stack-boundary, > +# clang has the option -mstack-alignment for that purpose. > +ifneq ($(call cc-option, -mpreferred-stack-boundary=4,),) > +cc_stack_align_opt := -mpreferred-stack-boundary > +else ifneq ($(call cc-option, -mstack-alignment=4,),) > +cc_stack_align_opt := -mstack-alignment > +endif > + The commas after "=4" are redundant. I removed them when I applied this patch. -- Best Regards Masahiro Yamada
Re: [PATCH v5 0/3] x86: stack alignment for boot code and clang
2017-06-22 17:58 GMT+09:00 Ingo Molnar: > > * Matthias Kaehlcke wrote: > >> This series fixes an issue with the stack of the x86 boot code not >> being aligned as intended. Further it adapts the Makefile to account >> for the fact that clang uses a different option to configure the >> stack alignment than gcc (-mstack-alignment=N vs >> -mpreferred-stack-boundary=N) >> >> Collaterally the series adds the new kbuild macro __cc-option and >> refactors the macros cc-option and hostcc-option to make use of >> __cc-option. >> >> Matthias Kaehlcke (3): >> kbuild: Add __cc-option macro >> x86/build: Use __cc-option for boot code compiler options >> x86/build: Specify stack alignment for clang >> >> Makefile | 2 +- >> arch/x86/Makefile | 33 + >> scripts/Kbuild.include | 14 -- >> scripts/Makefile.host | 6 -- >> 4 files changed, 38 insertions(+), 17 deletions(-) > > So given that there are non-trivial kbuild changes here, I'd suggest these > patches > might have a better home in the kbuild tree. For the x86 bits: > > Acked-by: Ingo Molnar > > Thanks, > > Ingo > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Series applied to linux-kbuild/kbuild. -- Best Regards Masahiro Yamada
Re: [PATCH v5 0/3] x86: stack alignment for boot code and clang
2017-06-22 17:58 GMT+09:00 Ingo Molnar : > > * Matthias Kaehlcke wrote: > >> This series fixes an issue with the stack of the x86 boot code not >> being aligned as intended. Further it adapts the Makefile to account >> for the fact that clang uses a different option to configure the >> stack alignment than gcc (-mstack-alignment=N vs >> -mpreferred-stack-boundary=N) >> >> Collaterally the series adds the new kbuild macro __cc-option and >> refactors the macros cc-option and hostcc-option to make use of >> __cc-option. >> >> Matthias Kaehlcke (3): >> kbuild: Add __cc-option macro >> x86/build: Use __cc-option for boot code compiler options >> x86/build: Specify stack alignment for clang >> >> Makefile | 2 +- >> arch/x86/Makefile | 33 + >> scripts/Kbuild.include | 14 -- >> scripts/Makefile.host | 6 -- >> 4 files changed, 38 insertions(+), 17 deletions(-) > > So given that there are non-trivial kbuild changes here, I'd suggest these > patches > might have a better home in the kbuild tree. For the x86 bits: > > Acked-by: Ingo Molnar > > Thanks, > > Ingo > -- > To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Series applied to linux-kbuild/kbuild. -- Best Regards Masahiro Yamada
Re: [PATCH] kbuild: deprecate cc-option-align
2017-06-19 16:28 GMT+09:00 Masahiro Yamada: > Documentation/kbuild/makefiles.txt says the change for align options > occurred at GCC 3.0, and Documentation/process/changes.rst says the > minimal supported GCC version is 3.2, so it should be safe to hard-code > -falign* options. > > Fix the only user arch/x86/Makefile_32.cpu and deprecate the > cc-option-align. > > Signed-off-by: Masahiro Yamada Applied to linux-kbuild/kbuild. -- Best Regards Masahiro Yamada
Re: [PATCH] kbuild: deprecate cc-option-align
2017-06-19 16:28 GMT+09:00 Masahiro Yamada : > Documentation/kbuild/makefiles.txt says the change for align options > occurred at GCC 3.0, and Documentation/process/changes.rst says the > minimal supported GCC version is 3.2, so it should be safe to hard-code > -falign* options. > > Fix the only user arch/x86/Makefile_32.cpu and deprecate the > cc-option-align. > > Signed-off-by: Masahiro Yamada Applied to linux-kbuild/kbuild. -- Best Regards Masahiro Yamada
[PATCH] tile: fix dependency and .*.cmd inclusion for incremental build
Build targets using if_changed(_rule) must depend on FORCE so that they are evaluated every time. In order to include .*.cmd files correctly, build targets added to "targets" must not be prefixed with $(obj)/ because it is done by scripts/Makefile.lib . Signed-off-by: Masahiro Yamada--- I found this Makefile in the mainline is already broken for incremental building. I inserted this before thin archive migration patches. arch/tile/kernel/vdso/Makefile | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/tile/kernel/vdso/Makefile b/arch/tile/kernel/vdso/Makefile index c54fff3..cf162a2 100644 --- a/arch/tile/kernel/vdso/Makefile +++ b/arch/tile/kernel/vdso/Makefile @@ -42,10 +42,9 @@ $(obj)/vdso.o: $(obj)/vdso.so # link rule for the .so file, .lds has to be first SYSCFLAGS_vdso.so.dbg = $(c_flags) -$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) +$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE $(call if_changed,vdsold) - # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. @@ -96,17 +95,17 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS)) KBUILD_CFLAGS_32 += -m32 -fPIC -shared obj-vdso32 = $(patsubst %, v%32.o, $(vdso-syms)) -obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) targets += $(obj-vdso32) vdso32.so vdso32.so.dbg +obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) $(obj-vdso32:%=%): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) $(obj-vdso32:%=%): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32) -$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c +$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c FORCE $(call if_changed_rule,cc_o_c) -$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S +$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S FORCE $(call if_changed,as_o_S) # Force dependency @@ -114,5 +113,5 @@ $(obj)/vdso32.o: $(obj)/vdso32.so SYSCFLAGS_vdso32.so.dbg = -m32 -shared -s -Wl,-soname=linux-vdso32.so.1 \ $(call cc-ldoption, -Wl$(comma)--hash-style=both) -$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) +$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) FORCE $(call if_changed,vdsold) -- 2.7.4
[PATCH] tile: fix dependency and .*.cmd inclusion for incremental build
Build targets using if_changed(_rule) must depend on FORCE so that they are evaluated every time. In order to include .*.cmd files correctly, build targets added to "targets" must not be prefixed with $(obj)/ because it is done by scripts/Makefile.lib . Signed-off-by: Masahiro Yamada --- I found this Makefile in the mainline is already broken for incremental building. I inserted this before thin archive migration patches. arch/tile/kernel/vdso/Makefile | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/tile/kernel/vdso/Makefile b/arch/tile/kernel/vdso/Makefile index c54fff3..cf162a2 100644 --- a/arch/tile/kernel/vdso/Makefile +++ b/arch/tile/kernel/vdso/Makefile @@ -42,10 +42,9 @@ $(obj)/vdso.o: $(obj)/vdso.so # link rule for the .so file, .lds has to be first SYSCFLAGS_vdso.so.dbg = $(c_flags) -$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) +$(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE $(call if_changed,vdsold) - # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. @@ -96,17 +95,17 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS)) KBUILD_CFLAGS_32 += -m32 -fPIC -shared obj-vdso32 = $(patsubst %, v%32.o, $(vdso-syms)) -obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) targets += $(obj-vdso32) vdso32.so vdso32.so.dbg +obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) $(obj-vdso32:%=%): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) $(obj-vdso32:%=%): KBUILD_CFLAGS = $(KBUILD_CFLAGS_32) -$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c +$(obj)/vgettimeofday32.o: $(obj)/vgettimeofday.c FORCE $(call if_changed_rule,cc_o_c) -$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S +$(obj)/vrt_sigreturn32.o: $(obj)/vrt_sigreturn.S FORCE $(call if_changed,as_o_S) # Force dependency @@ -114,5 +113,5 @@ $(obj)/vdso32.o: $(obj)/vdso32.so SYSCFLAGS_vdso32.so.dbg = -m32 -shared -s -Wl,-soname=linux-vdso32.so.1 \ $(call cc-ldoption, -Wl$(comma)--hash-style=both) -$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) +$(obj)/vdso32.so.dbg: $(src)/vdso.lds $(obj-vdso32) FORCE $(call if_changed,vdsold) -- 2.7.4
Re: [patches] Re: [PATCH 13/17] RISC-V: Add include subdirectory
On Sat, 2017-06-24 at 14:32 -0700, Palmer Dabbelt wrote: > On Sat, 24 Jun 2017 08:42:05 PDT (-0700), b...@kernel.crashing.org wrote: > > On Fri, 2017-06-23 at 19:01 -0700, Palmer Dabbelt wrote: > > > > > +#define mmiowb() __asm__ __volatile__ ("fence io,io" : : : > > > > > "memory"); > > > > I forgot if we already mentioned that but mmiowb is primarily intended > > to order MMIO stores vs. a subsequent spin_unlock. > > > > I'm not sure an IO only fence is sufficient here. > > > > Note that I've never trusted drivers to get that right, it's a rather > > bad abstraction to begin with, so on powerpc, instead, I just set a > > per-cpu flag on every non-relaxed MMIO write and test it in spin_unlock > > in order to "beef up" the barrier in there if necessary. > > Sorry about that -- I thought I'd included a note somewhere that the atomics > and barriers weren't ready to go yet, as we'd found a bunch of problems with > them in the first review and I needed to go through them all. Arnd suggested > copying the PowerPC approach to mmiowb and I like that better, so we're going > to use it. Ah yes, I did see your note, I just wasn't sure we had clarified the mmiowb case and thought it was worth mentioning. Cheers, Ben,
Re: [patches] Re: [PATCH 13/17] RISC-V: Add include subdirectory
On Sat, 2017-06-24 at 14:32 -0700, Palmer Dabbelt wrote: > On Sat, 24 Jun 2017 08:42:05 PDT (-0700), b...@kernel.crashing.org wrote: > > On Fri, 2017-06-23 at 19:01 -0700, Palmer Dabbelt wrote: > > > > > +#define mmiowb() __asm__ __volatile__ ("fence io,io" : : : > > > > > "memory"); > > > > I forgot if we already mentioned that but mmiowb is primarily intended > > to order MMIO stores vs. a subsequent spin_unlock. > > > > I'm not sure an IO only fence is sufficient here. > > > > Note that I've never trusted drivers to get that right, it's a rather > > bad abstraction to begin with, so on powerpc, instead, I just set a > > per-cpu flag on every non-relaxed MMIO write and test it in spin_unlock > > in order to "beef up" the barrier in there if necessary. > > Sorry about that -- I thought I'd included a note somewhere that the atomics > and barriers weren't ready to go yet, as we'd found a bunch of problems with > them in the first review and I needed to go through them all. Arnd suggested > copying the PowerPC approach to mmiowb and I like that better, so we're going > to use it. Ah yes, I did see your note, I just wasn't sure we had clarified the mmiowb case and thought it was worth mentioning. Cheers, Ben,
Re: [PATCH net-next] net: add netlink_ext_ack support to rtnl_link_ops
On 6/24/17 5:35 AM, Matthias Schiffer wrote: > The following functions are extended with a netlink_ext_ack argument to > allow extended error reporting: > > * validate > * newlink > * changelink > * slave_validate > * slave_changelink I would prefer separate patches for validate, slave_validate, newlink, changelink, and slave_changelink. I do not believe there is a reason to lump them into 1 giant patch.
Re: [PATCH net-next] net: add netlink_ext_ack support to rtnl_link_ops
On 6/24/17 5:35 AM, Matthias Schiffer wrote: > The following functions are extended with a netlink_ext_ack argument to > allow extended error reporting: > > * validate > * newlink > * changelink > * slave_validate > * slave_changelink I would prefer separate patches for validate, slave_validate, newlink, changelink, and slave_changelink. I do not believe there is a reason to lump them into 1 giant patch.
Re: drivers:soc:fsl:qbman:qman.c: Change a comment for an entry check inside drain_mr_fqrni function
On Fri, May 05, 2017 at 10:05:56AM +0200, Karim Eshapa wrote: > Change the comment for an entry check inside function > drain_mr_fqrni() with sleep for sufficient period > of time instead of long time proccessor cycles. > > Signed-off-by: Karim Eshapa> --- > drivers/soc/fsl/qbman/qman.c | 25 + > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c > index 18d391e..636a7d7 100644 > --- a/drivers/soc/fsl/qbman/qman.c > +++ b/drivers/soc/fsl/qbman/qman.c > @@ -1071,18 +1071,19 @@ static int drain_mr_fqrni(struct qm_portal *p) > msg = qm_mr_current(p); > if (!msg) { > /* > - * if MR was full and h/w had other FQRNI entries to produce, we > - * need to allow it time to produce those entries once the > - * existing entries are consumed. A worst-case situation > - * (fully-loaded system) means h/w sequencers may have to do 3-4 > - * other things before servicing the portal's MR pump, each of > - * which (if slow) may take ~50 qman cycles (which is ~200 > - * processor cycles). So rounding up and then multiplying this > - * worst-case estimate by a factor of 10, just to be > - * ultra-paranoid, goes as high as 10,000 cycles. NB, we consume > - * one entry at a time, so h/w has an opportunity to produce new > - * entries well before the ring has been fully consumed, so > - * we're being *really* paranoid here. > + * if MR was full and h/w had other FQRNI entries to > + * produce, we need to allow it time to produce those > + * entries once the existing entries are consumed. > + * A worst-case situation (fully-loaded system) means > + * h/w sequencers may have to do 3-4 other things > + * before servicing the portal's MR pump, each of > + * which (if slow) may take ~50 qman cycles > + * (which is ~200 processor cycles). So sleep with > + * 1 ms would be very efficient, after this period > + * we can check if there is something produced. > + * NB, we consume one entry at a time, so h/w has > + * an opportunity to produce new entries well before > + * the ring has been fully consumed. Do you mean "sufficient" here rather than "efficient"? It's far less inefficient than what the code was previously doing, but still... Otherwise, looks good. -Scott
Re: drivers:soc:fsl:qbman:qman.c: Change a comment for an entry check inside drain_mr_fqrni function
On Fri, May 05, 2017 at 10:05:56AM +0200, Karim Eshapa wrote: > Change the comment for an entry check inside function > drain_mr_fqrni() with sleep for sufficient period > of time instead of long time proccessor cycles. > > Signed-off-by: Karim Eshapa > --- > drivers/soc/fsl/qbman/qman.c | 25 + > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c > index 18d391e..636a7d7 100644 > --- a/drivers/soc/fsl/qbman/qman.c > +++ b/drivers/soc/fsl/qbman/qman.c > @@ -1071,18 +1071,19 @@ static int drain_mr_fqrni(struct qm_portal *p) > msg = qm_mr_current(p); > if (!msg) { > /* > - * if MR was full and h/w had other FQRNI entries to produce, we > - * need to allow it time to produce those entries once the > - * existing entries are consumed. A worst-case situation > - * (fully-loaded system) means h/w sequencers may have to do 3-4 > - * other things before servicing the portal's MR pump, each of > - * which (if slow) may take ~50 qman cycles (which is ~200 > - * processor cycles). So rounding up and then multiplying this > - * worst-case estimate by a factor of 10, just to be > - * ultra-paranoid, goes as high as 10,000 cycles. NB, we consume > - * one entry at a time, so h/w has an opportunity to produce new > - * entries well before the ring has been fully consumed, so > - * we're being *really* paranoid here. > + * if MR was full and h/w had other FQRNI entries to > + * produce, we need to allow it time to produce those > + * entries once the existing entries are consumed. > + * A worst-case situation (fully-loaded system) means > + * h/w sequencers may have to do 3-4 other things > + * before servicing the portal's MR pump, each of > + * which (if slow) may take ~50 qman cycles > + * (which is ~200 processor cycles). So sleep with > + * 1 ms would be very efficient, after this period > + * we can check if there is something produced. > + * NB, we consume one entry at a time, so h/w has > + * an opportunity to produce new entries well before > + * the ring has been fully consumed. Do you mean "sufficient" here rather than "efficient"? It's far less inefficient than what the code was previously doing, but still... Otherwise, looks good. -Scott
Re: [v3] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.
On Fri, May 05, 2017 at 07:45:18AM +0200, Karim Eshapa wrote: > Use msleep() instead of stucking with > long delay will be more efficient. > > Signed-off-by: Karim Eshapa> --- > drivers/soc/fsl/qbman/qman.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) Acked-by: Scott Wood (though the subject line should be "soc/qman: ...") Leo, are you going to send this patch (and other qman patches) via arm-soc? -Scott
Re: [v3] drivers:soc:fsl:qbman:qman.c: Sleep instead of stuck hacking jiffies.
On Fri, May 05, 2017 at 07:45:18AM +0200, Karim Eshapa wrote: > Use msleep() instead of stucking with > long delay will be more efficient. > > Signed-off-by: Karim Eshapa > --- > drivers/soc/fsl/qbman/qman.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) Acked-by: Scott Wood (though the subject line should be "soc/qman: ...") Leo, are you going to send this patch (and other qman patches) via arm-soc? -Scott
Re: [PATCH v3 07/11] tty: improve tty_insert_flip_char() fast path
Hi Arnd, [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.12-rc6 next-20170623] [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/Arnd-Bergmann/bring-back-stack-frame-warning-with-KASAN/20170625-071646 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-b0-06250903 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/tty/tty_buffer.c: In function '__tty_insert_flip_char': >> drivers/tty/tty_buffer.c:376: warning: unused variable 'flags' vim +/flags +376 drivers/tty/tty_buffer.c 360 return copied; 361 } 362 EXPORT_SYMBOL(tty_insert_flip_string_flags); 363 364 /** 365 * __tty_insert_flip_char - Add one character to the tty buffer 366 * @port: tty port 367 * @ch: character 368 * @flag: flag byte 369 * 370 * Queue a single byte to the tty buffering, with an optional flag. 371 * This is the slow path of tty_insert_flip_char. 372 */ 373 int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag) 374 { 375 struct tty_buffer *tb = port->buf.tail; > 376 int flags = (flag == TTY_NORMAL) ? TTYB_NORMAL : 0; 377 378 if (!tty_buffer_request_room(port, 1)) 379 return 0; 380 381 *flag_buf_ptr(tb, tb->used) = flag; 382 *char_buf_ptr(tb, tb->used++) = ch; 383 384 return 1; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v3 07/11] tty: improve tty_insert_flip_char() fast path
Hi Arnd, [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.12-rc6 next-20170623] [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/Arnd-Bergmann/bring-back-stack-frame-warning-with-KASAN/20170625-071646 base: git://linuxtv.org/media_tree.git master config: x86_64-randconfig-b0-06250903 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/tty/tty_buffer.c: In function '__tty_insert_flip_char': >> drivers/tty/tty_buffer.c:376: warning: unused variable 'flags' vim +/flags +376 drivers/tty/tty_buffer.c 360 return copied; 361 } 362 EXPORT_SYMBOL(tty_insert_flip_string_flags); 363 364 /** 365 * __tty_insert_flip_char - Add one character to the tty buffer 366 * @port: tty port 367 * @ch: character 368 * @flag: flag byte 369 * 370 * Queue a single byte to the tty buffering, with an optional flag. 371 * This is the slow path of tty_insert_flip_char. 372 */ 373 int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag) 374 { 375 struct tty_buffer *tb = port->buf.tail; > 376 int flags = (flag == TTY_NORMAL) ? TTYB_NORMAL : 0; 377 378 if (!tty_buffer_request_room(port, 1)) 379 return 0; 380 381 *flag_buf_ptr(tb, tb->used) = flag; 382 *char_buf_ptr(tb, tb->used++) = ch; 383 384 return 1; --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[PATCH V3] staging: rtl8192u - add parameter names
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson--- V2 had vauge subject and V1 comment above the line V1 had vauge subject drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V3] staging: rtl8192u - add parameter names
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson --- V2 had vauge subject and V1 comment above the line V1 had vauge subject drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4 ++-- drivers/staging/rtl8192u/r8192U.h| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h index 899c77ed2a43..b062cad052b9 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -2187,7 +2187,7 @@ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, struct sk_buff *frag, int hdr_len); int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); -void ieee80211_txb_free(struct ieee80211_txb *); +void ieee80211_txb_free(struct ieee80211_txb *txb); /* ieee80211_rx.c */ diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h index 005bf89aae65..a0aa0f5be63a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h @@ -82,8 +82,8 @@ struct ieee80211_crypt_data { int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops); int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops); struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name); -void ieee80211_crypt_deinit_entries(struct ieee80211_device *, int); -void ieee80211_crypt_deinit_handler(unsigned long); +void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force); +void ieee80211_crypt_deinit_handler(unsigned long data); void ieee80211_crypt_delayed_deinit(struct ieee80211_device *ieee, struct ieee80211_crypt_data **crypt); diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h index 4c7a5e3d3e5e..51c150a39fc2 100644 --- a/drivers/staging/rtl8192u/r8192U.h +++ b/drivers/staging/rtl8192u/r8192U.h @@ -1147,9 +1147,9 @@ int write_nic_word(struct net_device *dev, int x, u16 y); int write_nic_dword(struct net_device *dev, int x, u32 y); void force_pci_posting(struct net_device *dev); -void rtl8192_rtx_disable(struct net_device *); -void rtl8192_rx_enable(struct net_device *); -void rtl8192_tx_enable(struct net_device *); +void rtl8192_rtx_disable(struct net_device *dev); +void rtl8192_rx_enable(struct net_device *dev); +void rtl8192_tx_enable(struct net_device *dev); void rtl8192_disassociate(struct net_device *dev); void rtl8185_set_rf_pins_enable(struct net_device *dev, u32 a); -- 2.13.0
[PATCH V3] staging: sm750fb - add parameter names
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson--- V2 had V1 comment above the line V1 had vauge subject line drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V3] staging: sm750fb - add parameter names
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- V2 had V1 comment above the line V1 had vauge subject line drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 5b186dafedec..4386122799b2 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -189,14 +189,22 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev); int hw_sm750_deWait(void); int hw_sm750le_deWait(void); -int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*); -int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, - struct fb_fix_screeninfo*); -int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort); -int hw_sm750_setBLANK(struct lynxfb_output*, int); -int hw_sm750le_setBLANK(struct lynxfb_output*, int); +int hw_sm750_output_setMode(struct lynxfb_output *output, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var); + +int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, + struct fb_var_screeninfo *var, + struct fb_fix_screeninfo *fix); + +int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, + ushort red, ushort green, ushort blue); + +int hw_sm750_setBLANK(struct lynxfb_output *output, int blank); +int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank); int hw_sm750_pan_display(struct lynxfb_crtc *crtc, const struct fb_var_screeninfo *var, const struct fb_info *info); -- 2.13.0
[PATCH V3] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson--- V2 had V1 comment above the line V1 had vauge subject lines drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V3] staging: rtl8723bs - remove asm includes
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson --- V2 had V1 comment above the line V1 had vauge subject lines drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/osdep_service_linux.h b/drivers/staging/rtl8723bs/include/osdep_service_linux.h index 486e8184b0b2..0c9b4f622fee 100644 --- a/drivers/staging/rtl8723bs/include/osdep_service_linux.h +++ b/drivers/staging/rtl8723bs/include/osdep_service_linux.h @@ -26,10 +26,10 @@ /* include */ #include #include - #include + #include #include - #include - #include + #include + #include #include #include #include -- 2.13.0
[PATCH V3] staging: unisys: visorhba - octal permissions
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson--- V1 and V2 had vauge subject lines drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
[PATCH V3] staging: unisys: visorhba - octal permissions
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson --- V1 and V2 had vauge subject lines drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c index 2fd31c9762c6..a6e7a6bbc428 100644 --- a/drivers/staging/unisys/visorhba/visorhba_main.c +++ b/drivers/staging/unisys/visorhba/visorhba_main.c @@ -1090,7 +1090,7 @@ static int visorhba_probe(struct visor_device *dev) goto err_scsi_remove_host; } devdata->debugfs_info = - debugfs_create_file("info", S_IRUSR | S_IRGRP, + debugfs_create_file("info", 0440, devdata->debugfs_dir, devdata, _debugfs_fops); if (!devdata->debugfs_info) { -- 2.13.0
Re: [PATCH 2/2] tcp: md5: export all configured signature keys in /proc/net
Hi Ivan, [auto build test ERROR on net/master] [also build test ERROR on v4.12-rc6 next-20170623] [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/Ivan-Delalande/tcp-add-mode-parameter-to-tcp_proc_register/20170625-070707 config: x86_64-randconfig-x019-06250446 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/ipv4/tcp.c: In function 'do_md5_seq_print_key': net/ipv4/tcp.c:3300:53: error: 'const struct tcp_md5sig_key' has no member named 'prefixlen' seq_printf(seq, "%39pI4/%-3u ", >addr.a4, key->prefixlen); ^~ >> net/ipv4/tcp.c:3302:46: error: 'const union tcp_md5_addr' has no member >> named 'a6'; did you mean 'a4'? seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, key->prefixlen); ^ net/ipv4/tcp.c:3302:54: error: 'const struct tcp_md5sig_key' has no member named 'prefixlen' seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, key->prefixlen); ^~ vim +3302 net/ipv4/tcp.c 3294 { 3295 if (key->keylen == 0) 3296 return; 3297 3298 seq_printf(seq, "%4d: %6lu ", st->num, ino); 3299 if (key->family == AF_INET) > 3300 seq_printf(seq, "%39pI4/%-3u ", >addr.a4, > key->prefixlen); 3301 else > 3302 seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, > key->prefixlen); 3303 seq_printf(seq, "%*pE\n", key->keylen, key->key); 3304 } 3305 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 2/2] tcp: md5: export all configured signature keys in /proc/net
Hi Ivan, [auto build test ERROR on net/master] [also build test ERROR on v4.12-rc6 next-20170623] [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/Ivan-Delalande/tcp-add-mode-parameter-to-tcp_proc_register/20170625-070707 config: x86_64-randconfig-x019-06250446 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/ipv4/tcp.c: In function 'do_md5_seq_print_key': net/ipv4/tcp.c:3300:53: error: 'const struct tcp_md5sig_key' has no member named 'prefixlen' seq_printf(seq, "%39pI4/%-3u ", >addr.a4, key->prefixlen); ^~ >> net/ipv4/tcp.c:3302:46: error: 'const union tcp_md5_addr' has no member >> named 'a6'; did you mean 'a4'? seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, key->prefixlen); ^ net/ipv4/tcp.c:3302:54: error: 'const struct tcp_md5sig_key' has no member named 'prefixlen' seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, key->prefixlen); ^~ vim +3302 net/ipv4/tcp.c 3294 { 3295 if (key->keylen == 0) 3296 return; 3297 3298 seq_printf(seq, "%4d: %6lu ", st->num, ino); 3299 if (key->family == AF_INET) > 3300 seq_printf(seq, "%39pI4/%-3u ", >addr.a4, > key->prefixlen); 3301 else > 3302 seq_printf(seq, "%39pI6c/%-3u ", >addr.a6, > key->prefixlen); 3303 seq_printf(seq, "%*pE\n", key->keylen, key->key); 3304 } 3305 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[PATCH V4] staging: vt6655 - add parameter names
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson--- V1,V2 and V3 had vauge subject line. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(struct
[PATCH V4] staging: vt6655 - add parameter names
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson --- V1,V2 and V3 had vauge subject line. drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-- drivers/staging/vt6655/mac.h | 58 drivers/staging/vt6655/power.h | 16 +++ drivers/staging/vt6655/rf.h | 16 +-- 5 files changed, 57 insertions(+), 67 deletions(-) diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h index 03369ffaa4d6..1a04dbb57d42 100644 --- a/drivers/staging/vt6655/card.h +++ b/drivers/staging/vt6655/card.h @@ -64,25 +64,25 @@ typedef enum _CARD_STATUS_TYPE { struct vnt_private; void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type); -void CARDvUpdateBasicTopRate(struct vnt_private *); -bool CARDbIsOFDMinBasicRate(struct vnt_private *); -void CARDvSetLoopbackMode(struct vnt_private *, unsigned short wLoopbackMode); -bool CARDbSoftwareReset(struct vnt_private *); -void CARDvSetFirstNextTBTT(struct vnt_private *, +void CARDvUpdateBasicTopRate(struct vnt_private *priv); +bool CARDbIsOFDMinBasicRate(struct vnt_private *priv); +void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode); +bool CARDbSoftwareReset(struct vnt_private *priv); +void CARDvSetFirstNextTBTT(struct vnt_private *priv, unsigned short wBeaconInterval); -void CARDvUpdateNextTBTT(struct vnt_private *, u64 qwTSF, +void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF, unsigned short wBeaconInterval); -bool CARDbGetCurrentTSF(struct vnt_private *, u64 *pqwCurrTSF); +bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF); u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval); u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2); -unsigned char CARDbyGetPktType(struct vnt_private *); -void CARDvSafeResetTx(struct vnt_private *); -void CARDvSafeResetRx(struct vnt_private *); -bool CARDbRadioPowerOff(struct vnt_private *); -bool CARDbRadioPowerOn(struct vnt_private *); -bool CARDbSetPhyParameter(struct vnt_private *, u8); -bool CARDbUpdateTSF(struct vnt_private *, unsigned char byRxRate, +unsigned char CARDbyGetPktType(struct vnt_private *priv); +void CARDvSafeResetTx(struct vnt_private *priv); +void CARDvSafeResetRx(struct vnt_private *priv); +bool CARDbRadioPowerOff(struct vnt_private *priv); +bool CARDbRadioPowerOn(struct vnt_private *priv); +bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type); +bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate, u64 qwBSSTimestamp); -bool CARDbSetBeaconPeriod(struct vnt_private *, unsigned short wBeaconInterval); +bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval); #endif /* __CARD_H__ */ diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h index 2621dfabff06..8fe70760e548 100644 --- a/drivers/staging/vt6655/channel.h +++ b/drivers/staging/vt6655/channel.h @@ -21,8 +21,8 @@ #include "card.h" -void vnt_init_bands(struct vnt_private *); +void vnt_init_bands(struct vnt_private *priv); -bool set_channel(struct vnt_private *, struct ieee80211_channel *); +bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 33b758cb79d4..db401e32ae23 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -885,57 +885,57 @@ do { \ #define MACvSetRFLE_LatchBase(iobase) \ MACvWordRegBitsOn(iobase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_RFLEOPT) -bool MACbIsRegBitsOn(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOn(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsRegBitsOff(struct vnt_private *, unsigned char byRegOfs, +bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, unsigned char byTestBits); -bool MACbIsIntDisable(struct vnt_private *); +bool MACbIsIntDisable(struct vnt_private *priv); -void MACvSetShortRetryLimit(struct vnt_private *, unsigned char byRetryLimit); +void MACvSetShortRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLongRetryLimit(struct vnt_private *, unsigned char byRetryLimit); -void MACvGetLongRetryLimit(struct vnt_private *, +void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); +void MACvGetLongRetryLimit(struct vnt_private *priv, unsigned char *pbyRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *, unsigned char byLoopbackMode); +void MACvSetLoopbackMode(struct vnt_private *priv,
Re: [PATCH v8 3/3] mailbox: qcom: Add support for APCS clock controller
Hi Georgi, [auto build test ERROR on next-20170619] [cannot apply to clk/clk-next robh/for-next linus/master v4.12-rc6 v4.12-rc5 v4.12-rc4 v4.12-rc6] [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/Georgi-Djakov/Add-support-for-Qualcomm-A53-CPU-clock/20170625-063544 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All error/warnings (new ones prefixed by >>): In file included from drivers/mailbox/qcom-apcs-ipc-mailbox.c:26:0: >> drivers/mailbox/../clk/qcom/clk-regmap.h:31:16: error: field 'hw' has >> incomplete type struct clk_hw hw; ^~ drivers/mailbox/qcom-apcs-ipc-mailbox.c: In function 'msm8916_register_clk': >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:9: error: variable 'init' has >> initializer but incomplete type struct clk_init_data init = { }; ^ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:23: error: storage size of >> 'init' isn't known struct clk_init_data init = { }; ^~~~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:119:15: error: 'CLK_SET_RATE_PARENT' >> undeclared (first use in this function) init.flags = CLK_SET_RATE_PARENT; ^~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c:119:15: note: each undeclared identifier is reported only once for each function it appears in >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:122:9: error: implicit declaration >> of function '__clk_lookup' [-Werror=implicit-function-declaration] pclk = __clk_lookup(gpll0_a53cc[1]); ^~~~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:122:7: warning: assignment makes >> pointer from integer without a cast [-Wint-conversion] pclk = __clk_lookup(gpll0_a53cc[1]); ^ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:148:8: error: implicit declaration >> of function 'of_clk_add_hw_provider' [-Werror=implicit-function-declaration] ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, ^~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:148:45: error: >> 'of_clk_hw_simple_get' undeclared (first use in this function) ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, ^~~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:23: warning: unused variable 'init' [-Wunused-variable] struct clk_init_data init = { }; ^~~~ cc1: some warnings being treated as errors vim +/hw +31 drivers/mailbox/../clk/qcom/clk-regmap.h 085d7a45 Stephen Boyd 2014-01-15 25 * @enable_reg: register when using regmap enable/disable ops 085d7a45 Stephen Boyd 2014-01-15 26 * @enable_mask: mask when using regmap enable/disable ops 085d7a45 Stephen Boyd 2014-01-15 27 * @enable_is_inverted: flag to indicate set enable_mask bits to disable 085d7a45 Stephen Boyd 2014-01-15 28 * when using clock_enable_regmap and friends APIs. 085d7a45 Stephen Boyd 2014-01-15 29 */ 085d7a45 Stephen Boyd 2014-01-15 30 struct clk_regmap { 085d7a45 Stephen Boyd 2014-01-15 @31struct clk_hw hw; 085d7a45 Stephen Boyd 2014-01-15 32struct regmap *regmap; 085d7a45 Stephen Boyd 2014-01-15 33unsigned int enable_reg; 085d7a45 Stephen Boyd 2014-01-15 34unsigned int enable_mask; :: The code at line 31 was first introduced by commit :: 085d7a455444f4d425371ee3c8a273c6e1b522db clk: qcom: Add a regmap type clock struct :: TO: Stephen Boyd:: CC: Mike Turquette --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v8 3/3] mailbox: qcom: Add support for APCS clock controller
Hi Georgi, [auto build test ERROR on next-20170619] [cannot apply to clk/clk-next robh/for-next linus/master v4.12-rc6 v4.12-rc5 v4.12-rc4 v4.12-rc6] [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/Georgi-Djakov/Add-support-for-Qualcomm-A53-CPU-clock/20170625-063544 config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=ia64 All error/warnings (new ones prefixed by >>): In file included from drivers/mailbox/qcom-apcs-ipc-mailbox.c:26:0: >> drivers/mailbox/../clk/qcom/clk-regmap.h:31:16: error: field 'hw' has >> incomplete type struct clk_hw hw; ^~ drivers/mailbox/qcom-apcs-ipc-mailbox.c: In function 'msm8916_register_clk': >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:9: error: variable 'init' has >> initializer but incomplete type struct clk_init_data init = { }; ^ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:23: error: storage size of >> 'init' isn't known struct clk_init_data init = { }; ^~~~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:119:15: error: 'CLK_SET_RATE_PARENT' >> undeclared (first use in this function) init.flags = CLK_SET_RATE_PARENT; ^~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c:119:15: note: each undeclared identifier is reported only once for each function it appears in >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:122:9: error: implicit declaration >> of function '__clk_lookup' [-Werror=implicit-function-declaration] pclk = __clk_lookup(gpll0_a53cc[1]); ^~~~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:122:7: warning: assignment makes >> pointer from integer without a cast [-Wint-conversion] pclk = __clk_lookup(gpll0_a53cc[1]); ^ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:148:8: error: implicit declaration >> of function 'of_clk_add_hw_provider' [-Werror=implicit-function-declaration] ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, ^~ >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:148:45: error: >> 'of_clk_hw_simple_get' undeclared (first use in this function) ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, ^~~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c:101:23: warning: unused variable 'init' [-Wunused-variable] struct clk_init_data init = { }; ^~~~ cc1: some warnings being treated as errors vim +/hw +31 drivers/mailbox/../clk/qcom/clk-regmap.h 085d7a45 Stephen Boyd 2014-01-15 25 * @enable_reg: register when using regmap enable/disable ops 085d7a45 Stephen Boyd 2014-01-15 26 * @enable_mask: mask when using regmap enable/disable ops 085d7a45 Stephen Boyd 2014-01-15 27 * @enable_is_inverted: flag to indicate set enable_mask bits to disable 085d7a45 Stephen Boyd 2014-01-15 28 * when using clock_enable_regmap and friends APIs. 085d7a45 Stephen Boyd 2014-01-15 29 */ 085d7a45 Stephen Boyd 2014-01-15 30 struct clk_regmap { 085d7a45 Stephen Boyd 2014-01-15 @31struct clk_hw hw; 085d7a45 Stephen Boyd 2014-01-15 32struct regmap *regmap; 085d7a45 Stephen Boyd 2014-01-15 33unsigned int enable_reg; 085d7a45 Stephen Boyd 2014-01-15 34unsigned int enable_mask; :: The code at line 31 was first introduced by commit :: 085d7a455444f4d425371ee3c8a273c6e1b522db clk: qcom: Add a regmap type clock struct :: TO: Stephen Boyd :: CC: Mike Turquette --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 2/2] i2c: Add Spreadtrum I2C controller driver
Hi Baolin, [auto build test ERROR on wsa/i2c/for-next] [also build test ERROR on v4.12-rc6 next-20170623] [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/Baolin-Wang/dt-bindings-i2c-Add-Spreadtrum-I2C-controller-documentation/20170622-111344 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): drivers/i2c/busses/i2c-sprd.c:686:1: warning: data definition has no type or storage class arch_initcall_sync(sprd_i2c_init); ^~ >> drivers/i2c/busses/i2c-sprd.c:686:1: error: type defaults to 'int' in >> declaration of 'arch_initcall_sync' [-Werror=implicit-int] drivers/i2c/busses/i2c-sprd.c:686:1: warning: parameter names (without types) in function declaration drivers/i2c/busses/i2c-sprd.c:682:12: warning: 'sprd_i2c_init' defined but not used [-Wunused-function] static int sprd_i2c_init(void) ^ cc1: some warnings being treated as errors vim +686 drivers/i2c/busses/i2c-sprd.c 680 }; 681 682 static int sprd_i2c_init(void) 683 { 684 return platform_driver_register(_i2c_driver); 685 } > 686 arch_initcall_sync(sprd_i2c_init); 687 688 static void sprd_i2c_exit(void) 689 { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH v2 2/2] i2c: Add Spreadtrum I2C controller driver
Hi Baolin, [auto build test ERROR on wsa/i2c/for-next] [also build test ERROR on v4.12-rc6 next-20170623] [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/Baolin-Wang/dt-bindings-i2c-Add-Spreadtrum-I2C-controller-documentation/20170622-111344 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All errors (new ones prefixed by >>): drivers/i2c/busses/i2c-sprd.c:686:1: warning: data definition has no type or storage class arch_initcall_sync(sprd_i2c_init); ^~ >> drivers/i2c/busses/i2c-sprd.c:686:1: error: type defaults to 'int' in >> declaration of 'arch_initcall_sync' [-Werror=implicit-int] drivers/i2c/busses/i2c-sprd.c:686:1: warning: parameter names (without types) in function declaration drivers/i2c/busses/i2c-sprd.c:682:12: warning: 'sprd_i2c_init' defined but not used [-Wunused-function] static int sprd_i2c_init(void) ^ cc1: some warnings being treated as errors vim +686 drivers/i2c/busses/i2c-sprd.c 680 }; 681 682 static int sprd_i2c_init(void) 683 { 684 return platform_driver_register(_i2c_driver); 685 } > 686 arch_initcall_sync(sprd_i2c_init); 687 688 static void sprd_i2c_exit(void) 689 { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH V2 0/3] Refine numa_emulation
This has really been a long time, not sure we have any concern on this? This change looks good to me which make the numa emulation more robust. And David has acked. Welcome any comments on this. On Tue, May 02, 2017 at 09:04:50PM +0800, Wei Yang wrote: >My previous patch "x86/mm/numa: Remove numa_nodemask_from_meminfo()" hits a >problem in numa_emulation. The reason is numa_nodes_parsed is not set >correctly after emulation. > >This patch set tries to fix this and also with two code refine. > >Detailed discussions are in this thread: > >https://lkml.org/lkml/2017/3/13/1230 > >and test result is posted : > >https://lkml.org/lkml/2017/4/10/641 > >V2: >* refresh the change log based on David comments >* use nodes_clear() > >Wei Yang (3): > x86/numa_emulation: fix potential memory leak > x86/numa_emulation: assign physnode_mask directly from >numa_nodes_parsed > x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes > > arch/x86/mm/numa_emulation.c | 61 > 1 file changed, 33 insertions(+), 28 deletions(-) > >-- >2.11.0 -- Wei Yang Help you, Help me signature.asc Description: PGP signature
Re: [PATCH V2 0/3] Refine numa_emulation
This has really been a long time, not sure we have any concern on this? This change looks good to me which make the numa emulation more robust. And David has acked. Welcome any comments on this. On Tue, May 02, 2017 at 09:04:50PM +0800, Wei Yang wrote: >My previous patch "x86/mm/numa: Remove numa_nodemask_from_meminfo()" hits a >problem in numa_emulation. The reason is numa_nodes_parsed is not set >correctly after emulation. > >This patch set tries to fix this and also with two code refine. > >Detailed discussions are in this thread: > >https://lkml.org/lkml/2017/3/13/1230 > >and test result is posted : > >https://lkml.org/lkml/2017/4/10/641 > >V2: >* refresh the change log based on David comments >* use nodes_clear() > >Wei Yang (3): > x86/numa_emulation: fix potential memory leak > x86/numa_emulation: assign physnode_mask directly from >numa_nodes_parsed > x86/numa_emulation: restructures numa_nodes_parsed from emulated nodes > > arch/x86/mm/numa_emulation.c | 61 > 1 file changed, 33 insertions(+), 28 deletions(-) > >-- >2.11.0 -- Wei Yang Help you, Help me signature.asc Description: PGP signature
Re: [PATCH 11/14] mm, memory_hotplug: do not associate hotadded memory to zones until online
On Mon, May 15, 2017 at 10:58:24AM +0200, Michal Hocko wrote: >From: Michal Hocko> [...] >+void move_pfn_range_to_zone(struct zone *zone, >+ unsigned long start_pfn, unsigned long nr_pages) >+{ >+ struct pglist_data *pgdat = zone->zone_pgdat; >+ int nid = pgdat->node_id; >+ unsigned long flags; >+ unsigned long i; This is an unused variable: mm/memory_hotplug.c: In function ‘move_pfn_range_to_zone’: mm/memory_hotplug.c:895:16: warning: unused variable ‘i’ [-Wunused-variable] Do you suggest me to write a patch or you would fix it in your later rework? >+ >+ if (zone_is_empty(zone)) >+ init_currently_empty_zone(zone, start_pfn, nr_pages); >+ >+ clear_zone_contiguous(zone); >+ >+ /* TODO Huh pgdat is irqsave while zone is not. It used to be like that >before */ >+ pgdat_resize_lock(pgdat, ); >+ zone_span_writelock(zone); >+ resize_zone_range(zone, start_pfn, nr_pages); >+ zone_span_writeunlock(zone); >+ resize_pgdat_range(pgdat, start_pfn, nr_pages); >+ pgdat_resize_unlock(pgdat, ); >+ >+ /* >+ * TODO now we have a visible range of pages which are not associated >+ * with their zone properly. Not nice but set_pfnblock_flags_mask >+ * expects the zone spans the pfn range. All the pages in the range >+ * are reserved so nobody should be touching them so we should be safe >+ */ >+ memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, >MEMMAP_HOTPLUG); >+ for (i = 0; i < nr_pages; i++) { >+ unsigned long pfn = start_pfn + i; >+ set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn); > } > >2.11.0 -- Wei Yang Help you, Help me signature.asc Description: PGP signature
Re: [PATCH 11/14] mm, memory_hotplug: do not associate hotadded memory to zones until online
On Mon, May 15, 2017 at 10:58:24AM +0200, Michal Hocko wrote: >From: Michal Hocko > [...] >+void move_pfn_range_to_zone(struct zone *zone, >+ unsigned long start_pfn, unsigned long nr_pages) >+{ >+ struct pglist_data *pgdat = zone->zone_pgdat; >+ int nid = pgdat->node_id; >+ unsigned long flags; >+ unsigned long i; This is an unused variable: mm/memory_hotplug.c: In function ‘move_pfn_range_to_zone’: mm/memory_hotplug.c:895:16: warning: unused variable ‘i’ [-Wunused-variable] Do you suggest me to write a patch or you would fix it in your later rework? >+ >+ if (zone_is_empty(zone)) >+ init_currently_empty_zone(zone, start_pfn, nr_pages); >+ >+ clear_zone_contiguous(zone); >+ >+ /* TODO Huh pgdat is irqsave while zone is not. It used to be like that >before */ >+ pgdat_resize_lock(pgdat, ); >+ zone_span_writelock(zone); >+ resize_zone_range(zone, start_pfn, nr_pages); >+ zone_span_writeunlock(zone); >+ resize_pgdat_range(pgdat, start_pfn, nr_pages); >+ pgdat_resize_unlock(pgdat, ); >+ >+ /* >+ * TODO now we have a visible range of pages which are not associated >+ * with their zone properly. Not nice but set_pfnblock_flags_mask >+ * expects the zone spans the pfn range. All the pages in the range >+ * are reserved so nobody should be touching them so we should be safe >+ */ >+ memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, >MEMMAP_HOTPLUG); >+ for (i = 0; i < nr_pages; i++) { >+ unsigned long pfn = start_pfn + i; >+ set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn); > } > >2.11.0 -- Wei Yang Help you, Help me signature.asc Description: PGP signature
Re: [PATCH V6 2/2] powerpc/numa: Update CPU topology when VPHN enabled
Hi Michael, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.12-rc6 next-20170623] [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/Michael-Bringmann/powerpc-hotplug-Ensure-enough-nodes-avail-for-operations/20170621-141803 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-storcenter_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): In file included from include/linux/topology.h:35:0, from include/linux/gfp.h:8, from include/linux/idr.h:16, from include/linux/kernfs.h:14, from include/linux/sysfs.h:15, from include/linux/kobject.h:21, from include/linux/of.h:21, from include/linux/irqdomain.h:34, from arch/powerpc/include/asm/irq.h:12, from arch/powerpc/include/asm/prom.h:19, from arch/powerpc/kernel/cputable.c:22: >> arch/powerpc/include/asm/topology.h:85:12: error: 'timed_topology_update' >> defined but not used [-Werror=unused-function] static int timed_topology_update(int nsecs) ^ cc1: all warnings being treated as errors vim +/timed_topology_update +85 arch/powerpc/include/asm/topology.h 79 #endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */ 80 81 #if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR) && \ 82 defined(CONFIG_HOTPLUG_CPU) 83 extern int timed_topology_update(int nsecs); 84 #else > 85 static int timed_topology_update(int nsecs) 86 { 87 return 0; 88 } --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH V6 2/2] powerpc/numa: Update CPU topology when VPHN enabled
Hi Michael, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.12-rc6 next-20170623] [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/Michael-Bringmann/powerpc-hotplug-Ensure-enough-nodes-avail-for-operations/20170621-141803 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-storcenter_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=powerpc All errors (new ones prefixed by >>): In file included from include/linux/topology.h:35:0, from include/linux/gfp.h:8, from include/linux/idr.h:16, from include/linux/kernfs.h:14, from include/linux/sysfs.h:15, from include/linux/kobject.h:21, from include/linux/of.h:21, from include/linux/irqdomain.h:34, from arch/powerpc/include/asm/irq.h:12, from arch/powerpc/include/asm/prom.h:19, from arch/powerpc/kernel/cputable.c:22: >> arch/powerpc/include/asm/topology.h:85:12: error: 'timed_topology_update' >> defined but not used [-Werror=unused-function] static int timed_topology_update(int nsecs) ^ cc1: all warnings being treated as errors vim +/timed_topology_update +85 arch/powerpc/include/asm/topology.h 79 #endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */ 80 81 #if defined(CONFIG_NUMA) && defined(CONFIG_PPC_SPLPAR) && \ 82 defined(CONFIG_HOTPLUG_CPU) 83 extern int timed_topology_update(int nsecs); 84 #else > 85 static int timed_topology_update(int nsecs) 86 { 87 return 0; 88 } --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 1/4] sched,numa: override part of migrate_degrades_locality when idle balancing
On Sat, 2017-06-24 at 08:58 +0200, Ingo Molnar wrote: > * r...@redhat.comwrote: > > > From: Rik van Riel > > > > Several tests in the NAS benchmark seem to run a lot slower with > > NUMA balancing enabled, than with NUMA balancing disabled. The > > slower run time corresponds with increased idle time. > > > > Overriding the final test of migrate_degrades_locality (but still > > doing the other NUMA tests first) seems to improve performance > > of those benchmarks. > > > > Reported-by: Jirka Hladky > > Signed-off-by: Rik van Riel > > Signed-off-by: Rik van Riel > > Note, I removed the first SOB from the commit, assuming that you only > meant to > include the second one? Thank you. It looks like I used the wrong email address in the SOB I wrote in the patch, and git added the second one automatically. The second one is indeed the one I want.
Re: [PATCH 1/4] sched,numa: override part of migrate_degrades_locality when idle balancing
On Sat, 2017-06-24 at 08:58 +0200, Ingo Molnar wrote: > * r...@redhat.com wrote: > > > From: Rik van Riel > > > > Several tests in the NAS benchmark seem to run a lot slower with > > NUMA balancing enabled, than with NUMA balancing disabled. The > > slower run time corresponds with increased idle time. > > > > Overriding the final test of migrate_degrades_locality (but still > > doing the other NUMA tests first) seems to improve performance > > of those benchmarks. > > > > Reported-by: Jirka Hladky > > Signed-off-by: Rik van Riel > > Signed-off-by: Rik van Riel > > Note, I removed the first SOB from the commit, assuming that you only > meant to > include the second one? Thank you. It looks like I used the wrong email address in the SOB I wrote in the patch, and git added the second one automatically. The second one is indeed the one I want.
[ANNOUNCE] Git v2.13.2
The latest maintenance release Git v2.13.2 is now available at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.13.2' tag and the 'maint' branch that the tag points at: url = https://kernel.googlesource.com/pub/scm/git/git url = git://repo.or.cz/alt-git.git url = https://github.com/gitster/git Git v2.13.2 Release Notes = Fixes since v2.13.1 --- * The "collision detecting" SHA-1 implementation shipped with 2.13.1 was still broken on some platforms. Update to the upstream code again to take their fix. * "git checkout --recurse-submodules" did not quite work with a submodule that itself has submodules. * Introduce the BUG() macro to improve die("BUG: ..."). * The "run-command" API implementation has been made more robust against dead-locking in a threaded environment. * A recent update to t5545-push-options.sh started skipping all the tests in the script when a web server testing is disabled or unavailable, not just the ones that require a web server. Non HTTP tests have been salvaged to always run in this script. * "git clean -d" used to clean directories that has ignored files, even though the command should not lose ignored ones without "-x". "git status --ignored" did not list ignored and untracked files without "-uall". These have been corrected. * The timestamp of the index file is now taken after the file is closed, to help Windows, on which a stale timestamp is reported by fstat() on a file that is opened for writing and data was written but not yet closed. * "git pull --rebase --autostash" didn't auto-stash when the local history fast-forwards to the upstream. * "git describe --contains" penalized light-weight tags so much that they were almost never considered. Instead, give them about the same chance to be considered as an annotated tag that is the same age as the underlying commit would. * The result from "git diff" that compares two blobs, e.g. "git diff $commit1:$path $commit2:$path", used to be shown with the full object name as given on the command line, but it is more natural to use the $path in the output and use it to look up .gitattributes. * A flaky test has been corrected. * Help contributors that visit us at GitHub. * "git stash push " did not work from a subdirectory at all. Bugfix for a topic in v2.13 Also contains various documentation updates and code clean-ups. Changes since v2.13.1 are as follows: Adam Dinwoodie (1): docs: fix formatting and grammar Brandon Williams (12): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before forking run-command: use the async-signal-safe execv instead of execvp string-list: add string_list_remove function run-command: prepare child environment before forking run-command: don't die in child when duping /dev/null run-command: eliminate calls to error handling functions in child run-command: handle dup2 and close errors in child run-command: add note about forking and threading run-command: expose is_executable function run-command: restrict PATH search to executable files Dennis Kaarsemaker (1): send-email: Net::SMTP::SSL is obsolete, use only when necessary Eric Wong (1): run-command: block signals between fork and execve Jeff Hostetler (1): read-cache: close index.lock in do_write_index Jeff King (23): usage.c: add BUG() function setup_git_env: convert die("BUG") to BUG() config: complain about --local outside of a git repo usage.c: drop set_error_handle() handle_revision_arg: reset "dotdot" consistently handle_revision_arg: simplify commit reference lookups handle_revision_arg: stop using "dotdot" as a generic pointer handle_revision_arg: hoist ".." check out of range parsing handle_revision_arg: add handle_dotdot() helper sha1_name: consistently refer to object_context as "oc" get_sha1_with_context: always initialize oc->symlink_path get_sha1_with_context: dynamically allocate oc->path t4063: add tests of direct blob diffs handle_revision_arg: record modes for "a..b" endpoints handle_revision_arg: record paths for pending objects diff: pass whole pending entry in blobinfo diff: use the word "path" instead of "name" for blobs diff: use pending "path" if it is available diff: use blob path for blob/file diffs connect.c: fix leak in parse_one_symref_info() remote: drop free_refspecs() function t5313: make extended-table test more deterministic
[ANNOUNCE] Git v2.13.2
The latest maintenance release Git v2.13.2 is now available at the usual places. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/ The following public repositories all have a copy of the 'v2.13.2' tag and the 'maint' branch that the tag points at: url = https://kernel.googlesource.com/pub/scm/git/git url = git://repo.or.cz/alt-git.git url = https://github.com/gitster/git Git v2.13.2 Release Notes = Fixes since v2.13.1 --- * The "collision detecting" SHA-1 implementation shipped with 2.13.1 was still broken on some platforms. Update to the upstream code again to take their fix. * "git checkout --recurse-submodules" did not quite work with a submodule that itself has submodules. * Introduce the BUG() macro to improve die("BUG: ..."). * The "run-command" API implementation has been made more robust against dead-locking in a threaded environment. * A recent update to t5545-push-options.sh started skipping all the tests in the script when a web server testing is disabled or unavailable, not just the ones that require a web server. Non HTTP tests have been salvaged to always run in this script. * "git clean -d" used to clean directories that has ignored files, even though the command should not lose ignored ones without "-x". "git status --ignored" did not list ignored and untracked files without "-uall". These have been corrected. * The timestamp of the index file is now taken after the file is closed, to help Windows, on which a stale timestamp is reported by fstat() on a file that is opened for writing and data was written but not yet closed. * "git pull --rebase --autostash" didn't auto-stash when the local history fast-forwards to the upstream. * "git describe --contains" penalized light-weight tags so much that they were almost never considered. Instead, give them about the same chance to be considered as an annotated tag that is the same age as the underlying commit would. * The result from "git diff" that compares two blobs, e.g. "git diff $commit1:$path $commit2:$path", used to be shown with the full object name as given on the command line, but it is more natural to use the $path in the output and use it to look up .gitattributes. * A flaky test has been corrected. * Help contributors that visit us at GitHub. * "git stash push " did not work from a subdirectory at all. Bugfix for a topic in v2.13 Also contains various documentation updates and code clean-ups. Changes since v2.13.1 are as follows: Adam Dinwoodie (1): docs: fix formatting and grammar Brandon Williams (12): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before forking run-command: use the async-signal-safe execv instead of execvp string-list: add string_list_remove function run-command: prepare child environment before forking run-command: don't die in child when duping /dev/null run-command: eliminate calls to error handling functions in child run-command: handle dup2 and close errors in child run-command: add note about forking and threading run-command: expose is_executable function run-command: restrict PATH search to executable files Dennis Kaarsemaker (1): send-email: Net::SMTP::SSL is obsolete, use only when necessary Eric Wong (1): run-command: block signals between fork and execve Jeff Hostetler (1): read-cache: close index.lock in do_write_index Jeff King (23): usage.c: add BUG() function setup_git_env: convert die("BUG") to BUG() config: complain about --local outside of a git repo usage.c: drop set_error_handle() handle_revision_arg: reset "dotdot" consistently handle_revision_arg: simplify commit reference lookups handle_revision_arg: stop using "dotdot" as a generic pointer handle_revision_arg: hoist ".." check out of range parsing handle_revision_arg: add handle_dotdot() helper sha1_name: consistently refer to object_context as "oc" get_sha1_with_context: always initialize oc->symlink_path get_sha1_with_context: dynamically allocate oc->path t4063: add tests of direct blob diffs handle_revision_arg: record modes for "a..b" endpoints handle_revision_arg: record paths for pending objects diff: pass whole pending entry in blobinfo diff: use the word "path" instead of "name" for blobs diff: use pending "path" if it is available diff: use blob path for blob/file diffs connect.c: fix leak in parse_one_symref_info() remote: drop free_refspecs() function t5313: make extended-table test more deterministic
Re: [GIT PULL] Kbuild fixes for v4.12-rc7
On Sat, Jun 24, 2017 at 3:59 PM, Masahiro Yamadawrote: > > Sorry, I noticed a typo in my pull-request summary. Pulled, with commit message fix-up. Linus
Re: [GIT PULL] Kbuild fixes for v4.12-rc7
On Sat, Jun 24, 2017 at 3:59 PM, Masahiro Yamada wrote: > > Sorry, I noticed a typo in my pull-request summary. Pulled, with commit message fix-up. Linus
Re: [GIT PULL] Kbuild fixes for v4.12-rc7
Hi Linus Sorry, I noticed a typo in my pull-request summary. > Kbuild fixes for v4.12 (2nd) > > - fix warnings of host programs > > - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= COMPILED_SOURCE=1 instead of COMPILE_SOURCE=1 Could you fix it locally? 2017-06-25 7:49 GMT+09:00 Masahiro Yamada: > Hi Linus, > > This is the 2nd round of Kbuild fixes for v4.12. > Nothing scary, just some random fixes. > Please pull! > > > The following changes since commit 08332893e37af6ae779367e78e444f8f9571511d: > > Linux 4.12-rc2 (2017-05-21 19:30:23 -0700) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git > tags/kbuild-fixes-v4.12-2 > > for you to fetch changes up to ad8181060788c80c0ad75b583f24c22fa962a7a6: > > kconfig: fix sparse warnings in nconfig (2017-06-23 06:00:52 +0900) > > > Kbuild fixes for v4.12 (2nd) > > - fix warnings of host programs > > - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= > > - clarify help message of C=1 option > > - fix dependency for ncurses compatibility check > > - fix "make headers_install" for fakechroot environment > > > Borislav Petkov (1): > kconfig: Check for libncurses before menuconfig > > Cao jin (1): > Kbuild: tiny correction on `make help` > > Nicolas Iooss (1): > genksyms: add printf format attribute to error_with_pos() > > Randy Dunlap (1): > kconfig: fix sparse warnings in nconfig > > Richard Genoud (1): > kbuild: fix header installation under fakechroot environment > > Robert Jarzmik (1): > tags: honor COMPILED_SOURCE with apart output directory > > Makefile | 2 +- > scripts/Makefile.headersinst | 10 +- > scripts/genksyms/genksyms.h | 2 +- > scripts/kconfig/Makefile | 2 +- > scripts/kconfig/nconf.c | 12 ++-- > scripts/kconfig/nconf.gui.c | 4 ++-- > scripts/tags.sh | 1 + > 7 files changed, 21 insertions(+), 12 deletions(-) > > > -- > Best Regards > Masahiro Yamada -- Best Regards Masahiro Yamada
Re: [GIT PULL] Kbuild fixes for v4.12-rc7
Hi Linus Sorry, I noticed a typo in my pull-request summary. > Kbuild fixes for v4.12 (2nd) > > - fix warnings of host programs > > - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= COMPILED_SOURCE=1 instead of COMPILE_SOURCE=1 Could you fix it locally? 2017-06-25 7:49 GMT+09:00 Masahiro Yamada : > Hi Linus, > > This is the 2nd round of Kbuild fixes for v4.12. > Nothing scary, just some random fixes. > Please pull! > > > The following changes since commit 08332893e37af6ae779367e78e444f8f9571511d: > > Linux 4.12-rc2 (2017-05-21 19:30:23 -0700) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git > tags/kbuild-fixes-v4.12-2 > > for you to fetch changes up to ad8181060788c80c0ad75b583f24c22fa962a7a6: > > kconfig: fix sparse warnings in nconfig (2017-06-23 06:00:52 +0900) > > > Kbuild fixes for v4.12 (2nd) > > - fix warnings of host programs > > - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= > > - clarify help message of C=1 option > > - fix dependency for ncurses compatibility check > > - fix "make headers_install" for fakechroot environment > > > Borislav Petkov (1): > kconfig: Check for libncurses before menuconfig > > Cao jin (1): > Kbuild: tiny correction on `make help` > > Nicolas Iooss (1): > genksyms: add printf format attribute to error_with_pos() > > Randy Dunlap (1): > kconfig: fix sparse warnings in nconfig > > Richard Genoud (1): > kbuild: fix header installation under fakechroot environment > > Robert Jarzmik (1): > tags: honor COMPILED_SOURCE with apart output directory > > Makefile | 2 +- > scripts/Makefile.headersinst | 10 +- > scripts/genksyms/genksyms.h | 2 +- > scripts/kconfig/Makefile | 2 +- > scripts/kconfig/nconf.c | 12 ++-- > scripts/kconfig/nconf.gui.c | 4 ++-- > scripts/tags.sh | 1 + > 7 files changed, 21 insertions(+), 12 deletions(-) > > > -- > Best Regards > Masahiro Yamada -- Best Regards Masahiro Yamada
[GIT PULL] Kbuild fixes for v4.12-rc7
Hi Linus, This is the 2nd round of Kbuild fixes for v4.12. Nothing scary, just some random fixes. Please pull! The following changes since commit 08332893e37af6ae779367e78e444f8f9571511d: Linux 4.12-rc2 (2017-05-21 19:30:23 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git tags/kbuild-fixes-v4.12-2 for you to fetch changes up to ad8181060788c80c0ad75b583f24c22fa962a7a6: kconfig: fix sparse warnings in nconfig (2017-06-23 06:00:52 +0900) Kbuild fixes for v4.12 (2nd) - fix warnings of host programs - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= - clarify help message of C=1 option - fix dependency for ncurses compatibility check - fix "make headers_install" for fakechroot environment Borislav Petkov (1): kconfig: Check for libncurses before menuconfig Cao jin (1): Kbuild: tiny correction on `make help` Nicolas Iooss (1): genksyms: add printf format attribute to error_with_pos() Randy Dunlap (1): kconfig: fix sparse warnings in nconfig Richard Genoud (1): kbuild: fix header installation under fakechroot environment Robert Jarzmik (1): tags: honor COMPILED_SOURCE with apart output directory Makefile | 2 +- scripts/Makefile.headersinst | 10 +- scripts/genksyms/genksyms.h | 2 +- scripts/kconfig/Makefile | 2 +- scripts/kconfig/nconf.c | 12 ++-- scripts/kconfig/nconf.gui.c | 4 ++-- scripts/tags.sh | 1 + 7 files changed, 21 insertions(+), 12 deletions(-) -- Best Regards Masahiro Yamada
[GIT PULL] Kbuild fixes for v4.12-rc7
Hi Linus, This is the 2nd round of Kbuild fixes for v4.12. Nothing scary, just some random fixes. Please pull! The following changes since commit 08332893e37af6ae779367e78e444f8f9571511d: Linux 4.12-rc2 (2017-05-21 19:30:23 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git tags/kbuild-fixes-v4.12-2 for you to fetch changes up to ad8181060788c80c0ad75b583f24c22fa962a7a6: kconfig: fix sparse warnings in nconfig (2017-06-23 06:00:52 +0900) Kbuild fixes for v4.12 (2nd) - fix warnings of host programs - fix "make tags" when COMPILE_SOURCE=1 is specified along with O= - clarify help message of C=1 option - fix dependency for ncurses compatibility check - fix "make headers_install" for fakechroot environment Borislav Petkov (1): kconfig: Check for libncurses before menuconfig Cao jin (1): Kbuild: tiny correction on `make help` Nicolas Iooss (1): genksyms: add printf format attribute to error_with_pos() Randy Dunlap (1): kconfig: fix sparse warnings in nconfig Richard Genoud (1): kbuild: fix header installation under fakechroot environment Robert Jarzmik (1): tags: honor COMPILED_SOURCE with apart output directory Makefile | 2 +- scripts/Makefile.headersinst | 10 +- scripts/genksyms/genksyms.h | 2 +- scripts/kconfig/Makefile | 2 +- scripts/kconfig/nconf.c | 12 ++-- scripts/kconfig/nconf.gui.c | 4 ++-- scripts/tags.sh | 1 + 7 files changed, 21 insertions(+), 12 deletions(-) -- Best Regards Masahiro Yamada
Re: [2/2] drivers/watchdog: ASPEED reference dev tree properties for config
On Tue, Jun 13, 2017 at 03:38:18PM -0500, Christopher Bostic wrote: > Reference the system device tree when configuring the watchdog. > Configure for external signal generation if optional attribute > 'external-signal' is present in device tree. Configure for > reset system after timeout if the optional attribute > 'no-system-reset' is not present. Disabling system reset may be > required in situations where one of the other watchdogs in the > systems is responsible for this. > > Signed-off-by: Christopher Bostic> --- > drivers/watchdog/aspeed_wdt.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c > index 1c65258..9deb4be 100644 > --- a/drivers/watchdog/aspeed_wdt.c > +++ b/drivers/watchdog/aspeed_wdt.c > @@ -140,6 +140,7 @@ static int aspeed_wdt_probe(struct platform_device *pdev) > { > struct aspeed_wdt *wdt; > struct resource *res; > + struct device_node *np; > int ret; > > wdt = devm_kzalloc(>dev, sizeof(*wdt), GFP_KERNEL); > @@ -170,8 +171,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev) >* the SOC and not the full chip >*/ > wdt->ctrl = WDT_CTRL_RESET_MODE_SOC | > - WDT_CTRL_1MHZ_CLK | > - WDT_CTRL_RESET_SYSTEM; > + WDT_CTRL_1MHZ_CLK; > + > + np = pdev->dev.of_node; > + if (np && !of_get_property(np, "no-system-reset", NULL)) > + wdt->ctrl |= WDT_CTRL_RESET_SYSTEM; > + Please use of_property_read_bool(). Also, checking np for NULL is unnecessary since the called function does that. Note that the above code as written is wrong - if np is NULL, WDT_CTRL_RESET_SYSTEM will no longer be set. The new properties should probably start with "aspeed," but I'll leave that up to DT maintainers to decide. > + if (np && of_get_property(np, "external-signal", NULL)) > + wdt->ctrl |= WDT_CTRL_WDT_EXT; > + > + writel(wdt->ctrl, wdt->base + WDT_CTRL); > > if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { > aspeed_wdt_start(>wdd);
Re: [2/2] drivers/watchdog: ASPEED reference dev tree properties for config
On Tue, Jun 13, 2017 at 03:38:18PM -0500, Christopher Bostic wrote: > Reference the system device tree when configuring the watchdog. > Configure for external signal generation if optional attribute > 'external-signal' is present in device tree. Configure for > reset system after timeout if the optional attribute > 'no-system-reset' is not present. Disabling system reset may be > required in situations where one of the other watchdogs in the > systems is responsible for this. > > Signed-off-by: Christopher Bostic > --- > drivers/watchdog/aspeed_wdt.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c > index 1c65258..9deb4be 100644 > --- a/drivers/watchdog/aspeed_wdt.c > +++ b/drivers/watchdog/aspeed_wdt.c > @@ -140,6 +140,7 @@ static int aspeed_wdt_probe(struct platform_device *pdev) > { > struct aspeed_wdt *wdt; > struct resource *res; > + struct device_node *np; > int ret; > > wdt = devm_kzalloc(>dev, sizeof(*wdt), GFP_KERNEL); > @@ -170,8 +171,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev) >* the SOC and not the full chip >*/ > wdt->ctrl = WDT_CTRL_RESET_MODE_SOC | > - WDT_CTRL_1MHZ_CLK | > - WDT_CTRL_RESET_SYSTEM; > + WDT_CTRL_1MHZ_CLK; > + > + np = pdev->dev.of_node; > + if (np && !of_get_property(np, "no-system-reset", NULL)) > + wdt->ctrl |= WDT_CTRL_RESET_SYSTEM; > + Please use of_property_read_bool(). Also, checking np for NULL is unnecessary since the called function does that. Note that the above code as written is wrong - if np is NULL, WDT_CTRL_RESET_SYSTEM will no longer be set. The new properties should probably start with "aspeed," but I'll leave that up to DT maintainers to decide. > + if (np && of_get_property(np, "external-signal", NULL)) > + wdt->ctrl |= WDT_CTRL_WDT_EXT; > + > + writel(wdt->ctrl, wdt->base + WDT_CTRL); > > if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { > aspeed_wdt_start(>wdd);
Re: [1/2] drivers/watchdog: Document new aspeed optional dev tree properties.
On Tue, Jun 13, 2017 at 03:38:17PM -0500, Christopher Bostic wrote: > Describe new optional property 'external-signal'. When present in the > system device tree an exernal signal is generated on watchdog timeout. > > Describe new optional property 'no-system-reset'. When present in the > system device tree no system reset is to occur on watchdog timeout. > System reset in this case is managed by one of the other watchogs > available. > > Signed-off-by: Christopher BosticThis requires DT maintainer approval, but DT maintainers were not copied. Please resend and use scripts/get_maintainer.pl to determine who to send it to. Guenter > --- > Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > index c5e74d7..4099ea5 100644 > --- a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > +++ b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > @@ -8,9 +8,20 @@ Required properties: > - reg: physical base address of the controller and length of memory mapped > region > > +Optional properties: > + - external-signal: If the property is present then an external signal is to > + be generated on watchdog timeout. If absent, external signal is not > + generated. > + > + - no-system-reset: If the property is present then system will not be reset > + on watchdog timeout. In this case one of the other watchdogs will handle > + reset. If absent then the watchdog resets the system on timeout. > + > Example: > > wdt1: watchdog@1e785000 { > compatible = "aspeed,ast2400-wdt"; > reg = <0x1e785000 0x1c>; > + external-signal; > + no-system-reset; > };
Re: [1/2] drivers/watchdog: Document new aspeed optional dev tree properties.
On Tue, Jun 13, 2017 at 03:38:17PM -0500, Christopher Bostic wrote: > Describe new optional property 'external-signal'. When present in the > system device tree an exernal signal is generated on watchdog timeout. > > Describe new optional property 'no-system-reset'. When present in the > system device tree no system reset is to occur on watchdog timeout. > System reset in this case is managed by one of the other watchogs > available. > > Signed-off-by: Christopher Bostic This requires DT maintainer approval, but DT maintainers were not copied. Please resend and use scripts/get_maintainer.pl to determine who to send it to. Guenter > --- > Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > index c5e74d7..4099ea5 100644 > --- a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > +++ b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > @@ -8,9 +8,20 @@ Required properties: > - reg: physical base address of the controller and length of memory mapped > region > > +Optional properties: > + - external-signal: If the property is present then an external signal is to > + be generated on watchdog timeout. If absent, external signal is not > + generated. > + > + - no-system-reset: If the property is present then system will not be reset > + on watchdog timeout. In this case one of the other watchdogs will handle > + reset. If absent then the watchdog resets the system on timeout. > + > Example: > > wdt1: watchdog@1e785000 { > compatible = "aspeed,ast2400-wdt"; > reg = <0x1e785000 0x1c>; > + external-signal; > + no-system-reset; > };
Re: [PATCH 2/3] pci: Add a generic, weakly-linked pcibios_align_resource
On Sat, 24 Jun 2017 02:41:42 PDT (-0700), ge...@linux-m68k.org wrote: > Hi Palmer, > > On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbeltwrote: >> Multiple architectures define this as trivial function, and I'm adding >> another one as part of the RISC-V port. This adds a __weak version of >> pcibios_align_resource and deletes the now obselete ones in a handful of >> ports. >> >> The only functional change should be that a handful of ports used to >> export pcibios_fixup_bus. Only some architectures export this, so I >> just dropped it. >> >> Signed-off-by: Palmer Dabbelt > > This function is only ever used as a pointer passed to > pci_bus_alloc_resource()? > > What about having > > #ifndef pcibios_fixup_bus > #define pcibios_fixup_bus NULL > #endif > > in asm-generic/pci.h, letting the architecture with a non-trivial > implementation predefine the preprocessor symbol, and teaching > pci_bus_alloc_resource() to handle NULL? > > [...] > > Oh, the latter eventually calls into allocate_resource(), which already falls > back to simple_align_resource() if the alignment function is NULL, which > does the same thing. > So NULL should already work. I'm OK with that, but like your comments on the last one I think it might fit better as a __weak function. I think there were also some questions as to whether these should actually be empty functions or not. I'm really happy with either way. Since this is all out of my wheelhouse, can one of the PCI maintainers chime in as to what I should do here?
Re: [patches] Re: [PATCH 13/17] RISC-V: Add include subdirectory
On Sat, 24 Jun 2017 08:42:05 PDT (-0700), b...@kernel.crashing.org wrote: > On Fri, 2017-06-23 at 19:01 -0700, Palmer Dabbelt wrote: >> > > +#define mmiowb()Â Â Â Â Â Â __asm__ __volatile__ ("fence io,io" : : : >> > > "memory"); > > I forgot if we already mentioned that but mmiowb is primarily intended > to order MMIO stores vs. a subsequent spin_unlock. > > I'm not sure an IO only fence is sufficient here. > > Note that I've never trusted drivers to get that right, it's a rather > bad abstraction to begin with, so on powerpc, instead, I just set a > per-cpu flag on every non-relaxed MMIO write and test it in spin_unlock > in order to "beef up" the barrier in there if necessary. Sorry about that -- I thought I'd included a note somewhere that the atomics and barriers weren't ready to go yet, as we'd found a bunch of problems with them in the first review and I needed to go through them all. Arnd suggested copying the PowerPC approach to mmiowb and I like that better, so we're going to use it. Thanks!
Re: [PATCH 1/3] pci: Add a generic, weakly-linked pcibios_fixup_bus
On Sat, 24 Jun 2017 02:34:06 PDT (-0700), ge...@linux-m68k.org wrote: > Hi Palmer, > > On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbeltwrote: >> Multiple architectures define this as an empty function, and I'm adding >> another one as part of the RISC-V port. This adds a __weak version of >> pci_fixup_bios and deletes the now obselete ones in a handful of ports. >> >> The only functional change should be that microblaze used to export >> pcibios_fixup_bus. None of the other architectures export this, so I >> just dropped it. >> >> Signed-off-by: Palmer Dabbelt > > Given this is an empty function, wouldn't it make more sense to have > a static inline in asm-generic, protected by #ifndef pcibios_fixup_bus? I think the PCI people were considering changing this from a per-arch function to a per-controller function, so I think the inline won't help any there. I think since they hope to eventually clean up all the __weak functions it fits a bit better this way, but I'm really fine with anything here.
Re: [patches] Re: [PATCH 13/17] RISC-V: Add include subdirectory
On Sat, 24 Jun 2017 08:42:05 PDT (-0700), b...@kernel.crashing.org wrote: > On Fri, 2017-06-23 at 19:01 -0700, Palmer Dabbelt wrote: >> > > +#define mmiowb()Â Â Â Â Â Â __asm__ __volatile__ ("fence io,io" : : : >> > > "memory"); > > I forgot if we already mentioned that but mmiowb is primarily intended > to order MMIO stores vs. a subsequent spin_unlock. > > I'm not sure an IO only fence is sufficient here. > > Note that I've never trusted drivers to get that right, it's a rather > bad abstraction to begin with, so on powerpc, instead, I just set a > per-cpu flag on every non-relaxed MMIO write and test it in spin_unlock > in order to "beef up" the barrier in there if necessary. Sorry about that -- I thought I'd included a note somewhere that the atomics and barriers weren't ready to go yet, as we'd found a bunch of problems with them in the first review and I needed to go through them all. Arnd suggested copying the PowerPC approach to mmiowb and I like that better, so we're going to use it. Thanks!
Re: [PATCH 1/3] pci: Add a generic, weakly-linked pcibios_fixup_bus
On Sat, 24 Jun 2017 02:34:06 PDT (-0700), ge...@linux-m68k.org wrote: > Hi Palmer, > > On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbelt wrote: >> Multiple architectures define this as an empty function, and I'm adding >> another one as part of the RISC-V port. This adds a __weak version of >> pci_fixup_bios and deletes the now obselete ones in a handful of ports. >> >> The only functional change should be that microblaze used to export >> pcibios_fixup_bus. None of the other architectures export this, so I >> just dropped it. >> >> Signed-off-by: Palmer Dabbelt > > Given this is an empty function, wouldn't it make more sense to have > a static inline in asm-generic, protected by #ifndef pcibios_fixup_bus? I think the PCI people were considering changing this from a per-arch function to a per-controller function, so I think the inline won't help any there. I think since they hope to eventually clean up all the __weak functions it fits a bit better this way, but I'm really fine with anything here.
Re: [PATCH 2/3] pci: Add a generic, weakly-linked pcibios_align_resource
On Sat, 24 Jun 2017 02:41:42 PDT (-0700), ge...@linux-m68k.org wrote: > Hi Palmer, > > On Sat, Jun 24, 2017 at 3:50 AM, Palmer Dabbelt wrote: >> Multiple architectures define this as trivial function, and I'm adding >> another one as part of the RISC-V port. This adds a __weak version of >> pcibios_align_resource and deletes the now obselete ones in a handful of >> ports. >> >> The only functional change should be that a handful of ports used to >> export pcibios_fixup_bus. Only some architectures export this, so I >> just dropped it. >> >> Signed-off-by: Palmer Dabbelt > > This function is only ever used as a pointer passed to > pci_bus_alloc_resource()? > > What about having > > #ifndef pcibios_fixup_bus > #define pcibios_fixup_bus NULL > #endif > > in asm-generic/pci.h, letting the architecture with a non-trivial > implementation predefine the preprocessor symbol, and teaching > pci_bus_alloc_resource() to handle NULL? > > [...] > > Oh, the latter eventually calls into allocate_resource(), which already falls > back to simple_align_resource() if the alignment function is NULL, which > does the same thing. > So NULL should already work. I'm OK with that, but like your comments on the last one I think it might fit better as a __weak function. I think there were also some questions as to whether these should actually be empty functions or not. I'm really happy with either way. Since this is all out of my wheelhouse, can one of the PCI maintainers chime in as to what I should do here?
[PATCH] xattr: fix kstrdup.cocci warnings
fs/xattr.c:516:10-17: WARNING opportunity for kstrdep (strcpy on line 519) Use kstrdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/kstrdup.cocci CC: Stefan BergerSigned-off-by: Fengguang Wu --- xattr.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/xattr.c +++ b/fs/xattr.c @@ -513,10 +513,9 @@ xattr_userns_name(const char *fullname, return buffer; out_copy: - buffer = kmalloc(strlen(suffix) + 1, GFP_KERNEL); + buffer = kstrdup(suffix, GFP_KERNEL); if (!buffer) return ERR_PTR(-ENOMEM); - strcpy(buffer, suffix); return buffer;
Re: [PATCH 1/3] xattr: Enable security.capability in user namespaces
Hi Stefan, [auto build test WARNING on linus/master] [also build test WARNING on v4.12-rc6 next-20170623] [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/Stefan-Berger/Enable-namespaced-file-capabilities/20170625-001722 coccinelle warnings: (new ones prefixed by >>) >> fs/xattr.c:516:10-17: WARNING opportunity for kstrdep (strcpy on line 519) Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[PATCH] xattr: fix kstrdup.cocci warnings
fs/xattr.c:516:10-17: WARNING opportunity for kstrdep (strcpy on line 519) Use kstrdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/kstrdup.cocci CC: Stefan Berger Signed-off-by: Fengguang Wu --- xattr.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/xattr.c +++ b/fs/xattr.c @@ -513,10 +513,9 @@ xattr_userns_name(const char *fullname, return buffer; out_copy: - buffer = kmalloc(strlen(suffix) + 1, GFP_KERNEL); + buffer = kstrdup(suffix, GFP_KERNEL); if (!buffer) return ERR_PTR(-ENOMEM); - strcpy(buffer, suffix); return buffer;
Re: [PATCH 1/3] xattr: Enable security.capability in user namespaces
Hi Stefan, [auto build test WARNING on linus/master] [also build test WARNING on v4.12-rc6 next-20170623] [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/Stefan-Berger/Enable-namespaced-file-capabilities/20170625-001722 coccinelle warnings: (new ones prefixed by >>) >> fs/xattr.c:516:10-17: WARNING opportunity for kstrdep (strcpy on line 519) Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Re: [PATCH 6/6] rtc: s3c: Handle clock enable failures
Hi, On 16/06/2017 at 21:28:07 +0200, Krzysztof Kozlowski wrote: > clk_enable() can fail so handle such case. > > Signed-off-by: Krzysztof Kozlowski> --- > drivers/rtc/rtc-s3c.c | 72 > --- > 1 file changed, 57 insertions(+), 15 deletions(-) > I've applied the whole series. However, quite often, on a platform, clk_prepare/enable are ensured to never fail and I find that the added complexity to handle failures is not worth it. > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c > index 0cb2f27a30b4..a8992c227f61 100644 > --- a/drivers/rtc/rtc-s3c.c > +++ b/drivers/rtc/rtc-s3c.c > @@ -68,18 +68,32 @@ struct s3c_rtc_data { > void (*disable) (struct s3c_rtc *info); > }; > > -static void s3c_rtc_enable_clk(struct s3c_rtc *info) > +static int s3c_rtc_enable_clk(struct s3c_rtc *info) > { > unsigned long irq_flags; > + int ret = 0; > > spin_lock_irqsave(>alarm_clk_lock, irq_flags); > + > if (info->clk_disabled) { > - clk_enable(info->rtc_clk); > - if (info->data->needs_src_clk) > - clk_enable(info->rtc_src_clk); > + ret = clk_enable(info->rtc_clk); > + if (ret) > + goto out; > + > + if (info->data->needs_src_clk) { > + ret = clk_enable(info->rtc_src_clk); > + if (ret) { > + clk_disable(info->rtc_clk); > + goto out; > + } > + } > info->clk_disabled = false; > } > + > +out: > spin_unlock_irqrestore(>alarm_clk_lock, irq_flags); > + > + return ret; > } > > static void s3c_rtc_disable_clk(struct s3c_rtc *info) > @@ -122,10 +136,13 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > unsigned int tmp; > + int ret; > > dev_dbg(info->dev, "%s: aie=%d\n", __func__, enabled); > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > tmp = readb(info->base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; > > @@ -136,10 +153,13 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > > s3c_rtc_disable_clk(info); > > - if (enabled) > - s3c_rtc_enable_clk(info); > - else > + if (enabled) { > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > + } else { > s3c_rtc_disable_clk(info); > + } > > return 0; > } > @@ -147,10 +167,14 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > /* Set RTC frequency */ > static int s3c_rtc_setfreq(struct s3c_rtc *info, int freq) > { > + int ret; > + > if (!is_power_of_2(freq)) > return -EINVAL; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > spin_lock_irq(>pie_lock); > > if (info->data->set_freq) > @@ -167,8 +191,11 @@ static int s3c_rtc_gettime(struct device *dev, struct > rtc_time *rtc_tm) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > unsigned int have_retried = 0; > + int ret; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > retry_get_time: > rtc_tm->tm_min = readb(info->base + S3C2410_RTCMIN); > @@ -212,6 +239,7 @@ static int s3c_rtc_settime(struct device *dev, struct > rtc_time *tm) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > int year = tm->tm_year - 100; > + int ret; > > dev_dbg(dev, "set time %04d.%02d.%02d %02d:%02d:%02d\n", > 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, > @@ -224,7 +252,9 @@ static int s3c_rtc_settime(struct device *dev, struct > rtc_time *tm) > return -EINVAL; > } > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > writeb(bin2bcd(tm->tm_sec), info->base + S3C2410_RTCSEC); > writeb(bin2bcd(tm->tm_min), info->base + S3C2410_RTCMIN); > @@ -243,8 +273,11 @@ static int s3c_rtc_getalarm(struct device *dev, struct > rtc_wkalrm *alrm) > struct s3c_rtc *info = dev_get_drvdata(dev); > struct rtc_time *alm_tm = >time; > unsigned int alm_en; > + int ret; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > alm_tm->tm_sec = readb(info->base + S3C2410_ALMSEC); > alm_tm->tm_min = readb(info->base + S3C2410_ALMMIN); > @@ -293,6 +326,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct > rtc_wkalrm *alrm) > struct s3c_rtc *info = dev_get_drvdata(dev); > struct rtc_time
Re: [PATCH 6/6] rtc: s3c: Handle clock enable failures
Hi, On 16/06/2017 at 21:28:07 +0200, Krzysztof Kozlowski wrote: > clk_enable() can fail so handle such case. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/rtc/rtc-s3c.c | 72 > --- > 1 file changed, 57 insertions(+), 15 deletions(-) > I've applied the whole series. However, quite often, on a platform, clk_prepare/enable are ensured to never fail and I find that the added complexity to handle failures is not worth it. > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c > index 0cb2f27a30b4..a8992c227f61 100644 > --- a/drivers/rtc/rtc-s3c.c > +++ b/drivers/rtc/rtc-s3c.c > @@ -68,18 +68,32 @@ struct s3c_rtc_data { > void (*disable) (struct s3c_rtc *info); > }; > > -static void s3c_rtc_enable_clk(struct s3c_rtc *info) > +static int s3c_rtc_enable_clk(struct s3c_rtc *info) > { > unsigned long irq_flags; > + int ret = 0; > > spin_lock_irqsave(>alarm_clk_lock, irq_flags); > + > if (info->clk_disabled) { > - clk_enable(info->rtc_clk); > - if (info->data->needs_src_clk) > - clk_enable(info->rtc_src_clk); > + ret = clk_enable(info->rtc_clk); > + if (ret) > + goto out; > + > + if (info->data->needs_src_clk) { > + ret = clk_enable(info->rtc_src_clk); > + if (ret) { > + clk_disable(info->rtc_clk); > + goto out; > + } > + } > info->clk_disabled = false; > } > + > +out: > spin_unlock_irqrestore(>alarm_clk_lock, irq_flags); > + > + return ret; > } > > static void s3c_rtc_disable_clk(struct s3c_rtc *info) > @@ -122,10 +136,13 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > unsigned int tmp; > + int ret; > > dev_dbg(info->dev, "%s: aie=%d\n", __func__, enabled); > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > tmp = readb(info->base + S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN; > > @@ -136,10 +153,13 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > > s3c_rtc_disable_clk(info); > > - if (enabled) > - s3c_rtc_enable_clk(info); > - else > + if (enabled) { > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > + } else { > s3c_rtc_disable_clk(info); > + } > > return 0; > } > @@ -147,10 +167,14 @@ static int s3c_rtc_setaie(struct device *dev, unsigned > int enabled) > /* Set RTC frequency */ > static int s3c_rtc_setfreq(struct s3c_rtc *info, int freq) > { > + int ret; > + > if (!is_power_of_2(freq)) > return -EINVAL; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > spin_lock_irq(>pie_lock); > > if (info->data->set_freq) > @@ -167,8 +191,11 @@ static int s3c_rtc_gettime(struct device *dev, struct > rtc_time *rtc_tm) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > unsigned int have_retried = 0; > + int ret; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > retry_get_time: > rtc_tm->tm_min = readb(info->base + S3C2410_RTCMIN); > @@ -212,6 +239,7 @@ static int s3c_rtc_settime(struct device *dev, struct > rtc_time *tm) > { > struct s3c_rtc *info = dev_get_drvdata(dev); > int year = tm->tm_year - 100; > + int ret; > > dev_dbg(dev, "set time %04d.%02d.%02d %02d:%02d:%02d\n", > 1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, > @@ -224,7 +252,9 @@ static int s3c_rtc_settime(struct device *dev, struct > rtc_time *tm) > return -EINVAL; > } > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > writeb(bin2bcd(tm->tm_sec), info->base + S3C2410_RTCSEC); > writeb(bin2bcd(tm->tm_min), info->base + S3C2410_RTCMIN); > @@ -243,8 +273,11 @@ static int s3c_rtc_getalarm(struct device *dev, struct > rtc_wkalrm *alrm) > struct s3c_rtc *info = dev_get_drvdata(dev); > struct rtc_time *alm_tm = >time; > unsigned int alm_en; > + int ret; > > - s3c_rtc_enable_clk(info); > + ret = s3c_rtc_enable_clk(info); > + if (ret) > + return ret; > > alm_tm->tm_sec = readb(info->base + S3C2410_ALMSEC); > alm_tm->tm_min = readb(info->base + S3C2410_ALMMIN); > @@ -293,6 +326,7 @@ static int s3c_rtc_setalarm(struct device *dev, struct > rtc_wkalrm *alrm) > struct s3c_rtc *info = dev_get_drvdata(dev); > struct rtc_time *tm = >time; >
Re: [PATCH v2 2/3] dt-bindings: iio: update STM32 timers clock names
On Thu, 22 Jun 2017 16:25:39 -0500 Rob Herringwrote: > On Wed, Jun 14, 2017 at 05:13:15PM +0200, Fabrice Gasnier wrote: > > Clock name has been updated during driver/DT binding review: > > https://lkml.org/lkml/2016/12/13/718 > > Update DT binding doc to reflect this. > > > > Fixes: bf2d8581b1b3 (iio: Add bindings for STM32 timer trigger driver) > > Signed-off-by: Fabrice Gasnier > > Acked-by: Benjamin Gaignard > > Acked-by: Jonathan Cameron > > --- > > Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Acked-by: Rob Herring Applied to the togreg branch of iio.git. Might well have missed the coming merge window, but guess no major hurry for this. Jonathan
Re: [PATCH v2 2/3] dt-bindings: iio: update STM32 timers clock names
On Thu, 22 Jun 2017 16:25:39 -0500 Rob Herring wrote: > On Wed, Jun 14, 2017 at 05:13:15PM +0200, Fabrice Gasnier wrote: > > Clock name has been updated during driver/DT binding review: > > https://lkml.org/lkml/2016/12/13/718 > > Update DT binding doc to reflect this. > > > > Fixes: bf2d8581b1b3 (iio: Add bindings for STM32 timer trigger driver) > > Signed-off-by: Fabrice Gasnier > > Acked-by: Benjamin Gaignard > > Acked-by: Jonathan Cameron > > --- > > Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Acked-by: Rob Herring Applied to the togreg branch of iio.git. Might well have missed the coming merge window, but guess no major hurry for this. Jonathan
4.12.0-rc5+git: kernel BUG at arch/x86/mm/highmem_32.c:47
This is 4.12.0-rc5-00137-ga090bd4ff838 on a dual AthlonMP server tha has been running fine until 4.11.0 included. 4.12.0-rc5-00137-ga090bd4ff838 was the first kernel after 4.11 that I tried and the problem happened while compiling next kernel from git. First it seems to be task jbd2/sda1-8:70 blocked for more than 120 seconds with blk-mq (wondering why I have it enabled on a old spinning HDD server) and then series of invalid opcode: BUG-s. [0.00] Linux version 4.12.0-rc5-00137-ga090bd4ff838 (mroos@vanaondatra) (gcc version 6.3.0 20170415 (Debian 6.3.0-14) ) #57 SMP Fri Jun 16 12:07:23 EEST 2017 [0.00] x86/fpu: x87 FPU will use FXSAVE [0.00] e820: BIOS-provided physical RAM map: [0.00] BIOS-e820: [mem 0x-0x0009f7ff] usable [0.00] BIOS-e820: [mem 0x0009f800-0x0009] reserved [0.00] BIOS-e820: [mem 0x000e4800-0x000f] reserved [0.00] BIOS-e820: [mem 0x0010-0x5ffe] usable [0.00] BIOS-e820: [mem 0x5fff-0x5fff6bff] ACPI data [0.00] BIOS-e820: [mem 0x5fff6c00-0x5fff] ACPI NVS [0.00] BIOS-e820: [mem 0xfec0-0xfec0] reserved [0.00] BIOS-e820: [mem 0xfee0-0xfee00fff] reserved [0.00] BIOS-e820: [mem 0xfff8-0x] reserved [0.00] Notice: NX (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.3 present. [0.00] DMI: Unknown Unknown/S2462 THUNDER K7, BIOS Guinness-8 04/07/2003 [0.00] tsc: Fast TSC calibration using PIT [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved [0.00] e820: remove [mem 0x000a-0x000f] usable [0.00] e820: last_pfn = 0x5fff0 max_arch_pfn = 0x10 [0.00] MTRR default type: uncachable [0.00] MTRR fixed ranges enabled: [0.00] 0-9 write-back [0.00] A-B uncachable [0.00] C-C8FFF write-protect [0.00] C9000-D uncachable [0.00] E-E3FFF write-back [0.00] E4000-F write-protect [0.00] MTRR variable ranges enabled: [0.00] 0 base 0 mask FC000 write-back [0.00] 1 base 04000 mask FE000 write-back [0.00] 2 disabled [0.00] 3 disabled [0.00] 4 disabled [0.00] 5 disabled [0.00] 6 disabled [0.00] 7 disabled [0.00] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [0.00] found SMP MP-table at [mem 0x000f74c0-0x000f74cf] mapped at [c00f74c0] [0.00] initial memory mapped: [mem 0x-0x01ff] [0.00] Base memory trampoline at [c009b000] 9b000 size 16384 [0.00] BRK [0x01be4000, 0x01be4fff] PGTABLE [0.00] ACPI: Early table checksum verification disabled [0.00] ACPI: RSDP 0x000F7460 14 (v00 PTLTD ) [0.00] ACPI: RSDT 0x5FFF451B 2C (v01 PTLTDRSDT 0604 LTP ) [0.00] ACPI: FACP 0x5FFF6B2E 74 (v01 TYAN GUINNESS 0604 PTEC 000F4240) [0.00] ACPI: DSDT 0x5FFF4547 0025E7 (v01 AMDAMDACPI 0604 MSFT 010D) [0.00] ACPI: FACS 0x5FC0 40 [0.00] ACPI: APIC 0x5FFF6BA2 5E (v01 PTLTDAPIC 0604 LTP ) [0.00] ACPI: Local APIC address 0xfee0 [0.00] 647MB HIGHMEM available. [0.00] 887MB LOWMEM available. [0.00] mapped low ram: 0 - 377fe000 [0.00] low ram: 0 - 377fe000 [0.00] BRK [0x01be5000, 0x01be5fff] PGTABLE [0.00] Zone ranges: [0.00] DMA [mem 0x1000-0x00ff] [0.00] Normal [mem 0x0100-0x377fdfff] [0.00] HighMem [mem 0x377fe000-0x5ffe] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x1000-0x0009efff] [0.00] node 0: [mem 0x0010-0x5ffe] [0.00] Initmem setup node 0 [mem 0x1000-0x5ffe] [0.00] On node 0 totalpages: 393102 [0.00] DMA zone: 32 pages used for memmap [0.00] DMA zone: 0 pages reserved [0.00] DMA zone: 3998 pages, LIFO batch:0 [0.00] Normal zone: 1744 pages used for memmap [0.00] Normal zone: 223230 pages, LIFO batch:31 [0.00] HighMem zone: 165874 pages, LIFO batch:31 [0.00] Using APIC driver default [0.00] ACPI: PM-Timer IO Port: 0x8008 [0.00] ACPI: Local APIC address 0xfee0 [0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) [0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [0.00] IOAPIC[0]: apic_id 2, version 17, address 0xfec0, GSI
4.12.0-rc5+git: kernel BUG at arch/x86/mm/highmem_32.c:47
This is 4.12.0-rc5-00137-ga090bd4ff838 on a dual AthlonMP server tha has been running fine until 4.11.0 included. 4.12.0-rc5-00137-ga090bd4ff838 was the first kernel after 4.11 that I tried and the problem happened while compiling next kernel from git. First it seems to be task jbd2/sda1-8:70 blocked for more than 120 seconds with blk-mq (wondering why I have it enabled on a old spinning HDD server) and then series of invalid opcode: BUG-s. [0.00] Linux version 4.12.0-rc5-00137-ga090bd4ff838 (mroos@vanaondatra) (gcc version 6.3.0 20170415 (Debian 6.3.0-14) ) #57 SMP Fri Jun 16 12:07:23 EEST 2017 [0.00] x86/fpu: x87 FPU will use FXSAVE [0.00] e820: BIOS-provided physical RAM map: [0.00] BIOS-e820: [mem 0x-0x0009f7ff] usable [0.00] BIOS-e820: [mem 0x0009f800-0x0009] reserved [0.00] BIOS-e820: [mem 0x000e4800-0x000f] reserved [0.00] BIOS-e820: [mem 0x0010-0x5ffe] usable [0.00] BIOS-e820: [mem 0x5fff-0x5fff6bff] ACPI data [0.00] BIOS-e820: [mem 0x5fff6c00-0x5fff] ACPI NVS [0.00] BIOS-e820: [mem 0xfec0-0xfec0] reserved [0.00] BIOS-e820: [mem 0xfee0-0xfee00fff] reserved [0.00] BIOS-e820: [mem 0xfff8-0x] reserved [0.00] Notice: NX (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.3 present. [0.00] DMI: Unknown Unknown/S2462 THUNDER K7, BIOS Guinness-8 04/07/2003 [0.00] tsc: Fast TSC calibration using PIT [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved [0.00] e820: remove [mem 0x000a-0x000f] usable [0.00] e820: last_pfn = 0x5fff0 max_arch_pfn = 0x10 [0.00] MTRR default type: uncachable [0.00] MTRR fixed ranges enabled: [0.00] 0-9 write-back [0.00] A-B uncachable [0.00] C-C8FFF write-protect [0.00] C9000-D uncachable [0.00] E-E3FFF write-back [0.00] E4000-F write-protect [0.00] MTRR variable ranges enabled: [0.00] 0 base 0 mask FC000 write-back [0.00] 1 base 04000 mask FE000 write-back [0.00] 2 disabled [0.00] 3 disabled [0.00] 4 disabled [0.00] 5 disabled [0.00] 6 disabled [0.00] 7 disabled [0.00] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [0.00] found SMP MP-table at [mem 0x000f74c0-0x000f74cf] mapped at [c00f74c0] [0.00] initial memory mapped: [mem 0x-0x01ff] [0.00] Base memory trampoline at [c009b000] 9b000 size 16384 [0.00] BRK [0x01be4000, 0x01be4fff] PGTABLE [0.00] ACPI: Early table checksum verification disabled [0.00] ACPI: RSDP 0x000F7460 14 (v00 PTLTD ) [0.00] ACPI: RSDT 0x5FFF451B 2C (v01 PTLTDRSDT 0604 LTP ) [0.00] ACPI: FACP 0x5FFF6B2E 74 (v01 TYAN GUINNESS 0604 PTEC 000F4240) [0.00] ACPI: DSDT 0x5FFF4547 0025E7 (v01 AMDAMDACPI 0604 MSFT 010D) [0.00] ACPI: FACS 0x5FC0 40 [0.00] ACPI: APIC 0x5FFF6BA2 5E (v01 PTLTDAPIC 0604 LTP ) [0.00] ACPI: Local APIC address 0xfee0 [0.00] 647MB HIGHMEM available. [0.00] 887MB LOWMEM available. [0.00] mapped low ram: 0 - 377fe000 [0.00] low ram: 0 - 377fe000 [0.00] BRK [0x01be5000, 0x01be5fff] PGTABLE [0.00] Zone ranges: [0.00] DMA [mem 0x1000-0x00ff] [0.00] Normal [mem 0x0100-0x377fdfff] [0.00] HighMem [mem 0x377fe000-0x5ffe] [0.00] Movable zone start for each node [0.00] Early memory node ranges [0.00] node 0: [mem 0x1000-0x0009efff] [0.00] node 0: [mem 0x0010-0x5ffe] [0.00] Initmem setup node 0 [mem 0x1000-0x5ffe] [0.00] On node 0 totalpages: 393102 [0.00] DMA zone: 32 pages used for memmap [0.00] DMA zone: 0 pages reserved [0.00] DMA zone: 3998 pages, LIFO batch:0 [0.00] Normal zone: 1744 pages used for memmap [0.00] Normal zone: 223230 pages, LIFO batch:31 [0.00] HighMem zone: 165874 pages, LIFO batch:31 [0.00] Using APIC driver default [0.00] ACPI: PM-Timer IO Port: 0x8008 [0.00] ACPI: Local APIC address 0xfee0 [0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) [0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) [0.00] IOAPIC[0]: apic_id 2, version 17, address 0xfec0, GSI
Re: [PATCH v2 8/8] iio: counter: Add support for STM32 LPTimer
On Wed, 21 Jun 2017 16:30:15 +0200 Fabrice Gasnierwrote: > Add support for STM32 Low-Power Timer, that can be used as counter > or quadrature encoder. > > Signed-off-by: Fabrice Gasnier Hmm. Sometime I'm going to ask you guys to document how all these different components fit together. Far too many ways of cooking the same dish with some of these ST parts ;) I've cc'd William. You already have Benjamin. Hopefully they also have time to cast their eyes over this patch as it would be very helpful. We are still defining new ABI for these devices so good to have more eyes than for a normal patch. Jonathan > --- > Changes in v2: > - s/Low Power/Low-Power > - update few comments > --- > .../ABI/testing/sysfs-bus-iio-lptimer-stm32| 57 +++ > drivers/iio/counter/Kconfig| 9 + > drivers/iio/counter/Makefile | 1 + > drivers/iio/counter/stm32-lptimer-cnt.c| 383 > + > 4 files changed, 450 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > create mode 100644 drivers/iio/counter/stm32-lptimer-cnt.c > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > b/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > new file mode 100644 > index 000..ad2cc63 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > @@ -0,0 +1,57 @@ > +What:/sys/bus/iio/devices/iio:deviceX/in_count0_preset > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the current preset value. Writing sets the > + preset value. Encoder counts continuously from 0 to preset > + value, depending on direction (up/down). Some of these are generic now and used by several parts. Time we started thinking about a more generic file. sysfs-bus-iio-counter > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the list possible quadrature modes. > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Configure the device counter quadrature modes: > + - non-quadrature: > + Encoder IN1 input servers as the count input (up > + direction). > + - quadrature: > + Encoder IN1 and IN2 inputs are mixed to get direction > + and count. Don't suppose we can call them A and B in common with labelling on many encoders? Also makes this documentation same as for the 104 device. > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count_polarity_available > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the list possible active edges. > + > +What:/sys/bus/iio/devices/iio:deviceX/in_count0_polarity > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Configure the device encoder/counter active edge: > + - rising-edge > + - falling-edge > + - both-edges For both edges, I believe we last supported this with scale. So can we have both edges for the non quadrature? If so your scale reported is not taking this into account. > + > + In non-quadrature mode, device counts up on active edge. > + In quadrature mode, encoder counting scenarios are as follows: > + > + | Active | Level on | IN1 signal| IN2 signal | > + | edge| opposite |-- > + | | signal | Rising | Falling | Rising | Falling | > + > + | Rising | High -> | Down |-|Up|-| > + | edge| Low -> |Up|-| Down |-| > + > + | Falling | High -> |- |Up |- | Down | > + | edge| Low -> |- | Down |- |Up | > + > + | Both| High -> | Down |Up |Up| Down | > + | edges | Low -> |Up| Down | Down |Up | > + Last case was definitely done with scale for the 104 counter - not that it is detailed enough
Re: [PATCH v2 8/8] iio: counter: Add support for STM32 LPTimer
On Wed, 21 Jun 2017 16:30:15 +0200 Fabrice Gasnier wrote: > Add support for STM32 Low-Power Timer, that can be used as counter > or quadrature encoder. > > Signed-off-by: Fabrice Gasnier Hmm. Sometime I'm going to ask you guys to document how all these different components fit together. Far too many ways of cooking the same dish with some of these ST parts ;) I've cc'd William. You already have Benjamin. Hopefully they also have time to cast their eyes over this patch as it would be very helpful. We are still defining new ABI for these devices so good to have more eyes than for a normal patch. Jonathan > --- > Changes in v2: > - s/Low Power/Low-Power > - update few comments > --- > .../ABI/testing/sysfs-bus-iio-lptimer-stm32| 57 +++ > drivers/iio/counter/Kconfig| 9 + > drivers/iio/counter/Makefile | 1 + > drivers/iio/counter/stm32-lptimer-cnt.c| 383 > + > 4 files changed, 450 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > create mode 100644 drivers/iio/counter/stm32-lptimer-cnt.c > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > b/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > new file mode 100644 > index 000..ad2cc63 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32 > @@ -0,0 +1,57 @@ > +What:/sys/bus/iio/devices/iio:deviceX/in_count0_preset > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the current preset value. Writing sets the > + preset value. Encoder counts continuously from 0 to preset > + value, depending on direction (up/down). Some of these are generic now and used by several parts. Time we started thinking about a more generic file. sysfs-bus-iio-counter > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the list possible quadrature modes. > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Configure the device counter quadrature modes: > + - non-quadrature: > + Encoder IN1 input servers as the count input (up > + direction). > + - quadrature: > + Encoder IN1 and IN2 inputs are mixed to get direction > + and count. Don't suppose we can call them A and B in common with labelling on many encoders? Also makes this documentation same as for the 104 device. > + > +What: > /sys/bus/iio/devices/iio:deviceX/in_count_polarity_available > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Reading returns the list possible active edges. > + > +What:/sys/bus/iio/devices/iio:deviceX/in_count0_polarity > +KernelVersion: 4.13 > +Contact: fabrice.gasn...@st.com > +Description: > + Configure the device encoder/counter active edge: > + - rising-edge > + - falling-edge > + - both-edges For both edges, I believe we last supported this with scale. So can we have both edges for the non quadrature? If so your scale reported is not taking this into account. > + > + In non-quadrature mode, device counts up on active edge. > + In quadrature mode, encoder counting scenarios are as follows: > + > + | Active | Level on | IN1 signal| IN2 signal | > + | edge| opposite |-- > + | | signal | Rising | Falling | Rising | Falling | > + > + | Rising | High -> | Down |-|Up|-| > + | edge| Low -> |Up|-| Down |-| > + > + | Falling | High -> |- |Up |- | Down | > + | edge| Low -> |- | Down |- |Up | > + > + | Both| High -> | Down |Up |Up| Down | > + | edges | Low -> |Up| Down | Down |Up | > + Last case was definitely done with scale for the 104 counter - not that it is detailed enough here to cover the other two cases. It might make
Re: [PATCH RESEND 0/7] Introduce MEDIA_VERSION to end KENREL_VERSION abuse in media
Em Wed, 21 Jun 2017 10:08:05 +0200 Johannes Thumshirnescreveu: > Currently the media subsystem has a very creative abuse of the > KERNEL_VERSION macro to encode an arbitrary version triplet for media > drivers and device hardware revisions. > > This series introduces a new macro called MEDIA_REVISION which encodes > a version triplet like KERNEL_VERSION does, but clearly has media > centric semantics and doesn't fool someone into thinking specific > parts are defined for a specific kernel version only like in out of > tree drivers. Sorry, but I can't see any advantage on it. On the downside, it includes the media controller header file (media.h) where it is not needed. > > Johannes Thumshirn (7): > [media] media: introduce MEDIA_REVISION macro > video: fbdev: don't use KERNEL_VERSION macro for MEDIA_REVISION > [media] media: document the use of MEDIA_REVISION instead of > KERNEL_VERSION > [media] cx25821: use MEDIA_REVISION instead of KERNEL_VERSION > [media] media: s3c-camif: Use MEDIA_REVISON instead of KERNEL_VERSION > [media] media: bcm2048: use MEDIA_REVISION isntead of KERNEL_VERSION > staging/atomisp: use MEDIA_VERSION instead of KERNEL_VERSION That's said, some of the above shouldn't be using KERNEL_VERSION at all. The V4L2 core sets the version already. So, drivers like cx25821, s3c-camif, bcm2048 and atomisp are likely doing the wrong thing. Thanks, Mauro
Re: [PATCH RESEND 0/7] Introduce MEDIA_VERSION to end KENREL_VERSION abuse in media
Em Wed, 21 Jun 2017 10:08:05 +0200 Johannes Thumshirn escreveu: > Currently the media subsystem has a very creative abuse of the > KERNEL_VERSION macro to encode an arbitrary version triplet for media > drivers and device hardware revisions. > > This series introduces a new macro called MEDIA_REVISION which encodes > a version triplet like KERNEL_VERSION does, but clearly has media > centric semantics and doesn't fool someone into thinking specific > parts are defined for a specific kernel version only like in out of > tree drivers. Sorry, but I can't see any advantage on it. On the downside, it includes the media controller header file (media.h) where it is not needed. > > Johannes Thumshirn (7): > [media] media: introduce MEDIA_REVISION macro > video: fbdev: don't use KERNEL_VERSION macro for MEDIA_REVISION > [media] media: document the use of MEDIA_REVISION instead of > KERNEL_VERSION > [media] cx25821: use MEDIA_REVISION instead of KERNEL_VERSION > [media] media: s3c-camif: Use MEDIA_REVISON instead of KERNEL_VERSION > [media] media: bcm2048: use MEDIA_REVISION isntead of KERNEL_VERSION > staging/atomisp: use MEDIA_VERSION instead of KERNEL_VERSION That's said, some of the above shouldn't be using KERNEL_VERSION at all. The V4L2 core sets the version already. So, drivers like cx25821, s3c-camif, bcm2048 and atomisp are likely doing the wrong thing. Thanks, Mauro
Re: [PATCH v2 7/8] dt-bindings: iio: Add STM32 LPTimer quadrature encoder and counter
On Wed, 21 Jun 2017 16:30:14 +0200 Fabrice Gasnierwrote: > Add documentation for STMicroelectronics STM32 Low-Power Timer > quadrature encoder and counter binding. > > Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron > --- > Changes in v2: > - s/Low Power/Low-Power > - remove leading 0x in example (parent node) > - improve properties descriptions > --- > .../bindings/iio/counter/stm32-lptimer-cnt.txt | 27 > ++ > 1 file changed, 27 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > > diff --git > a/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > b/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > new file mode 100644 > index 000..b9fd014 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > @@ -0,0 +1,27 @@ > +STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter > + > +STM32 Low-Power Timer provides several counter modes. It can be used as: > +- quadrature encoder to detect angular position and direction of rotary > + elements, from IN1 and IN2 input signals. > +- simple counter from IN1 input signal. > + > +Must be a sub-node of an STM32 Low-Power Timer device tree node. > +See ../mfd/stm32-lptimer.txt for details about the parent node. > + > +Required properties: > +- compatible:Must be "st,stm32-lptimer-counter". > +- pinctrl-names: Set to "default". > +- pinctrl-0: List of phandles pointing to pin configuration > nodes, > + to set IN1/IN2 pins in mode of operation for Low-Power > + Timer input on external pin. > + > +Example: > + lptimer1: lptimer@40002400 { > + compatible = "st,stm32-lptimer"; > + ... > + counter { > + compatible = "st,stm32-lptimer-counter"; > + pinctrl-names = "default"; > + pinctrl-0 = <_in_pins>; > + }; > + };
Re: [PATCH v2 7/8] dt-bindings: iio: Add STM32 LPTimer quadrature encoder and counter
On Wed, 21 Jun 2017 16:30:14 +0200 Fabrice Gasnier wrote: > Add documentation for STMicroelectronics STM32 Low-Power Timer > quadrature encoder and counter binding. > > Signed-off-by: Fabrice Gasnier Acked-by: Jonathan Cameron > --- > Changes in v2: > - s/Low Power/Low-Power > - remove leading 0x in example (parent node) > - improve properties descriptions > --- > .../bindings/iio/counter/stm32-lptimer-cnt.txt | 27 > ++ > 1 file changed, 27 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > > diff --git > a/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > b/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > new file mode 100644 > index 000..b9fd014 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/counter/stm32-lptimer-cnt.txt > @@ -0,0 +1,27 @@ > +STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter > + > +STM32 Low-Power Timer provides several counter modes. It can be used as: > +- quadrature encoder to detect angular position and direction of rotary > + elements, from IN1 and IN2 input signals. > +- simple counter from IN1 input signal. > + > +Must be a sub-node of an STM32 Low-Power Timer device tree node. > +See ../mfd/stm32-lptimer.txt for details about the parent node. > + > +Required properties: > +- compatible:Must be "st,stm32-lptimer-counter". > +- pinctrl-names: Set to "default". > +- pinctrl-0: List of phandles pointing to pin configuration > nodes, > + to set IN1/IN2 pins in mode of operation for Low-Power > + Timer input on external pin. > + > +Example: > + lptimer1: lptimer@40002400 { > + compatible = "st,stm32-lptimer"; > + ... > + counter { > + compatible = "st,stm32-lptimer-counter"; > + pinctrl-names = "default"; > + pinctrl-0 = <_in_pins>; > + }; > + };
Re: [PATCH v2 6/8] iio: trigger: Add STM32 LPTimer trigger driver
On Wed, 21 Jun 2017 16:30:13 +0200 Fabrice Gasnierwrote: > Add support for LPTIMx_OUT triggers that can be found on some STM32 > devices. These triggers can be used then by ADC or DAC. > Typical usage is to configure LPTimer as PWM output (via pwm-stm32-lp) > and have synchronised analog conversions with these triggers. > > Signed-off-by: Fabrice Gasnier Given this can't be used as a trigger for other devices (no exposed interrupt?) I'd expect to see a validate_device callback provided for the trigger ops. That would prevent other devices trying to use it. Otherwise, looks good. Jonathan > --- > Changes in v2: > - s/Low Power/Low-Power > - update few comments > --- > drivers/iio/trigger/Kconfig | 11 +++ > drivers/iio/trigger/Makefile | 1 + > drivers/iio/trigger/stm32-lptimer-trigger.c | 110 > ++ > include/linux/iio/timer/stm32-lptim-trigger.h | 24 ++ > 4 files changed, 146 insertions(+) > create mode 100644 drivers/iio/trigger/stm32-lptimer-trigger.c > create mode 100644 include/linux/iio/timer/stm32-lptim-trigger.h > > diff --git a/drivers/iio/trigger/Kconfig b/drivers/iio/trigger/Kconfig > index e4d4e63..a633d2c 100644 > --- a/drivers/iio/trigger/Kconfig > +++ b/drivers/iio/trigger/Kconfig > @@ -24,6 +24,17 @@ config IIO_INTERRUPT_TRIGGER > To compile this driver as a module, choose M here: the > module will be called iio-trig-interrupt. > > +config IIO_STM32_LPTIMER_TRIGGER > + tristate "STM32 Low-Power Timer Trigger" > + depends on MFD_STM32_LPTIMER || COMPILE_TEST > + help > + Select this option to enable STM32 Low-Power Timer Trigger. > + This can be used as trigger source for STM32 internal ADC > + and/or DAC. > + > + To compile this driver as a module, choose M here: the > + module will be called stm32-lptimer-trigger. > + > config IIO_STM32_TIMER_TRIGGER > tristate "STM32 Timer Trigger" > depends on (ARCH_STM32 && OF && MFD_STM32_TIMERS) || COMPILE_TEST > diff --git a/drivers/iio/trigger/Makefile b/drivers/iio/trigger/Makefile > index 5c4ecd3..0a72a2a 100644 > --- a/drivers/iio/trigger/Makefile > +++ b/drivers/iio/trigger/Makefile > @@ -6,6 +6,7 @@ > > obj-$(CONFIG_IIO_HRTIMER_TRIGGER) += iio-trig-hrtimer.o > obj-$(CONFIG_IIO_INTERRUPT_TRIGGER) += iio-trig-interrupt.o > +obj-$(CONFIG_IIO_STM32_LPTIMER_TRIGGER) += stm32-lptimer-trigger.o > obj-$(CONFIG_IIO_STM32_TIMER_TRIGGER) += stm32-timer-trigger.o > obj-$(CONFIG_IIO_SYSFS_TRIGGER) += iio-trig-sysfs.o > obj-$(CONFIG_IIO_TIGHTLOOP_TRIGGER) += iio-trig-loop.o > diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c > b/drivers/iio/trigger/stm32-lptimer-trigger.c > new file mode 100644 > index 000..bcb9aa2 > --- /dev/null > +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c > @@ -0,0 +1,110 @@ > +/* > + * STM32 Low-Power Timer Trigger driver > + * > + * Copyright (C) STMicroelectronics 2017 > + * > + * Author: Fabrice Gasnier . > + * > + * License terms: GNU General Public License (GPL), version 2 > + * > + * Inspired by Benjamin Gaignard's stm32-timer-trigger driver > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* List Low-Power Timer triggers */ > +static const char * const stm32_lptim_triggers[] = { > + LPTIM1_OUT, > + LPTIM2_OUT, > + LPTIM3_OUT, > +}; > + > +struct stm32_lptim_trigger { > + struct device *dev; > + const char *trg; > +}; > + > +static const struct iio_trigger_ops stm32_lptim_trigger_ops = { > + .owner = THIS_MODULE, > +}; > + > +/** > + * is_stm32_lptim_trigger > + * @trig: trigger to be checked > + * > + * return true if the trigger is a valid STM32 IIO Low-Power Timer Trigger > + * either return false > + */ > +bool is_stm32_lptim_trigger(struct iio_trigger *trig) > +{ > + return (trig->ops == _lptim_trigger_ops); > +} > +EXPORT_SYMBOL(is_stm32_lptim_trigger); > + > +static int stm32_lptim_setup_trig(struct stm32_lptim_trigger *priv) > +{ > + struct iio_trigger *trig; > + > + trig = devm_iio_trigger_alloc(priv->dev, "%s", priv->trg); > + if (!trig) > + return -ENOMEM; > + > + trig->dev.parent = priv->dev->parent; > + trig->ops = _lptim_trigger_ops; > + iio_trigger_set_drvdata(trig, priv); > + > + return devm_iio_trigger_register(priv->dev, trig); > +} > + > +static int stm32_lptim_trigger_probe(struct platform_device *pdev) > +{ > + struct stm32_lptim_trigger *priv; > + u32 index; > + int ret; > + > + priv = devm_kzalloc(>dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + if (of_property_read_u32(pdev->dev.of_node, "reg", )) > + return -EINVAL; > + > + if (index >= ARRAY_SIZE(stm32_lptim_triggers)) > + return -EINVAL; > + > + priv->dev = >dev; > + priv->trg =
Re: [PATCH v2 6/8] iio: trigger: Add STM32 LPTimer trigger driver
On Wed, 21 Jun 2017 16:30:13 +0200 Fabrice Gasnier wrote: > Add support for LPTIMx_OUT triggers that can be found on some STM32 > devices. These triggers can be used then by ADC or DAC. > Typical usage is to configure LPTimer as PWM output (via pwm-stm32-lp) > and have synchronised analog conversions with these triggers. > > Signed-off-by: Fabrice Gasnier Given this can't be used as a trigger for other devices (no exposed interrupt?) I'd expect to see a validate_device callback provided for the trigger ops. That would prevent other devices trying to use it. Otherwise, looks good. Jonathan > --- > Changes in v2: > - s/Low Power/Low-Power > - update few comments > --- > drivers/iio/trigger/Kconfig | 11 +++ > drivers/iio/trigger/Makefile | 1 + > drivers/iio/trigger/stm32-lptimer-trigger.c | 110 > ++ > include/linux/iio/timer/stm32-lptim-trigger.h | 24 ++ > 4 files changed, 146 insertions(+) > create mode 100644 drivers/iio/trigger/stm32-lptimer-trigger.c > create mode 100644 include/linux/iio/timer/stm32-lptim-trigger.h > > diff --git a/drivers/iio/trigger/Kconfig b/drivers/iio/trigger/Kconfig > index e4d4e63..a633d2c 100644 > --- a/drivers/iio/trigger/Kconfig > +++ b/drivers/iio/trigger/Kconfig > @@ -24,6 +24,17 @@ config IIO_INTERRUPT_TRIGGER > To compile this driver as a module, choose M here: the > module will be called iio-trig-interrupt. > > +config IIO_STM32_LPTIMER_TRIGGER > + tristate "STM32 Low-Power Timer Trigger" > + depends on MFD_STM32_LPTIMER || COMPILE_TEST > + help > + Select this option to enable STM32 Low-Power Timer Trigger. > + This can be used as trigger source for STM32 internal ADC > + and/or DAC. > + > + To compile this driver as a module, choose M here: the > + module will be called stm32-lptimer-trigger. > + > config IIO_STM32_TIMER_TRIGGER > tristate "STM32 Timer Trigger" > depends on (ARCH_STM32 && OF && MFD_STM32_TIMERS) || COMPILE_TEST > diff --git a/drivers/iio/trigger/Makefile b/drivers/iio/trigger/Makefile > index 5c4ecd3..0a72a2a 100644 > --- a/drivers/iio/trigger/Makefile > +++ b/drivers/iio/trigger/Makefile > @@ -6,6 +6,7 @@ > > obj-$(CONFIG_IIO_HRTIMER_TRIGGER) += iio-trig-hrtimer.o > obj-$(CONFIG_IIO_INTERRUPT_TRIGGER) += iio-trig-interrupt.o > +obj-$(CONFIG_IIO_STM32_LPTIMER_TRIGGER) += stm32-lptimer-trigger.o > obj-$(CONFIG_IIO_STM32_TIMER_TRIGGER) += stm32-timer-trigger.o > obj-$(CONFIG_IIO_SYSFS_TRIGGER) += iio-trig-sysfs.o > obj-$(CONFIG_IIO_TIGHTLOOP_TRIGGER) += iio-trig-loop.o > diff --git a/drivers/iio/trigger/stm32-lptimer-trigger.c > b/drivers/iio/trigger/stm32-lptimer-trigger.c > new file mode 100644 > index 000..bcb9aa2 > --- /dev/null > +++ b/drivers/iio/trigger/stm32-lptimer-trigger.c > @@ -0,0 +1,110 @@ > +/* > + * STM32 Low-Power Timer Trigger driver > + * > + * Copyright (C) STMicroelectronics 2017 > + * > + * Author: Fabrice Gasnier . > + * > + * License terms: GNU General Public License (GPL), version 2 > + * > + * Inspired by Benjamin Gaignard's stm32-timer-trigger driver > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* List Low-Power Timer triggers */ > +static const char * const stm32_lptim_triggers[] = { > + LPTIM1_OUT, > + LPTIM2_OUT, > + LPTIM3_OUT, > +}; > + > +struct stm32_lptim_trigger { > + struct device *dev; > + const char *trg; > +}; > + > +static const struct iio_trigger_ops stm32_lptim_trigger_ops = { > + .owner = THIS_MODULE, > +}; > + > +/** > + * is_stm32_lptim_trigger > + * @trig: trigger to be checked > + * > + * return true if the trigger is a valid STM32 IIO Low-Power Timer Trigger > + * either return false > + */ > +bool is_stm32_lptim_trigger(struct iio_trigger *trig) > +{ > + return (trig->ops == _lptim_trigger_ops); > +} > +EXPORT_SYMBOL(is_stm32_lptim_trigger); > + > +static int stm32_lptim_setup_trig(struct stm32_lptim_trigger *priv) > +{ > + struct iio_trigger *trig; > + > + trig = devm_iio_trigger_alloc(priv->dev, "%s", priv->trg); > + if (!trig) > + return -ENOMEM; > + > + trig->dev.parent = priv->dev->parent; > + trig->ops = _lptim_trigger_ops; > + iio_trigger_set_drvdata(trig, priv); > + > + return devm_iio_trigger_register(priv->dev, trig); > +} > + > +static int stm32_lptim_trigger_probe(struct platform_device *pdev) > +{ > + struct stm32_lptim_trigger *priv; > + u32 index; > + int ret; > + > + priv = devm_kzalloc(>dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + if (of_property_read_u32(pdev->dev.of_node, "reg", )) > + return -EINVAL; > + > + if (index >= ARRAY_SIZE(stm32_lptim_triggers)) > + return -EINVAL; > + > + priv->dev = >dev; > + priv->trg = stm32_lptim_triggers[index]; > + > + ret = stm32_lptim_setup_trig(priv); > +
Re: [PATCH v2 5/8] dt-bindings: iio: Add STM32 LPTimer trigger binding
On Wed, 21 Jun 2017 16:30:12 +0200 Fabrice Gasnierwrote: > Add documentation for STMicroelectronics STM32 Low-Power Timer Trigger > binding. > > Signed-off-by: Fabrice Gasnier looks sensible to me. I'm kind of assuming this whole series will end up going through Lee and MFD. Acked-by: Jonathan Cameron > --- > Changes in v2: > - s/Low Power/Low-Power > - remove leading 0x in example (parent node) > - improve reg property description > --- > .../bindings/iio/timer/stm32-lptimer-trigger.txt | 23 > ++ > 1 file changed, 23 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > > diff --git > a/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > b/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > new file mode 100644 > index 000..466d99f > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > @@ -0,0 +1,23 @@ > +STMicroelectronics STM32 Low-Power Timer Trigger > + > +STM32 Low-Power Timer provides trigger source (LPTIM output) that can be used > +by STM32 internal ADC and/or DAC. > + > +Must be a sub-node of an STM32 Low-Power Timer device tree node. > +See ../mfd/stm32-lptimer.txt for details about the parent node. > + > +Required properties: > +- compatible:Must be "st,stm32-lptimer-trigger". > +- reg: Selects trigger hardware block. Must be 0, 1 or > 2 > + respectively for lptimer1, lptimer2 or lptimer3 > + trigger output. > + > +Example: > + lptimer1: lptimer@40002400 { > + compatible = "st,stm32-lptimer"; > + ... > + trigger@0 { > + compatible = "st,stm32-lptimer-trigger"; > + reg = <0>; > + }; > + };
Re: [PATCH v2 5/8] dt-bindings: iio: Add STM32 LPTimer trigger binding
On Wed, 21 Jun 2017 16:30:12 +0200 Fabrice Gasnier wrote: > Add documentation for STMicroelectronics STM32 Low-Power Timer Trigger > binding. > > Signed-off-by: Fabrice Gasnier looks sensible to me. I'm kind of assuming this whole series will end up going through Lee and MFD. Acked-by: Jonathan Cameron > --- > Changes in v2: > - s/Low Power/Low-Power > - remove leading 0x in example (parent node) > - improve reg property description > --- > .../bindings/iio/timer/stm32-lptimer-trigger.txt | 23 > ++ > 1 file changed, 23 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > > diff --git > a/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > b/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > new file mode 100644 > index 000..466d99f > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/timer/stm32-lptimer-trigger.txt > @@ -0,0 +1,23 @@ > +STMicroelectronics STM32 Low-Power Timer Trigger > + > +STM32 Low-Power Timer provides trigger source (LPTIM output) that can be used > +by STM32 internal ADC and/or DAC. > + > +Must be a sub-node of an STM32 Low-Power Timer device tree node. > +See ../mfd/stm32-lptimer.txt for details about the parent node. > + > +Required properties: > +- compatible:Must be "st,stm32-lptimer-trigger". > +- reg: Selects trigger hardware block. Must be 0, 1 or > 2 > + respectively for lptimer1, lptimer2 or lptimer3 > + trigger output. > + > +Example: > + lptimer1: lptimer@40002400 { > + compatible = "st,stm32-lptimer"; > + ... > + trigger@0 { > + compatible = "st,stm32-lptimer-trigger"; > + reg = <0>; > + }; > + };
Re: [PATCH 3/3] iio: adc: mt7622: Add compatible node for mt7622.
On Thu, 22 Jun 2017 13:44:34 +0800 Zhiyong Taowrote: > This commit adds mt7622 compatible node. > > Signed-off-by: Zhiyong Tao > --- > drivers/iio/adc/mt6577_auxadc.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index 2dd7c74..4a2cd9e 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -308,6 +308,7 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > static const struct of_device_id mt6577_auxadc_of_match[] = { > { .compatible = "mediatek,mt2701-auxadc", }, > { .compatible = "mediatek,mt8173-auxadc", }, > + { .compatible = "mediatek,mt7622-auxadc", }, Keep them in numeric order perhaps? Might become a worthwhile step if this logic gets used for lot more parts in future! Jonathan > { } > }; > MODULE_DEVICE_TABLE(of, mt6577_auxadc_of_match);
Re: [PATCH 3/3] iio: adc: mt7622: Add compatible node for mt7622.
On Thu, 22 Jun 2017 13:44:34 +0800 Zhiyong Tao wrote: > This commit adds mt7622 compatible node. > > Signed-off-by: Zhiyong Tao > --- > drivers/iio/adc/mt6577_auxadc.c |1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index 2dd7c74..4a2cd9e 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -308,6 +308,7 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > static const struct of_device_id mt6577_auxadc_of_match[] = { > { .compatible = "mediatek,mt2701-auxadc", }, > { .compatible = "mediatek,mt8173-auxadc", }, > + { .compatible = "mediatek,mt7622-auxadc", }, Keep them in numeric order perhaps? Might become a worthwhile step if this logic gets used for lot more parts in future! Jonathan > { } > }; > MODULE_DEVICE_TABLE(of, mt6577_auxadc_of_match);
Re: [PATCH 2/3] iio: adc: mt7622: add support for suspend/resume.
On Thu, 22 Jun 2017 13:44:33 +0800 Zhiyong Taowrote: > This patch supports auxadc suspend/resume flow. > Disable auxadc clk and power in suspend function. > Enable axuadc clk and power in resume function. > > Signed-off-by: Zhiyong Tao Worth handling the cases where power management is not configured into the kernel properly. So a few minor suggestions. Otherwise looks good to me. > --- > drivers/iio/adc/mt6577_auxadc.c | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index 2d104c8..2dd7c74 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -184,6 +184,37 @@ static int mt6577_auxadc_read_raw(struct iio_dev > *indio_dev, > .read_raw = _auxadc_read_raw, > }; > > +static int mt6577_auxadc_resume(struct device *dev) > +{ > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > + struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); > + int ret; > + > + ret = clk_prepare_enable(adc_dev->adc_clk); > + if (ret) { > + pr_err("failed to enable auxadc clock\n"); > + return ret; > + } > + > + mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC, > + MT6577_AUXADC_PDN_EN, 0); > + mdelay(MT6577_AUXADC_POWER_READY_MS); > + > + return 0; > +} > + > +static int mt6577_auxadc_suspend(struct device *dev) Mark these __maybe_unused for the CONFIG_PM but not CONFIG_PM_SLEEP case. > +{ > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > + struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); > + > + mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC, > + 0, MT6577_AUXADC_PDN_EN); > + clk_disable_unprepare(adc_dev->adc_clk); > + > + return 0; > +} > + > static int mt6577_auxadc_probe(struct platform_device *pdev) > { > struct mt6577_auxadc_device *adc_dev; > @@ -269,6 +300,11 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > return 0; > } > > +static const struct dev_pm_ops mt6577_auxadc_pm_ops = { > + .suspend = mt6577_auxadc_suspend, > + .resume = mt6577_auxadc_resume, > +}; > + Use the SIMPLE_SYSTEM_PM_OPS macro to make these assignments magically go away if PM_CONFIG_SLEEP is not defined. > static const struct of_device_id mt6577_auxadc_of_match[] = { > { .compatible = "mediatek,mt2701-auxadc", }, > { .compatible = "mediatek,mt8173-auxadc", }, > @@ -280,6 +316,7 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > .driver = { > .name = "mt6577-auxadc", > .of_match_table = mt6577_auxadc_of_match, > + .pm = _auxadc_pm_ops, > }, > .probe = mt6577_auxadc_probe, > .remove = mt6577_auxadc_remove,
Re: [PATCH 2/3] iio: adc: mt7622: add support for suspend/resume.
On Thu, 22 Jun 2017 13:44:33 +0800 Zhiyong Tao wrote: > This patch supports auxadc suspend/resume flow. > Disable auxadc clk and power in suspend function. > Enable axuadc clk and power in resume function. > > Signed-off-by: Zhiyong Tao Worth handling the cases where power management is not configured into the kernel properly. So a few minor suggestions. Otherwise looks good to me. > --- > drivers/iio/adc/mt6577_auxadc.c | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/drivers/iio/adc/mt6577_auxadc.c b/drivers/iio/adc/mt6577_auxadc.c > index 2d104c8..2dd7c74 100644 > --- a/drivers/iio/adc/mt6577_auxadc.c > +++ b/drivers/iio/adc/mt6577_auxadc.c > @@ -184,6 +184,37 @@ static int mt6577_auxadc_read_raw(struct iio_dev > *indio_dev, > .read_raw = _auxadc_read_raw, > }; > > +static int mt6577_auxadc_resume(struct device *dev) > +{ > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > + struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); > + int ret; > + > + ret = clk_prepare_enable(adc_dev->adc_clk); > + if (ret) { > + pr_err("failed to enable auxadc clock\n"); > + return ret; > + } > + > + mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC, > + MT6577_AUXADC_PDN_EN, 0); > + mdelay(MT6577_AUXADC_POWER_READY_MS); > + > + return 0; > +} > + > +static int mt6577_auxadc_suspend(struct device *dev) Mark these __maybe_unused for the CONFIG_PM but not CONFIG_PM_SLEEP case. > +{ > + struct iio_dev *indio_dev = dev_get_drvdata(dev); > + struct mt6577_auxadc_device *adc_dev = iio_priv(indio_dev); > + > + mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC, > + 0, MT6577_AUXADC_PDN_EN); > + clk_disable_unprepare(adc_dev->adc_clk); > + > + return 0; > +} > + > static int mt6577_auxadc_probe(struct platform_device *pdev) > { > struct mt6577_auxadc_device *adc_dev; > @@ -269,6 +300,11 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > return 0; > } > > +static const struct dev_pm_ops mt6577_auxadc_pm_ops = { > + .suspend = mt6577_auxadc_suspend, > + .resume = mt6577_auxadc_resume, > +}; > + Use the SIMPLE_SYSTEM_PM_OPS macro to make these assignments magically go away if PM_CONFIG_SLEEP is not defined. > static const struct of_device_id mt6577_auxadc_of_match[] = { > { .compatible = "mediatek,mt2701-auxadc", }, > { .compatible = "mediatek,mt8173-auxadc", }, > @@ -280,6 +316,7 @@ static int mt6577_auxadc_remove(struct platform_device > *pdev) > .driver = { > .name = "mt6577-auxadc", > .of_match_table = mt6577_auxadc_of_match, > + .pm = _auxadc_pm_ops, > }, > .probe = mt6577_auxadc_probe, > .remove = mt6577_auxadc_remove,
Re: [PATCH] iio: adc: at91-sama5d2_adc: add support for suspend/resume functionality
On Fri, 23 Jun 2017 12:25:35 +0300 Eugen Hristevwrote: > On 23.06.2017 01:07, kbuild test robot wrote: > > Hi Eugen, > > > > [auto build test ERROR on iio/togreg] > > [also build test ERROR on v4.12-rc6 next-20170622] > > [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/Eugen-Hristev/iio-adc-at91-sama5d2_adc-add-support-for-suspend-resume-functionality/20170623-043330 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg > > config: sparc64-allyesconfig (attached as .config) > > compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > > reproduce: > > wget > > https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O > > ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=sparc64 > > > > All errors (new ones prefixed by >>): > > > > drivers/iio/adc/at91-sama5d2_adc.c: In function 'at91_adc_suspend': > >>> drivers/iio/adc/at91-sama5d2_adc.c:559:9: error: implicit declaration of > >>> function 'pinctrl_pm_select_sleep_state' > >>> [-Werror=implicit-function-declaration] > > return pinctrl_pm_select_sleep_state(dev); > > ^ > Will send a revised patch to fix this warning on SPARC architecture. > > > drivers/iio/adc/at91-sama5d2_adc.c: In function 'at91_adc_resume': > >>> drivers/iio/adc/at91-sama5d2_adc.c:569:8: error: implicit declaration of > >>> function 'pinctrl_pm_select_default_state' > >>> [-Werror=implicit-function-declaration] > > ret = pinctrl_pm_select_default_state(dev); > > ^~~ > >>> drivers/iio/adc/at91-sama5d2_adc.c:589:3: error: implicit declaration of > >>> function 'at91_adc_configure_trigger' > >>> [-Werror=implicit-function-declaration] > >at91_adc_configure_trigger(st->trig, true); > >^~ > >>> drivers/iio/adc/at91-sama5d2_adc.c:589:32: error: 'struct at91_adc_state' > >>> has no member named 'trig'; did you mean 'reg'? > >at91_adc_configure_trigger(st->trig, true); > These two errors appears because this patch is on top of my other patch > for hardware trigger and buffer which is on the way upstream, and not > yet in linux-next. > Building over the tree with the included patch will work. Ah that explains the cryptic comment in the v2 of this patch. Good to have that cleared up! > > Regards, > Eugen > > ^~ > > cc1: some warnings being treated as errors > > > > vim +/pinctrl_pm_select_sleep_state +559 drivers/iio/adc/at91-sama5d2_adc.c > > > > 553 at91_adc_writel(st, AT91_SAMA5D2_CR, > > AT91_SAMA5D2_CR_SWRST); > > 554 > > 555 clk_disable_unprepare(st->per_clk); > > 556 regulator_disable(st->vref); > > 557 regulator_disable(st->reg); > > 558 > > > 559 return pinctrl_pm_select_sleep_state(dev); > > 560 } > > 561 > > 562 static int at91_adc_resume(struct device *dev) > > 563 { > > 564 struct iio_dev *indio_dev = > > 565 > > platform_get_drvdata(to_platform_device(dev)); > > 566 struct at91_adc_state *st = iio_priv(indio_dev); > > 567 int ret; > > 568 > > > 569 ret = pinctrl_pm_select_default_state(dev); > > 570 if (ret) > > 571 goto resume_failed; > > 572 > > 573 ret = regulator_enable(st->reg); > > 574 if (ret) > > 575 goto resume_failed; > > 576 > > 577 ret = regulator_enable(st->vref); > > 578 if (ret) > > 579 goto reg_disable_resume; > > 580 > > 581 ret = clk_prepare_enable(st->per_clk); > > 582 if (ret) > > 583 goto vref_disable_resume; > > 584 > > 585 at91_adc_hw_init(st); > > 586 > > 587 /* reconfiguring trigger hardware state */ > > 588 if (iio_buffer_enabled(indio_dev)) > > > 589 at91_adc_configure_trigger(st->trig, true); > > 590 > > 591 return 0; > > 592 > > > > --- > > 0-DAY kernel test infrastructureOpen Source Technology > > Center > > https://lists.01.org/pipermail/kbuild-all Intel > > Corporation > >
Re: [PATCH] iio: adc: at91-sama5d2_adc: add support for suspend/resume functionality
On Fri, 23 Jun 2017 12:25:35 +0300 Eugen Hristev wrote: > On 23.06.2017 01:07, kbuild test robot wrote: > > Hi Eugen, > > > > [auto build test ERROR on iio/togreg] > > [also build test ERROR on v4.12-rc6 next-20170622] > > [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/Eugen-Hristev/iio-adc-at91-sama5d2_adc-add-support-for-suspend-resume-functionality/20170623-043330 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg > > config: sparc64-allyesconfig (attached as .config) > > compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > > reproduce: > > wget > > https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O > > ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # save the attached .config to linux build tree > > make.cross ARCH=sparc64 > > > > All errors (new ones prefixed by >>): > > > > drivers/iio/adc/at91-sama5d2_adc.c: In function 'at91_adc_suspend': > >>> drivers/iio/adc/at91-sama5d2_adc.c:559:9: error: implicit declaration of > >>> function 'pinctrl_pm_select_sleep_state' > >>> [-Werror=implicit-function-declaration] > > return pinctrl_pm_select_sleep_state(dev); > > ^ > Will send a revised patch to fix this warning on SPARC architecture. > > > drivers/iio/adc/at91-sama5d2_adc.c: In function 'at91_adc_resume': > >>> drivers/iio/adc/at91-sama5d2_adc.c:569:8: error: implicit declaration of > >>> function 'pinctrl_pm_select_default_state' > >>> [-Werror=implicit-function-declaration] > > ret = pinctrl_pm_select_default_state(dev); > > ^~~ > >>> drivers/iio/adc/at91-sama5d2_adc.c:589:3: error: implicit declaration of > >>> function 'at91_adc_configure_trigger' > >>> [-Werror=implicit-function-declaration] > >at91_adc_configure_trigger(st->trig, true); > >^~ > >>> drivers/iio/adc/at91-sama5d2_adc.c:589:32: error: 'struct at91_adc_state' > >>> has no member named 'trig'; did you mean 'reg'? > >at91_adc_configure_trigger(st->trig, true); > These two errors appears because this patch is on top of my other patch > for hardware trigger and buffer which is on the way upstream, and not > yet in linux-next. > Building over the tree with the included patch will work. Ah that explains the cryptic comment in the v2 of this patch. Good to have that cleared up! > > Regards, > Eugen > > ^~ > > cc1: some warnings being treated as errors > > > > vim +/pinctrl_pm_select_sleep_state +559 drivers/iio/adc/at91-sama5d2_adc.c > > > > 553 at91_adc_writel(st, AT91_SAMA5D2_CR, > > AT91_SAMA5D2_CR_SWRST); > > 554 > > 555 clk_disable_unprepare(st->per_clk); > > 556 regulator_disable(st->vref); > > 557 regulator_disable(st->reg); > > 558 > > > 559 return pinctrl_pm_select_sleep_state(dev); > > 560 } > > 561 > > 562 static int at91_adc_resume(struct device *dev) > > 563 { > > 564 struct iio_dev *indio_dev = > > 565 > > platform_get_drvdata(to_platform_device(dev)); > > 566 struct at91_adc_state *st = iio_priv(indio_dev); > > 567 int ret; > > 568 > > > 569 ret = pinctrl_pm_select_default_state(dev); > > 570 if (ret) > > 571 goto resume_failed; > > 572 > > 573 ret = regulator_enable(st->reg); > > 574 if (ret) > > 575 goto resume_failed; > > 576 > > 577 ret = regulator_enable(st->vref); > > 578 if (ret) > > 579 goto reg_disable_resume; > > 580 > > 581 ret = clk_prepare_enable(st->per_clk); > > 582 if (ret) > > 583 goto vref_disable_resume; > > 584 > > 585 at91_adc_hw_init(st); > > 586 > > 587 /* reconfiguring trigger hardware state */ > > 588 if (iio_buffer_enabled(indio_dev)) > > > 589 at91_adc_configure_trigger(st->trig, true); > > 590 > > 591 return 0; > > 592 > > > > --- > > 0-DAY kernel test infrastructureOpen Source Technology > > Center > > https://lists.01.org/pipermail/kbuild-all Intel > > Corporation > >