[RFC PATCH v6 11/32] bpf tools: Collect eBPF programs from their own sections

2015-06-08 Thread Wang Nan
This patch collects all programs in an object file into an array of 'struct bpf_program' for further processing. That structure is for representing each eBPF program. 'bpf_prog' should be a better name, but it has been used by linux/filter.h. Although it is a kernel space name, I still prefer to

[RFC PATCH v6 14/32] bpf tools: Add bpf.c/h for common bpf operations

2015-06-08 Thread Wang Nan
This patch introduces bpf.c and bpf.h, which hold common functions issuing bpf syscall. The goal of these two files is to hide syscall completly from user. Note that bpf.c and bpf.h only deal with kernel interface. Things like structure of 'map' section in the ELF object is not cared by of

[RFC PATCH v6 10/32] bpf tools: Collect symbol table from SHT_SYMTAB section

2015-06-08 Thread Wang Nan
This patch collects symbols section. This section is useful when linking ELF maps. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index

[RFC PATCH v6 17/32] bpf tools: Introduce bpf_load_program() to bpf.c

2015-06-08 Thread Wang Nan
bpf_load_program() can be used to load bpf program into kernel. To make loading faster, first try to load without logbuf. Try again with logbuf if the first try failed. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/bpf.c | 34 ++

[RFC PATCH v6 01/32] tools build: Add feature check for eBPF API

2015-06-08 Thread Wang Nan
In this patch, eBPF API is checked by compiling a c source file which uses fields in bpf_attr which will be used by libbpf. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/build/Makefile.feature | 6 -- tools/build/feature/Makefile | 6 +-

[RFC PATCH v6 15/32] bpf tools: Create eBPF maps defined in an object file

2015-06-08 Thread Wang Nan
This patch creates maps based on 'map' section in object file using bpf_create_map(), and stores the fds into an array in 'struct bpf_object'. Previous patches parse ELF object file and collecte required data, but doesn't play with kernel. They belong to 'opening' phase. This patch is the first

[RFC PATCH v6 13/32] bpf tools: Record map accessing instructions for each program

2015-06-08 Thread Wang Nan
This patch records the indics of instructions which are needed to be relocated. Those information are saved in 'reloc_desc' field in 'struct bpf_program'. In loading phase (this patch takes effect in opening phase), the collected instructions will be replaced by map loading instructions. Since we

[RFC PATCH v6 16/32] bpf tools: Relocate eBPF programs

2015-06-08 Thread Wang Nan
If an eBPF program accesses a map, LLVM generates a load instruction which loads an absolute address into a register, like this: ld_64 r1, ... call2 That ld_64 instruction will be recorded in relocation section. To enable the usage of that map, relocation must be done by replacing

[RFC PATCH v6 12/32] bpf tools: Collect relocation sections from SHT_REL sections

2015-06-08 Thread Wang Nan
This patch collects relocation sections into 'struct object'. Such sections are used for connecting maps to bpf programs. 'reloc' field in 'struct bpf_object' is introduced for storing such informations. This patch simply store the data into 'reloc' field. Following patch will parse them to know

[RFC PATCH v6 04/32] bpf tools: Open eBPF object file and do basic validation

2015-06-08 Thread Wang Nan
This patch defines basic interface of libbpf. 'struct bpf_object' will be the handler of each object file. Its internal structure is hide to user. eBPF object files are compiled by LLVM as ELF format. In this patch, libelf is used to open those files, read EHDR and do basic validation according to

[RFC PATCH v6 24/32] perf record: Compile scriptlets if pass '.c' to --event

2015-06-08 Thread Wang Nan
This patch enables passing source files to --event directly using: # perf record --event bpf-file.c command This patch does following works: 1) 'struct bpf_param' is introduced to store compiler related options; 2) bpf__compile() is introduced for compiling source code by calling clang

[RFC PATCH v6 23/32] perf record: Enable passing bpf object file to --event

2015-06-08 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.

[RFC PATCH v6 21/32] bpf tools: Link all bpf objects onto a list

2015-06-08 Thread Wang Nan
To prevent caller from creating additional structures to hold pointers of 'struct bpf_object', this patch link all such structures onto a list (hidden to user). bpf_object__for_each() is introduced to allow users iterate over each objects. bpf_object__for_each() is safe even user close the object

[RFC PATCH v6 22/32] perf tools: Make perf depend on libbpf

2015-06-08 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

[RFC PATCH v6 19/32] bpf tools: Introduce accessors for struct bpf_program

2015-06-08 Thread Wang Nan
This patch introduces accessors for user of libbpf to retrive section name and fd of a opened/loaded eBPF program. 'struct bpf_prog_handler' is used for that purpose. Accessors of programs section name and file descriptor are provided. Set/get private data are also impelmented. Signed-off-by:

