[PATCH v4 13/20] mm: Introduce __page_add_new_anon_rmap()

2017-10-09 Thread Laurent Dufour
When dealing with speculative page fault handler, we may race with VMA being split or merged. In this case the vma->vm_start and vm->vm_end fields may not match the address the page fault is occurring. This can only happens when the VMA is split but in that case, the anon_vma pointer of the new VM

[PATCH v4 02/20] mm: Prepare for FAULT_FLAG_SPECULATIVE

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra When speculating faults (without holding mmap_sem) we need to validate that the vma against which we loaded pages is still valid when we're ready to install the new PTE. Therefore, replace the pte_offset_map_lock() calls that (re)take the PTL with pte_map_lock() which can fa

[PATCH v4 08/20] mm: Protect SPF handler against anon_vma changes

2017-10-09 Thread Laurent Dufour
The speculative page fault handler must be protected against anon_vma changes. This is because page_add_new_anon_rmap() is called during the speculative path. In addition, don't try speculative page fault if the VMA don't have an anon_vma structure allocated because its allocation should be protec

[PATCH v4 07/20] mm: Cache some VMA fields in the vm_fault structure

2017-10-09 Thread Laurent Dufour
When handling speculative page fault, the vma->vm_flags and vma->vm_page_prot fields are read once the page table lock is released. So there is no more guarantee that these fields would not change in our back. They will be saved in the vm_fault structure before the VMA is checked for changes. This

[PATCH v4 03/20] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2017-10-09 Thread Laurent Dufour
When handling page fault without holding the mmap_sem the fetch of the pte lock pointer and the locking will have to be done while ensuring that the VMA is not touched in our back. So move the fetch and locking operations in a dedicated function. Signed-off-by: Laurent Dufour --- mm/memory.c |

[PATCH v4 16/20] mm: Adding speculative page fault failure trace events

2017-10-09 Thread Laurent Dufour
This patch a set of new trace events to collect the speculative page fault event failures. Signed-off-by: Laurent Dufour --- include/trace/events/pagefault.h | 87 mm/memory.c | 59 ++- 2 files changed, 135 ins

