Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.

2015-07-08 Thread Rik van Riel
On 07/08/2015 09:20 AM, Srikar Dronamraju wrote: > In commit:8a9e62a "sched/numa: Prefer NUMA hotness over cache hotness" > sched feature NUMA was always set to true. However this sched feature was > suppose to be enabled on NUMA boxes only thro set_numabalancing_state(). > > To get back to the

Re: [PATCH] hwmon: (f71882fg): Add support for f81768d

2015-07-08 Thread George Joseph
On Tue, Jul 7, 2015 at 8:34 PM, Guenter Roeck wrote: > Hi George, > > On 07/07/2015 06:16 PM, George Joseph wrote: >> >> Add f81768d (id 0x1210) currently found on Jetway motherboards. >> It has 11 voltages but otherwise needed no special handling >> in this driver. >> >> Signed-off-by: George

Re: [PATCH v2 5/5] usb: gadget: atmel_usba_udc: add missing ret value check

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Add missing return value check. In case of error print debug message > and return error code. > > Signed-off-by: Robert Baldyga > Acked-by: Nicolas Ferre Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/udc/atmel_usba_udc.c | 4 > 1

Re: [PATCH v2 4/5] staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Since maxpacket_limit was introduced all UDC drivers should use > usb_ep_set_maxpacket_limit() function instead of setting maxpacket value > manually. ep.maxpacket_limit contains actual maximum maxpacket value > supported by hardware which is needed by

Re: [PATCH v2 3/5] usb: isp1760: udc: add missing usb_ep_set_maxpacket_limit()

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Since maxpacket_limit was introduced all UDC drivers should use > usb_ep_set_maxpacket_limit() function instead of setting maxpacket value > manually. ep.maxpacket_limit contains actual maximum maxpacket value > supported by hardware which is needed by

Re: Clarification for the use of additional fields in the message body

2015-07-08 Thread SF Markus Elfring
> Is there truly no way to simplify that process? I see some software development possibilities which could improve the communication with high volume mailing lists. > You should be sending the patches directly with SMTP using git-send-email, This tool is also fine for the publishing of a lot

Re: [PATCH v2 2/5] usb: gadget: midi: avoid redundant f_midi_set_alt() call

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Function midi registers two interfaces with single set_alt() function > which means that f_midi_set_alt() is called twice when configuration > is set. That means that endpoint initialization and ep request allocation > is done two times. To avoid this

Re: [PATCH] MIPS, IRQCHIP: Move i8259 irqchip driver to drivers/irqchip.

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 3:46 PM, Ralf Baechle wrote: arch/mips/Kconfig | 4 - arch/mips/kernel/Makefile | 1 - arch/mips/kernel/i8259.c| 384 drivers/irqchip/Kconfig | 4 + drivers/irqchip/Makefile| 1 +

Re: [PATCH v2 1/5] usb: gadget: ffs: call functionfs_unbind() if _ffs_func_bind() fails

2015-07-08 Thread Michal Nazarewicz
On Wed, Jul 08 2015, Robert Baldyga wrote: > Function ffs_do_functionfs_bind() calls functionfs_bind() which allocates > usb request and increments refcounts. These things needs to be cleaned > up by if further steps of initialization fail by calling functionfs_unbind(). > > Signed-off-by: Robert

Re: [PATCH 15/20] staging/lustre/libcfs: get rid of debugfs/lnet/console_backoff