[RFC PATCH v6 20/32] bpf tools: Introduce accessors for struct bpf_object

2015-06-08 Thread Wang Nan
This patch add an accessor which allows caller to get count of programs in an object file. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov --- tools/lib/bpf/libbpf.c | 9 + tools/lib/bpf/libbpf.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/tools/lib/bpf/libbpf.c

[RFC PATCH v6 28/32] perf record: Probe at kprobe points

2015-06-08 Thread Wang Nan
In this patch, kprobe points are created using add_perf_probe_events. Since all events are already grouped together in an array, calling add_perf_probe_events() once creates all of them. probe_conf.max_probes is set to MAX_PROBES to support glob matching. Signed-off-by: Wang Nan ---

[RFC PATCH v6 25/32] perf tools: Add 'bpf.' config section to perf default config

2015-06-08 Thread Wang Nan
perf_bpf_config() is added to parse 'bpf' section in perf config file. Following is an example: [bpf] clang-path = /llvm/bin/x86_64-linux-clang" llc-path = /llvm/bin/x86_64-linux-llc" clang-opt = "-nostdinc -isystem /llvm/lib/clang/include -I/kernel/arch/x86/include ..." llc-opt =

Re: [RFC PATCH] sched: Fix sched_wakeup tracepoint

2015-06-08 Thread Mathieu Desnoyers
- On Jun 8, 2015, at 8:55 AM, Peter Zijlstra pet...@infradead.org wrote: > On Fri, 2015-06-05 at 13:23 +, Mathieu Desnoyers wrote: >> sched_wakeup: when try_to_wake_up{,_local} is called in the waker. >> sched_activate_task: when the wakee is marked runnable. >> sched_switch: when

[RFC PATCH v6 32/32] perf record: Add LLVM options for compiling BPF scripts

2015-06-08 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 4 options to 'perf record' for this propose: --clang-path, --clang-opt, --llc-path and --llc-opt. Signed-off-by:

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Dov Levenglick
> On Sun, Jun 7, 2015 at 10:32 AM, wrote: >>> 2015-06-05 5:53 GMT+09:00 : > Hi Yaniv, > > 2015-06-03 18:37 GMT+09:00 Yaniv Gardi : >> @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct >> platform_device *pdev) >> goto out; >> } >>

[RFC PATCH v6 29/32] perf record: Load all eBPF object into kernel

2015-06-08 Thread Wang Nan
This patch utilizes bpf_load_object() provided by libbpf to load all objects into kernel. Signed-off-by: Wang Nan --- tools/perf/builtin-record.c | 12 tools/perf/util/bpf-loader.c | 19 +++ tools/perf/util/bpf-loader.h | 2 ++ 3 files changed, 33 insertions(+)

[RFC PATCH v6 30/32] perf tools: Add bpf_fd field to evsel and config it

2015-06-08 Thread Wang Nan
This patch adds a bpf_fd field to 'struct evsel' then introduces method to config it. In bpf-loader, a bpf__for_each_program() function is added. Which calls the callback function for each eBPF programs with their event structure and file descriptors. In evlist.c, perf_evlist__add_bpf() is added

[RFC PATCH v6 27/32] perf probe: Attach trace_probe_event with perf_probe_event

2015-06-08 Thread Wang Nan
This patch drops struct __event_package structure. Instead, it adds trace_probe_event into 'struct perf_probe_event'. trace_probe_event information give further patches a chance to access actual probe points and actual arguments. Using them, bpf_loader will be able to attach one bpf program to

[RFC PATCH v6 26/32] perf tools: Parse probe points of eBPF programs during preparation

2015-06-08 Thread Wang Nan
This patch parses section name of each program, and creates corresponding 'struct perf_probe_event' structure. parse_perf_probe_command() is used to do the main parsing works. Parsing result is stored into a global array. This is because add_perf_probe_events() is non-reentrantable. In following

[RFC PATCH v6 31/32] perf tools: Attach eBPF program to perf event

2015-06-08 Thread Wang Nan
In this patch PERF_EVENT_IOC_SET_BPF ioctl is used to attach eBPF program to a newly created perf event. The file descriptor of the eBPF program is passed to perf record using previous patches, and stored into evsel->bpf_fd. It is possible that different perf event are created for one kprobe

[RFC PATCH v6 18/32] bpf tools: Load eBPF programs in object files into kernel

2015-06-08 Thread Wang Nan
This patch utilizes previous introduced bpf_load_program to load programs in the ELF file into kernel. Result is stored in 'fd' field in 'struct bpf_program'. During loading, it allocs a log buffer and free it before return. Note that that buffer is not passed to bpf_load_program() if the first

