[PATCH v4 09/11] smack: namespace groundwork

2015-10-14 Thread Lukasz Pawelczyk
This commit introduces several changes to Smack to prepare it for namespace implementation. All the changes are related to namespaces. Overview of the changes: - Adds required data structures for mapped labels and functions to operate on them. - Implements the proc interface

[PATCH 25/31] bpf tools: Extract and collect map names from BPF object file

2015-10-14 Thread Wang Nan
This patch collect name of map in BPF object files and saves them into 'maps' field in 'struct bpf_object'. 'bpf_object__get_map_by_name' is introduced to retrive map fd and definitions through its name. Signed-off-by: Wang Nan Signed-off-by: He Kuang Cc: Arnaldo Carvalho de Melo Cc: Alexei

[PATCH 03/31] perf tools: Enable passing bpf object file to --event

2015-10-14 Thread Wang Nan
By introducing new rules in tools/perf/util/parse-events.[ly], this patch enables 'perf record --event bpf_file.o' to select events by an eBPF object file. It calls parse_events_load_bpf() to load that file, which uses bpf__prepare_load() and finally calls bpf_object__open() for the object files.

[PATCH 18/31] perf tools: Use same BPF program if arguments are identical

2015-10-14 Thread Wang Nan
This patch allows creating only one BPF program for different 'probe_trace_event'(tev) generated by one 'perf_probe_event'(pev), if their prologues are identical. This is done by comparing argument list of different tev, and maps type of prologue and tev using a mapping array. This patch utilizes

[PATCH 05/31] perf record: Load eBPF object into kernel

2015-10-14 Thread Wang Nan
This patch utilizes bpf_object__load() provided by libbpf to load all objects into kernel. Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: He Kuang Cc: Jiri Olsa Cc: Kaixu Xia Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Paul

[PATCH 04/31] perf record, bpf: Create probe points for BPF programs

2015-10-14 Thread Wang Nan
This patch introduces bpf__{un,}probe() functions to enable callers to create kprobe points based on section names a BPF program. It parses the section names in the program and creates corresponding 'struct perf_probe_event' structures. The parse_perf_probe_command() function is used to do the

[PATCH 26/31] perf tools: Support perf event alias name

2015-10-14 Thread Wang Nan
From: He Kuang This patch adds new bison rules for specifying an alias name to a perf event, which allows cmdline refer to previous defined perf event through its name. With this patch user can give alias name to a perf event using following cmdline: # perf record -e mypmu=cycles ... To allow

[PATCH 02/31] perf ebpf: Add the libbpf glue

2015-10-14 Thread Wang Nan
The 'bpf-loader.[ch]' files are introduced in this patch. Which will be the interface between perf and libbpf. bpf__prepare_load() resides in bpf-loader.c. Following patches will enrich these two files. Signed-off-by: Wang Nan Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Alexei Starovoitov

[PATCH 24/31] bpf tools: Collect map definition in bpf_object

2015-10-14 Thread Wang Nan
This patch collects more information from maps sections in BPF object files into 'struct bpf_object', enables later patches access those information (such as the type and size of the map). In this patch, a new handler 'struct bpf_map' is extracted in parallel with bpf_object and bpf_program. Its

[PATCH 01/31] perf tools: Make perf depend on libbpf

2015-10-14 Thread Wang Nan
By adding libbpf into perf's Makefile, this patch enables perf to build libbpf during building if libelf is found and neither NO_LIBELF nor NO_LIBBPF is set. The newly introduced code is similar to libapi and libtraceevent building in Makefile.perf. MANIFEST is also updated for 'make

[PATCH 06/31] perf tools: Collect perf_evsel in BPF object files

2015-10-14 Thread Wang Nan
This patch collects 'struct perf_evsel' for every probing points in BPF object file(s) and fill 'struct evlist'. The previous introduced dummy event now removed. After this patch, following command: # perf record --event filter.o ls Can trace on each probing points defined in filter.o. The

[PATCH 27/31] perf tools: Pass available CPU number to clang compiler

2015-10-14 Thread Wang Nan
This patch introduces a new macro "__NR_CPUS__" to perf's embedded clang compiler, which represent the available CPU counters in this system. BPF program can use this macro to create a map with same number of system CPUs. For exmaple: struct bpf_map_def SEC("maps") pmu_map = { .type =

[PATCH v4 08/11] smack: misc cleanups in preparation for a namespace patch

2015-10-14 Thread Lukasz Pawelczyk
This patch does some small miscellaneous cleanups and additions that should not change the code behaviour in any way. Its only purpose is to shape the code in a way that the smack namespace patches would be smaller and easier to understand. Changes: - four small helper functions added - minor

[PATCH 12/31] perf probe: Reset args and nargs for probe_trace_event when failure

