Re: [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
>> - trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu ts:%ld.%09ld", >> + trace_seq_printf(s, "#%-5u inner/outer(us): %4llu/%-5llu >> ts:%lld.%09ld", >>field->seqnum, >>field->duration, >>field->outer_duration,

Re: [PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Steven Rostedt
On Fri, 7 Apr 2017 17:57:00 -0700 Deepa Dinamani wrote: > struct timespec is not y2038 safe on 32 bit machines > and needs to be replaced by struct timespec64 > in order to represent times beyond year 2038 on such > machines. > > Fix all the timestamp representation in struct trace_hwlat > and

[PATCH 12/12] time: Delete current_fs_time() function

2017-04-07 Thread Deepa Dinamani
All uses of the current_fs_time() function have been replaced by other time interfaces. And, its use cases can be fulfilled by current_time() or ktime_get_* variants. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann --- include/linux/fs.h | 1 - kernel/time/time.c | 14 --

[PATCH 07/12] fs: btrfs: Use ktime_get_real_ts for root ctime

2017-04-07 Thread Deepa Dinamani
btrfs_root_item maintains the ctime for root updates. This is not part of vfs_inode. Since current_time() uses struct inode* as an argument as Linus suggested, this cannot be used to update root times unless, we modify the signature to use inode. Since btrfs uses nanosecond time granularity, it c

[PATCH 11/12] time: Delete CURRENT_TIME_SEC and CURRENT_TIME

2017-04-07 Thread Deepa Dinamani
All uses of CURRENT_TIME_SEC and CURRENT_TIME macros have been replaced by other time functions. These macros are also not y2038 safe. And, all their use cases can be fulfilled by y2038 safe ktime_get_* variants. Signed-off-by: Deepa Dinamani Acked-by: John Stultz Reviewed-by: Arnd Bergmann ---

[PATCH 10/12] apparmorfs: Replace CURRENT_TIME with current_time()

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time(). This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. current_time() is also planned to be transitioned

[PATCH 03/12] fs: cifs: Replace CURRENT_TIME by other appropriate apis

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time() for filesystem times, and ktime_get_* functions for authentication timestamps and timezone calculations. This is also in preparation for the patch that transitions vfs timesta

[PATCH 09/12] lustre: Replace CURRENT_TIME macro

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time() for filesystem times, and ktime_get_* functions for others. struct timespec is also not y2038 safe. Retain timespec for timestamp representation here as lustre uses it interna

[PATCH 08/12] fs: ubifs: Replace CURRENT_TIME_SEC with current_time

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME_SEC is not y2038 safe. current_time() will be transitioned to use 64 bit time along with vfs in a separate patch. There is no plan to transition CURRENT_TIME_SEC to use y2038 safe time interfaces. current_time() returns timestamps according to the granularities set in the inode's supe

[PATCH 05/12] fs: ufs: Use ktime_get_real_ts64() for birthtime

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. Replace it with ktime_get_real_ts64(). Inode time formats are already 64 bit long and accommodates time64_t. Signed-off-by: Deepa Dinamani --- fs/ufs/ialloc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc

[PATCH 04/12] fs: ceph: CURRENT_TIME with ktime_get_real_ts()

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME is not y2038 safe. The macro will be deleted and all the references to it will be replaced by ktime_get_* apis. struct timespec is also not y2038 safe. Retain timespec for timestamp representation here as ceph uses it internally everywhere. These references will be changed to use stru

[PATCH 06/12] audit: Use timespec64 to represent audit timestamps

2017-04-07 Thread Deepa Dinamani
struct timespec is not y2038 safe. Audit timestamps are recorded in string format into an audit buffer for a given context. These mark the entry timestamps for the syscalls. Use y2038 safe struct timespec64 to represent the times. The log strings can handle this transition as strings can hold upto

[PATCH 02/12] trace: Make trace_hwlat timestamp y2038 safe

2017-04-07 Thread Deepa Dinamani
struct timespec is not y2038 safe on 32 bit machines and needs to be replaced by struct timespec64 in order to represent times beyond year 2038 on such machines. Fix all the timestamp representation in struct trace_hwlat and all the corresponding implementations. Signed-off-by: Deepa Dinamani --

[PATCH 00/12] Delete CURRENT_TIME, CURRENT_TIME_SEC and current_fs_time

2017-04-07 Thread Deepa Dinamani
The series contains the last unmerged uses of CURRENT_TIME, CURRENT_TIME_SEC, and current_fs_time(). The series also deletes these apis. All the patches except [PATCH 9/12] and [PATCH 10/12] are resend patches. These patches fix new instances of CURRENT_TIME. cifs and ceph patches have been squash

[PATCH 01/12] fs: f2fs: Use ktime_get_real_seconds for sit_info times

2017-04-07 Thread Deepa Dinamani
CURRENT_TIME_SEC is not y2038 safe. Replace use of CURRENT_TIME_SEC with ktime_get_real_seconds in segment timestamps used by GC algorithm including the segment mtime timestamps. Signed-off-by: Deepa Dinamani Reviewed-by: Arnd Bergmann --- fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 5 +++--

[PATCH] staging: wilc1000: fix incorrect strncasecmp length

2017-04-07 Thread Colin King
From: Colin Ian King The strncasecmp of buff against the literal string RSSI is using variable length which is zero. This should be instead using the variable size instead. Also remove the redundant variable length. Detected by PVS-Studio, warning: V575 Signed-off-by: Colin Ian King --- driv

RE: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush

2017-04-07 Thread Jork Loeser
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, April 7, 2017 04:27 > To: de...@linuxdriverproject.org; x...@kernel.org > Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H.

RE: [PATCH 4/7] x86/hyperv: implement rep hypercalls

2017-04-07 Thread Jork Loeser
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, April 7, 2017 04:27 > To: de...@linuxdriverproject.org; x...@kernel.org > Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H.

RE: [PATCH 2/7] x86/hyper-v: fast hypercall implementation

2017-04-07 Thread Jork Loeser
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, April 7, 2017 04:27 > To: de...@linuxdriverproject.org; x...@kernel.org > Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H.

RE: [PATCH 1/7] x86/hyperv: make hv_do_hypercall() inline

2017-04-07 Thread Jork Loeser
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Friday, April 7, 2017 04:27 > To: de...@linuxdriverproject.org; x...@kernel.org > Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang ; Stephen Hemminger > ; Thomas Gleixner ; Ingo > Molnar ; H.

Re: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock when spliting large pages

2017-04-07 Thread Brijesh Singh
On 04/07/2017 06:33 AM, Borislav Petkov wrote: On Thu, Apr 06, 2017 at 01:37:41PM -0500, Brijesh Singh wrote: I did thought about prot idea but ran into another corner case which may require us changing the signature of phys_pud_init and phys_pmd_init. The paddr_start and paddr_end args into k

Re: [PATCH 7/7] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-04-07 Thread Steven Rostedt
On Fri, 7 Apr 2017 13:27:01 +0200 Vitaly Kuznetsov wrote: > Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). > Tracing is done the same way we do xen_mmu_flush_tlb_others(). > > Signed-off-by: Vitaly Kuznetsov > --- > MAINTAINERS | 1 + > arch/x86/hype

Re: [PATCH 1/3] staging: atomisp: remove enable_isp_irq function and add disable_isp_irq

2017-04-07 Thread Alan Cox
On Fri, 2017-04-07 at 14:56 +0900, Daeseok Youn wrote: > Enable/Disable ISP irq is switched with "enable" parameter of > enable_isp_irq(). It would be better splited to two such as > enable_isp_irq()/disable_isp_irq(). > > But the enable_isp_irq() is no use in atomisp_cmd.c file. > So remove the e

[PATCH 09/11] staging: most: usb: fix calculation of the extra_len

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov The final size of the buffer used for the streaming transfer consists of the size for the user payload (buffer_size) and the size for the gaps needed by the controller (extra_len). The current implementation of the hdm_configure_channel() corrects the buffer size down to th

[PATCH 11/11] staging: most: usb: pass correct register table

2017-04-07 Thread Christian Gromm
Inside the function store_value() the table of writable registers need to be passed to function get_static_reg_addr() or else the correct register address is never going to be found. Reported-by: Alex Riesen Signed-off-by: Christian Gromm --- drivers/staging/most/hdm-usb/hdm_usb.c | 2 +- 1 fil

[PATCH 07/11] staging: most: consolidate attributes for list of links

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov This patch replaces three temporary variables representing the attributes to control the links between the AIMs and HDMs with an array of three elements to keep the corresponding code compact. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm --- drivers/stag

[PATCH 01/11] staging: most: fix comment of the function add_link_store

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov This patch replaces the name store_add_link by the add_link_store in the comment for the corresponding function. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 03/11] staging: most: core: fix function names