[RFC PATCH v6 03/32] bpf tools: Allow caller to set printing function

2015-06-08 Thread Wang Nan
By libbpf_set_print(), users of libbpf are allowed to register he/she own debug, info and warning printing functions. Libbpf will use those functions to print messages. If not provided, default info and warning printing functions are fprintf(stderr, ...); default debug printing is NULL. This API

[RFC PATCH v6 00/32] perf tools: filtering events using eBPF programs

2015-06-08 Thread Wang Nan
This is the 6th version which tries to introduce eBPF programs to perf. It enables 'perf record' to filter events using eBPF programs like: # perf record --event bpf-file.c sleep 1 and # perf record --event bpf-file.o sleep 1 This patch series is based on tip/perf/core (a3d8654). Compared

[PATCH v2] drm/panel: add lg4573 driver

2015-06-08 Thread Heiko Schocher
Add support for LG LG4573 480x800 4,3" panel. the LG4573 is used on the LG LCD LB043WV2-SD01, an industrial 4.3" TFT panel with SPI control interface. Signed-off-by: Heiko Schocher --- Changes in v2: - add comments from Thierry Reding: - fix some spelling issues - remove "power-on-delay"

Re: nios2: Export get_cycles

2015-06-08 Thread Herbert Xu
On Tue, Jun 09, 2015 at 03:19:32PM +1000, Stephen Rothwell wrote: > Hi Herbert, > > On Tue, 9 Jun 2015 12:46:46 +0800 Herbert Xu > wrote: > > > > On Mon, Jun 08, 2015 at 09:31:54PM -0700, Guenter Roeck wrote: > > > > > > nios2 still fails to build with > > > > > > ERROR: "get_cycles"

[RFC PATCH v6 06/32] bpf tools: Check endianess and make libbpf fail early

2015-06-08 Thread Wang Nan
Check endianess according to EHDR. Code is taken from tools/perf/util/symbol-elf.c. Libbpf doesn't magically convert missmatched endianess. Even if we swap eBPF instructions to correct byte order, we are unable to deal with endianess in code logical generated by LLVM. Therefore, libbpf should

[ANNOUNCE] kmod 21

2015-06-08 Thread Lucas De Marchi
kmod 21 is out: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-21.tar.xz ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-21.tar.sign Small release with just 3 changes worth mentioning. From the NEWS file: - New features: - kmod tool started to learn the

Re: NILFS2: double uuid

2015-06-08 Thread Heinz Diehl
On 08.06.2015, Heinz Diehl wrote: > > This change has been applied between v2.24 and v2.24.1 of util-linux, > > and not yet fixed in the mainline. > Ok, I'll try to identify and revert this commit in the meantime. The patch doesn't revert cleanly. Is there a workaround I could use until the

Re: [patch 2/7] timer: Remove FIFO guarantee

2015-06-08 Thread George Spelvin
Thomas Gleixner wrote: > It does. Depending on when you enqueue the timer because the thing is > calculated from the delta (expires - jiffies). Ah, right. If slack > 0, the slack amount is absolute and the rounding will be consistent. But if slack < 0, which is the default, it's a percentage of

RE: [PATCH] class: Free the kobject.name if kset_register fails

2015-06-08 Thread Chen, Lin Z
Hi greg, >How did you ever trigger this error case? When try to register the same class twice. >I don't like mucking about in the root of the kobject name structure, as who >knows what is really happening there. Isn't there some other "better" way to >resolve this? I try to use below patch

[v10 10/10] iommu, x86: Properly handle posted interrupts for IOMMU hotplug

2015-06-08 Thread Feng Wu
Return error when inserting a new IOMMU which doesn't support posted interrupts if posted interrupts are already enabled. Signed-off-by: Feng Wu Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel --- drivers/iommu/intel_irq_remapping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[v10 06/10] iommu, x86: Avoid migrating VT-d posted interrupts

2015-06-08 Thread Feng Wu
When the interrupt is configured in posted mode, the destination of the interrupt is set in the Posted-Interrupts Descriptor and the migration of these interrupts happens during vCPU scheduling. We still update the cached irte, which will be used when changing back to remapping mode, but we avoid

[v10 05/10] iommu, x86: Save the mode (posted or remapped) of an IRTE

2015-06-08 Thread Feng Wu
Add a new field to struct irq_2_iommu, which captures whether the associated IRTE is in posted mode or remapped mode. We update this field when the IRTE is written into the table. Suggested-by: Thomas Gleixner Signed-off-by: Feng Wu Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel ---

[v10 01/10] iommu: Add new member capability to struct irq_remap_ops

2015-06-08 Thread Feng Wu
Add a new member 'capability' to struct irq_remap_ops for storing information about available capabilities such as VT-d Posted-Interrupts. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel --- arch/x86/include/asm/irq_remapping.h | 4