2015-10-14 Thread Wang Nan
When failure occures in add_probe_trace_event(), args in probe_trace_event is incomplete. Since information in it may be used in futher, this patch frees the allocated memory and set it to NULL to avoid dangling pointer. Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Brendan Gregg Cc:

[PATCH 13/31] bpf tools: Load a program with different instances using preprocessor

2015-10-14 Thread Wang Nan
In this patch, caller of libbpf is able to control the loaded programs by installing a preprocessor callback for a BPF program. With preprocessor, different instances can be created from one BPF program. This patch will be used by perf to generate different prologue for different 'struct

Re: [PATCH v2] ARM: fix vdsomunge not to depend on glibc specific byteswap.h

2015-10-14 Thread H. Nikolaus Schaller
ping. Am 03.10.2015 um 22:46 schrieb H. Nikolaus Schaller : > If the host toolchain is not glibc based then the arm kernel build > fails with > > HOSTCC arch/arm/vdso/vdsomunge > arch/arm/vdso/vdsomunge.c:48:22: fatal error: byteswap.h: No such file or > directory > > Observed: with

[PATCH 17/31] perf tools: Generate prologue for BPF programs

2015-10-14 Thread Wang Nan
This patch generates prologue for each 'struct probe_trace_event' for fetching arguments for BPF programs. After bpf__probe(), iterate over each programs to check whether prologue is required. If none of 'struct perf_probe_event' a program will attach to has at least one argument, simply skip

[PATCH 10/31] perf test: Enforce LLVM test for BPF test

2015-10-14 Thread Wang Nan
This patch replaces the original toy BPF program with previous introduced bpf-script-example.c. Dynamically embedded it into 'llvm-src.c'. The newly introduced BPF program attaches a BPF program at 'sys_epoll_pwait()', and collect half samples from it. perf itself never use that syscall, so

[PATCH 16/31] perf tools: Add prologue for BPF programs for fetching arguments

2015-10-14 Thread Wang Nan
From: He Kuang This patch generates prologue for a BPF program which fetch arguments for it. With this patch, the program can have arguments as follow: SEC("lock_page=__lock_page page->flags") int lock_page(struct pt_regs *ctx, int err, unsigned long flags) { return 1; } This

[PATCH 09/31] perf tools: Compile scriptlets to BPF objects when passing '.c' to --event

2015-10-14 Thread Wang Nan
This patch provides infrastructure for passing source files to --event directly using: # perf record --event bpf-file.c command This patch does following works: 1) Allow passing '.c' file to '--event'. parse_events_load_bpf() is expanded to allow caller tell it whether the passed file is

[PATCH 19/31] perf record: Support custom vmlinux path

2015-10-14 Thread Wang Nan
From: He Kuang Make perf-record command support --vmlinux option if BPF_PROLOGUE is on. 'perf record' needs vmlinux as the source of DWARF info to generate prologue for BPF programs, so path of vmlinux should be specified. Short name 'k' has been taken by 'clockid'. This patch skips the short

[GIT PULL 00/31] perf tools: filtering events using eBPF programs