2017-04-07 Thread Christian Gromm
This patch fixes the names of the show/store functions to match the naming convention. Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c | 68 +--- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/drivers/staging/most/mostcore/

[PATCH 05/11] staging: most: core: consolidate channel attributes

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov This patch replaces 13 temporary variables representing the attributes to control the channel with an array of 13 elements to keep the corresponding code compact. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c | 61

[PATCH 10/11] staging: most: usb: fix size overflow

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov Despite the user payload may not be bigger than (2**16 - 1) bytes, the final packet size may be bigger because of the gap space needed for the controller. This patch removes the temporary variables of the type u16 that are used to hold the offsets that may be bigger than 2*

[PATCH 08/11] staging: most: destroy cdev when channel gets disconnected

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov When a channel is being removed while an application holds the corresponding character device, this device is going to be destroyed only after the application closes the file descriptor and releases character device. In case the channel appears again before the application c

[PATCH 02/11] staging: most: fix comment of the function remove_link_store

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov This patch replaces the name store_remove_link by the remove_link_store in the comment for the corresponding function. Signed-off-by: Andrey Shvetsov Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 04/11] staging: most: core: make use of __ATTR_* macros

2017-04-07 Thread Christian Gromm
This patch replaces the proprietary macros with those provided by the kernel. Signed-off-by: Christian Gromm --- drivers/staging/most/mostcore/core.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/m

