[PATCHv6 03/37] page-flags: relax page flag policy for few flags

2017-01-26 Thread Kirill A. Shutemov
These flags are in use for filesystems with backing storage: PG_error, PG_writeback and PG_readahead. Signed-off-by: Kirill A. Shutemov --- include/linux/page-flags.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-fl

[PATCHv6 34/37] ext4: make fallocate() operations work with huge pages

2017-01-26 Thread Kirill A. Shutemov
__ext4_block_zero_page_range() adjusted to calculate starting iblock correctry for huge pages. ext4_{collapse,insert}_range() requires page cache invalidation. We need the invalidation to be aligning to huge page border if huge pages are possible in page cache. Signed-off-by: Kirill A. Shutemov

[PATCHv6 31/37] ext4: handle writeback with huge pages

2017-01-26 Thread Kirill A. Shutemov
Modify mpage_map_and_submit_buffers() and mpage_release_unused_pages() to deal with huge pages. Mostly result of try-and-error. Critical view would be appreciated. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 61 - 1 file change

[PATCHv6 06/37] thp: handle write-protection faults for file THP

2017-01-26 Thread Kirill A. Shutemov
For filesystems that wants to be write-notified (has mkwrite), we will encount write-protection faults for huge PMDs in shared mappings. The easiest way to handle them is to clear the PMD and let it refault as wriable. Signed-off-by: Kirill A. Shutemov Reviewed-by: Jan Kara --- mm/memory.c | 1

[PATCHv6 00/37] ext4: support of huge pages

2017-01-26 Thread Kirill A. Shutemov
Here's respin of my huge ext4 patchset on top v4.10-rc/5 + my recent patchset that fixes rmap-related THP bugs. That patchset also bring required for huge-ext4 page_mkclean() changes. Please review and consider applying. I don't see any xfstests regressions with huge pages enabled. Patch with new

[PATCHv6 30/37] ext4: make ext4_da_page_release_reservation() aware about huge pages

2017-01-26 Thread Kirill A. Shutemov
For huge pages 'stop' must be within HPAGE_PMD_SIZE. Let's use hpage_size() in the BUG_ON(). We also need to change how we calculate lblk for cluster deallocation. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/e

[PATCHv6 36/37] mm, fs, ext4: expand use of page_mapping() and page_to_pgoff()

2017-01-26 Thread Kirill A. Shutemov
With huge pages in page cache we see tail pages in more code paths. This patch replaces direct access to struct page fields with macros which can handle tail pages properly. Signed-off-by: Kirill A. Shutemov --- fs/buffer.c | 2 +- fs/ext4/inode.c | 4 ++-- mm/filemap.c| 24

[PATCHv6 05/37] thp: try to free page's buffers before attempt split

2017-01-26 Thread Kirill A. Shutemov
We want page to be isolated from the rest of the system before splitting it. We rely on page count to be 2 for file pages to make sure nobody uses the page: one pin to caller, one to radix-tree. Filesystems with backing storage can have page count increased if it has buffers. Let's try to free th

[PATCHv6 18/37] fs: make block_write_{begin,end}() be able to handle huge pages

2017-01-26 Thread Kirill A. Shutemov
It's more or less straight-forward. Most changes are around getting offset/len withing page right and zero out desired part of the page. Signed-off-by: Kirill A. Shutemov --- fs/buffer.c | 70 +++-- 1 file changed, 40 insertions(+), 30 del

[PATCHv6 14/37] thp: introduce hpage_size() and hpage_mask()

2017-01-26 Thread Kirill A. Shutemov
Introduce new helpers which return size/mask of the page: HPAGE_PMD_SIZE/HPAGE_PMD_MASK if the page is PageTransHuge() and PAGE_SIZE/PAGE_MASK otherwise. Signed-off-by: Kirill A. Shutemov --- include/linux/huge_mm.h | 16 1 file changed, 16 insertions(+) diff --git a/include/li

[PATCHv6 24/37] ext4: make ext4_mpage_readpages() hugepage-aware

2017-01-26 Thread Kirill A. Shutemov
As BIO_MAX_PAGES is smaller (on x86) than HPAGE_PMD_NR, we cannot use the optimization ext4_mpage_readpages() provides. So, for huge pages, we fallback directly to block_read_full_page(). This should be re-visited once we get multipage bvec upstream. Signed-off-by: Kirill A. Shutemov --- fs/ex

[PATCHv6 32/37] ext4: make EXT4_IOC_MOVE_EXT work with huge pages

2017-01-26 Thread Kirill A. Shutemov
Adjust how we find relevant block within page and how we clear the required part of the page. Signed-off-by: Kirill A. Shutemov --- fs/ext4/move_extent.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 6fc14def0

[PATCHv6 28/37] ext4: make ext4_block_write_begin() aware about huge pages

2017-01-26 Thread Kirill A. Shutemov
It simply matches changes to __block_write_begin_int(). Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 7e65a5b78cf1..3eae2d058fd0 100644 --- a/

[PATCHv6 01/37] mm, shmem: swich huge tmpfs to multi-order radix-tree entries

2017-01-26 Thread Kirill A. Shutemov
We would need to use multi-order radix-tree entires for ext4 and other filesystems to have coherent view on tags (dirty/towrite) in the tree. This patch converts huge tmpfs implementation to multi-order entries, so we will be able to use the same code patch for all filesystems. We also change int