[v10 07/10] iommu, x86: Add cap_pi_support() to detect VT-d PI capability

2015-06-08 Thread Feng Wu
Add helper function to detect VT-d Posted-Interrupts capability. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Acked-by: David Woodhouse Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel --- include/linux/intel-iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git

[v10 04/10] iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip

2015-06-08 Thread Feng Wu
Interrupt chip callback to set the VCPU affinity for posted interrupts. [ tglx: Use the helper function to copy from the remap irte instead of open coding it. Massage the comment as well ] Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Acked-by: David Woodhouse Reviewed-by: Thomas

[v10 08/10] iommu, x86: Setup Posted-Interrupts capability for Intel iommu

2015-06-08 Thread Feng Wu
Set Posted-Interrupts capability for Intel iommu when Interrupt Remapping is enabled, clear it when disabled. Signed-off-by: Feng Wu Reviewed-by: Thomas Gleixner Acked-by: Joerg Roedel --- drivers/iommu/intel_irq_remapping.c | 30 ++ drivers/iommu/irq_remapping.c

[v10 02/10] iommu: dmar: Extend struct irte for VT-d Posted-Interrupts

2015-06-08 Thread Feng Wu
From: Thomas Gleixner The IRTE (Interrupt Remapping Table Entry) is either an entry for remapped or for posted interrupts. The hardware distiguishes between remapped and posted entries by bit 15 in the low 64 bit of the IRTE. If cleared the entry is remapped, if set it's posted. The entries

[v10 03/10] iommu: dmar: Provide helper to copy shared irte fields

2015-06-08 Thread Feng Wu
From: Thomas Gleixner Instead of open coding, provide a helper function to copy the shared irte fields. Signed-off-by: Thomas Gleixner --- include/linux/dmar.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 0dbcabc..e9bc929

[v10 09/10] iommu, x86: Provide irq_remapping_cap() interface

2015-06-08 Thread Feng Wu
Add a new interface irq_remapping_cap() to detect whether irq remapping supports new features, such as VT-d Posted-Interrupts. Export the function, so that KVM code can check this and use this mechanism properly. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Reviewed-by: Thomas Gleixner

[v10 00/10] Add VT-d Posted-Interrupts support - IOMMU part

2015-06-08 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

Re: [PATCH v2 2/2] drivers: ata: add support for Ceva sata host controller

2015-06-08 Thread Tejun Heo
cc'ing Hans and quoting whole message. Hans, can you please review this one? Thanks. On Fri, Jun 05, 2015 at 11:32:28AM +0530, Suneel Garapati wrote: > Adds support for Ceva sata host controller on Xilinx > Zynq UltraScale+ MPSoC. > > Signed-off-by: Suneel Garapati > --- > Changes v2 > -

Re: nios2: Export get_cycles

2015-06-08 Thread Stephen Rothwell
Hi Herbert, On Tue, 9 Jun 2015 12:46:46 +0800 Herbert Xu wrote: > > On Mon, Jun 08, 2015 at 09:31:54PM -0700, Guenter Roeck wrote: > > > > nios2 still fails to build with > > > > ERROR: "get_cycles" [crypto/jitterentropy.ko] undefined! > > It's the only arch that doesn't inline get_cycles

Re: [PATCH 1/2] KVM: MMU: fix SMAP virtualization

2015-06-08 Thread Vinson Lee
On Tue, May 26, 2015 at 7:53 PM, Xiao Guangrong wrote: > > > On 05/26/2015 10:48 PM, Paolo Bonzini wrote: >> >> >> >> On 26/05/2015 16:45, Edward Cree wrote: > > This breaks older compilers that can't initialize anon structures. > > How old ? Even gcc 3.1 says you can use unnamed

Re: [PATCH kernel v12 33/34] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:25PM +1000, Alexey Kardashevskiy wrote: > The existing implementation accounts the whole DMA window in > the locked_vm counter. This is going to be worse with multiple > containers and huge DMA windows. Also, real-time accounting would requite > additional tracking of

Re: [PATCH kernel v12 09/34] vfio: powerpc/spapr: Move locked_vm accounting to helpers

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:01PM +1000, Alexey Kardashevskiy wrote: > There moves locked pages accounting to helpers. > Later they will be reused for Dynamic DMA windows (DDW). > > This reworks debug messages to show the current value and the limit. > > This stores the locked pages number in

Re: [PATCH kernel v12 26/34] powerpc/powernv/ioda2: Introduce pnv_pci_ioda2_set_window

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:18PM +1000, Alexey Kardashevskiy wrote: > This is a part of moving DMA window programming to an iommu_ops > callback. pnv_pci_ioda2_set_window() takes an iommu_table_group as > a first parameter (not pnv_ioda_pe) as it is going to be used as > a callback for VFIO DDW