[PATCH 06/11] staging: most: core: separate property showing links

2017-04-07 Thread Christian Gromm
From: Andrey Shvetsov Currently an AIM has the following properties available to manage links: - write-only "remove_link" used to remove a link from a list - read/write "add_link" used to add a link to a list and display them This patch transfers the read functionality of "add_link" to the n

[PATCH] staging wlan-ng: mark PDA buf as __le16

2017-04-07 Thread Maciek Borzecki
PDA buffer contains little-endian data, clearly mark it as such. Fixes sparse warnings: drivers/staging/wlan-ng/hfa384x_usb.c:2359:34: warning: cast to restricted __le16 drivers/staging/wlan-ng/hfa384x_usb.c:2360:35: warning: cast to restricted __le16 drivers/staging/wlan-ng/hfa384x_usb.c:

[PATCH] add blank line after declarations

2017-04-07 Thread Manny Vindiola
Add blank line after variable declarations as part of checkpatch.pl style fixup. Signed-off-by: Manny Vindiola --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c b/drivers/stag

[PATCH] staging: wilc1000: Update handler assignment logic

2017-04-07 Thread Aditya Shankar
With this update, the host driver is consistent with the implementation on the firmware side with respect to obtaining the driver handler for all modes. With this new format, the calls to set the wilc operation mode is simplified. Signed-off-by: Aditya Shankar --- drivers/staging/wilc1000/host_i

[PATCH] staging: wilc1000: Use new format for configuring firmware

2017-04-07 Thread Aditya Shankar
The configuration packet format has changed in the newer wilc firmware versions 14.2 and up. This update ensures that the firmware is initialized correctly by the host and configured in the required mode. Signed-off-by: Aditya Shankar --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 59 +++

[PATCH] staging: wilc1000: Fix problem with wrong vif index