[PATCH v4 19/20] x86/mm: Add speculative pagefault handling

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra Try a speculative fault before acquiring mmap_sem, if it returns with VM_FAULT_RETRY continue with the mmap_sem acquisition and do the traditional fault. Signed-off-by: Peter Zijlstra (Intel) [Clearing of FAULT_FLAG_ALLOW_RETRY is now done in handle_speculative_fault()] [

[PATCH v4 17/20] perf: Add a speculative page fault sw event

2017-10-09 Thread Laurent Dufour
Add a new software event to count succeeded speculative page faults. Signed-off-by: Laurent Dufour --- include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 140ae638cfd6..101e509ee39b 100644 ---

[PATCH v4 14/20] mm: Provide speculative fault infrastructure

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra Provide infrastructure to do a speculative fault (not holding mmap_sem). The not holding of mmap_sem means we can race against VMA change/removal and page-table destruction. We use the SRCU VMA freeing to keep the VMA around. We use the VMA seqcount to detect change (includi

[PATCH v4 18/20] perf tools: Add support for the SPF perf event

2017-10-09 Thread Laurent Dufour
Add support for the new speculative faults event. Signed-off-by: Laurent Dufour --- tools/include/uapi/linux/perf_event.h | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/parse-events.c| 4 tools/perf/util/parse-events.l| 1 + tools/perf/util/python.c

[PATCH v4 20/20] powerpc/mm: Add speculative page fault

2017-10-09 Thread Laurent Dufour
This patch enable the speculative page fault on the PowerPC architecture. This will try a speculative page fault without holding the mmap_sem, if it returns with VM_FAULT_RETRY, the mmap_sem is acquired and the traditional page fault processing is done. Support is only provide for BOOK3S_64 curre

[PATCH v4 11/20] mm: Introduce __maybe_mkwrite()

2017-10-09 Thread Laurent Dufour
The current maybe_mkwrite() is getting passed the pointer to the vma structure to fetch the vm_flags field. When dealing with the speculative page fault handler, it will be better to rely on the cached vm_flags value stored in the vm_fault structure. This patch introduce a __maybe_mkwrite() servi

[PATCH v4 10/20] mm: Introduce __lru_cache_add_active_or_unevictable

2017-10-09 Thread Laurent Dufour
The speculative page fault handler which is run without holding the mmap_sem is calling lru_cache_add_active_or_unevictable() but the vm_flags is not guaranteed to remain constant. Introducing __lru_cache_add_active_or_unevictable() which has the vma flags value parameter instead of the vma pointer

[PATCH v4 12/20] mm: Introduce __vm_normal_page()

2017-10-09 Thread Laurent Dufour
When dealing with the speculative fault path we should use the VMA's field cached value stored in the vm_fault structure. Currently vm_normal_page() is using the pointer to the VMA to fetch the vm_flags value. This patch provides a new __vm_normal_page() which is receiving the vm_flags flags value

[PATCH v4 15/20] mm: Try spin lock in speculative path

2017-10-09 Thread Laurent Dufour
There is a deadlock when a CPU is doing a speculative page fault and another one is calling do_unmap(). The deadlock occurred because the speculative path try to spinlock the pte while the interrupt are disabled. When the other CPU in the unmap's path has locked the pte then is waiting for all the

[PATCH v4 09/20] mm/migrate: Pass vm_fault pointer to migrate_misplaced_page()

2017-10-09 Thread Laurent Dufour
migrate_misplaced_page() is only called during the page fault handling so it's better to pass the pointer to the struct vm_fault instead of the vma. This way during the speculative page fault path the saved vma->vm_flags could be used. Signed-off-by: Laurent Dufour --- include/linux/migrate.h |

[PATCH v4 05/20] mm: Protect VMA modifications using VMA sequence count

2017-10-09 Thread Laurent Dufour
The VMA sequence count has been introduced to allow fast detection of VMA modification when running a page fault handler without holding the mmap_sem. This patch provides protection against the VMA modification done in : - madvise() - mremap() - mpol_rebind_policy()

[PATCH v4 06/20] mm: RCU free VMAs

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra Manage the VMAs with SRCU such that we can do a lockless VMA lookup. We put the fput(vma->vm_file) in the SRCU callback, this keeps files valid during speculative faults, this is possible due to the delayed fput work by Al Viro -- do we need srcu_barrier() in unmount somepla

[PATCH v4 04/20] mm: VMA sequence count

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra Wrap the VMA modifications (vma_adjust/unmap_page_range) with sequence counts such that we can easily test if a VMA is changed. The unmap_page_range() one allows us to make assumptions about page-tables; when we find the seqcount hasn't changed we can assume page-tables are

[PATCH v4 01/20] mm: Dont assume page-table invariance during faults

2017-10-09 Thread Laurent Dufour
From: Peter Zijlstra One of the side effects of speculating on faults (without holding mmap_sem) is that we can race with free_pgtables() and therefore we cannot assume the page-tables will stick around. Remove the reliance on the pte pointer. Signed-off-by: Peter Zijlstra (Intel) [Remove onl

[PATCH v4 00/20] Speculative page faults

2017-10-09 Thread Laurent Dufour
This is a port on kernel 4.14 of the work done by Peter Zijlstra to handle page fault without holding the mm semaphore [1]. The idea is to try to handle user space page faults without holding the mmap_sem. This should allow better concurrency for massively threaded process since the page fault han

Re: [PATCH V5 6/7] blk-mq-sched: improve dispatching from sw queue

2017-10-09 Thread Ming Lei
On Tue, Oct 03, 2017 at 02:05:27AM -0700, Christoph Hellwig wrote: > On Sat, Sep 30, 2017 at 06:27:19PM +0800, Ming Lei wrote: > > SCSI devices use host-wide tagset, and the shared > > driver tag space is often quite big. Meantime > > there is also queue depth for each lun(.cmd_per_lun), > > which

[PATCH 0/2] pinctrl: meson: prepare for new SoC

2017-10-09 Thread Jerome Brunet
The goal of this patchset is to prepare meson pinctrl driver to add a new meson SoC support. This new SoC will share the same pinconf/gpio registers but the pinmux part will be slightly different. First patch allows to compile and ship only the necessary pinctrl drivers, depending on the architect

[PATCH 2/2] pinctrl: meson: rework pinmux ops

2017-10-09 Thread Jerome Brunet
This change prepare the introduction of new meson SoC. This new SoC will share the same gpio/pinconf registers but the pinmux part will be different. While the format of the data associated with each pinmux group will change, the way to handle pinmuxing will be similar. To deal with this new situa

[PATCH 1/2] pinctrl: meson: separate soc drivers

2017-10-09 Thread Jerome Brunet
When meson pinctrl is enabled, all meson platforms pinctrl drivers are built in the kernel, with a significant amount of data. This leads to situation where pinctrl drivers targeting an architecture are also compiled and shipped on another one (ex: meson8 - ARM - compiled and shipped on ARM64 buil

Re: [PATCH] intel-oaktrail: Clean up dead code

2017-10-09 Thread Andy Shevchenko
On Mon, Oct 9, 2017 at 1:57 AM, Christos Gkekas wrote: > A couple of macros are unused and need to be removed. > Also variable percent is unsigned so checking whether it is less than > zero is redundant. > -#define OT_EC_CAMERA_MASK (1 << 0) > #define OT_EC_BT_MASK (1 << 1) > #def

Re: [PATCH] perf tools: unbreak perf record for arm/arm64

2017-10-09 Thread Will Deacon
On Fri, Oct 06, 2017 at 07:38:22PM +0100, Mark Rutland wrote: > Currently, perf record is broken on arm/arm64 systems when the PMU is > specified explicitly as part of the event, e.g. > > $ ./perf record -e armv8_cortex_a53/cpu_cycles/u true > > In such cases, perf record fails to open events unl

Re: [PATCH] dt-bindings: pinctrl: Move mcp23s08 from gpio

2017-10-09 Thread Sebastian Reichel
Hi, On Thu, Oct 05, 2017 at 09:50:02AM +0200, Lars Poeschel wrote: > The mcp23s08 driver was moved from gpio to pinctrl. This moves it's > devicetree binding doc as well. So driver and binding doc are in sync > again. > > Signed-off-by: Lars Poeschel > --- > .../bindings/{gpio/gpio-mcp23s08.txt

Re: [PATCH] dt-bindings: pinctrl: Move mcp23s08 from gpio

2017-10-09 Thread Sebastian Reichel
Hi, On Mon, Oct 09, 2017 at 11:39:02AM +0200, Lars Poeschel wrote: > On Sun, Oct 8, 2017 at 01:58:52 CEST Linus Walleij wrote: > > CCing-in Sebastian Reichel who did the move to pinctrl and pinctrl support as > well. > > > On Thu, Oct 5, 2017 at 9:50 AM, Lars Poeschel wrote: > > > The mcp23s08

[PATCH V2] writeback: merge try_to_writeback_inodes_sb_nr() into caller

2017-10-09 Thread Rakesh Pandit
Since commit 925a6efb8ff0c ("Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc") this function hasn't been used outside so stop exporting it. In addition we merge it into try_to_writeback_inodes_sb() which is the only caller. Also change return type of try_to_writeback_inodes_sb t

Re: [PATCH V5 7/7] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-10-09 Thread Ming Lei
On Tue, Oct 03, 2017 at 02:11:28AM -0700, Christoph Hellwig wrote: > This looks good in general: > > Reviewed-by: Christoph Hellwig > > Minor nitpicks below: > > > const bool has_sched_dispatch = e && e->type->ops.mq.dispatch_request; > > This is now only tested once, so you can remove the

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Johan Hovold
On Sat, Oct 07, 2017 at 05:56:17PM +0900, Jaejoong Kim wrote: > Hi > > 2017-10-04 18:01 GMT+09:00 Johan Hovold : > > A clean-up patch removing removing two redundant NULL-checks from the >^^ > The word 'removing' was written twice. :) Thanks for not

Re: [PATCH] Fix mpage_writepage() for pages with buffers

2017-10-09 Thread Johannes Thumshirn
Acked-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key f

Re: [PATCH] mm/page-writeback.c: fix bug caused by disable periodic writeback

2017-10-09 Thread Yafang Shao
2017-10-09 17:56 GMT+08:00 Jan Kara : > On Sat 07-10-17 06:58:04, Yafang Shao wrote: >> After disable periodic writeback by writing 0 to >> dirty_writeback_centisecs, the handler wb_workfn() will not be >> entered again until the dirty background limit reaches or >> sync syscall is executed or no e

Re: [lockdep] b09be676e0 BUG: unable to handle kernel NULL pointer dereference at 000001f2

2017-10-09 Thread Peter Zijlstra
> Fengguang, if you're still listening, could you please rerun the tests > on top of ce07a9415f26, with the attached patches also applied? Ping!? it would be very good to get feedback on this asap. > From e7840ad76515f0b5061fcdd098b57b7c01b61482 Mon Sep 17 00:00:00 2001 > Message-Id: > > From:

Re: [PATCH] perf tools: unbreak perf record for arm/arm64

2017-10-09 Thread Mark Rutland
On Mon, Oct 09, 2017 at 11:22:00AM +0100, Will Deacon wrote: > It sucks that we haven't noticed this being broken for so long, but I can > confirm that this fixes the issue: > > Acked-by: Will Deacon > Tested-by Will Deacon Cheers. > Any chance we can get this into 4.14? You'll probably need t

Re: [PATCH] KVM: remove printing of token address

2017-10-09 Thread Paolo Bonzini
On 09/10/2017 12:04, Tobin C. Harding wrote: > On Mon, Oct 09, 2017 at 03:49:38AM -0400, Paolo Bonzini wrote: >> >> >> - Original Message - >>> From: "Tobin C. Harding" >>> To: "Paolo Bonzini" , rkrc...@redhat.com >>> Cc: k...@vger.kernel.org, linux-kernel@vger.kernel.org, "Tobin C. Hardin

Re: usb/sound/line6: trying to register non-static key in podhd_disconnect

2017-10-09 Thread Andrey Konovalov
On Tue, Oct 3, 2017 at 9:41 AM, Takashi Iwai wrote: > On Mon, 25 Sep 2017 14:40:08 +0200, > Andrey Konovalov wrote: >> >> Hi! >> >> I've got the following report while fuzzing the kernel with syzkaller. >> >> On commit e19b205be43d11bff638cad4487008c48d21c103 (4.14-rc2). >> >> INFO: trying to regi

[PATCH v2 1/2] KVM: X86: Processor States following Reset or INIT

2017-10-09 Thread Wanpeng Li
From: Wanpeng Li - XCR0 is zeroed by RESET but not INIT - XSS is zeroed by both RESET and INIT - BNDCFGU, BND0-BND3, BNDCFGS are zeroed by both RESET and INIT This patch does this according to SDM. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li --- v1 -> v2: *

[PATCH v2 2/2] KVM: VMX: Don't expose unrestricted_guest is enabled if ept is disabled

2017-10-09 Thread Wanpeng Li
From: Wanpeng Li SDM mentioned: "If either the “unrestricted guest” VM-execution control or the “mode-based execute control for EPT” VM- execution control is 1, the “enable EPT” VM-execution control must also be 1." However, we can still observe unrestricted_guest is Y after inserting t

Re: [PATCH] mm/page-writeback.c: fix bug caused by disable periodic writeback

2017-10-09 Thread Jan Kara
On Mon 09-10-17 18:44:23, Yafang Shao wrote: > 2017-10-09 17:56 GMT+08:00 Jan Kara : > > On Sat 07-10-17 06:58:04, Yafang Shao wrote: > >> After disable periodic writeback by writing 0 to > >> dirty_writeback_centisecs, the handler wb_workfn() will not be > >> entered again until the dirty backgrou

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Andrey Konovalov
On Wed, Oct 4, 2017 at 11:01 AM, Johan Hovold wrote: > A clean-up patch removing removing two redundant NULL-checks from the > console disconnect handler inadvertently also removed a third check. > This could lead to the struct usb_serial being prematurely freed by the > console code when a driver

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Johan Hovold
On Mon, Oct 09, 2017 at 01:05:30PM +0200, Andrey Konovalov wrote: > On Wed, Oct 4, 2017 at 11:01 AM, Johan Hovold wrote: > > A clean-up patch removing removing two redundant NULL-checks from the > > console disconnect handler inadvertently also removed a third check. > > This could lead to the str

[PATCH BUGFIX] block, bfq: fix bug related to the burst_size counter

2017-10-09 Thread Paolo Valente
Hi Jens, unfortunately, the patch "block, bfq: decrease burst size when queues in burst exit", queued for 4.15 [1] introduces a bug, described in detail in the commit message of this patch. If triggered, this bug may cause loss of control on I/O-request service order. Please queue this fix right a

[PATCH BUGFIX] block, bfq: fix unbalanced decrements of burst size

2017-10-09 Thread Paolo Valente
The commit "block, bfq: decrease burst size when queues in burst exit" introduced the decrement of burst_size on the removal of a bfq_queue from the burst list. Unfortunately, this decrement can happen to be performed even when burst size is already equal to 0, because of unbalanced decrements. A d

[PATCH v5] crypto: s5p-sss: Add HASH support for Exynos

2017-10-09 Thread Kamil Konieczny
Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. It uses the crypto framework asynchronous hash api. It is based on omap-sham.c driver. S5P has some HW differencies and is not implemented. Modifications in s5p-sss: - Add hash supporting structures and functions. - Modify irq hand

Re: [PATCH 1/3] backlight: tdo24m: fix the spi cs between transfers

2017-10-09 Thread Daniel Thompson
On 06/10/17 20:58, Robert Jarzmik wrote: Currently the LCD display (TD035S) on the cm-x300 platform is broken and remains blank. The TD0245S specification requires that the chipselect is toggled between commands sent to the panel. This was also the purpose of the former patch of commit f64dcac0b

Re: usb/misc/ims-pcu: slab-out-of-bounds in ims_pcu_parse_cdc_data

2017-10-09 Thread Andrey Konovalov
On Sat, Oct 7, 2017 at 8:14 PM, Dmitry Torokhov wrote: > On Thu, Sep 28, 2017 at 01:35:51PM +0200, Andrey Konovalov wrote: >> Hi! >> >> I've got the following report while fuzzing the kernel with syzkaller. >> >> On commit dc972a67cc54585bd83ad811c4e9b6ab3dcd427e (4.14-rc2+). >> >> There's no chec

Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-10-09 Thread Martijn Coenen
On Fri, Sep 1, 2017 at 9:24 AM, Greg KH wrote: > > I've now applied patches 1, 2, 7, 9, 11, and 12 from this series to my > tree, so feel free to rebase on it for the next round of these patches. Thanks Greg. You should also be able to apply patch 10 from this series ("ANDROID: binder: call poll_

[PATCH V6 2/5] blk-mq-sched: move actual dispatching into one helper

2017-10-09 Thread Ming Lei
So that it becomes easy to support to dispatch from sw queue in the following patch. No functional change. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Suggested-by: Christoph Hellwig # for simplifying dispatch logic Signed-off-by: Ming Lei --- block/blk-mq-sched.c | 43 ++

[PATCH V6 1/5] blk-mq-sched: fix scheduler bad performance

2017-10-09 Thread Ming Lei
When hw queue is busy, we shouldn't take requests from scheduler queue any more, otherwise it is difficult to do IO merge. This patch fixes the awful IO performance on some SCSI devices(lpfc, qla2xxx, ...) when mq-deadline/kyber is used by not taking requests if hw queue is busy. Reviewed-by: Bar

[PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-09 Thread Ming Lei
SCSI devices use host-wide tagset, and the shared driver tag space is often quite big. Meantime there is also queue depth for each lun( .cmd_per_lun), which is often small, for example, on both lpfc and qla2xxx, .cmd_per_lun is just 3. So lots of requests may stay in sw queue, and we always flush

[PATCH V6 3/5] sbitmap: introduce __sbitmap_for_each_set()

2017-10-09 Thread Ming Lei
We need to iterate ctx starting from any ctx in round robin way, so introduce this helper. Cc: Omar Sandoval Signed-off-by: Ming Lei --- include/linux/sbitmap.h | 64 - 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/include/linux/

[PATCH V6 5/5] blk-mq-sched: don't dequeue request until all in ->dispatch are flushed

2017-10-09 Thread Ming Lei
During dispatching, we moved all requests from hctx->dispatch to one temporary list, then dispatch them one by one from this list. Unfortunately during this period, run queue from other contexts may think the queue is idle, then start to dequeue from sw/scheduler queue and still try to dispatch bec

[PATCH V6 0/5] blk-mq-sched: improve sequential I/O performance

2017-10-09 Thread Ming Lei
Hi Jens, In Red Hat internal storage test wrt. blk-mq scheduler, we found that I/O performance is much bad with mq-deadline, especially about sequential I/O on some multi-queue SCSI devcies(lpfc, qla2xxx, SRP...) Turns out one big issue causes the performance regression: requests are still dequeu

Re: [PATCH v2 3/5] kernel/locking: Use atomic_cond_read_acquire when spinning in qrwlock

2017-10-09 Thread Will Deacon
On Sun, Oct 08, 2017 at 09:03:34AM +0800, Boqun Feng wrote: > On Fri, Oct 06, 2017 at 01:34:40PM +, Will Deacon wrote: > > The qrwlock slowpaths involve spinning when either a prospective reader > > is waiting for a concurrent writer to drain, or a prospective writer is > > waiting for concurre

[PATCH] scsi: libiscsi: fix shifting of DID_REQUEUE host byte

2017-10-09 Thread Johannes Thumshirn
The SCSI host byte should be shifted left by 16 in order to have scsi_decide_disposition() do the right thing (.i.e. requeue the command). Signed-off-by: Johannes Thumshirn Fixes: 661134ad3765 ("[SCSI] libiscsi, bnx2i: make bound ep check common") Cc: Lee Duncan Cc: Hannes Reinecke Cc: Bart Van

Re: [PATCH v16 1/5] lib/xbitmap: Introduce xbitmap

2017-10-09 Thread Tetsuo Handa
On 2017/09/30 13:05, Wei Wang wrote: > /** > + * xb_preload - preload for xb_set_bit() > + * @gfp_mask: allocation mask to use for preloading > + * > + * Preallocate memory to use for the next call to xb_set_bit(). This function > + * returns with preemption disabled. It will be enabled by xb_pr

Re: netlink backwards compatibility in userspace tools

2017-10-09 Thread Jason A. Donenfeld
Hi Dave, That seems wise. Thanks for the advice. A more sophisticated way of approaching this would be for the kernel to also send a bitmap of which attributes are "critical" and only warn (or even error) of _those_ are not understood. But that seems needlessly complex, and so I think I'll go with

[PATCH v2 02/13] mmc: mediatek: add support of mt2701/mt2712

2017-10-09 Thread Chaotian Jing
mt2701/mt2712 has 12bit clock div, which is not compatible with mt8135/mt8173. and, some additional features will be added in mt2701/mt2712, so that need distinguish it by comatibale name. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 82 +++

[PATCH v2 00/13] mmc: mediatek: add support of mt2701/mt2712

2017-10-09 Thread Chaotian Jing
This serial of patches are adding support of mt2701/mt2712. there are many changes and HW improvement between mt8173 and mt2701/mt2712, below is a list of these changes: 1. enlarge CLKDIV bits from 8 to 12 2. remove the PAD_TUNE register and add a new PAD_TUNE0 register 3. add data sync and

[PATCH v2 01/13] mmc: dt-bindings: Add reg/source_cg/latch-ck for Mediatek MMC bindings

2017-10-09 Thread Chaotian Jing
Change the comptiable for support of multi-platform Add description for reg Add description for source_cg Add description for mediatek,latch-ck Note that source_cg and mediatek,latch-ck are optional for some projects, eg, MT2701 do not have source_cg, and MT2712 do not need mediatek,latch-ck Signe

Re: [PATCH 1/2] pinctrl: meson: separate soc drivers

2017-10-09 Thread Neil Armstrong
On 09/10/2017 12:17, Jerome Brunet wrote: > When meson pinctrl is enabled, all meson platforms pinctrl drivers are > built in the kernel, with a significant amount of data. > > This leads to situation where pinctrl drivers targeting an architecture > are also compiled and shipped on another one (e

[PATCH v2 10/13] mmc: mediatek: add support of source_cg clock

2017-10-09 Thread Chaotian Jing
source clock need an independent cg to control, when doing clk mode switch, need gate source clock to avoid hw issue(multi-bit sync hw hang) Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH v2 12/13] mmc: mediatek: improve eMMC hs400 mode read performance

2017-10-09 Thread Chaotian Jing
enlarge outstanding value to improve read performance Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 3328d59..49d4d79 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/

[PATCH v2 06/13] mmc: mediatek: add pad_tune0 support

2017-10-09 Thread Chaotian Jing
from mt2701, the register of PAD_TUNE has been phased out, while there is a new register of PAD_TUNE0 Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 69 ++- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/drivers/mmc/host/

[PATCH v2 07/13] mmc: mediatek: add async fifo and data tune support

2017-10-09 Thread Chaotian Jing
mt2701/mt2712 supports async fifo & data tune, which can improve host stability. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 52 +-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc

[PATCH v2 03/13] mmc: dt-bindings: make compatible explicit

2017-10-09 Thread Chaotian Jing
the driver has updated to have an explicit compatible, so update binding file according to the driver change. Signed-off-by: Chaotian Jing --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/binding

[PATCH v2 13/13] mmc: mediatek: perfer to use rise edge latching for cmd line

2017-10-09 Thread Chaotian Jing
data lines have applied to perfer to use rise edge, also need apply it to cmd line. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 49d4d79..9f21cdb 100644

Re: [PATCH] mm/page-writeback.c: fix bug caused by disable periodic writeback

2017-10-09 Thread Yafang Shao
2017-10-09 19:03 GMT+08:00 Jan Kara : > On Mon 09-10-17 18:44:23, Yafang Shao wrote: >> 2017-10-09 17:56 GMT+08:00 Jan Kara : >> > On Sat 07-10-17 06:58:04, Yafang Shao wrote: >> >> After disable periodic writeback by writing 0 to >> >> dirty_writeback_centisecs, the handler wb_workfn() will not be

[tip:irq/urgent] genirq/cpuhotplug: Add sanity check for effective affinity mask

2017-10-09 Thread tip-bot for Thomas Gleixner
Commit-ID: 60b09c51bb4fb46e2331fdbb39f91520f31d35f7 Gitweb: https://git.kernel.org/tip/60b09c51bb4fb46e2331fdbb39f91520f31d35f7 Author: Thomas Gleixner AuthorDate: Mon, 9 Oct 2017 12:47:24 +0200 Committer: Thomas Gleixner CommitDate: Mon, 9 Oct 2017 13:26:48 +0200 genirq/cpuhotplug: Ad

[PATCH v2 11/13] mmc: mediatek: add latch-ck support

2017-10-09 Thread Chaotian Jing
some platform(eg.mt2701) does not support "stop clk fix", in this case, need set correct latch-ck to avoid crc error caused by stop clock block-internally. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/mtk-sd

[PATCH v2 09/13] mmc: mediatek: add stop_clk fix and enhance_rx support

2017-10-09 Thread Chaotian Jing
mt2712 supports stop_clk fix and enhance_rx, which can improve host stability. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 47 +++ 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/h

[tip:x86/urgent] x86/mm/64: Fix reboot interaction with CR4.PCIDE

2017-10-09 Thread tip-bot for Andy Lutomirski
Commit-ID: 924c6b900cfdf376b07bccfd80e62b21914f8a5a Gitweb: https://git.kernel.org/tip/924c6b900cfdf376b07bccfd80e62b21914f8a5a Author: Andy Lutomirski AuthorDate: Sun, 8 Oct 2017 21:53:05 -0700 Committer: Thomas Gleixner CommitDate: Mon, 9 Oct 2017 13:31:04 +0200 x86/mm/64: Fix reboot

[PATCH v2 08/13] mmc: mediatek: add busy_check support

2017-10-09 Thread Chaotian Jing
bit7 of PATCH_BIT1 has different meaning in new design, to compatible with previous platform, clear this bit in new platform. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.

[tip:irq/urgent] genirq/cpuhotplug: Enforce affinity setting on startup of managed irqs

2017-10-09 Thread tip-bot for Thomas Gleixner
Commit-ID: e43b3b58548051f8809391eb7bec7a27ed3003ea Gitweb: https://git.kernel.org/tip/e43b3b58548051f8809391eb7bec7a27ed3003ea Author: Thomas Gleixner AuthorDate: Wed, 4 Oct 2017 21:07:38 +0200 Committer: Thomas Gleixner CommitDate: Mon, 9 Oct 2017 13:26:48 +0200 genirq/cpuhotplug: En

Re: linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599: pointless test ?

2017-10-09 Thread Anju T Sudhakar
Hi David, On Monday 09 October 2017 10:31 AM, Michael Ellerman wrote: David Binderman writes: Hello there, linux-4.14-rc3/arch/powerpc/perf/imc-pmu.c:599]: (style) Unsigned variable 'ncpu' can't be negative so it is unnecessary to test it. Source code is if (ncpu >= 0 && ncpu < nr_cp

[PATCH v2 04/13] arm64: dts: mt8173: remove "mediatek,mt8135-mmc" from mmc nodes

2017-10-09 Thread Chaotian Jing
devicetree bindings has been updated to support multi-platforms, so that each platform has its owns compatible name. And, this compatible name may used in driver to distinguish with other platform. Signed-off-by: Chaotian Jing --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 1 fil

[PATCH v2 05/13] mmc: mediatek: make hs400_tune_response only for mt8173

2017-10-09 Thread Chaotian Jing
the origin design of hs400_tune_response is for mt8173 because of mt8173 has a special design. for doing that, we add a new member "compatible", by now it's only for mt8173. Signed-off-by: Chaotian Jing --- drivers/mmc/host/mtk-sd.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[tip:x86/urgent] x86/alternatives: Fix alt_max_short macro to really be a max()

2017-10-09 Thread tip-bot for Mathias Krause
Commit-ID: 6b32c126d33d5cb379bca280ab8acedc1ca978ff Gitweb: https://git.kernel.org/tip/6b32c126d33d5cb379bca280ab8acedc1ca978ff Author: Mathias Krause AuthorDate: Thu, 5 Oct 2017 20:30:12 +0200 Committer: Thomas Gleixner CommitDate: Mon, 9 Oct 2017 13:35:17 +0200 x86/alternatives: Fix

Re: [PATCH 4.9 086/104] arm64: kasan: avoid bad virt_to_pfn()

2017-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2017 at 11:06:53AM +0100, Will Deacon wrote: > On Mon, Oct 09, 2017 at 10:14:50AM +0100, Mark Brown wrote: > > On Sat, Oct 07, 2017 at 03:10:06AM +, Levin, Alexander (Sasha Levin) > > wrote: > > > > > We are experimenting with using neural network to aid with patch > > > selec

Re: [PATCH v2 03/13] ANDROID: binder: add support for RT prio inheritance.

2017-10-09 Thread Greg KH
On Mon, Oct 09, 2017 at 01:21:23PM +0200, Martijn Coenen wrote: > On Fri, Sep 1, 2017 at 9:24 AM, Greg KH wrote: > > > > I've now applied patches 1, 2, 7, 9, 11, and 12 from this series to my > > tree, so feel free to rebase on it for the next round of these patches. > > Thanks Greg. You should a

Re: [PATCH 2/2] pinctrl: meson: rework pinmux ops

2017-10-09 Thread Neil Armstrong
On 09/10/2017 12:17, Jerome Brunet wrote: > This change prepare the introduction of new meson SoC. This new SoC will > share the same gpio/pinconf registers but the pinmux part will be > different. While the format of the data associated with each pinmux group > will change, the way to handle pinmu

[PATCH] tty: n_gsm: pr_err() strings should end with newlines

2017-10-09 Thread Arvind Yadav
pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 0a3c966..b27986f 100644 --- a/drivers/t

[PATCH] thermal/intel_powerclamp: pr_err()/pr_info() strings should end with newlines

2017-10-09 Thread Arvind Yadav
pr_err()/pr_info() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav --- drivers/thermal/intel_powerclamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/inte

[PATCH] netlink: do not set cb_running if dump's start() errs

2017-10-09 Thread Jason A. Donenfeld
It turns out that multiple places can call netlink_dump(), which means it's still possible to dereference partially initialized values in dump() that were the result of a faulty returned start(). This fixes the issue by calling start() _before_ setting cb_running to true, so that there's no chance

Re: [PATCH] netlink: do not set cb_running if dump's start() errs

2017-10-09 Thread Jason A. Donenfeld
Dave - this very likely should be queued up for stable. Jason

Re: [PATCH v2] drm/atomic: Unref duplicated drm_atomic_state in drm_atomic_helper_resume()

2017-10-09 Thread Maarten Lankhorst
Op 09-10-17 om 08:46 schreef Jeffy Chen: > Kmemleak reported memory leak after suspend and resume: > unreferenced object 0xffc0e31d8880 (size 128): > comm "bash", pid 181, jiffies 4294763583 (age 24.694s) > hex dump (first 32 bytes): > 01 00 00 00 00 00 00 00 00 20 a2 eb c0 ff ff ff ..

Re: [PATCH] netlink: do not set cb_running if dump's start() errs

2017-10-09 Thread Johannes Berg
On Mon, 2017-10-09 at 13:56 +0200, Jason A. Donenfeld wrote: > @@ -2266,16 +2266,17 @@ int __netlink_dump_start(struct sock *ssk, > struct sk_buff *skb, > cb->min_dump_alloc = control->min_dump_alloc; > cb->skb = skb; > > + if (cb->start) { > + ret = cb->start(cb); >

Re: [PATCH] tty: n_gsm: pr_err() strings should end with newlines

2017-10-09 Thread Joe Perches
On Mon, 2017-10-09 at 17:14 +0530, Arvind Yadav wrote: > pr_err() messages should end with a new-line to avoid other messages > being concatenated. [] > diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c [] > @@ -2788,7 +2788,7 @@ static int gsm_create_network(struct gsm_dlci *dlci, > struct g

Re: [PATCH V2] writeback: merge try_to_writeback_inodes_sb_nr() into caller

2017-10-09 Thread Jan Kara
On Mon 09-10-17 13:34:41, Rakesh Pandit wrote: > Since commit 925a6efb8ff0c ("Btrfs: stop using > try_to_writeback_inodes_sb_nr to flush delalloc") this function hasn't > been used outside so stop exporting it. > > In addition we merge it into try_to_writeback_inodes_sb() which is the > only calle

[PATCH] dt-bindings: pinctrl: mcp23s08 update binding doc

2017-10-09 Thread Lars Poeschel
The mcp23s08 driver moved to pinctrl recently. It accepts the bias-pull-up pinctrl property since then. This updates the binding doc to reflect that. Thanks to Sebastian Reichel for the working example. Signed-off-by: Lars Poeschel --- .../bindings/pinctrl/pinctrl-mcp23s08.txt | 58

Re: [PATCH 10/12] net/mlx4: replace with

2017-10-09 Thread Masahiro Yamada
2017-10-09 2:32 GMT+09:00 Joe Perches : > On Mon, 2017-10-09 at 02:29 +0900, Masahiro Yamada wrote: >> The idea is simple; include necessary headers explicitly. > > Try that for kernel.h > > There's a reason aggregation of #includes is useful. > BTW, talking about , it is too much aggregation, isn

Re: [PATCH] tty: n_gsm: pr_err() strings should end with newlines

2017-10-09 Thread Arvind Yadav
Hi, On Monday 09 October 2017 05:30 PM, Joe Perches wrote: On Mon, 2017-10-09 at 17:14 +0530, Arvind Yadav wrote: pr_err() messages should end with a new-line to avoid other messages being concatenated. [] diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c [] @@ -2788,7 +2788,7 @@ stat

Re: [PATCH 1/2] ARM: cpuidle: refine failure handling in init flow

2017-10-09 Thread Daniel Lezcano
On 04/09/2017 08:52, Leo Yan wrote: > After applied Stefan Wahren patch ("ARM: cpuidle: Avoid memleak if init > fail") there have no memleak issue, but the code is not consistent to > handle initialization failure between driver registration and device > registration. And when device registration f

[PATCH] cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan

2017-10-09 Thread Aleksander Morgado
The u-blox TOBY-L2 is a LTE Cat 4 module with HSPA+ and 2G fallback. This module allows switching to different USB profiles with the 'AT+UUSBCONF' command, and provides a ECM network interface when the 'AT+UUSBCONF=2' profile is selected. The u-blox SARA-U2 is a HSPA module with 2G fallback. The d

[PATCH v4] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put()

2017-10-09 Thread Harsha Sharma
Replace instances of drm_framebuffer_reference/unreference() with *_get/put() suffixes and drm_dev_unref with *_put() suffix because get/put is shorter and consistent with the kernel use of *_get/put suffixes. Done with following coccinelle semantic patch @@ expression ex; @@ ( -drm_framebuffer_u

Re: [PATCH V5 00/14] blk-mq-sched: improve sequential I/O performance(part 1)

2017-10-09 Thread John Garry
On 30/09/2017 11:27, Ming Lei wrote: Hi Jens, In Red Hat internal storage test wrt. blk-mq scheduler, we found that I/O performance is much bad with mq-deadline, especially about sequential I/O on some multi-queue SCSI devcies(lpfc, qla2xxx, SRP...) Turns out one big issue causes the performanc

Re: [PATCH] netlink: do not set cb_running if dump's start() errs

2017-10-09 Thread Jason A. Donenfeld
Hi Johannes, Yes, indeed, and I think that's actually a good thing. It means that the starts aren't ever called in parallel, which could be useful if drivers have any ordering requirements. The change doesn't negatively effect any existing drivers. I'll resubmit with a larger commit message explai

Re: [PATCH -v2 15/18] sched/fair: Align PELT windows between cfs_rq and its se

2017-10-09 Thread Dietmar Eggemann
On 06/10/17 14:02, Peter Zijlstra wrote: > On Wed, Oct 04, 2017 at 08:27:01PM +0100, Dietmar Eggemann wrote: >> On 01/09/17 14:21, Peter Zijlstra wrote: >>> The PELT _sum values are a saw-tooth function, dropping on the decay >>> edge and then growing back up again during the window. >>> >>> When t

<    1   2   3   4   5   6   7   8   9   10   >