[PATCHv6 02/37] Revert "radix-tree: implement radix_tree_maybe_preload_order()"

2017-01-26 Thread Kirill A. Shutemov
This reverts commit 356e1c23292a4f63cfdf1daf0e0ddada51f32de8. After conversion of huge tmpfs to multi-order entries, we don't need this anymore. Signed-off-by: Kirill A. Shutemov --- include/linux/radix-tree.h | 1 - lib/radix-tree.c | 74 -

[PATCHv6 33/37] ext4: fix SEEK_DATA/SEEK_HOLE for huge pages

2017-01-26 Thread Kirill A. Shutemov
ext4_find_unwritten_pgoff() needs few tweaks to work with huge pages. Mostly trivial page_mapping()/page_to_pgoff() and adjustment to how we find relevant block. Signe-off-by: Kirill A. Shutemov --- fs/ext4/file.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --

[PATCHv6 27/37] ext4: handle huge pages in __ext4_block_zero_page_range()

2017-01-26 Thread Kirill A. Shutemov
As the function handles zeroing range only within one block, the required changes are trivial, just remove assuption on page size. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c in

[PATCHv6 23/37] mm: account huge pages to dirty, writaback, reclaimable, etc.

2017-01-26 Thread Kirill A. Shutemov
We need to account huge pages according to its size to get background writaback work properly. Signed-off-by: Kirill A. Shutemov --- fs/fs-writeback.c | 10 +++--- include/linux/backing-dev.h | 10 ++ include/linux/memcontrol.h | 22 ++--- mm/migrate.c| 1

[PATCHv6 35/37] ext4: reserve larger jounral transaction for huge pages

2017-01-26 Thread Kirill A. Shutemov
If huge pages enabled, in worst case with 2048 blocks underlying a page, each possibly in a different block group we have much more metadata to commit. Let's update estimates accordingly. I was not able to trigger bad situation without the patch as it's hard to construct very fragmented filesyste

[PATCHv6 37/37] ext4, vfs: add huge= mount option

2017-01-26 Thread Kirill A. Shutemov
The same four values as in tmpfs case. Encyption code is not yet ready to handle huge page, so we disable huge pages support if the inode has EXT4_INODE_ENCRYPT. Signed-off-by: Kirill A. Shutemov --- fs/ext4/ext4.h | 5 + fs/ext4/inode.c | 32 +++- fs/ext4/supe

[PATCHv6 13/37] mm: make write_cache_pages() work on huge pages

2017-01-26 Thread Kirill A. Shutemov
We writeback whole huge page a time. Let's adjust iteration this way. Signed-off-by: Kirill A. Shutemov --- include/linux/mm.h | 1 + include/linux/pagemap.h | 1 + mm/page-writeback.c | 17 - 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/linu

[PATCHv6 21/37] truncate: make invalidate_inode_pages2_range() aware about huge pages

2017-01-26 Thread Kirill A. Shutemov
For huge pages we need to unmap whole range covered by the huge page. Signed-off-by: Kirill A. Shutemov --- mm/truncate.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mm/truncate.c b/mm/truncate.c index 81e1a13acb63..ddb615e6a193 100644 --- a/mm/tr

[PATCHv6 17/37] fs: make block_read_full_page() be able to read huge page

2017-01-26 Thread Kirill A. Shutemov
The approach is straight-forward: for compound pages we read out whole huge page. For huge page we cannot have array of buffer head pointers on stack -- it's 4096 pointers on x86-64 -- 'arr' is allocated with kmalloc() for huge pages. Signed-off-by: Kirill A. Shutemov --- fs/buffer.c

[PATCHv6 19/37] fs: make block_page_mkwrite() aware about huge pages

2017-01-26 Thread Kirill A. Shutemov
Adjust check on whether part of the page beyond file size and apply compound_head() and page_mapping() where appropriate. Signed-off-by: Kirill A. Shutemov --- fs/buffer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index d05524f14846.

[PATCHv6 29/37] ext4: handle huge pages in ext4_da_write_end()

2017-01-26 Thread Kirill A. Shutemov
Call ext4_da_should_update_i_disksize() for head page with offset relative to head page. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 3eae2d058fd0..bdd62dcaa0b2 100644 ---

[PATCHv6 20/37] truncate: make truncate_inode_pages_range() aware about huge pages

2017-01-26 Thread Kirill A. Shutemov
As with shmem_undo_range(), truncate_inode_pages_range() removes huge pages, if it fully within range. Partial truncate of huge pages zero out this part of THP. Unlike with shmem, it doesn't prevent us having holes in the middle of huge page we still can skip writeback not touched buffers. With

[PATCHv6 08/37] filemap: handle huge pages in do_generic_file_read()

2017-01-26 Thread Kirill A. Shutemov
Most of work happans on head page. Only when we need to do copy data to userspace we find relevant subpage. We are still limited by PAGE_SIZE per iteration. Lifting this limitation would require some more work. Signed-off-by: Kirill A. Shutemov --- mm/filemap.c | 5 - 1 file changed, 4 inse

[PATCHv6 11/37] HACK: readahead: alloc huge pages, if allowed