2015-07-08 Thread Oleg Drokin
On Jul 8, 2015, at 4:28 AM, Dan Carpenter wrote: > On Mon, Jul 06, 2015 at 12:48:53PM -0400, gr...@linuxhacker.ru wrote: >> +static int param_set_uint_minmax(const char *val, >> + const struct kernel_param *kp, >> + unsigned int min,

Re: [RFC 4/8] lsm: smack: smack callbacks for kdbus security hooks

2015-07-08 Thread Stephen Smalley
On 07/08/2015 06:25 AM, Paul Osmialowski wrote: > This adds implementation of three smack callbacks sitting behind kdbus > security hooks as proposed by Karol Lewandowski. > > Originates from: > > git://git.infradead.org/users/pcmoore/selinux (branch: working-kdbus) > commit:

Re: [PATCHv3 08/16] staging: vme_user: provide DMA functionality

2015-07-08 Thread Martyn Welch
On 07/07/15 13:51, Alessio Igor Bogani wrote: Current VME stack links windows not to the boards, but to device drivers. >Driver >could potentially minimise window usage within it’s scope (any sort of >window >reusing, like mapping whole A16 once to be used with all boards), but this >won’t >work

Re: [PATCH v3 3/3] dt-binding:Documents the mbigen bindings

2015-07-08 Thread Mark Rutland
On Mon, Jul 06, 2015 at 08:09:08AM +0100, Ma Jun wrote: > Add the mbigen msi interrupt controller bindings document > > Change in v3: > ---Change the compatible string > ---Change the interrupt cells definition. > > Signed-off-by: Ma Jun > --- > Documentation/devicetree/bindings/arm/mbigen.txt

Re: [RFC 5/8] kdbus: use LSM hooks in kdbus code

2015-07-08 Thread Stephen Smalley
On 07/08/2015 06:25 AM, Paul Osmialowski wrote: > Originates from: > > https://github.com/lmctl/kdbus.git (branch: kdbus-lsm-v4.for-systemd-v212) > commit: aa0885489d19be92fa41c6f0a71df28763228a40 > > Signed-off-by: Karol Lewandowski > Signed-off-by: Paul Osmialowski > --- > ipc/kdbus/bus.c

Re: [PATCH v2] add stealth mode

2015-07-08 Thread Austin S Hemmelgarn
On 2015-07-06 15:44, Matteo Croce wrote: 2015-07-06 12:49 GMT+02:00 : On Thu, 02 Jul 2015 10:56:01 +0200, Matteo Croce said: Add option to disable any reply not related to a listening socket, like RST/ACK for TCP and ICMP Port-Unreachable for UDP. Also disables ICMP replies to echo request

Re: [PATCH] MIPS, IRQCHIP: Move i8259 irqchip driver to drivers/irqchip.

2015-07-08 Thread Ralf Baechle
On Wed, Jul 08, 2015 at 02:57:38PM +0200, Thomas Gleixner wrote: > > arch/mips/Kconfig | 4 - > > arch/mips/kernel/Makefile | 1 - > > arch/mips/kernel/i8259.c| 384 > > > > drivers/irqchip/Kconfig | 4 + > >

Re: [tip:sched/core] sched/numa: Prefer NUMA hotness over cache hotness

2015-07-08 Thread Srikar Dronamraju
* Srikar Dronamraju [2015-07-07 05:49:31]: > * tip-bot for Srikar Dronamraju [2015-07-06 08:50:28]: > > > Commit-ID: 8a9e62a238a3033158e0084d8df42ea116d69ce1 > > Gitweb: > > http://git.kernel.org/tip/8a9e62a238a3033158e0084d8df42ea116d69ce1 > > Author: Srikar Dronamraju > >

Re: [PATCHv3 08/16] staging: vme_user: provide DMA functionality

2015-07-08 Thread Martyn Welch
On 07/07/15 08:08, Alessio Igor Bogani wrote: I would be glad to try it if the maintainer is willing to receive this type of changes. Such requirements have come up in the past. I'd welcome such support being contributed to the kernel. My view has been that such an API could be built on top

Re: [PATCH v3 2/3] megaraid_sas : use dev_printk when possible

2015-07-08 Thread Bjorn Helgaas
On Wed, Jul 8, 2015 at 5:47 AM, Hannes Reinecke wrote: > On 07/07/2015 10:52 PM, Bjorn Helgaas wrote: >> Use dev_printk() when possible to make messages more useful. >> >> Signed-off-by: Bjorn Helgaas >> --- >> drivers/scsi/megaraid/megaraid_sas_base.c | 304 >> +--

Re: [PATCH V3 1/4] perf: Add PERF_RECORD_SWITCH to indicate context switches

2015-07-08 Thread Arnaldo Carvalho de Melo
Em Wed, Jul 08, 2015 at 12:52:40AM +0200, Peter Zijlstra escreveu: > On Tue, Jul 07, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jul 07, 2015 at 05:36:14PM +0200, Peter Zijlstra escreveu: > > > > To help userspace in places where all it has is the union perf_event, we > >

[PATCH v11 06/39] bpf tools: Read eBPF object from buffer

2015-07-08 Thread Wang Nan
To support dynamic compiling, this patch allows caller to pass a in-memory buffer to libbpf by bpf_object__open_buffer(). libbpf calls elf_memory() to open it as ELF object file. Because __bpf_object__open() collects all required data and won't need that buffer anymore, libbpf uses that buffer

[BUG ?] brcmsmac: condition with no effect

2015-07-08 Thread Nicholas Mc Guire
From: Nicholas Mc Guire scanning for trivial bug-patters with coccinelle spatches returned: drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c:3391 WARNING: condition with no effect (if branch == else) added in 'commit 5b435de0d786 ("net:

[PATCH v11 20/39] bpf tools: Introduce accessors for struct bpf_program

2015-07-08 Thread Wang Nan
This patch introduces accessors for user of libbpf to retrieve 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:

[PATCH v11 04/39] bpf tools: Allow caller to set printing function

2015-07-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

Re: [PATCH RESEND] Documentation: Add MCB documentation

2015-07-08 Thread Johannes Thumshirn
Jonathan Corbet writes: > On Tue, 7 Jul 2015 10:37:08 +0200 > Johannes Thumshirn wrote: > >> The 1st version of this patch was send on Feb 16 >> (https://lkml.org/lkml/2015/2/16/31) and it seems like it missed v4.1 and I >> couldn't find it in the docs-next tree as well, that's the reason for

[PATCH v11 05/39] bpf tools: Open eBPF object file and do basic validation

2015-07-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

[PATCH v11 15/39] bpf tools: Add bpf.c/h for common bpf operations

2015-07-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 completely from user. Note that bpf.c and bpf.h deal with kernel interface only. Things like structure of 'map' section in the ELF object is not cared by of

[PATCH v11 14/39] bpf tools: Record map accessing instructions for each program

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

[PATCH v11 21/39] bpf tools: Introduce accessors for struct bpf_object

2015-07-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 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

Re: [PATCHv3 08/16] staging: vme_user: provide DMA functionality

2015-07-08 Thread Martyn Welch
On 06/07/15 18:24, Dmitry Kalinkin wrote: Some functionality was dropped as it was not good practice >(such as receiving VME interrupts in user space, it's not really doable if >the slave card is Release On Register Access rather than Release on >Acknowledge), Didn't know about RORA. I wonder

[PATCH v11 19/39] bpf tools: Load eBPF programs in object files into kernel

2015-07-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

[PATCH v11 09/39] bpf tools: Collect version and license from ELF sections

2015-07-08 Thread Wang Nan
Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32 LINUX_VERSION_CODE. bpf_obj_validate() is introduced

Re: [PATCH V3 0/5] Allow user to request memory to be locked on page fault

2015-07-08 Thread Eric B Munson
On Tue, 07 Jul 2015, Andrew Morton wrote: > On Tue, 7 Jul 2015 13:03:38 -0400 Eric B Munson wrote: > > > mlock() allows a user to control page out of program memory, but this > > comes at the cost of faulting in the entire mapping when it is > > allocated. For large mappings where the entire

[PATCH v11 17/39] bpf tools: Relocate eBPF programs

2015-07-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

[PATCH v11 23/39] perf tools: Introduce llvm config options

2015-07-08 Thread Wang Nan
This patch introduces [llvm] config section with 5 options. Following patches will use then to config llvm dynamica compiling. 'llvm-utils.[ch]' is introduced in this patch for holding all llvm/clang related stuffs. Example: [llvm] # Path to clang. If omit, search it from $PATH.

[PATCH v11 31/39] perf tools: Parse probe points of eBPF programs during preparation

2015-07-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

[PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.

2015-07-08 Thread Srikar Dronamraju
In commit:8a9e62a "sched/numa: Prefer NUMA hotness over cache hotness" sched feature NUMA was always set to true. However this sched feature was suppose to be enabled on NUMA boxes only thro set_numabalancing_state(). To get back to the above behaviour, bring back NUMA_FAVOUR_HIGHER feature.

Re: [RFC PATCH v3 4/4] trace: Trace log handler for logging into STM blocks

2015-07-08 Thread Ingo Molnar
* Chunyan Zhang wrote: > >> +++ b/include/trace/perf.h > >> @@ -175,6 +175,7 @@ trace_event_raw_event_##call(void *__data, proto) > >>\ > >> { assign; } \ > >>

[PATCH v11 29/39] perf record: Enable passing bpf object file to --event

2015-07-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.

[PATCH v11 16/39] bpf tools: Create eBPF maps defined in an object file

2015-07-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 collects required data, but doesn't play with the kernel. They belong to the 'opening' phase. This patch is the

[PATCH v11 18/39] bpf tools: Introduce bpf_load_program() to bpf.c

2015-07-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 Cc: Brendan Gregg Cc: Daniel Borkmann Cc: David Ahern Cc: He Kuang

[PATCH v11 28/39] perf tools: Make perf depend on libbpf

2015-07-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

[PATCH v11 37/39] perf tools: Suppress probing messages when probing by BPF loading

2015-07-08 Thread Wang Nan
This patch suppress message output by add_perf_probe_events() and del_perf_probe_events() if they are triggered by BPF loading. Before this patch, when using 'perf record' with BPF object/source as event selector, following message will be output: Added new event:

[PATCH v11 03/39] bpf tools: Introduce 'bpf' library and add bpf feature check

2015-07-08 Thread Wang Nan
This is the first patch of libbpf. The goal of libbpf is to create a standard way for accessing eBPF object files. This patch creates 'Makefile' and 'Build' for it, allows 'make' to build libbpf.a and libbpf.so, 'make install' to put them into proper directories. Most part of Makefile is borrowed

[PATCH v11 32/39] perf probe: Attach trace_probe_event with perf_probe_event

2015-07-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 gives 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

[PATCH v11 35/39] perf tools: Add bpf_fd field to evsel and config it

2015-07-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__foreach_tev() function is added, Which calls the callback function for each 'struct probe_trace_event' events for each bpf program with their file descriptors. In evlist.c,

[PATCH v11 30/39] perf record: Compile scriptlets if pass '.c' to --event

2015-07-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) Allow passing '.c' file to '--event'. parse_events_load_bpf() is expanded to allow caller tell it whether the passed file is source file or

[PATCH v11 25/39] perf tools: Auto detecting kernel build directory

2015-07-08 Thread Wang Nan
This patch detects kernel build directory using a embedded shell script 'kbuild_detector', which does this by checking existence of include/generated/autoconf.h. clang working directory is changed to kbuild directory if it is found, to help user use relative include path. Following patch will

[PATCH v11 39/39] bpf tools: Load a program with different instance using preprocessor

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

[PATCH v11 27/39] perf tests: Add LLVM test for eBPF on-the-fly compiling

2015-07-08 Thread Wang Nan
Previous patches introduce llvm__compile_bpf() to compile source file to eBPF object. This patch adds testcase to test it. It also test libbpf by opening generated object. Signed-off-by: Wang Nan --- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 ++

Re: [RFC PATCH v3 4/4] trace: Trace log handler for logging into STM blocks

2015-07-08 Thread Steven Rostedt
On Wed, 8 Jul 2015 14:31:48 +0200 Peter Zijlstra wrote: > On Tue, Jul 07, 2015 at 06:10:43PM +0800, Chunyan Zhang wrote: > > Add the function 'trace_event_stm_output_##call' for printing events > > trace log into STM blocks. > > > > This patch also adds a function call at where the events have

[PATCH v11 24/39] perf tools: Call clang to compile C source to object code

2015-07-08 Thread Wang Nan
This is the core patch for supporting eBPF on-the-fly compiling, does the following work: 1. Search clang compiler using search_program(). 2. Run command template defined in llvm-bpf-cmd-template option in [llvm] config section using read_from_pipe(). Patch of clang and source code

[PATCH v11 02/39] tracing, perf: Implement BPF programs attached to uprobes

2015-07-08 Thread Wang Nan
By copying BPF related operation to uprobe processing path, this patch allow users attach BPF programs to uprobes like what they are already doing on kprobes. After this patch, users are allowed to use PERF_EVENT_IOC_SET_BPF on a uprobe perf event. Which make it possible to profile user space

[PATCH v11 38/39] perf record: Add clang options for compiling BPF scripts

2015-07-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 2 options to 'perf record' for this propose: --clang-path and --clang-opt. Signed-off-by: Wang Nan ---

[PATCH v11 34/39] perf record: Load all eBPF object into kernel

2015-07-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(+)

[PATCH v11 10/39] bpf tools: Collect map definitions from 'maps' section

2015-07-08 Thread Wang Nan
If maps are used by eBPF programs, corresponding object file(s) should contain a section named 'map'. Which contains map definitions. This patch copies the data of the whole section. Map data parsing should be acted just before map loading. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov

[PATCH v11 01/39] bpf: Use correct #ifdef controller for trace_call_bpf()

2015-07-08 Thread Wang Nan
Commit e1abf2cc8d5d80b41c4419368ec743ccadbb131e ("bpf: Fix the build on BPF_SYSCALL=y && !CONFIG_TRACING kernels, make it more configurable") updated the building condition of bpf_trace.o from CONFIG_BPF_SYSCALL to CONFIG_BPF_EVENTS, but the corresponding #ifdef controller in trace_events.h for

[PATCH v11 22/39] bpf tools: Link all bpf objects onto a list

2015-07-08 Thread Wang Nan
To allow enumeration of all bpf_objects, keep them in a list (hidden to caller). bpf_object__for_each_safe() is introduced to do this iteration. It is safe even user close the object during iteration. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov Cc: Brendan Gregg Cc: Daniel Borkmann

[PATCH v11 11/39] bpf tools: Collect symbol table from SHT_SYMTAB section

2015-07-08 Thread Wang Nan
This patch collects symbols section. This section is useful when linking BPF maps. What 'bpf_map_xxx()' functions actually require are map's file descriptors (and the internal verifier converts fds into pointers to 'struct bpf_map'), which we don't know when compiling. Therefore, we should make

[PATCH v11 36/39] perf tools: Attach eBPF program to perf event

2015-07-08 Thread Wang Nan
This is the final patch which makes basic BPF filter work. After applying this patch, users are allowed to use BPF filter like: # perf record --event ./hello_world.c ls In this patch PERF_EVENT_IOC_SET_BPF ioctl is used to attach eBPF program to a newly created perf event. The file descriptor

[PATCH v11 00/39] perf tools: filtering events using eBPF programs - part1

2015-07-08 Thread Wang Nan
Hi Arnaldo Carvalho de Melo, I rearranged the first 39 patches of this patchset according to your comments. After applying all of them you can use a hello world BPF program for testing. They are based on your 'tmp.perf/ebpf', commit 60cd37eb100c4880b28078a47f3062fac7572095. I hope I can

[PATCH v11 12/39] bpf tools: Collect eBPF programs from their own sections

2015-07-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

[PATCH v11 33/39] perf record: Probe at kprobe points

2015-07-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() creates all of them. probe_conf.max_probes is set to MAX_PROBES to support glob matching. Signed-off-by: Wang Nan ---

[PATCH v11 13/39] bpf tools: Collect relocation sections from SHT_REL sections

2015-07-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 information. This patch simply store the data into 'reloc' field. Following patch will parse them to know

[PATCH v11 26/39] perf tools: Auto detecting kernel include options

2015-07-08 Thread Wang Nan
To help user find correct kernel include options, this patch extracts them from kbuild system by an embedded script kinc_fetch_script, which creates a temporary directory, generates Makefile and an empty dummy.o then use the Makefile to fetch $(NOSTDINC_FLAGS), $(LINUXINCLUDE) and $(EXTRA_CFLAGS)

[PATCH v11 07/39] bpf tools: Check endianness and make libbpf fail early

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

[PATCH v11 08/39] bpf tools: Iterate over ELF sections to collect information

2015-07-08 Thread Wang Nan
bpf_obj_elf_collect() is introduced to iterate over each elf sections to collection information in eBPF object files. This function will futher enhanced to collect license, kernel version, programs, configs and map information. Signed-off-by: Wang Nan Acked-by: Alexei Starovoitov Cc: Brendan

Re: [PATCH] MIPS, IRQCHIP: Move i8259 irqchip driver to drivers/irqchip.

2015-07-08 Thread Thomas Gleixner
On Wed, 8 Jul 2015, Ralf Baechle wrote: > On Wed, Jul 08, 2015 at 02:57:38PM +0200, Thomas Gleixner wrote: > > > > arch/mips/Kconfig | 4 - > > > arch/mips/kernel/Makefile | 1 - > > > arch/mips/kernel/i8259.c| 384 > > > > > >

Re: mm: shmem_zero_setup skip security check and lockdep conflict with XFS

2015-07-08 Thread Stephen Smalley
On Sun, Jun 14, 2015 at 12:48 PM, Hugh Dickins wrote: > It appears that, at some point last year, XFS made directory handling > changes which bring it into lockdep conflict with shmem_zero_setup(): > it is surprising that mmap() can clone an inode while holding mmap_sem, > but that has been so

Re: Re: perf, kprobes: fuzzer generates huge number of WARNings

2015-07-08 Thread Masami Hiramatsu
On 2015/07/08 6:21, Alexei Starovoitov wrote: > On Tue, Jul 07, 2015 at 05:08:51PM -0400, Vince Weaver wrote: >> On Tue, 7 Jul 2015, Alexei Starovoitov wrote: >> >>> On Tue, Jul 07, 2015 at 12:00:12AM -0400, Vince Weaver wrote: Well the BPF hack is in the fuzzer, not the kernel. And

Re: [PATCH v3 9/9] usb: dwc3: core: don't break during suspend/resume while we're dual-role

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 1:37 PM, Roger Quadros wrote: We can't rely just on dr_mode to decide if we're in host or gadget mode when we're configured as otg/dual-role. So while dr_mode is OTG, we find out from the otg state machine if we're in host or gadget mode and take the necessary actions

Re: [RFC PATCH v3 1/4] STM trace event: Adding generic buffer interface driver

2015-07-08 Thread Alexander Shishkin
Peter Zijlstra writes: > On Tue, Jul 07, 2015 at 06:10:40PM +0800, Chunyan Zhang wrote: >> +config STM_TRACE_EVENT >> +tristate "Redirect/copy the output from kernel trace event to STM >> engine" > > How does tristate make sense here? You're using it unconditionally for > in-kernel

Re: [RFC PATCH v3 4/4] trace: Trace log handler for logging into STM blocks

2015-07-08 Thread Chunyan Zhang
On Wed, Jul 8, 2015 at 8:31 PM, Peter Zijlstra wrote: > On Tue, Jul 07, 2015 at 06:10:43PM +0800, Chunyan Zhang wrote: >> Add the function 'trace_event_stm_output_##call' for printing events >> trace log into STM blocks. >> >> This patch also adds a function call at where the events have been >>

[PATCH v4 0/7]powerpc/powernv: Nest Instrumentation support

2015-07-08 Thread Madhavan Srinivasan
This patchset enables Nest Instrumentation support on powerpc. POWER8 has per-chip Nest Intrumentation which provides various per-chip metrics like memory, powerbus, Xlink and Alink bandwidth. Nest Instrumentation provides an interface (via PORE Engine) to configure and move the nest counter data

[PATCH 3/4] mm, oom: organize oom context into struct

2015-07-08 Thread Michal Hocko
From: David Rientjes There are essential elements to an oom context that are passed around to multiple functions. Organize these elements into a new struct, struct oom_context, that specifies the context for an oom condition. This patch introduces no functional change. [mho...@suse.cz:

[PATCH 2/4] oom: Do not invoke oom notifiers on sysrq+f

2015-07-08 Thread Michal Hocko
From: Michal Hocko A github user rfjakob has reported the following issue via IRC. Manually triggering the OOM killer does not work anymore in 4.0.5 This is what it looks like: https://gist.github.com/rfjakob/346b7dc611fc3cdf4011 Basically, what happens is that the GPU driver frees some

Re: [PATCH v3 4/9] usb: dwc3: core: Adapt to named interrupts

2015-07-08 Thread Sergei Shtylyov
Hello. On 7/8/2015 1:36 PM, Roger Quadros wrote: From: Felipe Balbi Add support to use interrupt names, Following are the interrupt names Peripheral Interrupt - peripheral HOST Interrupt - host OTG Interrupt - otg [Roger Q] - If any of these are missing we use the first available

[PATCH v4 1/7] powerpc/powernv: Data structure and macros definition

2015-07-08 Thread Madhavan Srinivasan
Create new header file "nest-pmu.h" to add the data structures and macros needed for the nest pmu support. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Anshuman Khandual Cc: Stephane Eranian Signed-off-by: Madhavan

[PATCH v4 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support

2015-07-08 Thread Madhavan Srinivasan
Adds cpumask attribute to be used by each nest pmu since nest units are per-chip. Only one cpu (first online cpu) from each node/chip is designated to read counters. On cpu hotplug, dying cpu is checked to see whether it is one of the designated cpus, if yes, next online cpu from the same

[PATCH v4 3/7] powerpc/powernv: Nest PMU detection and device tree parser

2015-07-08 Thread Madhavan Srinivasan
Create a file "nest-pmu.c" to contain nest pmu related functions. Code to detect nest pmu support and parser to collect per-chip reserved memory region information from device tree (DT). Detection mechanism is to look for specific property "ibm,ima-chip" in DT. For Nest pmu, device tree will have

Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf

2015-07-08 Thread Arnaldo Carvalho de Melo
Em Tue, Jul 07, 2015 at 07:03:50PM -0700, Alexei Starovoitov escreveu: > On 7/7/15 1:16 PM, Arnaldo Carvalho de Melo wrote: > >So, please move this to just before we can use it, wiring it up should > >mean, hey, try this "hello, world" eBPF program right now! > > btw, since bpf is now stable llvm

[PATCH 1/4] oom: Do not panic when OOM killer is sysrq triggered

2015-07-08 Thread Michal Hocko
From: Michal Hocko OOM killer might be triggered explicitly via sysrq+f. This is supposed to kill a task no matter what e.g. a task is selected even though there is an OOM victim on the way to exit. This is a big hammer for an admin to help to resolve a memory short condition when the system is

[PATCH 0/4] oom: sysrq+f fixes + cleanups

2015-07-08 Thread Michal Hocko
Hi, some of these patches have been posted already: http://marc.info/?l=linux-mm=143462145830969=2 This series contains an additional fix for another sysrq+f issue reported off mailing list (patch #2). First two patches are clear fixes. The third patch is from David with my minor changes. The

[PATCH 4/4] oom: split out forced OOM killer

2015-07-08 Thread Michal Hocko
From: Michal Hocko The forced OOM killing is currently wired into out_of_memory() call even though their objective is different which makes the code ugly and harder to follow. Generic out_of_memory path has to deal with configuration settings and heuristics which are completely irrelevant to the

[PATCH v4 6/7] powerpc/powernv: generic nest pmu event functions

2015-07-08 Thread Madhavan Srinivasan
Add set of generic nest pmu related event functions to be used by each nest pmu. Add code to register nest pmus. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Anshuman Khandual Cc: Stephane Eranian Signed-off-by: Madhavan

[PATCH v4 5/7] powerpc/powernv: add event attribute and group to nest pmu

2015-07-08 Thread Madhavan Srinivasan
Add code to create event/format attributes and attribute groups for each nest pmu. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Anshuman Khandual Cc: Stephane Eranian Signed-off-by: Madhavan Srinivasan ---

[PATCH v4 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-08 Thread Madhavan Srinivasan
Parse device tree to detect supported nest pmu units. Traverse through each nest pmu unit folder to find supported events and corresponding unit/scale files (if any). The nest unit event file from DT, will contain the offset in the reserved memory region to get the counter data for a given event.

Re: [RFC PATCH v10 23/50] perf tools: Make perf depend on libbpf

2015-07-08 Thread Arnaldo Carvalho de Melo
Em Wed, Jul 08, 2015 at 07:45:34PM +0800, Wangnan (F) escreveu: > On 2015/7/8 4:16, Arnaldo Carvalho de Melo wrote: > >Em Tue, Jul 07, 2015 at 04:54:52PM -0300, Arnaldo Carvalho de Melo escreveu: > >>Em Wed, Jul 01, 2015 at 02:14:11AM +, Wang Nan escreveu: > >>>Error messages are also updated

[PATCH v4 2/7] powerpc/powernv: Add OPAL support for Nest PMU

2015-07-08 Thread Madhavan Srinivasan
Nest Counters can be configured via PORE Engine and OPAL provides an interface to start/stop it. OPAL side patches are posted in the skiboot mailing. Cc: Stewart Smith Cc: Jeremy Kerr Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev

Re: [PATCH] MIPS, IRQCHIP: Move i8259 irqchip driver to drivers/irqchip.

2015-07-08 Thread Thomas Gleixner
On Wed, 8 Jul 2015, Ralf Baechle wrote: > arch/mips/Kconfig | 4 - > arch/mips/kernel/Makefile | 1 - > arch/mips/kernel/i8259.c| 384 > > drivers/irqchip/Kconfig | 4 + > drivers/irqchip/Makefile| 1 + >

Re: [PATCH v2 1/3] x86/pci/intel_mid_pci: work around for IRQ0 assignment

2015-07-08 Thread Thomas Gleixner
On Wed, 8 Jul 2015, Andy Shevchenko wrote: > A few devices on Intel Edison board (Intel Tangier) has IRQ0 as an IRQ line in > the PCI configuration. The actual one which is using that is a first eMMC host > controller. You fail to explain that the other devices have a bogus PCI configuration. >

Re: [PATCH] iio: accel: kxcjk-1013: Remove blank lines

2015-07-08 Thread Daniel Baluta
On Wed, Jul 8, 2015 at 3:44 PM, Ana Calinov wrote: > This patch fixes the the following errors given by > checkpatch.pl with --strict: > Please don't use multiple blank lines. > Blank lines aren't necessary after an open brace '{'. > > Signed-off-by: Ana Calinov Looks good to me. Reviewed-by:

Re: [PATCH 2/3] kmod: Add up-to-date explanations on the purpose of each asynchronous levels

2015-07-08 Thread Frederic Weisbecker
On Tue, Jul 07, 2015 at 04:07:58PM -0700, Andrew Morton wrote: > On Mon, 6 Jul 2015 17:33:40 +0200 Frederic Weisbecker > wrote: > > > There seem to be quite some confusions on the comments, likely due to > > changes that came after them. > > > > Now since it's very non obvious why we have 3

Re: [RFC PATCH] irq: IRQ bypass manager

2015-07-08 Thread Alex Williamson
On Wed, 2015-07-08 at 12:22 +, Wu, Feng wrote: > > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, July 08, 2015 5:40 AM > > To: linux-kernel@vger.kernel.org; k...@vger.kernel.org > > Cc: eric.au...@st.com;

[PATCH v2 0/2] arm: kernel: implement cpuidle_ops with psci backend

2015-07-08 Thread Jisheng Zhang
We'd like to use cpuidle-arm.c for both arm and arm64 with psci as backend. For arm64, it works. But for arm, we miss cpuidle_ops, these patches try to address this issue. Has been tested on Marvell Berlin SoCs. These patches are rebased on the Mark Rutland's latest psci unification work and

Re: [PATCH 2/2] serial: 8250: Allow to skip autoconfig_irq() for a console

2015-07-08 Thread Prarit Bhargava
On 07/08/2015 07:55 AM, Peter Hurley wrote: > Hi Taichi, > > On 06/05/2015 06:03 AM, Taichi Kageyama wrote: >> This patch provides a new parameter as a workaround of the following >> problem. It allows us to skip autoconfig_irq() and to use a well-known irq >> number for a console even if

[PATCH v2 1/2] firmware: psci: move cpu_suspend handling to generic code

2015-07-08 Thread Jisheng Zhang
Functions implemented on arm64 to suspend cpu and translate the idle state index passed by the cpu_suspend core call to a valid PSCI state are not arm64 specific and should be moved to generic code so that they can be reused on arm systems too. This patch moves these functions to generic PSCI

Re: + kmod-remove-unecessary-explicit-wide-cpu-affinity-setting.patch added to -mm tree

2015-07-08 Thread Frederic Weisbecker
On Wed, Jul 08, 2015 at 01:32:26AM +0200, Oleg Nesterov wrote: > Well, sorry for noise. > > Let me repeat that I agree with this change, but... > > On 07/07, Andrew Morton wrote: > > > > From: Frederic Weisbecker > > Subject: kmod: remove unecessary explicit wide CPU affinity setting > > > >

[PATCH v2 2/2] arm: kernel: implement cpuidle_ops with psci backend

2015-07-08 Thread Jisheng Zhang
This patch implements cpuidle_ops using psci. After this patch, we can use cpuidle-arm.c with psci backend for both arm and arm64. Signed-off-by: Jisheng Zhang --- arch/arm/kernel/Makefile | 1 + arch/arm/kernel/psci_cpuidle.c | 29 + 2 files changed, 30

Re: [PATCH v4 0/2] vhost: support more than 64 memory regions

2015-07-08 Thread Igor Mammedov
On Thu, 2 Jul 2015 15:08:09 +0200 Igor Mammedov wrote: > changes since v3: > * rebased on top of vhost-next branch > changes since v2: > * drop cache patches for now as suggested > * add max_mem_regions module parameter instead of unconditionally > increasing limit > * drop bsearch

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