2015-10-14 Thread Wang Nan
in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/pi3orama/linux.git tags/perf-ebpf-for-acme-20151014 for you to fetch changes up to 6df036cb7d42a2e0ebf312e127b02425bd57bc55: perf tools: Enable BPF object configure syntax (2015-10-14 10:0

[PATCH v4 10/11] smack: namespace implementation

2015-10-14 Thread Lukasz Pawelczyk
This commit uses all the changes introduced in "namespace groundwork" and previous preparation patches and makes smack aware of its namespace and mapped labels. It modifies the following functions to be namespace aware: - smk_access - smk_find_label_name - smk_get_label And all functions that

[PATCH 20/31] perf tools: Allow BPF program attach to uprobe events

2015-10-14 Thread Wang Nan
This patch appends new syntax to BPF object section name to support probing at uprobe event. Now we can use BPF program like this: SEC( "target=/lib64/libc.so.6\n" "libcwrite=__write" ) int libcwrite(void *ctx) { return 1; } Where, in section name of a program, before the main config

[PATCH 14/31] perf tools: Add BPF_PROLOGUE config options for further patches

2015-10-14 Thread Wang Nan
If both LIBBPF and DWARF are detected, it is possible to create prologue for eBPF programs to help them accessing kernel data. HAVE_BPF_PROLOGUE and CONFIG_BPF_PROLOGUE is added as flags for this feature. PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET indicates an architecture supports converting name

[PATCH 15/31] perf tools: Compile dwarf-regs.c if CONFIG_BPF_PROLOGUE is on

2015-10-14 Thread Wang Nan
regs_query_register_offset() in dwarf-regs.c is required by BPF prologue. Make it be compiled if CONFIG_BPF_PROLOGUE is on to avoid building failure when CONFIG_BPF_PROLOGUE is on but CONFIG_DWARF is not set. Signed-off-by: Wang Nan Signed-off-by: He Kuang Acked-by: Masami Hiramatsu Cc: Alexei

[PATCH v4 06/11] smack: don't use implicit star to display smackfs/syslog

2015-10-14 Thread Lukasz Pawelczyk
Smackfs/syslog is analogous to onlycap and unconfined. When not filled they don't do anything. In such cases onlycap and unconfined displayed nothing when read, but syslog unconditionally displayed star. This doesn't work well with namespaces where the star could have been unmapped. Besides the

[PATCH 30/31] perf record: Apply config to BPF objects before recording

2015-10-14 Thread Wang Nan
From: He Kuang In perf record, before start recording, call bpf__apply_config() to turn on all BPF config options. Signed-off-by: Wang Nan Signed-off-by: He Kuang Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: He Kuang Cc:

[PATCH 23/31] bpf tools: Add helper function for updating bpf maps elements

2015-10-14 Thread Wang Nan
From: He Kuang Add helper function bpf_map_update_elem() which calls sys_bpf syscall to update elements in bpf maps. Signed-off-by: Wang Nan Signed-off-by: He Kuang Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: He Kuang Cc:

[PATCH 11/31] perf test: Add 'perf test BPF'

2015-10-14 Thread Wang Nan
This patch adds BPF testcase for testing BPF event filtering. By utilizing the result of 'perf test LLVM', this patch compiles the eBPF sample program then test it ability. The BPF script in 'perf test LLVM' collects half of execution of epoll_pwait(). This patch runs 111 times of it, so the

[PATCH 08/31] perf record: Add clang options for compiling BPF scripts

2015-10-14 Thread Wang Nan
Although previous patch allows setting BPF compiler related options in perfconfig, on some ad-hoc situation it still requires passing options through cmdline. This patch introduces 2 options to 'perf record' for this propose: --clang-path and --clang-opt. Signed-off-by: Wang Nan Cc: Alexei

[PATCH 29/31] perf tools: Add API to apply config to BPF map

2015-10-14 Thread Wang Nan
bpf__apply_config() is introduced as the core CPI to apply config options to all BPF objects. This patch also does the real work for setting maps events for BPF_MAP_TYPE_PERF_EVENT_ARRAY maps by inserting file descriptions of a evsel into the BPF map. This patch is required because we are unable

[PATCH 28/31] perf tools: Add API to config maps in bpf object

2015-10-14 Thread Wang Nan
bpf__config_obj() is introduced as a core API to config BPF object after loading. One configuration option of maps is introduced. After this patch BPF object can accept configuration like: maps.my_pmy.event=evt Where evt is a predefined event with alias "evt". Signed-off-by: Wang Nan

[PATCH 31/31] perf tools: Enable BPF object configure syntax

2015-10-14 Thread Wang Nan
This patch adds the final step for BPF map configuration. A new syntax is appended into parser so user can config BPF objects through '/' '/' enclosed config terms. After this patch, BPF programs for perf are finally able to utilize bpf_perf_event_read() introduced in commit

[PATCH v4 00/11] Smack namespace

2015-10-14 Thread Lukasz Pawelczyk
Fourth version of Smack namespace. Rebased for smack-for-4.4 with some minor cosmetic changes. Readme from v3 as there were the most significant changes: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg899383.html

[PATCH v4 04/11] lsm: inode_pre_setxattr hook

2015-10-14 Thread Lukasz Pawelczyk
Add a new LSM hook called before inode's setxattr. It is required for LSM to be able to reliably replace the xattr's value to be set to filesystem in __vfs_setxattr_noperm(). Useful for mapped values, like in the upcoming Smack namespace patches. Signed-off-by: Lukasz Pawelczyk Acked-by: Serge

Re: [PATCHv3 01/11] arm64: Move swapper pagetable definitions

2015-10-14 Thread Suzuki K. Poulose
On 14/10/15 12:42, Mark Rutland wrote: On Wed, Oct 14, 2015 at 12:20:24PM +0100, Suzuki K. Poulose wrote: Also renames the symbols to prevent conflicts. e.g, BLOCK_SHIFT => SWAPPER_BLOCK_SHIFT This sounds sensible to be, so FWIW: Acked-by: Mark Rutland I have a couple of minor

[PATCH V2 1/2] bpf: control the trace data output on current cpu when perf sampling

2015-10-14 Thread Kaixu Xia
This patch adds the flag sample_disable to control the trace data output process when perf sampling. By setting this flag and integrating with ebpf, we can control the data output process and get the samples we are most interested in. The bpf helper bpf_perf_event_sample_control() can control the

[PATCH V2 2/2] bpf: control a set of perf events by creating a new ioctl PERF_EVENT_IOC_SET_ENABLER

2015-10-14 Thread Kaixu Xia
This patch creates a new ioctl PERF_EVENT_IOC_SET_ENABLER to let perf to select an event as 'enabler'. So we can set this 'enabler' event to enable/disable a set of events. The event on CPU 0 is treated as the 'enabler' event by default. Signed-off-by: Kaixu Xia --- include/linux/perf_event.h

[PATCH V2 0/2] bpf: enable/disable events stored in PERF_EVENT_ARRAY maps trace data output when perf sampling

2015-10-14 Thread Kaixu Xia
Previous RFC patch url: https://lkml.org/lkml/2015/10/12/135 changes in V2: - rebase the whole patch set to net-next tree(4b418bf); - remove the added flag perf_sample_disable in bpf_map; - move the added fields in structure perf_event to proper place to avoid cacheline miss; - use counter

Re: [PATCH 0/4] ARM: berlin: improve multi_v7_defconfig support

2015-10-14 Thread Arnd Bergmann
On Wednesday 14 October 2015 12:34:00 Antoine Tenart wrote: > Hi all, > > Some drivers used on a Marvell Berlin kernel were missing from > multi_v7_defconfig. This series add them. Adding them is great, but we try to have as much as possible in loadable modules for new additions. Can you do

Re: [PATCH] mutex: make mutex_lock_nested an inline function

2015-10-14 Thread Mark Brown
On Wed, Oct 14, 2015 at 01:07:17PM +0200, Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 11:27:06AM +0100, Mark Brown wrote: > > On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote: > > > Uuh, I just looked at next and saw this regulator_lock_supply() > > > function. How is that

Re: [PATCH v2 4/5] mfd: arizona: Update DT binding documentation for mic detection

2015-10-14 Thread Lee Jones
On Wed, 14 Oct 2015, Mark Brown wrote: > On Wed, Oct 14, 2015 at 08:28:12AM +0100, Lee Jones wrote: > > On Tue, 13 Oct 2015, Mark Brown wrote: > > > On Tue, Oct 13, 2015 at 09:02:18AM +0100, Lee Jones wrote: > > > > > Providing Acks should not (and has not to my knowledge) be a binding > > > >

Re: drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c:70:2-8: preceding lock on line 67

2015-10-14 Thread Julia Lawall
Please check whether not releasing the lock is intentional. julia On Wed, 14 Oct 2015, kbuild test robot wrote: > CC: kbuild-...@01.org > CC: linux-kernel@vger.kernel.org > TO: Ben Skeggs > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head:

Re: [PATCH v2 9/9] mm/compaction: new threshold for compaction depleted zone

2015-10-14 Thread Vlastimil Babka
On 08/24/2015 04:19 AM, Joonsoo Kim wrote: > Now, compaction algorithm become powerful. Migration scanner traverses > whole zone range. So, old threshold for depleted zone which is designed > to imitate compaction deferring approach isn't appropriate for current > compaction algorithm. If we

Re: [PATCH] pwm-backlight: fix the panel power sequence

2015-10-14 Thread Lee Jones
On Wed, 14 Oct 2015, YH Huang wrote: > Hi all, > > If you have any suggestion, please let me know. > Thanks. Please don't do that. If you think the patch has fallen through the gaps, please just RESEND it, like [RESEND vX] $subject. > On Wed, 2015-09-16 at 22:42 +0800, YH Huang wrote: > > In

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread Jungseok Lee
On Oct 14, 2015, at 4:13 PM, AKASHI Takahiro wrote: > On 10/09/2015 11:24 PM, James Morse wrote: >> Hi Jungseok, >> >> On 07/10/15 16:28, Jungseok Lee wrote: >>> Currently, a call trace drops a process stack walk when a separate IRQ >>> stack is used. It makes a call trace information much less

Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-10-14 Thread Johannes Thumshirn
On Wed, 2015-10-07 at 16:51 -0700, Lee Duncan wrote: > Update the SCSI hosts module to use the ida_simple*() routines > to manage its host_no index instead of an ATOMIC integer. This > means that the SCSI host number will now be reclaimable. > > Signed-off-by: Lee Duncan > --- >

Re: Silent hang up caused by pages being not scanned?

2015-10-14 Thread Tetsuo Handa
Linus Torvalds wrote: > On Tue, Oct 13, 2015 at 5:21 AM, Tetsuo Handa > wrote: > > > > If I remove > > > > /* Any of the zones still reclaimable? Don't OOM. */ > > if (zones_reclaimable) > > return 1; > > > > the OOM killer is invoked even when there are so much

Re: [PATCH 2/3] iommu/hisilicon: Add hi6220 iommu driver

2015-10-14 Thread Joerg Roedel
On Thu, Oct 08, 2015 at 03:45:47PM +0800, Chen Feng wrote: > +static int hi6220_smmu_attach_dev(struct iommu_domain *domain, > + struct device *dev) > +{ > + struct hi6220_domain *m_domain = to_hi6220_domain(domain); > + > + smmu_domain_prepare(m_domain); > +

Re: [PATCH v4 2/2] arm64: Expand the stack trace feature to support IRQ stack

2015-10-14 Thread Jungseok Lee
On Oct 14, 2015, at 12:00 AM, Jungseok Lee wrote: > On Oct 13, 2015, at 8:00 PM, James Morse wrote: >> Hi Jungseok, > > Hi James, > >> On 12/10/15 23:13, Jungseok Lee wrote: >>> On Oct 13, 2015, at 1:34 AM, James Morse wrote: Having two kmem_caches for 16K stacks on a 64K page system may be

[PATCH 3/3] ARM: at91/defconfig: update sama5 defconfig

2015-10-14 Thread Ludovic Desroches
Add SAMA5D2 SoC plus Atmel flexcom and Atmel sdhci devices. Signed-off-by: Ludovic Desroches --- arch/arm/configs/sama5_defconfig | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 31eb951..6e806f5

[PATCH 1/3] ARM: at91/dt: sama5d2: add missing devices

2015-10-14 Thread Ludovic Desroches
Big update of the sama5d2.dtsi file since many patches have reached te mainline: - add generated clocks - enable crypto devices - add flexcom devices - add tdes device - add sdmmc devices Signed-off-by: Ludovic Desroches Signed-off-by: Nicolas Ferre Signed-off-by: Cyrille Pitchen ---

[PATCH 2/3] ARM: at91/dt: sama5d2 Xplained: add several devices

2015-10-14 Thread Ludovic Desroches
Add sdmmc and flexcom devices Signed-off-by: Ludovic Desroches Signed-off-by: Cyrille Pitchen --- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 106 1 file changed, 106 insertions(+) diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts

[PATCH v3 5/5] KVM: nVMX: expose VPID capability to L1

2015-10-14 Thread Wanpeng Li
Expose VPID capability to L1. For nested guests, we don't do anything specific for single context invalidation. Hence, only advertise support for global context invalidation. The major benefit of nested VPID comes from having separate vpids when switching between L1 and L2, and also when L2's

[PATCH v3 4/5] KVM: nVMX: nested VPID emulation

2015-10-14 Thread Wanpeng Li
VPID is used to tag address space and avoid a TLB flush. Currently L0 use the same VPID to run L1 and all its guests. KVM flushes VPID when switching between L1 and L2. This patch advertises VPID to the L1 hypervisor, then address space of L1 and L2 can be separately treated and avoid TLB flush

Re: [PATCHv3 02/11] arm64: Handle section maps for swapper/idmap

2015-10-14 Thread Mark Rutland
On Wed, Oct 14, 2015 at 12:20:25PM +0100, Suzuki K. Poulose wrote: > We use section maps with 4K page size to create the swapper/idmaps. > So far we have used !64K or 4K checks to handle the case where we > use the section maps. > This patch adds a new symbol, ARM64_SWAPPER_USES_SECTION_MAPS, to >

[PATCH v3 3/5] KVM: nVMX: emulate the INVVPID instruction

2015-10-14 Thread Wanpeng Li
Add the INVVPID instruction emulation. Reviewed-by: Wincy Van Signed-off-by: Wanpeng Li --- arch/x86/include/asm/vmx.h | 1 + arch/x86/kvm/vmx.c | 61 +- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git

[PATCH v3 0/5] KVM: nVMX: nested VPID emulation

2015-10-14 Thread Wanpeng Li
v2 -> v3: * separate nested_vmx_vpid_caps and move checks to patch 3/5, only rejoin them when reading the MSR. v1 -> v2: * set bit 32 of the VMX_EPT_VPID_CAP MSR * check against the supported types in the implementation of the INVVPID instruction * the memory operand must always be

[PATCH v3 1/5] KVM: VMX: adjust interface to allocate/free_vpid

2015-10-14 Thread Wanpeng Li
Adjust allocate/free_vid so that they can be reused for the nested vpid. Reviewed-by: Wincy Van Signed-off-by: Wanpeng Li --- arch/x86/kvm/vmx.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

[PATCH v3 2/5] KVM: VMX: introduce __vmx_flush_tlb to handle specific vpid

2015-10-14 Thread Wanpeng Li
Introduce __vmx_flush_tlb() to handle specific vpid. It will be used by later patches, note that the "all context" variant can be mapped to vpid_sync_vcpu_single with vpid02 as the argument (a nice side effect of vpid02 design). Reviewed-by: Wincy Van Signed-off-by: Wanpeng Li ---

Re: [RFC] arm64: ioremap: add ioremap_cache macro

2015-10-14 Thread yalin wang
> On Oct 14, 2015, at 16:23, Arnd Bergmann wrote: > > On Wednesday 14 October 2015 10:41:26 yalin wang wrote: > >>> On Oct 13, 2015, at 23:20, Catalin Marinas wrote: I'm not sure we want this. See: https://lkml.org/lkml/2015/10/9/699 >>> >>> Thanks Will and Arnd, I missed

Re: [PATCH] fix return value error

2015-10-14 Thread Leon Romanovsky
On Wed, Oct 14, 2015 at 11:17 AM, Heloise NH wrote: > Signed-off-by: Heloise NH The patch is a correct one, however can you update the subject and description to be more informative? Please add that new_inode() function can fail for allocation only. > --- >

Re: [PATCH 2/2] ARM: dts: omap3: keep ssi ports by default

2015-10-14 Thread Roger Quadros
On 14/10/15 14:37, Sebastian Reichel wrote: > Hi, > > On Wed, Oct 14, 2015 at 02:27:27PM +0300, Roger Quadros wrote: >> On 14/10/15 14:19, Sebastian Reichel wrote: >>> On Wed, Oct 14, 2015 at 01:44:16PM +0300, Roger Quadros wrote: Let's keep the SSI ports disabled in the omap3.dtsi to avoid

Re: [PATCH v6 4/5] devfreq_cooling: add trace information

2015-10-14 Thread Javi Merino
Hi Steve, On Thu, Sep 10, 2015 at 06:19:28PM +0100, Steven Rostedt wrote: > On Thu, 10 Sep 2015 18:09:31 +0100 > Javi Merino wrote: > > > Tracing is useful for debugging and performance tuning. Add similar > > traces to what's present in the cpu cooling device. > > > > Cc: Zhang Rui > > Cc:

Re: [PATCH 1/5] mtd: nand: omap2: Support parsing dma channel information from DT

2015-10-14 Thread Roger Quadros
Franklin, On 14/10/15 14:36, Roger Quadros wrote: > On 13/10/15 04:38, Franklin S Cooper Jr wrote: >> Switch from dma_request_channel to allow passing dma channel >> information from DT rather than hardcoding a value. >> >> Signed-off-by: Franklin S Cooper Jr > > Acked-by: Roger Quadros > >>

[PATCH] n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars

2015-10-14 Thread Peter Hurley
Waking the reader immediately upon receipt of TTY_BREAK or TTY_PARITY chars has no effect on the outcome of read(): 1. Only non-canonical/EXTPROC mode applies since canonical mode will not return data until a line termination is received anyway 2. EXTPROC mode - the reader will always be woken

[PATCH v5 02/24] ARM: common: edma: Remove unused functions

2015-10-14 Thread Peter Ujfalusi
We no longer have users for these functions so they can be removed. Remove also unused enums from the header file. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 376 - include/linux/platform_data/edma.h | 33 2 files changed,

[PATCH v5 05/24] ARM/dmaengine: edma: Move of_dma_controller_register to the dmaengine driver

2015-10-14 Thread Peter Ujfalusi
If the of_dma_controller is registered in the non dmaengine driver we could have race condition: the of_dma_controller has been registered, but the dmaengine driver is not yet probed. Drivers requesting DMA channels during this window will fail since we do not yet have dmaengine drivers

Re: [PATCH 5/5] ARM: OMAP2+: Update gpmc and nand DT binding documentation

2015-10-14 Thread Roger Quadros
On 13/10/15 04:38, Franklin S Cooper Jr wrote: > Add additional details to the gpmc and nand documentation to clarify > what is needed to enable nand dma prefetch. > > Signed-off-by: Franklin S Cooper Jr > --- > Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt | 7 > ++- >

[PATCH v5 08/24] ARM/dmaengine: edma: Remove limitation on the number of eDMA controllers

2015-10-14 Thread Peter Ujfalusi
Since the driver stack no longer depends on lookup with id number in a global array of pointers, the limitation for the number of eDMAs are no longer needed. We can handle as many eDMAs in legacy and DT boot as we have memory for them to allocate the needed structures. Signed-off-by: Peter

[PATCH v5 10/24] ARM: davinci: Add dma_mask to eDMA devices

2015-10-14 Thread Peter Ujfalusi
The upcoming change to merge the arch/arm/common/edma.c into drivers/dma/edma.c will need this change when booting daVinci devices in no DT mode. Signed-off-by: Peter Ujfalusi Acked-by: Sekhar Nori --- arch/arm/mach-davinci/devices-da8xx.c | 2 ++ arch/arm/mach-davinci/dm355.c | 1 +

[PATCH v5 12/24] dmaengine: edma: Allocate memory dynamically for bitmaps and structures

2015-10-14 Thread Peter Ujfalusi
Instead of using defines to specify the size of different arrays and bitmaps, allocate the memory for them based on the information we get from the HW itself. Since these defines are set based on the worst case, there are devices where they are not valid. Signed-off-by: Peter Ujfalusi ---

[PATCH v5 07/24] ARM/dmaengine: edma: Public API to use private struct pointer

2015-10-14 Thread Peter Ujfalusi
Instead of relying on indexes pointing to edma private date in the global pointer array, pass the private data pointer via the public API. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 305 ++--- drivers/dma/edma.c | 79

[PATCH v5 14/24] dmaengine: edma: Cleanup regarding the use of dev around the code

2015-10-14 Thread Peter Ujfalusi
Be consistent and do not mix the use of dev, >dev, etc in the functions. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 61 +++--- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c

[PATCH v5 06/24] ARM: common: edma: Internal API to use pointer to 'struct edma'

2015-10-14 Thread Peter Ujfalusi
Merge the iomem into the 'struct edma' and change the internal (static) functions to use pointer to the edma_cc instead of the ctlr number. Signed-off-by: Peter Ujfalusi --- arch/arm/common/edma.c | 400 - 1 file changed, 197 insertions(+), 203

[PATCH v5 18/24] dmaengine: edma: Consolidate the comments for functions

2015-10-14 Thread Peter Ujfalusi
Remove or rewrite the comments for the internal functions. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 86 +++--- 1 file changed, 11 insertions(+), 75 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v5 15/24] dmaengine: edma: Use dev_dbg instead pr_debug

2015-10-14 Thread Peter Ujfalusi
We have access to dev, so it is better to use the dev_dbg for debug prints. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH v5 19/24] dmaengine: edma: Simplify the interrupt handling