2017-01-26 Thread Kirill A. Shutemov
Most page cache allocation happens via readahead (sync or async), so if we want to have significant number of huge pages in page cache we need to find a ways to allocate them from readahead. Unfortunately, huge pages doesn't fit into current readahead design: 128 max readahead window, assumption o

[PATCHv6 16/37] thp: make thp_get_unmapped_area() respect S_HUGE_MODE

2017-01-26 Thread Kirill A. Shutemov
We want mmap(NULL) to return PMD-aligned address if the inode can have huge pages in page cache. Signed-off-by: Kirill A. Shutemov --- mm/huge_memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 55aee62e8444..2b1d8d13e2c3 1006

[PATCHv6 26/37] ext4: handle huge pages in ext4_page_mkwrite()

2017-01-26 Thread Kirill A. Shutemov
Trivial: remove assumption on page size. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 8d1b5e63cb15..a25be1cf4506 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @

[PATCHv6 15/37] thp: do not threat slab pages as huge in hpage_{nr_pages,size,mask}

2017-01-26 Thread Kirill A. Shutemov
Slab pages can be compound, but we shouldn't threat them as THP for pupose of hpage_* helpers, otherwise it would lead to confusing results. For instance, ext4 uses slab pages for journal pages and we shouldn't confuse them with THPs. The easiest way is to exclude them in hpage_* helpers. Signed-

[PATCHv6 10/37] filemap: handle huge pages in filemap_fdatawait_range()

2017-01-26 Thread Kirill A. Shutemov
We writeback whole huge page a time. Signed-off-by: Kirill A. Shutemov --- mm/filemap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/mm/filemap.c b/mm/filemap.c index 4e398d5e4134..f5cd654b3662 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -405,9 +405,14 @@ static int __filemap_fda

[PATCHv6 07/37] filemap: allocate huge page in page_cache_read(), if allowed

2017-01-26 Thread Kirill A. Shutemov
This patch adds basic functionality to put huge page into page cache. At the moment we only put huge pages into radix-tree if the range covered by the huge page is empty. We ignore shadow entires for now, just remove them from the tree before inserting huge page. Later we can add logic to accumu

[PATCHv6 12/37] brd: make it handle huge pages

2017-01-26 Thread Kirill A. Shutemov
Do not assume length of bio segment is never larger than PAGE_SIZE. With huge pages it's HPAGE_PMD_SIZE (2M on x86-64). Signed-off-by: Kirill A. Shutemov --- drivers/block/brd.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/block/brd.c b/drivers/b

[PATCHv6 22/37] mm, hugetlb: switch hugetlbfs to multi-order radix-tree entries

2017-01-26 Thread Kirill A. Shutemov
From: Naoya Horiguchi Currently, hugetlb pages are linked to page cache on the basis of hugepage offset (derived from vma_hugecache_offset()) for historical reason, which doesn't match to the generic usage of page cache and requires some routines to covert page offset <=> hugepage offset in commo

[PATCHv6 25/37] ext4: make ext4_writepage() work on huge pages

2017-01-26 Thread Kirill A. Shutemov
Change ext4_writepage() and underlying ext4_bio_write_page(). It basically removes assumption on page size, infer it from struct page instead. Signed-off-by: Kirill A. Shutemov --- fs/ext4/inode.c | 10 +- fs/ext4/page-io.c | 11 +-- 2 files changed, 14 insertions(+), 7 deleti

[PATCHv6 04/37] mm, rmap: account file thp pages

2017-01-26 Thread Kirill A. Shutemov
Let's add FileHugePages and FilePmdMapped fields into meminfo and smaps. It indicates how many times we allocate and map file THP. Signed-off-by: Kirill A. Shutemov --- drivers/base/node.c| 6 ++ fs/proc/meminfo.c | 4 fs/proc/task_mmu.c | 5 - include/linux/mmzone.h

Re: [PATCH 1/6] mm: introduce kv[mz]alloc helpers