Re: [PATCH kernel v12 27/34] powerpc/powernv: Implement multilevel TCE tables

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:19PM +1000, Alexey Kardashevskiy wrote: > TCE tables might get too big in case of 4K IOMMU pages and DDW enabled > on huge guests (hundreds of GB of RAM) so the kernel might be unable to > allocate contiguous chunk of physical memory to store the TCE table. > > To

Re: [PATCH kernel v12 32/34] powerpc/mmu: Add userspace-to-physical addresses translation cache

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:24PM +1000, Alexey Kardashevskiy wrote: > We are adding support for DMA memory pre-registration to be used in > conjunction with VFIO. The idea is that the userspace which is going to > run a guest may want to pre-register a user space memory region so > it all gets

Re: [PATCH v13 5/5] cgroup: implement the PIDs subsystem

2015-06-08 Thread Tejun Heo
Hello, Aleksa. On Sat, Jun 06, 2015 at 10:02:18AM +1000, Aleksa Sarai wrote: ... > +/* > + * Lockless hierarchical accounting (with enforceable limits) derived from > + * mm/page_counter.c. Original copyright notice from page_counter code: > + * > + *

nios2: Export get_cycles

2015-06-08 Thread Herbert Xu
On Mon, Jun 08, 2015 at 09:31:54PM -0700, Guenter Roeck wrote: > > nios2 still fails to build with > > ERROR: "get_cycles" [crypto/jitterentropy.ko] undefined! It's the only arch that doesn't inline get_cycles and doesn't export it. ---8<--- nios2 is the only architecture that does not inline

[PATCH] Staging: rts5208: xd: Fixed checkpatch warning

2015-06-08 Thread Nizam Haider
Fixed a warning, else is not generally useful after a break or return. Signed-off-by: Nizam Haider --- drivers/staging/rts5208/xd.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c index 8fd108e..10fea7b

Re: [PATCH -rfc 4/4] locking/rtmutex: Support spin on owner (osq)

2015-06-08 Thread Davidlohr Bueso
On Fri, 2015-06-05 at 15:59 +0200, Thomas Gleixner wrote: > On Tue, 19 May 2015, Davidlohr Bueso wrote: > > > > +/* > > + * Lockless alternative to rt_mutex_has_waiters() as we do not need the > > + * wait_lock to check if we are in, for instance, a transitional state > > + * after calling

Re: [PATCH v13 4/5] cgroup: allow a cgroup subsystem to reject a fork

2015-06-08 Thread Tejun Heo
Hello, Aleksa. Looks pretty good to me in general. Some minor comments below. On Sat, Jun 06, 2015 at 10:02:17AM +1000, Aleksa Sarai wrote: > diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h > index a593e29..17d0046 100644 > --- a/include/linux/cgroup.h > +++

Re: [PATCH v4 5/7] Watchdog: introduce ARM SBSA watchdog driver

2015-06-08 Thread Guenter Roeck
On 06/08/2015 08:59 PM, Fu Wei wrote: Hi Guenter, On 9 June 2015 at 02:26, Guenter Roeck wrote: On 06/08/2015 09:05 AM, Fu Wei wrote: Hi Gurnter On 3 June 2015 at 01:07, Guenter Roeck wrote: On 06/02/2015 09:55 AM, Fu Wei wrote: Hi Timur, Thanks , feedback inline On 2 June 2015 at

Re: [PATCH 2/2 RESEND] power: reset: Add syscon poweroff device node for APM X-Gene platform

2015-06-08 Thread Tai Tri Nguyen
Hi Dann, On Mon, Jun 8, 2015 at 8:44 PM, Dann Frazier wrote: > On Tue, Jun 2, 2015 at 1:19 PM, Tai Nguyen wrote: >> This patch adds syscon poweroff device node to support poweroff feature >> on APM X-Gene Mustang platform > > hey Tai, > The reboot changes work just fine for me, but poweroff

Re: [PATCH] crypto: drbg - use pragmas for disabling optimization

2015-06-08 Thread Guenter Roeck
On 06/08/2015 07:08 PM, Stephan Mueller wrote: Hi, I performed measurements of the upper and lower boundary of the minimum and Shannon entropy for the RNG before the patch and after the patch. The values are very similar which demonstrates that the change does not affect the cryptographic

[PATCH v2] Staging: vt6655: Remove unnecessary equality checks in rxtx.c

2015-06-08 Thread Harisangam, Sharvari (S.)
From: Harisangam Sharvari The unnecessary equality checks for bool variable are removed in rxtx.c. These changes were detected with the help of coccinelle tool Signed-off-by: Harisangam Sharvari --- drivers/staging/vt6655/rxtx.c |8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH 4.5/8] blkcg, cfq-iosched: use GFP_NOWAIT instead of GFP_ATOMIC for non-critical allocations

2015-06-08 Thread Tejun Heo
>From b848495d2c987e960d1f7794966d82c05fcefc6d Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 9 Jun 2015 13:19:40 +0900 blkcg performs several allocations to track IOs per cgroup and enforce resource control. Most of these allocations are performed lazily on demand in the IO path and thus

Re: [PATCH V2 2/3] tty: serial: fsl_lpuart: remove RTS/CTS control from set/get_mctrl

2015-06-08 Thread Bhuvanchandra DV
On 06/08/2015 02:42 PM, Russell King - ARM Linux wrote: On Mon, Jun 01, 2015 at 10:51:06AM +0530, Bhuvanchandra DV wrote: +/* + * CTS/RTS can _only_ be handled + * automatically by the hardware. + */ That's really not acceptable. You need to do something here so that you can