2015-10-14 Thread Peter Ujfalusi
With the merger of the arch/arm/common/edma.c code into the dmaengine driver, there is no longer need to have per channel callback/data storage for interrupt events. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 450 - 1 file changed,

[PATCH v5 17/24] dmaengine: edma: Print warning when linking slots from different eDMA

2015-10-14 Thread Peter Ujfalusi
Warning message in case of linking between paRAM slots in different eDMA controllers. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index f6653da0ee16..d33ae0b43925 100644 ---

[PATCH v5 22/24] dmaengine: edma: Read channel mapping support only once from HW

2015-10-14 Thread Peter Ujfalusi
Instead of directly reading it from CCCFG register take the information out once when we set up the configuration from the HW. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c

Re: [RFC][PATCH] spi: Setup the master controller driver before setting the chipselect

2015-10-14 Thread Heiner Kallweit
On Wed, Oct 14, 2015 at 1:08 PM, Andy Shevchenko wrote: > +Cc: Jarkko to see from spi-pxa2xx prospective > > On Wed, Oct 14, 2015 at 12:47 PM, Ivan T. Ivanov wrote: >> Adding Andy. >> >> >>> On Oct 13, 2015, at 12:01 AM, Franklin S Cooper Jr wrote: >>> >>> Some devices depend on the master