2017-04-07 Thread Aditya Shankar
The vif->idx value is always 0 for two interfaces. wl->vif_num = 0; loop { ... vif->idx = wl->vif_num; ... wl->vif_num = i; i++; ... } At present, vif->idx is assigned the value of wl->vif_num at the beginning of this block and device is initialized base

Re: [RFC PATCH v2 14/32] x86: mm: Provide support to use memblock when spliting large pages

2017-04-07 Thread Borislav Petkov
On Thu, Apr 06, 2017 at 01:37:41PM -0500, Brijesh Singh wrote: > I did thought about prot idea but ran into another corner case which may > require > us changing the signature of phys_pud_init and phys_pmd_init. The paddr_start > and paddr_end args into kernel_physical_mapping_init() should be ali

[PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and hypercall improvements

2017-04-07 Thread Vitaly Kuznetsov
Hi, Hyper-V supports hypercalls for doing local and remote TLB flushing and gives its guests hints when using hypercall is preferred. While doing hypercalls for local TLB flushes is probably not practical (and is not being suggested by modern Hyper-V versions) remote TLB flush with a hypercall bri

[PATCH 4/7] x86/hyperv: implement rep hypercalls

2017-04-07 Thread Vitaly Kuznetsov
Rep hypercalls are normal hypercalls which perform multiple actions at once. Hyper-V guarantees to return exectution to the caller in not more than 50us and the caller needs to use hypercall continuation. Touch NMI watchdog between hypercall invocations. This is going to be used for HvFlushVirtual

[PATCH 1/7] x86/hyperv: make hv_do_hypercall() inline

2017-04-07 Thread Vitaly Kuznetsov
We have only three call sites for hv_do_hypercall() and we're going to change HVCALL_SIGNAL_EVENT to doing fast hypercall so we can inline this function for optimization. Hyper-V top level functional specification states that r9-r11 registers and flags may be clobbered by the hypervisor during hyp

[PATCH 2/7] x86/hyper-v: fast hypercall implementation

2017-04-07 Thread Vitaly Kuznetsov
Hyper-V supports 'fast' hypercalls when all parameters are passed through registers. Implement an inline version of a simpliest of these calls: hypercall with one 8-byte input and no output. Proper hypercall input interface (struct hv_hypercall_input) definition is added as well. Signed-off-by: V

[PATCH 5/7] hyper-v: globalize vp_index

2017-04-07 Thread Vitaly Kuznetsov
To support implementing remote TLB flushing on Hyper-V with a hypercall we need to make vp_index available outside of vmbus module. Rename and globalize. Signed-off-by: Vitaly Kuznetsov --- arch/x86/hyperv/hv_init.c | 34 +- arch/x86/include/asm/mshyperv.h |

[PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush

2017-04-07 Thread Vitaly Kuznetsov
Hyper-V host can suggest us to use hypercall for doing remote TLB flush, this is supposed to work faster than IPIs. Implementation details: to do HvFlushVirtualAddress{Space,List} hypercalls we need to put the input somewhere in memory and we don't really want to have memory allocation on each cal

[PATCH 7/7] tracing/hyper-v: trace hyperv_mmu_flush_tlb_others()

2017-04-07 Thread Vitaly Kuznetsov
Add Hyper-V tracing subsystem and trace hyperv_mmu_flush_tlb_others(). Tracing is done the same way we do xen_mmu_flush_tlb_others(). Signed-off-by: Vitaly Kuznetsov --- MAINTAINERS | 1 + arch/x86/hyperv/mmu.c | 6 ++ include/trace/events/hyperv.h | 30 ++

[PATCH 3/7] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT

2017-04-07 Thread Vitaly Kuznetsov
We need to pass only 8 bytes of input for HvSignalEvent which makes it a perfect fit for fast hypercall. hv_input_signal_event_buffer is not needed any more and hv_input_signal_event is converted to union for convenience. Signed-off-by: Vitaly Kuznetsov --- drivers/hv/channel_mgmt.c | 15 +--