Re: [RFC][PATCH 1/3] mm/debug-pagealloc.c: Split out page poisoning from debug page_alloc

2016-01-26 Thread Laura Abbott
On 01/25/2016 10:26 PM, Jianyu Zhan wrote: On Tue, Jan 26, 2016 at 12:55 AM, Laura Abbott wrote: +static bool __page_poisoning_enabled __read_mostly; +static bool want_page_poisoning __read_mostly = + !IS_ENABLED(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC); + I would say this patch is nice w

Re: [RFC][PATCH 2/3] mm/page_poison.c: Enable PAGE_POISONING as a separate option

2016-01-26 Thread Laura Abbott
On 01/25/2016 10:39 PM, Jianyu Zhan wrote: On Tue, Jan 26, 2016 at 12:55 AM, Laura Abbott wrote: --- a/mm/debug-pagealloc.c +++ b/mm/debug-pagealloc.c @@ -8,11 +8,5 @@ void __kernel_map_pages(struct page *page, int numpages, int enable) { - if (!page_poisoning_enabled()) -

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Kirill A. Shutemov
On Tue, Jan 26, 2016 at 01:52:31PM +0100, Dmitry Vyukov wrote: > Hello, > > The following program triggers the following bug: > > page:eab82240 count:0 mapcount:1 mapping:dead > index:0x0 compound_mapcount: 0 > flags: 0x1fffc00() > page dumped because: VM_BUG_ON_PAGE(P

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Luis R. Rodriguez
On Mon, Jan 25, 2016 at 05:55:02PM -0500, Boris Ostrovsky wrote: > On 01/25/2016 05:19 PM, Luis R. Rodriguez wrote: > >On Sat, Jan 23, 2016 at 02:49:36PM +, Andrew Cooper wrote: > > > > > >>it causes inappropriate linkage between the > >>toolstack and the version of Linux wishing to be booted.

Re: [RFC][PATCH 0/3] Sanitization of buddy pages

2016-01-26 Thread Laura Abbott
On 01/25/2016 10:05 PM, Sasha Levin wrote: On 01/25/2016 11:55 AM, Laura Abbott wrote: Hi, This is an implementation of page poisoning/sanitization for all arches. It takes advantage of the existing implementation for !ARCH_SUPPORTS_DEBUG_PAGEALLOC arches. This is a different approach than what

Re: [PATCH] mm: fix pfn_t to page conversion in vm_insert_mixed

2016-01-26 Thread Dan Williams
On Tue, Jan 26, 2016 at 11:46 AM, Julian Margetson wrote: > On 1/26/2016 2:37 PM, Dan Williams wrote: > > pfn_t_to_page() honors the flags in the pfn_t value to determine if a > pfn is backed by a page. However, vm_insert_mixed() was originally > written to use pfn_valid() to make this determinat

Re: [PATCH] printk, allow different timestamps for printk.time

2016-01-26 Thread Thomas Gleixner
Prarit, On Mon, 25 Jan 2016, Prarit Bhargava wrote: > diff --git a/Documentation/kernel-parameters.txt > b/Documentation/kernel-parameters.txt > index 87d40a7..2cf6692 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -3060,8 +3060,9 @@ bytes resp

Re: [PATCH v9 3/6] arm64/arm, numa, dt: adding numa dt binding implementation for arm64 platforms.

2016-01-26 Thread Bjorn Helgaas
Subject is "arm64/arm, numa, dt: adding ..." What is the significance of the "arm" part? The other patches only mention "arm64". General comment: the code below has little, if anything, that is actually arm64-specific. Maybe this is the first DT-based NUMA platform? I don't see other similar c

Re: [PATCH/RFC 3/3] s390: query dynamic DEBUG_PAGEALLOC setting

2016-01-26 Thread Thomas Gleixner
On Tue, 26 Jan 2016, Heiko Carstens wrote: > On Tue, Jan 26, 2016 at 10:18:25AM +0100, Christian Borntraeger wrote: > > We can use debug_pagealloc_enabled() to check if we can map > > the identity mapping with 1MB/2GB pages as well as to print > > the current setting in dump_stack. > > > > Signed-

Re: [REGRESSION] gpio: pxa: change initcall level second attempt

2016-01-26 Thread Robert Jarzmik
Robert Jarzmik writes: >> Have you seen this as well or do you know how exactly that should be >> worked around? > Hi Marcel, > > I haven't seen that before on my devicetree boards, I will try this evening on > top of next-20160125. > > Could you activate the debug logs in drivers/of/irq.c please

Re: [PATCH] genirq: fix trigger flags check for shared irqs

2016-01-26 Thread Thomas Gleixner
On Tue, 26 Jan 2016, Brian Starkey wrote: > For shared interrupts, if one requester passes in any IRQF_TRIGGER_* > flags whilst another doesn't, __setup_irq() can erroneously fail. > > The no-flags case should be treated as "already configured", so change > __setup_irq() to only check that the fl

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Andrew Morton
On Tue, 26 Jan 2016 22:28:29 +0200 "Kirill A. Shutemov" wrote: > The patch below fixes the issue for me, but this bug makes me wounder how > many bugs like this we have in kernel... :-/ > > Looks like we are too permissive about which VMA is migratable: > vma_migratable() filters out VMA by VM_

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Andrew Morton
On Tue, 26 Jan 2016 22:28:29 +0200 "Kirill A. Shutemov" wrote: > Let's mark the VMA as VM_IO to indicate to mm core that the VMA is > migratable. > > ... > > --- a/drivers/scsi/sg.c > +++ b/drivers/scsi/sg.c > @@ -1261,7 +1261,7 @@ sg_mmap(struct file *filp, struct vm_area_struct *vma) >

Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware

2016-01-26 Thread Bjorn Helgaas
On Mon, Jan 18, 2016 at 10:06:04PM +0530, Ganapatrao Kulkarni wrote: > update numa_node of device associated with pci bus. > moved down devm_kzalloc to allocate from node memory. > > Signed-off-by: Ganapatrao Kulkarni > --- > drivers/pci/host/pci-host-generic.c | 9 ++--- > 1 file changed, 6

Re: [PATCH] mm: fix pfn_t to page conversion in vm_insert_mixed

2016-01-26 Thread Julian Margetson
On 1/26/2016 4:34 PM, Dan Williams wrote: On Tue, Jan 26, 2016 at 11:46 AM, Julian Margetson wrote: On 1/26/2016 2:37 PM, Dan Williams wrote: pfn_t_to_page() honors the flags in the pfn_t value to determine if a pfn is backed by a page. However, vm_insert_mixed() was originally written to use

Re: linux-next: build failure after merge of the akpm tree

2016-01-26 Thread Stephen Rothwell
Hi Takashi, On Mon, 25 Jan 2016 14:45:55 +0100 Takashi Iwai wrote: > > From: Takashi Iwai > Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some > architectures > > Some architectures like PowerPC can handle the maximum struct size in > an ioctl only up to 13 bits, and str

Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware

2016-01-26 Thread Bjorn Helgaas
On Tue, Jan 26, 2016 at 02:50:05PM -0600, Bjorn Helgaas wrote: > On Mon, Jan 18, 2016 at 10:06:04PM +0530, Ganapatrao Kulkarni wrote: > > update numa_node of device associated with pci bus. > > moved down devm_kzalloc to allocate from node memory. > > > > Signed-off-by: Ganapatrao Kulkarni > > --

Re: WARNING in do_jobctl_trap

2016-01-26 Thread Oleg Nesterov
On 01/26, Dmitry Vyukov wrote: > > Hello, > > The following program triggers WARN_ON_ONCE(!signr) in do_jobctl_trap: Can't reproduce, but most probably I understand the problem... I'll try to make the simplified test-case tomorrow, it should work if I am right. Does it work for you reliably? If

Re: [PATCH] printk, allow different timestamps for printk.time

2016-01-26 Thread Prarit Bhargava
On 01/26/2016 03:34 PM, Thomas Gleixner wrote: > Prarit, > > On Mon, 25 Jan 2016, Prarit Bhargava wrote: >> diff --git a/Documentation/kernel-parameters.txt >> b/Documentation/kernel-parameters.txt >> index 87d40a7..2cf6692 100644 >> --- a/Documentation/kernel-parameters.txt >> +++ b/Documentat

[PATCH] mm: memcontrol: drop superfluous entry in the per-memcg stats array

2016-01-26 Thread Johannes Weiner
MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not an actual array entry. Reuse it for the first cgroup2 stat entry, like in the event array. Fixes: b2807f07f4f8 ("mm: memcontrol: add "sock" to cgroup2 memory.stat") Signed-off-by: Johannes Weiner --- include/linux/memcontrol.

[PATCH] Documentation: cgroup-v2: add memory.stat::sock description

2016-01-26 Thread Johannes Weiner
Signed-off-by: Johannes Weiner --- Documentation/cgroup-v2.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt index 65b3eac8856c..e8d25e784214 100644 --- a/Documentation/cgroup-v2.txt +++ b/Documentation/cgroup-v2.txt @@ -843,6 +8

[PATCH 02/17] resource: Handle resource flags properly

2016-01-26 Thread Borislav Petkov
From: Toshi Kani I/O resource flags consist of I/O resource types and modifier bits. Therefore, checking an I/O resource type in 'flags' must be performed with a bitwise operation. Fix find_next_iomem_res() and region_intersects() that simply compare 'flags' against a given value. Also change _

[PATCH 06/17] arch: Set IORESOURCE_SYSTEM_RAM flag for System RAM

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Set IORESOURCE_SYSTEM_RAM in flags of resource ranges with "System RAM", "Kernel code", "Kernel data", and "Kernel bss". Note that: - IORESOURCE_SYSRAM (i.e. modifier bit) is set in flags when IORESOURCE_MEM is already set. IORESOURCE_SYSTEM_RAM is defined as (IORESOURCE

[PATCH 15/17] x86/kexec: Remove walk_iomem_res() call with GART type

2016-01-26 Thread Borislav Petkov
From: Toshi Kani There is no longer any driver inserting a "GART" region in the kernel since 707d4eefbdb3 ("Revert "[PATCH] Insert GART region into resource map""). Remove the call to walk_iomem_res() with "GART" type, its callback function, and GART-specific variables set by the callback. R

[PATCH 14/17] x86, kexec, nvdimm: Use walk_iomem_res_desc() for iomem search

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Change the callers of walk_iomem_res() scanning for the following resources by name to use walk_iomem_res_desc() instead. "ACPI Tables" "ACPI Non-volatile Storage" "Persistent Memory (legacy)" "Crash kernel" Note, the caller of walk_iomem_res() with "GART" will be removed i

Re: [PATCH] clk: sunxi: Fix mod0 clock calculation to return stable results and check divisor size limits

2016-01-26 Thread Maxime Ripard
Hi, On Thu, Jan 14, 2016 at 11:40:15AM +0100, Marcus Weseloh wrote: > > On Mon, Dec 28, 2015 at 06:31:32PM +0100, Marcus Weseloh wrote: > >> This patch fixes some problems in the mod0 clock calculation. It has > >> the potential to break stuff, as the issues explained below had the > >> effect tha

[PATCH 04/17] x86/e820: Set System RAM type and descriptor

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Change e820_reserve_resources() to set 'flags' and 'desc' from e820 types. Set E820_RESERVED_KERN and E820_RAM's (System RAM) io resource type to IORESOURCE_SYSTEM_RAM. Do the same for "Kernel data", "Kernel code", and "Kernel bss", which are child nodes of System RAM. I/O res

[PATCH 13/17] resource: Add walk_iomem_res_desc()

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Add a new interface, walk_iomem_res_desc(), which walks through the iomem table by identifying a target with @flags and @desc. This interface provides the same functionality as walk_iomem_res(), but does not use strcmp() to @name for better efficiency. walk_iomem_res() is deprec

[PATCH 01/17] resource: Add System RAM resource type

2016-01-26 Thread Borislav Petkov
From: Toshi Kani The IORESOURCE_MEM I/O resource type is used for all types of memory-mapped ranges, ex. System RAM, System ROM, Video RAM, Persistent Memory, PCI Bus, PCI MMCONFIG, ACPI Tables, IOAPIC, reserved, and so on. This requires walk_system_ram_range(), walk_system_ram_res(), and region

[PATCH 11/17] arm/samsung: Change s3c_pm_run_res() to use System RAM type

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Change s3c_pm_run_res() to check with IORESOURCE_SYSTEM_RAM, instead of strcmp() with "System RAM", to walk through System RAM ranges in the iomem table. No functional change is made to the interface. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Toshi Kani Cc: Andrew Morto

[PATCH 16/17] resource: Kill walk_iomem_res()

2016-01-26 Thread Borislav Petkov
From: Toshi Kani walk_iomem_res_desc() replaced walk_iomem_res() and there is no caller to walk_iomem_res() any more. Kill it. Also remove @name from find_next_iomem_res() as it is no longer used. Signed-off-by: Toshi Kani Acked-by: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Dave Youn

[PATCH 09/17] drivers: Initialize resource entry to zero

2016-01-26 Thread Borislav Petkov
From: Toshi Kani I/O resource descriptor, 'desc' in struct resource, needs to be initialized to zero by default. Some drivers call kmalloc() to allocate a resource entry, but do not initialize it to zero by memset(). Change these drivers to call kzalloc(), instead. Signed-off-by: Toshi Kani A

[PATCH 12/17] memremap: Change region_intersects() to take @flags and @desc

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Change region_intersects() to identify a target with @flags and @desc, instead of @name with strcmp(). Change the callers of region_intersects(), memremap() and devm_memremap(), to set IORESOURCE_SYSTEM_RAM in @flags and IORES_DESC_NONE in @desc when searching System RAM. Also,

[PATCH 10/17] resource: Change walk_system_ram() to use System RAM type

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Now that all System RAM resource entries have been initialized to IORESOURCE_SYSTEM_RAM type, change walk_system_ram_res() and walk_system_ram_range() to call find_next_iomem_res() by setting @res.flags to IORESOURCE_SYSTEM_RAM and @name to NULL. With this change, they walk throu

[PATCH 5/5] mm: workingset: per-cgroup cache thrash detection

2016-01-26 Thread Johannes Weiner
Cache thrash detection (see a528910e12ec "mm: thrash detection-based file cache sizing" for details) currently only works on the system level, not inside cgroups. Worse, as the refaults are compared to the global number of active cache, cgroups might wrongfully get all their refaults activated when

[PATCH 0/5] mm: workingset: per-cgroup thrash detection

2016-01-26 Thread Johannes Weiner
Hi, these patches make the workingset code cgroup-aware, so that page reclaim works properly when using the cgroup memory controller. More details in the 5/5 changelog. This should have been part of the original thrash detection patches, but those were already too complex. So here we go. Thanks,

[PATCH 4/5] mm: workingset: eviction buckets for bigmem/lowbit machines

2016-01-26 Thread Johannes Weiner
For per-cgroup thrash detection, we need to store the memcg ID inside the radix tree cookie as well. However, on 32 bit that doesn't leave enough bits for the eviction timestamp to cover the necessary range of recently evicted pages. The radix tree entry would look like this: [ RADIX_TREE_EXCEPTIO

[PATCH 3/5] mm: workingset: separate shadow unpacking and refault calculation

2016-01-26 Thread Johannes Weiner
Per-cgroup thrash detection will need to derive a live memcg from the eviction cookie, and doing that inside unpack_shadow() will get nasty with the reference handling spread over two functions. In preparation, make unpack_shadow() clearly about extracting static data, and let workingset_refault()

[PATCH 1/5] mm: memcontrol: generalize locking for the page->mem_cgroup binding

2016-01-26 Thread Johannes Weiner
So far the only sites that needed to exclude charge migration to stabilize page->mem_cgroup have been per-cgroup page statistics, hence the name mem_cgroup_begin_page_stat(). But per-cgroup thrash detection will add another site that needs to ensure page->mem_cgroup lifetime. Rename these locking

[PATCH 2/5] mm: workingset: #define radix entry eviction mask

2016-01-26 Thread Johannes Weiner
This is a compile-time constant, no need to calculate it on refault. Signed-off-by: Johannes Weiner --- mm/workingset.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mm/workingset.c b/mm/workingset.c index 61ead9e5549d..3ef92f6e41fe 100644 --- a/mm/workingset.c +

[PATCH 17/17] ACPI/EINJ: Allow memory error injection to NVDIMM

2016-01-26 Thread Borislav Petkov
From: Toshi Kani In the case of memory error injection, einj_error_inject() checks if a target address is System RAM. Change this check to allow injecting a memory error into NVDIMM memory by calling region_intersects() with IORES_DESC_PERSISTENT_MEMORY. This enables memory error testing on both

[PATCH 08/17] xen, mm: Set IORESOURCE_SYSTEM_RAM to System RAM

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Set IORESOURCE_SYSTEM_RAM in struct resource.flags of "System RAM" entries. Signed-off-by: Toshi Kani Acked-by: David Vrabel # xen Cc: Andrew Banman Cc: Andrew Morton Cc: Boris Ostrovsky Cc: Dan Williams Cc: David Rientjes Cc: David Vrabel Cc: Gu Zheng Cc: Konrad Rzeszu

[PATCH 07/17] kexec: Set IORESOURCE_SYSTEM_RAM for System RAM

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Set proper ioresource flags and types for crash kernel reservation areas. Reviewed-by: Dave Young Signed-off-by: Toshi Kani Cc: Andrew Morton Cc: Baoquan He Cc: Dave Young Cc: HATAYAMA Daisuke Cc: ke...@lists.infradead.org Cc: linux-a...@vger.kernel.org Cc: linux-mm Cc: M

[PATCH 05/17] ia64: Set System RAM type and descriptor

2016-01-26 Thread Borislav Petkov
From: Toshi Kani Change efi_initialize_iomem_resources() to set 'flags' and 'desc' for EFI memory types. IORESOURCE_SYSRAM, a modifier bit, is set for System RAM as IORESOURCE_MEM is already set. IORESOURCE_SYSTEM_RAM is defined as (IORESOURCE_MEM|IORESOURCE_SYSRAM). I/O resource descriptor is se

[PATCH 03/17] resource: Add I/O resource descriptor

2016-01-26 Thread Borislav Petkov
From: Toshi Kani walk_iomem_res() and region_intersects() still need to use strcmp() for searching a resource entry by @name in the iomem table. This patch introduces I/O resource descriptor 'desc' in struct resource for the iomem search interfaces. Drivers can assign their unique descriptor to

[PATCH 00/17] tip-queue: 2016-01-26, mm stuff

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov Hi, so this is Toshi's work to make the io resource walking not take a resource name and the code do strcmp() but use proper resource descriptors (as unsigned longs) and compare them, see patch 3 for example. They're a good cleanup, look good to me, Toshi and I have tested

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Kirill A. Shutemov
On Tue, Jan 26, 2016 at 12:49:16PM -0800, Andrew Morton wrote: > On Tue, 26 Jan 2016 22:28:29 +0200 "Kirill A. Shutemov" > wrote: > > > Let's mark the VMA as VM_IO to indicate to mm core that the VMA is > > migratable. > > > > ... > > > > --- a/drivers/scsi/sg.c > > +++ b/drivers/scsi/sg.c > >

Re: [PATCH 07/15] dmaengine: dw: revisit data_width property

2016-01-26 Thread Rob Herring
On Sun, Jan 24, 2016 at 07:21:54PM +, Mans Rullgard wrote: > From: Andy Shevchenko > > There are several changes are done here: > > - Convert the property to be in bytes > >Much more convenient than keeping encoded value. > > - Use one value for all AHB masters for now > >It see

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Kirill A. Shutemov
On Tue, Jan 26, 2016 at 12:48:23PM -0800, Andrew Morton wrote: > On Tue, 26 Jan 2016 22:28:29 +0200 "Kirill A. Shutemov" > wrote: > > > The patch below fixes the issue for me, but this bug makes me wounder how > > many bugs like this we have in kernel... :-/ > > > > Looks like we are too permis

Re: [PATCH 12/17] memremap: Change region_intersects() to take @flags and @desc

2016-01-26 Thread Dan Williams
On Tue, Jan 26, 2016 at 12:57 PM, Borislav Petkov wrote: > From: Toshi Kani > > Change region_intersects() to identify a target with @flags and @desc, > instead of @name with strcmp(). > > Change the callers of region_intersects(), memremap() and > devm_memremap(), to set IORESOURCE_SYSTEM_RAM in

Re: [PATCH] signals: work around random wakeups in sigsuspend()

2016-01-26 Thread Oleg Nesterov
On 01/25, Andrew Morton wrote: > > On Mon, 25 Jan 2016 10:21:46 -0500 Sasha Levin wrote: > > > A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING > > being set. > > > > Avoid that by making sure we were signaled, like sys_pause() does. > > What we're lacking here is any descript

[PATCH 02/10] x86/asm: Drop a comment left over from X86_OOSTORE

2016-01-26 Thread Borislav Petkov
From: "Michael S. Tsirkin" The comment about wmb() being non-nop to deal with non-intel CPUs is a left over from before commit 09df7c4c8097 ("x86: Remove CONFIG_X86_OOSTORE"). It makes no sense now: in particular, wmb() is not a nop even for regular intel CPUs because of weird use-cases e.g.

[PATCH 05/10] x86/cpufeature: Replace the old static_cpu_has() with safe variant

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov So the old one didn't work properly before alternatives had run. And it was supposed to provide an optimized JMP because the assumption was that the offset it is jumping to is within a signed byte and thus a two-byte JMP. So I did an x86_64 allyesconfig build and dumped all

[PATCH 04/10] x86/cpufeature: Carve out X86_FEATURE_*

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov Move them to a separate header and have the following dependency: x86/cpufeatures.h <- x86/processor.h <- x86/cpufeature.h This makes it easier to use the header in asm code and not include the whole cpufeature.h and add guards for asm. Signed-off-by: Borislav Petkov Sug

[PATCH 08/10] x86/alternatives: Discard dynamic check after init

2016-01-26 Thread Borislav Petkov
From: Brian Gerst Move the code to do the dynamic check to the altinstr_aux section so that it is discarded after alternatives have run and a static branch has been chosen. This way we're changing the dynamic branch from C code to assembly, which makes it *substantially* smaller while avoiding a

[PATCH 06/10] x86/cpufeature: Get rid of the non-asm goto variant

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov I can simply quote hpa from the mail: "Get rid of the non-asm goto variant and just fall back to dynamic if asm goto is unavailable. It doesn't make any sense, really, if it is supposed to be safe, and by now the asm goto-capable gcc is in more wide use. (Originally the gcc

[PATCH 00/10] tip-queue 2016-01-26, rest

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov Hi, this is the rest of the series today. Main one is the cpufeature cleanup. I merged the AVIC patch from tip:x86/cpu so that the rest applies cleanly. The rest is simplifications/cleanups. Please apply, thanks. Alexander Kuleshov (1): x86/head_64: Simplify kernel load

[PATCH 09/10] x86/vdso: Use static_cpu_has()

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov ... and simplify and speed up a tad. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski --- arch/x86/entry/vdso/vma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 5471ac362147..6b46648588d

[PATCH 01/10] x86/asm: Add condition codes clobber to memory barrier macros

2016-01-26 Thread Borislav Petkov
From: "Michael S. Tsirkin" ADDL clobbers flags (such as CF) but barrier.h didn't tell this to gcc. Historically, gcc doesn't need them on x86, and always considers flags clobbered. We are probably missing the cc clobber in a *lot* of places for this reason. But even if not necessary, it's probab

Re: [RFC PATCH net] net/core: don't increment rx_dropped on inactive slaves

2016-01-26 Thread Jarod Wilson
On Sat, Jan 23, 2016 at 07:23:09AM -0800, Eric Dumazet wrote: > On Fri, 2016-01-22 at 14:11 -0500, Jarod Wilson wrote: > > > --- > > net/core/dev.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/net/core/dev.c b/net/core/dev.c > > index 8cba3d8..1354c7b 100644 > > --- a/net/co

[PATCH 07/10] x86/alternatives: Add an auxilary section

2016-01-26 Thread Borislav Petkov
From: Borislav Petkov Add .altinstr_aux for additional instructions which will be used before and/or during patching. All stuff which needs more sophisticated patching should go there. See next patch. Signed-off-by: Borislav Petkov --- arch/x86/kernel/vmlinux.lds.S | 11 +++ 1 file cha

[PATCH 10/10] x86/head_64: Simplify kernel load address alignment check

2016-01-26 Thread Borislav Petkov
From: Alexander Kuleshov We are using %rax as temporary register to check the kernel address alignment. We don't really have to since the TEST instruction does not clobber the destination operand. Suggested-by: Brian Gerst Signed-off-by: Alexander Kuleshov Cc: Alexander Popov Cc: Andrey Ryabi

qemu fails to build on 4.5-rc1

2016-01-26 Thread Pranith Kumar
Hi Dave, Commit 334e580a6f97 ("fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion") breaks building latest qemu as follows: In file included from /usr/include/xfs/xfs.h:58:0, from /home/pranith/qemu/block/raw-posix.c:96: /usr/include/xfs/xfs_fs.h:42:8: error: redefiniti

Re: [PATCH] zram: export the number of available comp streams

2016-01-26 Thread Andrew Morton
On Tue, 26 Jan 2016 21:03:59 +0900 Sergey Senozhatsky wrote: > I've been asked several very simple questions: > a) How can I ensure that zram uses (or used) several compression >streams? > b) What is the current number of comp streams (how much memory >does zram *actually* use for compre

[PATCH 03/10] x86/asm: Tweak the comment about wmb() use for IO

2016-01-26 Thread Borislav Petkov
From: "Michael S. Tsirkin" On x86, we *do* still use the non-nop rmb()/wmb() for IO barriers, but even that is generally questionable. Leave them around for historical reasons, unless somebody can point to a case where they care about the performance. Tweak the comment so people don't think they

Re: [RFC PATCH net] net/core: don't increment rx_dropped on inactive slaves

2016-01-26 Thread David Miller
From: Jarod Wilson Date: Tue, 26 Jan 2016 16:14:53 -0500 > # ethtool -S bond0 > no stats available ethtool -S is for device specific stats. Some drivers use this facility to provide per-RX-queue and per-TX-queue versions of the existing core netdev stats.

Re: linux-next: build failure after merge of the akpm tree

2016-01-26 Thread Takashi Iwai
On Tue, 26 Jan 2016 21:51:30 +0100, Stephen Rothwell wrote: > > Hi Takashi, > > On Mon, 25 Jan 2016 14:45:55 +0100 Takashi Iwai wrote: > > > > From: Takashi Iwai > > Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some > > architectures > > > > Some architectures like Pow

Re: [RFC PATCH net] net/core: don't increment rx_dropped on inactive slaves

2016-01-26 Thread Eric Dumazet
On Tue, Jan 26, 2016 at 1:14 PM, Jarod Wilson wrote: > On Sat, Jan 23, 2016 at 07:23:09AM -0800, Eric Dumazet wrote: >> On Fri, 2016-01-22 at 14:11 -0500, Jarod Wilson wrote: >> >> > --- >> > net/core/dev.c | 3 +++ >> > 1 file changed, 3 insertions(+) >> > >> > diff --git a/net/core/dev.c b/net/

Re: [PATCH v6 2/3] spi: sun4i: Fix clock calculations to be predictable and never exceed the requested rate

2016-01-26 Thread Maxime Ripard
On Mon, Jan 18, 2016 at 10:40:59AM +0100, Marcus Weseloh wrote: > Hi, > > 2016-01-17 19:51 GMT+01:00 Maxime Ripard : > > On Sun, Jan 10, 2016 at 10:11:11PM +0100, Marcus Weseloh wrote: > >> >> >> - /* Ensure that we have a parent clock fast enough */ > >> >> >> + /* > >> >> >> + * Ens

Re: [RFC][PATCH 1/4] arm64: Drop alloc function from create_mapping

2016-01-26 Thread Laura Abbott
On 01/26/2016 03:22 AM, Mark Rutland wrote: On Mon, Jan 25, 2016 at 08:52:12AM -0800, Laura Abbott wrote: create_mapping is only used in fixmap_remap_fdt. All the create_mapping calls need to happen on existing translation table pages without additional allocations. Rather than have an alloc fun

Re: [PATCH] Revert "regmap-mmio: Use native endianness for read/write"

2016-01-26 Thread Mark Brown
On Tue, Jan 26, 2016 at 03:23:12PM +, Mark Brown wrote: > On Tue, Jan 26, 2016 at 02:20:14PM +0100, Johannes Berg wrote: > > > Let me know if you want anything tested btw - it's pretty simple to > > build and tftpboot a kernel now that I have the setup :) > > I'm going to have some patches ou

Re: [PATCH] mm: memcontrol: drop superfluous entry in the per-memcg stats array

2016-01-26 Thread Andrew Morton
On Tue, 26 Jan 2016 15:55:29 -0500 Johannes Weiner wrote: > MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not > an actual array entry. Reuse it for the first cgroup2 stat entry, like > in the event array. > > ... > > --- a/include/linux/memcontrol.h > +++ b/include/linux/mem

Re: [RFC PATCH net] net/core: don't increment rx_dropped on inactive slaves

2016-01-26 Thread Jarod Wilson
On Tue, Jan 26, 2016 at 01:24:59PM -0800, Eric Dumazet wrote: > On Tue, Jan 26, 2016 at 1:14 PM, Jarod Wilson wrote: > > On Sat, Jan 23, 2016 at 07:23:09AM -0800, Eric Dumazet wrote: > >> On Fri, 2016-01-22 at 14:11 -0500, Jarod Wilson wrote: > >> > >> > --- > >> > net/core/dev.c | 3 +++ > >> >

Re: UBSAN: Undefined behaviour in net/ipv4/fib_trie.c:1397:22 and UBSAN: Undefined behaviour in ./arch/x86/include/asm/atomic.h:156:2

2016-01-26 Thread Eric Dumazet
On Tue, 2016-01-26 at 20:45 +0100, Toralf Förster wrote: > at a 32 nbit KVM image of a Gentoo Linux runniogn v4.5-rc1 - attached is > /var/log/messages > Jan 26 20:40:04 n22kvm-clone kernel: Jan 26 20:40:04 n22kvm-

Re: [RFC PATCH net] net/core: don't increment rx_dropped on inactive slaves

2016-01-26 Thread Jarod Wilson
On Tue, Jan 26, 2016 at 01:21:00PM -0800, David Miller wrote: > From: Jarod Wilson > Date: Tue, 26 Jan 2016 16:14:53 -0500 > > > # ethtool -S bond0 > > no stats available > > ethtool -S is for device specific stats. Okay, good, that was what it looked like to me. Glad I'm not completely lost he

Re: mm: VM_BUG_ON_PAGE(PageTail(page)) in mbind

2016-01-26 Thread Vlastimil Babka
On 26.1.2016 21:28, Kirill A. Shutemov wrote: > From 396ad132be07a2d2b9ec5d1d6ec9fe2fffe8105e Mon Sep 17 00:00:00 2001 > From: "Kirill A. Shutemov" > Date: Tue, 26 Jan 2016 22:59:16 +0300 > Subject: [PATCH] sg: mark VMA as VM_IO to prevent migration > > Reduced testcase: > > #include >

Re: [PATCH v2 0/3] x86: faster mb()+other barrier.h tweaks

2016-01-26 Thread H. Peter Anvin
On 01/26/16 00:20, Michael S. Tsirkin wrote: > On Tue, Jan 12, 2016 at 02:25:24PM -0800, H. Peter Anvin wrote: > > Hi hpa, > Any luck getting some feedback on this one? > Yes. What we know so far is that *most* cases it will work, but there are apparently a few corner cases where MFENCE or a fu

Re: [RFC PATCH] mm: support CONFIG_ZONE_DEVICE + CONFIG_ZONE_DMA

2016-01-26 Thread Vlastimil Babka
On 26.1.2016 1:06, Dan Williams wrote: > It appears devices requiring ZONE_DMA are still prevalent (see link > below). For this reason the proposal to require turning off ZONE_DMA to > enable ZONE_DEVICE is untenable in the short term. We want a single > kernel image to be able to support legacy

Re: [PATCH] mm: memcontrol: drop superfluous entry in the per-memcg stats array

2016-01-26 Thread Johannes Weiner
On Tue, Jan 26, 2016 at 01:30:24PM -0800, Andrew Morton wrote: > On Tue, 26 Jan 2016 15:55:29 -0500 Johannes Weiner wrote: > > > MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not > > an actual array entry. Reuse it for the first cgroup2 stat entry, like > > in the event array

Re: [RFC PATCH 2/3] lib/list_batch, x86: Enable list insertion/deletion batching in x86-64

2016-01-26 Thread Andi Kleen
Waiman Long writes: > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 330e738..443e41d 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -42,6 +42,7 @@ config X86 > select ARCH_SUPPORTS_NUMA_BALANCING if X86_64 > select ARCH_USE_BUILTIN_BSWAP > select A

[PATCH v4 0/2] pci: Add host controller driver for Cavium ThunderX PCIe

2016-01-26 Thread David Daney
From: David Daney Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. There are two patches: 1) Refactor code in pci-host-generic so that it can more easily be used by other drivers. This splits the driver for CAM and ECAM access methods

[PATCH v4 1/2] PCI: generic: Refactor code to enable reuse by other drivers.

2016-01-26 Thread David Daney
From: David Daney No change in functionality. Move structure definitions into a separate header file. Move common code to new file with Kconfig machinery to build it. Split probe function in to two parts: - a small driver specific probe function (gen_pci_probe) - a common probe that ca

[PATCH v4 2/2] pci, pci-thunder-pem: Add PCIe host driver for ThunderX processors.

2016-01-26 Thread David Daney
From: David Daney Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config space accessor functions. The pci-host-common code is used to configure the PCI machinery. Signed-off-by: David Daney Acked-by: Rob Her

[PATCH] [media] v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER

2016-01-26 Thread Arnd Bergmann
em28xx selects VIDEO_TUNER, which has a dependency on MEDIA_TUNER, so we get a Kconfig warning if that is disabled: warning: (VIDEO_PVRUSB2 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_C

Re: [RFC PATCH] mm: support CONFIG_ZONE_DEVICE + CONFIG_ZONE_DMA

2016-01-26 Thread Dan Williams
On Tue, Jan 26, 2016 at 1:42 PM, Vlastimil Babka wrote: > On 26.1.2016 1:06, Dan Williams wrote: >> It appears devices requiring ZONE_DMA are still prevalent (see link >> below). For this reason the proposal to require turning off ZONE_DMA to >> enable ZONE_DEVICE is untenable in the short term.

Re: [RFC][PATCH 2/4] arm64: Add option to force mapping with PAGE_SIZE pages

2016-01-26 Thread Laura Abbott
On 01/26/2016 03:14 AM, Mark Rutland wrote: Hi, On Mon, Jan 25, 2016 at 08:52:13AM -0800, Laura Abbott wrote: Under some circumstances (e.g. debugging) it may be useful to have all kernel memory mapped using PAGE_SIZE pages. Add an option for this. Signed-off-by: Laura Abbott --- arch/arm64

Re: [Xen-devel] [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-26 Thread Boris Ostrovsky
On 01/26/2016 03:30 PM, Luis R. Rodriguez wrote: What I'm proposing? 1) Lets see if we can put a proactive stop-gap to issues such as the cr4 shadow bug and Kasan bugs from creeping in. This should not only help PV but perhaps HVMLite. If you'd like to help with that refer to this thread: http

Re: [PATCH V4 16/16] ARM64: tegra: select PM_GENERIC_DOMAINS

2016-01-26 Thread Kevin Hilman
Thierry Reding writes: > On Thu, Jan 14, 2016 at 12:11:39PM +0100, Arnd Bergmann wrote: >> On Thursday 14 January 2016 11:29:24 Thierry Reding wrote: >> > >> > It just occurred to me that none of these options really make much of a >> > difference. As Jon mentioned once we merge this series a lo

Re: [PATCH] PCI: iproc: Fix BCMA PCIe bus scanning regression

2016-01-26 Thread Bjorn Helgaas
On Tue, Jan 26, 2016 at 10:37:20AM -0800, Ray Jui wrote: > Hi Bjorn, > > On 1/26/2016 10:22 AM, Bjorn Helgaas wrote: > >Hi Ray, > > > >On Wed, Jan 20, 2016 at 02:55:10PM -0800, Ray Jui wrote: > >>Commit 943ebae781f5 ("PCI: iproc: Add PAXC interface support") causes > >>regression on EP device dete

Re: [patch] hfs: fix hfs_readdir()

2016-01-26 Thread Viacheslav Dubeyko
On Tue, 2016-01-26 at 22:18 +0300, Dan Carpenter wrote: > Hm, I completely didn't see that it was a union instead of a struct. I > still think my fix is actually correct though. Now that you point out > the union, I see that my change is equivalent to just removing the '&' > char. > > - memc

Re: [PATCH v1 01/12] x86/smp: Make start_secondary() and initial_pg_pmd visible globally

2016-01-26 Thread Borislav Petkov
On Mon, Jan 25, 2016 at 10:30:26AM -0500, Boris Ostrovsky wrote: > initial_pg_pmd (together with initial_page_table) are not really required > --- I just used them for temporary page tables in the hvmlite startup code > instead of allocating dedicated pages for that. Perhaps there is other > (Xen-s

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Tue, Jan 26, 2016 at 12:16:09PM +, Will Deacon wrote: > On Mon, Jan 25, 2016 at 10:03:22PM -0800, Paul E. McKenney wrote: > > On Mon, Jan 25, 2016 at 04:42:43PM +, Will Deacon wrote: > > > On Fri, Jan 15, 2016 at 01:58:53PM -0800, Paul E. McKenney wrote: > > > > PPC Overlapping Group-B s

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Tue, Jan 26, 2016 at 11:44:46AM -0800, Linus Torvalds wrote: > On Tue, Jan 26, 2016 at 9:22 AM, Peter Zijlstra wrote: > > > > This is distinct from: > > That may be distinct, but: > > > struct foo *x = READ_ONCE(*ptr); > > smp_read_barrier_depends(); > > x->bar = 5; >

Re: [PATCH v8 2/5] dt-bindings: mediatek: Add smi dts binding

2016-01-26 Thread Rob Herring
On Tue, Jan 26, 2016 at 12:12:39PM +0800, Yong Wu wrote: > This patch add smi binding document and smi local arbiter header file. > > Signed-off-by: Yong Wu > --- > .../memory-controllers/mediatek,smi-common.txt | 24 + > .../memory-controllers/mediatek,smi-larb.txt | 25 + >

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Tue, Jan 26, 2016 at 11:19:27AM +0100, Peter Zijlstra wrote: > On Mon, Jan 25, 2016 at 10:03:22PM -0800, Paul E. McKenney wrote: > > On Mon, Jan 25, 2016 at 04:42:43PM +, Will Deacon wrote: > > > On Fri, Jan 15, 2016 at 01:58:53PM -0800, Paul E. McKenney wrote: > > > > On Fri, Jan 15, 2016 a

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Tue, Jan 26, 2016 at 11:24:02AM +0100, Peter Zijlstra wrote: > On Thu, Jan 14, 2016 at 02:20:46PM -0800, Paul E. McKenney wrote: > > On Thu, Jan 14, 2016 at 01:24:34PM -0800, Leonid Yegoshin wrote: > > > On 01/14/2016 12:48 PM, Paul E. McKenney wrote: > > > > > > > >So SYNC_RMB is intended to im

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Tue, Jan 26, 2016 at 11:09:27AM +, Will Deacon wrote: > On Tue, Jan 26, 2016 at 11:32:00AM +0100, Peter Zijlstra wrote: > > On Tue, Jan 26, 2016 at 11:24:02AM +0100, Peter Zijlstra wrote: > > > > > Yeah, this goes under the header: memory-barriers.txt is _NOT_ a > > > specification (I seem

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-26 Thread Paul E. McKenney
On Wed, Jan 27, 2016 at 12:52:07AM +0800, Boqun Feng wrote: > Hi Paul, > > On Mon, Jan 18, 2016 at 07:46:29AM -0800, Paul E. McKenney wrote: > > On Mon, Jan 18, 2016 at 04:19:29PM +0800, Herbert Xu wrote: > > > Paul E. McKenney wrote: > > > > > > > > You could use SYNC_ACQUIRE() to implement read

[PATCH] pci, pci-thunder-ecam: Add driver for ThunderX-pass1 on-chip ECAM devices

2016-01-26 Thread David Daney
From: David Daney The cavium,pci-thunder-ecam devices are exactly ECAM based PCI roots. They are special in that all the BARs are at fixed addresses. To handle this in a manner compatible with the core PCI code, we have the config access functions synthesize Enhanced Allocation capability entrie

Re: [PATCH 6/7] [media] em28xx: add MEDIA_TUNER dependency

2016-01-26 Thread Arnd Bergmann
On Tuesday 26 January 2016 15:08:19 Mauro Carvalho Chehab wrote: > > > Ok, if we'll have platform drivers for analog TV using the I2C bus > > > at directly in SoC, then your solution is better, but the tuner core > > > driver may not be the best way of doing it. So, for now, I would use > > > the s

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