[PATCH v5 21/24] dmaengine: edma: Simplify and optimize ccerr interrupt handler

2015-10-14 Thread Peter Ujfalusi
No need to run through the bits in QEMR and CCERR events since they will not trigger any action, so just clearing the errors there is fine. In case of the missed event the loop can be optimized so we spend less time to handle the event. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 82

Re: [PATCH 4/5] ARM: dts: am437x/am33xx/omap3/dm816x: Add gpmc dma channel

2015-10-14 Thread Roger Quadros
On 13/10/15 04:38, Franklin S Cooper Jr wrote: > Add dma channel information to the gpmc. Although not enabled by > default this will allow prefetch-dma to be used. > > Signed-off-by: Franklin S Cooper Jr > --- > arch/arm/boot/dts/am33xx.dtsi | 2 ++ > arch/arm/boot/dts/am4372.dtsi | 2 ++ >

[PATCH v5 24/24] dmaengine: edma: Dynamic paRAM slot handling if HW supports it

2015-10-14 Thread Peter Ujfalusi
If the eDMA3 has support for channel paRAM slot mapping we can utilize it to allocate slots on demand and save precious slots for real transfers. On am335x the eDMA has 64 channels which means we can unlock 64 paRAM slots out from the available 256. Signed-off-by: Peter Ujfalusi ---