[PATCHv2] ARM: exynos_defconfig: Enable CONFIG_SND_SOC_ODROIDX2 for Odroid-XU3

2015-06-08 Thread Anand Moon
Enable CONFIG_SND_SOC_ODROIDX2 and CONFIG_SND_SIMPLE_CARD to enable sound on Odroid-XU3 board using the max98090 audio codec. Signed-off-by: Anand Moon Reviewed-by: Lukasz Majewski --- Changes v2: Fixed the commit log. Signed-off-by: Anand Moon --- arch/arm/configs/exynos_defconfig | 2 ++ 1

Re: [PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This is now very simple to do. The only interesting part is a simple trick to find the right memslot in gfn_to_rmap, retrieving the address space from the spte role word. The same trick is used in the auditing code. The comment on top of union

Re: [PATCH v4 5/7] Watchdog: introduce ARM SBSA watchdog driver

2015-06-08 Thread Fu Wei
Hi Guenter, On 9 June 2015 at 02:26, Guenter Roeck wrote: > On 06/08/2015 09:05 AM, Fu Wei wrote: >> >> Hi Gurnter >> >> On 3 June 2015 at 01:07, Guenter Roeck wrote: >>> >>> On 06/02/2015 09:55 AM, Fu Wei wrote: Hi Timur, Thanks , feedback inline On 2 June

Re: [PATCH] zsmalloc: fix a null pointer dereference in destroy_handle_cache()

2015-06-08 Thread Sergey Senozhatsky
On (06/08/15 13:55), Andrew Morton wrote: [..] > > zs_destroy_pool()->destroy_handle_cache() invoked from > > zs_create_pool() can pass a NULL ->handle_cachep pointer > > to kmem_cache_destroy(), which will dereference it. > > > > That's slightly lacking in details (under what circumstances will

[PATCH 5/6] Refactor code to use new fw_event refcount

2015-06-08 Thread Calvin Owens
This refactors the fw_event code to use the new refcount. Signed-off-by: Calvin Owens --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c

[PATCH 2/6] Refactor code to use new sas_device refcount

2015-06-08 Thread Calvin Owens
This patch refactors the code in the driver to use the new reference count on the sas_device struct. Signed-off-by: Calvin Owens --- drivers/scsi/mpt2sas/mpt2sas_base.h | 4 +- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 329 ---

[PATCH 3/6] Fix unsafe sas_device_list usage

2015-06-08 Thread Calvin Owens
We cannot iterate over the list without holding a lock for the entire duration, or we risk corrupting random memory if items are added or deleted as we iterate. This refactors code such that it always holds the lock when iterating on or accessing the sas_device_list. Signed-off-by: Calvin Owens

[PATCH 1/6] Add refcount to sas_device struct

2015-06-08 Thread Calvin Owens
These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. Signed-off-by: Calvin Owens --- drivers/scsi/mpt2sas/mpt2sas_base.h | 16 1 file changed, 16 insertions(+) diff --git

[PATCH 6/6] Fix unsafe fw_event_list usage

2015-06-08 Thread Calvin Owens
Since the fw_event deletes itself from the list, cleanup_queue() can walk onto garbage pointers or walk off into freed memory. This refactors the code in _scsih_fw_event_cleanup_queue() to not iterate over the fw_event_list without a lock. Signed-off-by: Calvin Owens ---

[PATCH 4/6] Add refcount to fw_event_work struct

2015-06-08 Thread Calvin Owens
The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it. Signed-off-by: Calvin Owens --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c

[RESEND][PATCH 0/6] Fixes for memory corruption in mpt2sas

2015-06-08 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. I will provide a similar set of fixes for mpt3sas, since we see similar issues there as well. "Porting" this to mpt3sas will be trivial since the part of the

Re: [PATCH v2 11/13] KVM: x86: work on all available address spaces

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This patch has no semantic change, but it prepares for the introduction of a second address space for system management mode. A new function x86_set_memory_region (and the "slots_lock taken" counterpart __x86_set_memory_region) is introduced in

Re: [PATCH 2/2 RESEND] power: reset: Add syscon poweroff device node for APM X-Gene platform

2015-06-08 Thread Dann Frazier
On Tue, Jun 2, 2015 at 1:19 PM, Tai Nguyen wrote: > This patch adds syscon poweroff device node to support poweroff feature > on APM X-Gene Mustang platform hey Tai, The reboot changes work just fine for me, but poweroff does not: [ OK ] Reached target Final Step. Starting

Re: [PATCH v2 10/13] KVM: x86: use vcpu-specific functions to read/write/translate GFNs

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: We need to hide SMRAM from guests not running in SMM. Therefore, all uses of kvm_read_guest* and kvm_write_guest* must be changed to check whether the VCPU is in system management mode and use a different set of memslots. Switch from kvm_* to the

Re: [PATCH] mm/memory hotplug: print the last vmemmap region at the end of hot add memory

2015-06-08 Thread Zhu Guihua
On 06/09/2015 07:30 AM, Andrew Morton wrote: On Mon, 8 Jun 2015 14:44:41 +0800 Zhu Guihua wrote: When hot add two nodes continuously, we found the vmemmap region info is a bit messed. The last region of node 2 is printed when node 3 hot added, like the following: Initmem setup node 2 [mem

[PATCH v6] procfs: Always expose /proc//map_files/ and make it readable

2015-06-08 Thread Calvin Owens
Currently, /proc//map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface very useful because it allows userspace to stat() deleted files that are still mapped by some process, which enables a much quicker and more accurate answer to the

Re: [PATCH kernel v12 17/34] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-06-08 Thread David Gibson
On Fri, Jun 05, 2015 at 04:35:09PM +1000, Alexey Kardashevskiy wrote: > So far one TCE table could only be used by one IOMMU group. However > IODA2 hardware allows programming the same TCE table address to > multiple PE allowing sharing tables. > > This replaces a single pointer to a group in a

Re: [PATCH v2 09/13] KVM: x86: pass kvm_mmu_page to gfn_to_rmap

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This is always available (with one exception in the auditing code). Later we will also use the role to look up the right memslots array. return; @@ -191,11 +191,15 @@ static void audit_write_protection(struct kvm *kvm,

[PATCH v2 0/4] x86, mwaitt: introduce AMD mwaitt support

2015-06-08 Thread Huang Rui
Hi, This patch set introduces a new instruction support on AMD Carrizo (Family 15h, Model 60h-6fh). It adds mwaitx delay function with a configurable timer. Andy and Boris provide a suggestion which use mwaitx on delay method. Some discussions of the background, please see:

Re: [PATCH 2/2] dma: Add Xilinx zynqmp dma engine driver support

2015-06-08 Thread punnaiah choudary kalluri
On Mon, Jun 8, 2015 at 10:27 PM, Punnaiah Choudary Kalluri wrote: > Added the basic driver for zynqmp dma engine used in Zynq > UltraScale+ MPSoC. The initial release of this driver supports > only memory to memory transfers. > > Signed-off-by: Punnaiah Choudary Kalluri > --- >

[PATCH v2 4/4] x86, mwaitt: add documents of delay option

2015-06-08 Thread Huang Rui
This patch adds a description in the kerenel parameters documentation for "delay=" method. The default case is TSC delay. Signed-off-by: Huang Rui --- Documentation/kernel-parameters.txt |7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/kernel-parameters.txt

Re: [PATCH v2 08/13] KVM: implement multiple address spaces

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: /* @@ -772,6 +776,7 @@ int __kvm_set_memory_region(struct kvm *kvm, struct kvm_memory_slot *slot; struct kvm_memory_slot old, new; struct kvm_memslots *slots = NULL, *old_memslots; + int as_id, id; enum

Re: [PATCH] crypto: drbg - use pragmas for disabling optimization

2015-06-08 Thread Stephen Rothwell
Hi Stephan, On Tue, 09 Jun 2015 04:08:49 +0200 Stephan Mueller wrote: > > Replace the global -O0 compiler flag from the Makefile with GCC > pragmas to mark only the functions required to be compiled without > optimizations. > > This patch also adds a comment describing the rationale for the >

[PATCH v2 2/4] x86, mwaitt: make delay method configurable

2015-06-08 Thread Huang Rui
This patch introduces a kernel parameter (delay), user is able to configure it at boot loader to choose different types of delay method. Default schema is to use TSC delay. This update can be more flexiable to add new delay method. Suggested-by: Suravee Suthikulanit Signed-off-by: Huang Rui

[PATCH v2 3/4] x86, mwaitt: introduce mwaix delay with a configurable timer

2015-06-08 Thread Huang Rui
MWAITX can enable a timer and a corresponding timer value specified in SW P0 clocks. The SW P0 frequency is the same with TSC. The timer provides an upper bound on how long the instruction waits before exiting. The implementation of delay function in kernel can lerverage the timer of MWAITX. This

[PATCH v2 1/4] x86, mwaitt: add monitorx and mwaitx instruction

2015-06-08 Thread Huang Rui
On AMD Carrizo processors (Family 15h, Model 60h-6fh), there is a new feature called MWAITT (Mwait with a timer) as an extension of Monitor/Mwait. MWAITT, another name is MWAITX (MWAIT with extensions), has a configurable timer that causes MWAITX to exit on expiration. Compared with

Re: [PATCH][V3] usb: isp1760: check for null return from kzalloc

2015-06-08 Thread Felipe Balbi
On Mon, Jun 08, 2015 at 02:22:06PM -0700, Greg Kroah-Hartman wrote: > On Wed, Jun 03, 2015 at 03:43:23AM +0300, Laurent Pinchart wrote: > > Hi Colin, > > > > Thank you for the patch. > > > > On Tuesday 02 June 2015 19:05:13 Colin King wrote: > > > From: Colin Ian King > > > > > >

Re: [PATCH 8/8] cfq-iosched: charge async IOs to the appropriate blkcg's instead of the root

2015-06-08 Thread Tejun Heo
Hey, Vivek. On Mon, Jun 08, 2015 at 06:29:04PM -0400, Vivek Goyal wrote: ... > But above is not true for buffered writes, we will not associate io > context. Instead only cgroup information will be sent down and io > context of submitter will be used. > > So any thread which is forced to submit

Re: [PATCHv2 2/2] ARM: exynos_defconfig: Enable CONFIG_LEDS_PWM for Odroid-XU3

2015-06-08 Thread Anand Moon
Hi On 9 June 2015 at 05:26, Krzysztof Kozlowski wrote: > On 08.06.2015 02:03, Anand Moon wrote: >> Enable CONFIG_LEDS_PWM amd CONFIG_LEDS_TRIGGER_HEARTBEAT for >> Odroid-XU3 board. > > I am a little confused. > > This is v2. > > I found version 3, a little different: >

Re: [PATCH v2 3/8] blktrace: use strreplace in do_blk_trace_setup

2015-06-08 Thread Jens Axboe
On 06/08/2015 05:26 PM, Rasmus Villemoes wrote: Part of the disassembly of do_blk_trace_setup: 231b: e8 00 00 00 00 callq 2320 231c: R_X86_64_PC32 strlen+0xfffc 2320: eb 0a jmp232c 2322:

Re: [PATCHSET block/for-4.2/writeback] block, cgroup: make cfq charge async IOs to the appropriate blkcgs

2015-06-08 Thread Tejun Heo
Hey, Jeff. On Mon, Jun 08, 2015 at 03:49:56PM -0400, Jeff Moyer wrote: > Assuming you're ok with dropping patch 5, I'll review patches 6-8 once I'll update it to use GPF_NOWAIT. Can't drop it easily as that would complicate group lookup more complicated w/ pinning and all. > they've been

Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

2015-06-08 Thread Tejun Heo
On Mon, Jun 08, 2015 at 05:19:30PM -0400, Vivek Goyal wrote: > Whatever we end up using, may be it is a good idea to use same policy > for block group allocation too. Right now we use GFP_ATOMIC for blkcg > allocation. > > So this will be equivalent of that when memory is low, we don't provide >

Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

2015-06-08 Thread Tejun Heo
Hey, Jeff. On Mon, Jun 08, 2015 at 04:27:10PM -0400, Jeff Moyer wrote: > >> Remove @gfp_mask from cfq_find_alloc_queue() and propagate the changes > >> to its callers. This simplifies the function quite a bit and will > >> help making async queues per-cfq_group. > > > > Sorry, I disagree with

Re: [PATCH 12/15] KVM: MTRR: introduce mtrr_for_each_mem_type

2015-06-08 Thread Xiao Guangrong
On 06/09/2015 08:36 AM, David Matlack wrote: On Sat, May 30, 2015 at 3:59 AM, Xiao Guangrong wrote: It walks all MTRRs and gets all the memory cache type setting for the specified range also it checks if the range is fully covered by MTRRs Signed-off-by: Xiao Guangrong ---

  1   2   3   4   5   6   7   8   9   10   >