2017-01-26 Thread Michal Hocko
On Thu 12-01-17 16:37:12, Michal Hocko wrote: [...] > +void *kvmalloc_node(size_t size, gfp_t flags, int node) > +{ > + gfp_t kmalloc_flags = flags; > + void *ret; > + > + /* > + * vmalloc uses GFP_KERNEL for some internal allocations (e.g page > tables) > + * so the given se

Re: [PATCH 0/6 v3] kvmalloc

2017-01-26 Thread Joe Perches
On Thu, 2017-01-26 at 11:32 +0100, Michal Hocko wrote: > So I have folded the following to the patch 1. It is in line with > kvmalloc and hopefully at least tell more than the current code. [] > diff --git a/mm/vmalloc.c b/mm/vmalloc.c [] > @@ -1741,6 +1741,13 @@ void *__vmalloc_node_range(unsigned

Re: [PATCH] pwm: fix undefined behavior in stm32_pwm_apply

2017-01-26 Thread Lee Jones
On Wed, 25 Jan 2017, Arnd Bergmann wrote: > The stm32_pwm_apply randomly sets the polarity or doesn't, > as pointed out by this gcc warning: > > drivers/pwm/pwm-stm32.c: In function 'stm32_pwm_apply': > drivers/pwm/pwm-stm32.c:204:33: error: 'curstate.polarity' may be used > uninitialized in thi

Re: [GIT PULL] Immutable branch between MFD and MTD due for the v4.11 merge window

2017-01-26 Thread Lee Jones
On Wed, 25 Jan 2017, Mika Westerberg wrote: > On Tue, Jan 03, 2017 at 05:37:50PM +, Lee Jones wrote: > > MTD Maintainers, > > > > Enjoy! > > > > The following changes since commit 7ce7d89f48834cefece7804d38fc5d85382edf77: > > > > Linux 4.10-rc1 (2016-12-25 16:13:08 -0800) > > > > are ava

Re: [PATCH] perf: xgene: Include module.h

2017-01-26 Thread Will Deacon
On Wed, Jan 25, 2017 at 07:29:30PM -0800, Tai Tri Nguyen wrote: > On Wed, Jan 25, 2017 at 3:46 PM, Stephen Boyd wrote: > > I ran into a build error when I disabled CONFIG_ACPI and tried to > > compile this driver: > > > > drivers/perf/xgene_pmu.c:1242:1: warning: data definition has no type or >

Re: [tpmdd-devel] [PATCH v6 1/2] tpm: implement TPM 2.0 capability to get active PCR banks

2017-01-26 Thread Stefan Berger
On 01/20/2017 12:05 PM, Nayna Jain wrote: This patch implements the TPM 2.0 capability TPM_CAP_PCRS to retrieve the active PCR banks from the TPM. This is needed to enable extending all active banks as recommended by TPM 2.0 TCG Specification. Signed-off-by: Nayna Jain Reviewed-by: Jarkko Sakki

Re: [PATCH 0/6 v3] kvmalloc

2017-01-26 Thread Michal Hocko
On Thu 26-01-17 04:14:37, Joe Perches wrote: > On Thu, 2017-01-26 at 11:32 +0100, Michal Hocko wrote: > > So I have folded the following to the patch 1. It is in line with > > kvmalloc and hopefully at least tell more than the current code. > [] > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > [] > >

Re: [PATCH] regulator: constify regulator_ops structures

2017-01-26 Thread kbuild test robot
-structures/20170126-185451 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next config: x86_64-randconfig-s2-01261858 (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

Re: [PATCH] Revert "regulator: fixed: add support for ACPI interface"

2017-01-26 Thread Mark Brown
On Thu, Jan 26, 2017 at 11:56:07AM +0100, Rafael J. Wysocki wrote: > Did it actually go to linux-acpi, BTW? Don't think so. signature.asc Description: PGP signature

Re: [PATCH v3 1/2] iov_iter: allow iov_iter_get_pages_alloc to allocate more pages per call

2017-01-26 Thread Jeff Layton
On Wed, 2017-01-25 at 08:32 -0500, Jeff Layton wrote: > Currently, iov_iter_get_pages_alloc will only ever operate on the first > vector that iterate_all_kinds hands back. Most of the callers however > would like to have as long a set of pages as possible, to allow for > fewer, but larger I/Os. >

Re: [PATCH] eeprom: fix memory leak on buf when failed allocation of csraddr_str

2017-01-26 Thread Serge Semin
On Tue, Jan 24, 2017 at 02:38:38PM +, Colin King wrote: > From: Colin Ian King > > The error return path When csraddr_str fails to free buf, causing a > memory leak. Fix this by returning via the free_buf label that > performs the necessary cleanup. > > Signed-off-by: Colin Ian King > ---

Re: [PATCH] regulator: constify regulator_ops structures

2017-01-26 Thread Mark Brown
On Thu, Jan 26, 2017 at 04:17:48PM +0530, Bhumika Goyal wrote: > Declare regulator_ops structures as const as they are only stored in the > ops field of a regulator_desc structure. This field is of type const, so > regulator_ops structures having this property can be made const too. Please split t

Re: [PATCH -next] eeprom: idt_89hpesx: Drop kfree for memory allocated with devm_kzalloc

2017-01-26 Thread Serge Semin
On Wed, Jan 25, 2017 at 02:09:52PM +, Wei Yongjun wrote: > From: Wei Yongjun > > It's not necessary to free memory allocated with devm_kzalloc > and using kfree leads to a double free. > > Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") > Signed-off-by: Wei Yongjun > ---

Re: [patch] eeprom/idt_89hpesx: freeing devm_ pointer with kfree()

2017-01-26 Thread Serge Semin
On Thu, Jan 26, 2017 at 12:01:46PM +0300, Dan Carpenter wrote: > "pdev->ee_file" was allocated with devm_kmalloc() so freeing it with > kfree() is a double free. In fact, we don't need to free it at all. > > Fixes: cfad6425382e ("eeprom: Add IDT 89HPESx EEPROM/CSR driver") > Signed-off-by: Dan

Re: [PATCH v5 06/12] mmc: sdhci-xenon: Add Marvell Xenon SDHC core functionality

2017-01-26 Thread Adrian Hunter
On 26/01/17 12:50, Ulf Hansson wrote: > On 11 January 2017 at 18:19, Gregory CLEMENT > wrote: >> + priv->init_card_type = MMC_TYPE_MMC; >> + mmc->caps |= MMC_CAP_NONREMOVABLE; >> + >> + /* >> +* Force to clea

Re: [PATCH 1/2] tpm2: add session handle context saving and restoring to the space code

2017-01-26 Thread Jarkko Sakkinen
On Mon, Jan 23, 2017 at 09:37:11PM -0800, James Bottomley wrote: > sessions are different from transient objects in that their handles > may not be virtualized (because they're used for some hmac > calculations). Additionally when a session is context saved, a > vestigial memory remains in the TPM

Re: [PATCH 04/22] clocksource: add DT bindings for Cortina Gemini

2017-01-26 Thread Daniel Lezcano
On Sun, Jan 22, 2017 at 01:17:07PM +0100, Linus Walleij wrote: > This adds device tree bindings for the Cortina Systems Gemini > timer block used in these SoCs. > > Cc: Janos Laube > Cc: Paulius Zaleckas > Cc: Hans Ulli Kroll > Cc: Florian Fainelli > Cc: devicet...@vger.kernel.org > Signed-off

Re: [PATCH 05/22] clocksource: Add driver for the Cortina Gemini

2017-01-26 Thread Daniel Lezcano
On Sun, Jan 22, 2017 at 01:17:17PM +0100, Linus Walleij wrote: > This is a rewrite of the Gemini timer > driver in arch/arm/mach-gemini/timer.c trying to do everything > the device tree way: > > - Make every IO-access relative to a base address and dynamic > so we can do a dynamic ioremap and ge

Re: [PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig

2017-01-26 Thread kbuild test robot
Hi Bilal, [auto build test ERROR on arm-soc/for-next] [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/Bilal-Amarni/security-keys-add-CONFIG_KEYS_COMPAT-to-Kconfig/20170126-195458 base: https

Re: [PATCH 2/2] tpm2-space: add handling for global session exhaustion

2017-01-26 Thread Jarkko Sakkinen
On Mon, Jan 23, 2017 at 09:38:33PM -0800, James Bottomley wrote: > In a TPM2, sessions can be globally exhausted once there are > TPM_PT_ACTIVE_SESSION_MAX of them (even if they're all context saved). > The Strategy for handling this is to keep a global count of all the > sessions along with their

Re: gcc trunk fails to build kernel on PowerPC64 due to oprofile warnings

2017-01-26 Thread Arnd Bergmann
On Thu, Jan 26, 2017 at 12:00 PM, David Laight wrote: > From: Anton Blanchard >> Sent: 25 January 2017 23:01 >> gcc trunk has failed to build PowerPC64 kernels for a month or so. The issue >> is in oprofile, which is common code but ends up being sucked into >> arch/powerpc and therefore subject t

[PATCH] eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc

2017-01-26 Thread Serge Semin
Indeed, the data structure is allocated by device resource manager, so the driver doesn't need to free anything on remove() callback. Reported-by: Julia Lawall Signed-off-by: Serge Semin --- drivers/misc/eeprom/idt_89hpesx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/misc/eep

[PATCH v3 1/3] dt: bindings: add documentation for zx2967 family i2c controller

2017-01-26 Thread Baoyou Xie
This patch adds dt-binding documentation for zx2967 family i2c controller. Signed-off-by: Baoyou Xie Acked-by: Rob Herring --- .../devicetree/bindings/i2c/i2c-zx2967.txt | 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/i

[PATCH v3 2/3] MAINTAINERS: add zx2967 i2c controller driver to ARM ZTE architecture

2017-01-26 Thread Baoyou Xie
Add the zx2967 i2c controller driver as maintained by ARM ZTE architecture maintainers, as they're parts of the core IP. Signed-off-by: Baoyou Xie --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 275c434..757c098 100644 --- a/MAINTAINERS +++ b

[PATCH v3 3/3] i2c: zx2967: add i2c controller driver for ZTE's zx2967 family

2017-01-26 Thread Baoyou Xie
This patch adds i2c controller driver for ZTE's zx2967 family. Signed-off-by: Baoyou Xie --- drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-zx2967.c | 699 3 files changed, 709 insertions(+) creat

Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure

2017-01-26 Thread kbuild test robot
-address-filters/20170126-175256 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin

Re: [PATCH 0/6 v3] kvmalloc

2017-01-26 Thread Daniel Borkmann
On 01/26/2017 12:58 PM, Michal Hocko wrote: On Thu 26-01-17 12:33:55, Daniel Borkmann wrote: On 01/26/2017 11:08 AM, Michal Hocko wrote: [...] If you disagree I can drop the bpf part of course... If we could consolidate these spots with kvmalloc() eventually, I'm all for it. But even if __GF

Re: [PATCH 2/5] gtp: Improve another size determination in ipv4_pdp_add()

2017-01-26 Thread Alexey Dobriyan
On Thu, Jan 26, 2017 at 1:18 PM, SF Markus Elfring wrote: > - pctx = kmalloc(sizeof(struct pdp_ctx), GFP_KERNEL); > + pctx = kmalloc(sizeof(*pctx), GFP_KERNEL); The rule about "sizeof(*p)" style of allocation is bogus and should be abolished. Rationale says that > The alternati

Re: [PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode

2017-01-26 Thread Michal Hocko
On Mon 23-01-17 13:16:37, Johannes Weiner wrote: > We have an elaborate dirty/writeback throttling mechanism inside the > reclaim scanner, but for that to work the pages have to go through > shrink_page_list() and get counted for what they are. Otherwise, we > mess up the LRU order and don't match

Re: [PATCH 2/5] mm: vmscan: kick flushers when we encounter dirty pages on the LRU

2017-01-26 Thread Michal Hocko
On Mon 23-01-17 13:16:38, Johannes Weiner wrote: > Memory pressure can put dirty pages at the end of the LRU without > anybody running into dirty limits. Don't start writing individual > pages from kswapd while the flushers might be asleep. > > Signed-off-by: Johannes Weiner Acked-by: Michal Hoc

Re: [RFC PATCH v2 0/2] block: fix backing_dev_info lifetime

2017-01-26 Thread Christoph Hellwig
On Thu, Jan 26, 2017 at 11:06:53AM +0100, Jan Kara wrote: > Yeah, so my patches (and I suspect your as well), have a problem when the > backing_device_info stays around because blkdev inode still exists, device > gets removed (e.g. USB disk gets unplugged) but blkdev inode still stays > around (the

Re: [PATCH v1 2/3] x86/xen/time: setup vcpu 0 time info page

2017-01-26 Thread Joao Martins
On 01/25/2017 07:26 PM, Boris Ostrovsky wrote: > On 01/25/2017 12:33 PM, Joao Martins wrote: >> In order to support pvclock vdso on xen we need to setup the time >> info page for vcpu 0 and register the page with Xen using the >> VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall >> wi

Re: [PATCH v4 0/9] Implement clocksource for rockchip SoC using rockchip timer

2017-01-26 Thread Daniel Lezcano
On Thu, Jan 26, 2017 at 02:08:45PM +0300, Alexander Kochetkov wrote: > Hello Daniel! > > Sorry for bothering you. Just let you know that I sent v5 here: > http://lists.infradead.org/pipermail/linux-rockchip/2017-January/thread.html#13812 > > Because previous series was somehow missed in your inbo

Re: [PATCH v4 2/2] procfs/tasks: add a simple per-task procfs hidepid= field

2017-01-26 Thread Djalal Harouni
On Mon, Jan 23, 2017 at 9:07 PM, Andy Lutomirski wrote: > On Mon, Jan 23, 2017 at 3:46 AM, Djalal Harouni wrote: >> On Sat, Jan 21, 2017 at 1:53 AM, Andy Lutomirski wrote: >>> I agree that the kernel change to do it per task is very simple. But >>> this is an unfortunate slippery slope. What i

Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct reclaim path

2017-01-26 Thread Michal Hocko
On Mon 23-01-17 13:16:39, Johannes Weiner wrote: > Direct reclaim has been replaced by kswapd reclaim in pretty much all > common memory pressure situations, so this code most likely doesn't > accomplish the described effect anymore. The previous patch wakes up > flushers for all reclaimers when we

[PATCH] security/keys: add CONFIG_KEYS_COMPAT to Kconfig

2017-01-26 Thread Bilal Amarni
CONFIG_KEYS_COMPAT is defined in arch-specific Kconfigs and is missing for several 64-bit architectures : arm64, mips, parisc, tile. At the moment and for those architectures, calling in 32-bit userspace the keyctl syscall would return an ENOSYS error. This patch moves the CONFIG_KEYS_COMPAT opti

Re: [PATCH/RFC] iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space

2017-01-26 Thread Geert Uytterhoeven
Hi Robin, On Thu, Jan 26, 2017 at 12:23 PM, Robin Murphy wrote: > On 26/01/17 09:53, Geert Uytterhoeven wrote: >> Currently, the IPMMU/VMSA driver supports 32-bit I/O Virtual Addresses >> only, and thus sets io_pgtable_cfg.ias = 32. However, it doesn't force >> a 32-bit IOVA space through the IO

Re: [PATCH] pinctrl: rockchip: Add rk3328 pinctrl support

2017-01-26 Thread Linus Walleij
On Sun, Jan 22, 2017 at 9:38 AM, David Wu wrote: > From: "david.wu" > > This patch supports 3bit width iomux type. > Note, the iomux of following pins are special, need to > be handled specially. > - gpio2_b0 ~ gpio2_b6 > - gpio2_b7 > - gpio2_c7 > - gpio3_b0 > - gpio3_b1 ~ gpio3_b7 > And th

Re: [PATCH 4/5] mm: vmscan: only write dirty pages that the scanner has seen twice

2017-01-26 Thread Michal Hocko
On Mon 23-01-17 13:16:40, Johannes Weiner wrote: > Dirty pages can easily reach the end of the LRU while there are still > clean pages to reclaim around. Don't let kswapd write them back just > because there are a lot of them. It costs more CPU to find the clean > pages, but that's almost certainly

Re: [PATCH 1/3] perf, pt, coresight: Clean up address filter structure

2017-01-26 Thread Alexander Shishkin
://github.com/0day-ci/linux/commits/Alexander-Shishkin/perf-Updates-for-address-filters/20170126-175256 > config: arm-allmodconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 > reproduce: > wget > https://git.kernel.org/cgit/lin

Re: [PATCH] usb: musb: constify musb_hdrc_config structures

2017-01-26 Thread Bin Liu
On Wed, Jan 25, 2017 at 10:24:09PM +0100, Greg KH wrote: > On Wed, Jan 25, 2017 at 10:58:15AM -0600, Bin Liu wrote: > > On Wed, Jan 25, 2017 at 12:52:22AM +0530, Bhumika Goyal wrote: > > > Declare musb_hdrc_config structures as const as they are only stored in > > > the config field of a musb_hdrc_

Re: [PATCH 1/2] gpio: aspeed: Make bank names strings

2017-01-26 Thread Linus Walleij
On Mon, Jan 23, 2017 at 6:26 AM, Andrew Jeffery wrote: > From: Joel Stanley > > The Aspeed SoCs have more GPIOs than can be represented with A-Z. The > documentation uses two letter names such as AA and AB, so make the names > a three-character array in the bank struct to accommodate this. > > S

Re: [PATCH 08/22] power: supply: add AC power supply driver for AXP20X and AXP22X PMICs

2017-01-26 Thread Quentin Schulz
Hi Sebastian, On 17/01/2017 04:00, Sebastian Reichel wrote: > Hi Quentin, > > The driver looks mostly fine. I do have a two comments, though. > > On Mon, Jan 02, 2017 at 05:37:08PM +0100, Quentin Schulz wrote: >> [...] >> >> +static int axp20x_ac_power_probe(struct platform_device *pdev) >> +{ >

Re: [PATCH 0/6 v3] kvmalloc

2017-01-26 Thread Michal Hocko
On Thu 26-01-17 14:10:06, Daniel Borkmann wrote: > On 01/26/2017 12:58 PM, Michal Hocko wrote: > > On Thu 26-01-17 12:33:55, Daniel Borkmann wrote: > > > On 01/26/2017 11:08 AM, Michal Hocko wrote: > > [...] > > > > If you disagree I can drop the bpf part of course... > > > > > > If we could conso

[PATCH v2 2/2] scsi: storvsc: Add support for FC lightweight host.

2017-01-26 Thread Cathy Avery
Included in the current storvsc driver for Hyper-V is the ability to access luns on an FC fabric via a virtualized fiber channel adapter exposed by the Hyper-V host. This was done to provide an interface for existing customer tools that was more consistent with a conventional FC device. The driver

[PATCH v2 0/2] scsi: storvsc: Add support for FC lightweight host.

2017-01-26 Thread Cathy Avery
This patch set is based on the following patch submission and email exchange: [PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on Hyper-V K. Y. Srinivasan kys at microsoft.com Sat Mar 12 21:52:48 UTC 2016 http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-March/08711

[PATCH v2 1/2] scsi: scsi_transport_fc: Provide a lightweight option for Virtual FC Hosts.

2017-01-26 Thread Cathy Avery
This patch provides a means to offer a lightweight option to the current FC transport class. This new transport option is more suitable for FC transports running on a VM that virtualizes their FCs and that do not possess rports or vports whereas the heavyweight option maintains the standard physica

Re: [PATCH] pinctrl: aspeed: g4: Fix mux configuration for GPIOs AA[4-7], AB[0-7]

2017-01-26 Thread Linus Walleij
On Mon, Jan 23, 2017 at 6:27 AM, Andrew Jeffery wrote: > Incorrect video output configuration bits were being tested on pins in > GPIO banks AA and AB for the ROM{8,16} mux functions. The ROM{8,16} > functions are the highest priority for the relevant pins and also the > default function, so we r

[GIT PULL] pin control fixes for v4.10

2017-01-26 Thread Linus Walleij
Hi Linus, here is a bunch of pin control fixes for v4.10 that didn't get sent off until now, sorry for the delay. Please pull them in, it's only driver fixes. Yours, Linus Walleij The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8: Linux 4.10-rc3 (2017-01-08 14:18:17

Re: [PATCH v2 1/2] gpio: aspeed: Make bank names strings

2017-01-26 Thread Linus Walleij
On Tue, Jan 24, 2017 at 7:16 AM, Andrew Jeffery wrote: > From: Joel Stanley > > The Aspeed SoCs have more GPIOs than can be represented with A-Z. The > documentation uses two letter names such as AA and AB, so make the names > a three-character array in the bank struct to accommodate this. > > S

Re: [PATCH V11 2/3] ACPI: Add support for ResourceSource/IRQ domain mapping

2017-01-26 Thread Lorenzo Pieralisi
On Thu, Jan 26, 2017 at 11:43:43AM +0100, Rafael J. Wysocki wrote: > On Thursday, January 26, 2017 10:15:21 AM Lorenzo Pieralisi wrote: > > On Thu, Jan 26, 2017 at 03:01:18AM +0200, Andy Shevchenko wrote: > > > On Fri, Jan 20, 2017 at 4:34 AM, Agustin Vega-Frias > > > wrote: > > > > ACPI extended

Re: [PATCH v2 2/2] gpio: aspeed: Add banks Y, Z, AA, AB and AC

2017-01-26 Thread Linus Walleij
On Tue, Jan 24, 2017 at 7:16 AM, Andrew Jeffery wrote: > This is less straight-forward than one would hope, as some banks only > have 4 pins rather than 8, others are output only, yet more (W and > X, already supported) are input-only, and in the case of the g4 SoC bank > AC doesn't exist. > > Ad

Re: 4.10-rc5+ WARNING: CPU: 3 PID: 1 at ./include/drm/drm_crtc.h:857 drm_kms_helper_poll_enable.part.4+0xa8/0xc0

2017-01-26 Thread Jani Nikula
On Thu, 26 Jan 2017, Borislav Petkov wrote: > Hi all, > > I see this brand new warning when booting here. > > Top commit is v4.10-rc5-107-g883af14e67e8 from Linus' master. Please try [1]. BR, Jani. [1] http://mid.mail-archive.com/CAPM=9tzntDtR5opqNtfB=b_tdbv3bkgkjdhvfk9hvffzwmm...@mail.gmail.

Re: [PATCH 5/5] mm: vmscan: move dirty pages out of the way until they're flushed

2017-01-26 Thread Michal Hocko
On Mon 23-01-17 13:16:41, Johannes Weiner wrote: > We noticed a performance regression when moving hadoop workloads from > 3.10 kernels to 4.0 and 4.6. This is accompanied by increased pageout > activity initiated by kswapd as well as frequent bursts of allocation > stalls and direct reclaim scans.

Re: [PATCH v4 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-01-26 Thread Petr Mladek
On Thu 2017-01-19 09:46:09, Josh Poimboeuf wrote: > For live patching and possibly other use cases, a stack trace is only > useful if it can be assured that it's completely reliable. Add a new > save_stack_trace_tsk_reliable() function to achieve that. > diff --git a/arch/x86/kernel/stacktrace.c

Re: [PATCH] pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES

2017-01-26 Thread Linus Walleij
On Mon, Jan 23, 2017 at 8:15 AM, Jisheng Zhang wrote: > This should be a typo. > > Signed-off-by: Jisheng Zhang Patch applied to fixes. Yours, Linus Walleij

Re: [PATCHv4 3/5] pinctrl: mvebu: pinctrl driver for 98DX3236 SoC

2017-01-26 Thread Linus Walleij
On Mon, Jan 23, 2017 at 9:18 AM, Chris Packham wrote: > I noticed the mvebu pinctrl series isn't in Linus's (Torvalds) tree. Is > this on the cards for v4.10 or is it waiting for the next merge window? Next merge window. > In other words should I send v5 or my series now or wait for this to be

Understanding stop_machine() use for cpu_down()

2017-01-26 Thread Hardik H Bagdi
Hi, I'm trying to understand why stop_machine() is necessary for cpu_down() operation. I see that multi_cpu_stop() on every online cpu (which hogs the cpu and then triggers state changes state) and then, take_cpu_down is invoked on the outgoing cpu. This happens by every cpu decrementing the msda

Re: [PATCH 0/6 v3] kvmalloc

2017-01-26 Thread Michal Hocko
On Thu 26-01-17 14:40:04, Michal Hocko wrote: > On Thu 26-01-17 14:10:06, Daniel Borkmann wrote: > > On 01/26/2017 12:58 PM, Michal Hocko wrote: > > > On Thu 26-01-17 12:33:55, Daniel Borkmann wrote: > > > > On 01/26/2017 11:08 AM, Michal Hocko wrote: > > > [...] > > > > > If you disagree I can dro

Re: [PATCH v5 0/5] Update LZ4 compressor module

2017-01-26 Thread Sven Schmidt
On Thu, Jan 26, 2017 at 01:19:53AM -0800, Eric Biggers wrote: > On Thu, Jan 26, 2017 at 08:57:30AM +0100, Sven Schmidt wrote: > > > > This patchset is for updating the LZ4 compression module to a version based > > on LZ4 v1.7.3 allowing to use the fast compression algorithm aka LZ4 fast > > which

Re: [PATCH] pinctrl: mvebu: remove unused variable

2017-01-26 Thread Linus Walleij
On Mon, Jan 23, 2017 at 1:17 PM, Arnd Bergmann wrote: > A cleanup caused a harmless warning: > > drivers/pinctrl/mvebu/pinctrl-kirkwood.c: In function > 'kirkwood_pinctrl_probe': > drivers/pinctrl/mvebu/pinctrl-kirkwood.c:460:19: error: unused variable 'res' > [-Werror=unused-variable] > > The

[char-misc-next V3] mei: simplify error handling via devres function.

2017-01-26 Thread Tomas Winkler
Use devm_ and pcim_ functions to make error handling simpler and code smaller and tidier. Based on original patch by mei: me: use managed functions pcim_* and devm_* https://lkml.org/lkml/2016/2/1/339 Signed-off-by: Tomas Winkler Signed-off-by: Alexander Usyskin Signed-off-by: Andy Shevchenko

Re: linux-next: Tree for Jan 19

2017-01-26 Thread Guenter Roeck
On 01/25/2017 09:38 PM, Stafford Horne wrote: On Wed, Jan 25, 2017 at 08:54:53PM -0800, Guenter Roeck wrote: On 01/25/2017 08:37 AM, Paul Gortmaker wrote: [Re: linux-next: Tree for Jan 19] On 23/01/2017 (Mon 23:11) Stafford Horne wrote: [...] Are all of these builds using the tests from lk

<    1   2   3   4   5   6   7   8   >