[PATCH v5 20/24] dmaengine: edma: Move the pending error check into helper function

2015-10-14 Thread Peter Ujfalusi
In the ccerr interrupt handler the code checks for pending errors in the error status registers in two different places. Move the check out to a helper function. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 20 1 file changed, 12 insertions(+), 8 deletions(-)

[PATCH v5 16/24] dmaengine: edma: Use the edma_write_slot instead open coded memcpy_toio

2015-10-14 Thread Peter Ujfalusi
edma_write_slot() is for writing an entire paRAM slot. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 08f9bd0aa0b3..f6653da0ee16 100644 --- a/drivers/dma/edma.c +++

[PATCH v5 23/24] dmaengine: edma: Rename bitfields for slot and channel usage tracking

2015-10-14 Thread Peter Ujfalusi
The names chosen for the bitfields were quite confusing and given no real information on what they are used for... edma_inuse -> slot_inuse: tracks the slot usage/availability edma_unused -> channel_unused: tracks the channel usage/availability Signed-off-by: Peter Ujfalusi ---

[PATCH v5 11/24] ARM/dmaengine: edma: Merge the two drivers under drivers/dma/

2015-10-14 Thread Peter Ujfalusi
Move the code out from arch/arm/common and merge it inside of the dmaengine driver. This change is done with as minimal (if eny) functional change to the code as possible to avoid introducing regression. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren --- arch/arm/Kconfig

[PATCH v5 13/24] dmaengine: edma: Use devm_kcalloc when possible

2015-10-14 Thread Peter Ujfalusi
When allocating a memory for number of items it is better (looks better) to use devm_kcalloc. Signed-off-by: Peter Ujfalusi --- drivers/dma/edma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index d5a76c67f83f..95c10373168d

[PATCH v5 01/24] ARM: common: edma: Fix channel parameter for irq callbacks

2015-10-14 Thread Peter Ujfalusi
In case when the interrupt happened for the second eDMA the channel number was incorrectly passed to the client driver. Signed-off-by: Peter Ujfalusi CC: --- arch/arm/common/edma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/edma.c

[PATCH v5 03/24] dmaengine: edma: Simplify and optimize the edma_execute path

2015-10-14 Thread Peter Ujfalusi
The code path in edma_execute() and edma_callback() can be simplified and make it more optimal. There is not need to call in to edma_execute() when the transfer has been finished for example. Also the handling of missed/first or next batch of paRAMs can be done in a more optimal way.

[PATCH v5 09/24] ARM: davinci: Use platform_device_register_full() to create pdev for eDMA

2015-10-14 Thread Peter Ujfalusi
Convert the eDMA platform device creation to use struct platform_device_info XX __initconst and platform_device_register_full() This will allow us to cleanly specify the dma_mask for the devices in an upcoming patch. Signed-off-by: Peter Ujfalusi Acked-by: Sekhar Nori ---

[PATCH v5 04/24] ARM: davinci/common: Convert edma driver to handle one eDMA instance per driver

2015-10-14 Thread Peter Ujfalusi
Currently we have one device created to handle all (maximum 2) eDMAs in the system. With this change all eDMA instance will have it's own device/driver. This change is needed for further cleanups in the eDMA driver stack since the one device/driver to handle all eDMAs in the system was not

[PATCH v5 00/24] dmaengine/ARM: Merge the edma drivers into one

2015-10-14 Thread Peter Ujfalusi
Hi, Changes since v4: - checkpatch errors/warnings/checks has been fixed in spot and not in a followup patch. - Sekhar's Acked-by added to patches touching arch/arm/mach-davinci/ - Other comments for v4 has been addressed Changes since v3: - Separated the two (patch 10/11 in v2 patch 10 in v3)

Re: [PATCHv3 01/11] arm64: Move swapper pagetable definitions

2015-10-14 Thread Mark Rutland
On Wed, Oct 14, 2015 at 12:20:24PM +0100, Suzuki K. Poulose wrote: > Move the kernel pagetable (both swapper and idmap) definitions > from the generic asm/page.h to a new file, asm/kernel-pgtable.h. > > This is mostly a cosmetic change, to clean up the asm/page.h to > get rid of the arch specific

[PATCH] cpufreq, intel_pstate, Fix intel_pstate powersave min_perf_pct value

2015-10-14 Thread Prarit Bhargava
On systems that initialize the intel_pstate driver with the performance governor, and then switch to the powersave governor will not transition to lower cpu frequencies until /sys/devices/system/cpu/intel_pstate/min_perf_pct is set to a low value. The behavior of governor switching changed after

Re: [PATCH 2/5] mtd: nand: omap2: Start dma request before enabling prefetch

2015-10-14 Thread Roger Quadros
On 13/10/15 04:38, Franklin S Cooper Jr wrote: > The prefetch engine sends a dma request once a FIFO threshold has > been met. No other requests are received until the previous request > is handled. > > Starting an edma transfer (dma_async_issue_pending) results in any > previous event for the

Re: [PATCH 1/2] hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined.

2015-10-14 Thread Sebastian Reichel
Hi, On Wed, Oct 14, 2015 at 01:44:15PM +0300, Roger Quadros wrote: > The error handling path is broken as cawake_gpio was defined as > unsigned integer causing the following warnings on boards that don't > use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4. > > [...] Thanks,

Re: [PATCH] ARM: dts: am437x-gp-evm: Add wakeup interrupt source for pixcir_i2c_ts

2015-10-14 Thread Vignesh R
On 10/14/2015 04:34 PM, Roger Quadros wrote: > Vignesh, > > On 14/10/15 12:12, Vignesh R wrote: >> >> >> On 10/14/2015 02:16 PM, Roger Quadros wrote: >> >>> >>> On 14/10/15 08:52, Vignesh R wrote: On am437x-gp-evm, pixcir_i2c_ts can wakeup the system from lower power state via pinctrl

<    4   5   6   7   8   9   10   11   12   13   >