linux-next: Tree for Jul 1

2015-06-30 Thread Stephen Rothwell
Hi all, Please do not add any v4.3 related material to your linux-next included branches until after v4.2-rc1 is released. Changes since 20150630: I fixed a supplied patch to the akpm tree. Non-merge commits (relative to Linus' tree): 1860 1686 files changed, 98175 insertions(+), 25316

Re: [PATCH] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode

2015-06-30 Thread Mike Looijmans
On 01-07-15 04:19, Bean Huo 霍斌斌 (beanhuo) wrote: >> drivers/mtd/spi-nor/spi-nor.c | 2 ++ >> 1 file changed, 2 insertions(+) > >> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c >> index e8f6131..10ba94f 100644 >> --- a/drivers/mtd/spi-nor/spi-nor.c >> +++

Re: [RFC PATCH 0/5] Make eBPF programs output data to perf event

2015-06-30 Thread Peter Zijlstra
On Wed, Jul 01, 2015 at 02:57:30AM +, He Kuang wrote: > This patch adds an extra perf trace buffer for other utilities like > bpf to fill extra data to perf events. What!, why? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-06-30 Thread Greg KH
On Tue, Jun 30, 2015 at 10:34:25PM -0500, Jeremy White wrote: > > > >It's pointless to post a patch that you know has problems with it (i.e. > >it's not even in proper kernel coding style), as it will never be > >reviewed or even looked at. > > Thanks for the reply, and I'm sorry for the clumsy

Re: [PATCH] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode

2015-06-30 Thread Mike Looijmans
On 30-06-15 17:42, Graham Moore wrote: On 06/30/2015 06:17 AM, Mike Looijmans wrote: Micron QUAD mode expects command, address and data on 4 lanes instead of just one for command (extended SPI mode). This requires the controller to be in a special mode, so check first if the controller could

Re: [PATCH?] Livelock in pick_next_task_fair() / idle_balance()

2015-06-30 Thread Mike Galbraith
On Tue, 2015-06-30 at 16:30 +0200, Rabin Vincent wrote: > Hi, > > We're seeing a livelock where two CPUs both loop with interrupts > disabled in pick_next_task_fair() / idle_balance() and continuously > fetch all tasks from each other... Hm. Does the below help? Looks to me like we are

Re: [PATCH v2 3/4] spi: mediatek: Add spi bus for Mediatek MT8173

2015-06-30 Thread Sascha Hauer
On Wed, Jul 01, 2015 at 12:06:02PM +0800, Daniel Kurtz wrote: > Hi Leilk, > > Please see comments inline... > > On Mon, Jun 29, 2015 at 9:04 PM, Leilk Liu wrote: > > This patch adds basic spi bus for MT8173. > > > > Signed-off-by: Leilk Liu > > Signed-off-by: Eddie Huang > > --- > >

Re: [PATCH v2 4/5] perf mem: Fill in the missing freeing a session after an error occur

2015-06-30 Thread taeung
On 07/01/2015 04:57 AM, Arnaldo Carvalho de Melo wrote: Em Wed, Jul 01, 2015 at 12:18:45AM +0900, Taeung Song escreveu: When an error occur a error value is just returned without freeing the session. So allocating and freeing session have to be matched as a pair even if an error occur.

Gjelder for virksomheten / investering lån

2015-06-30 Thread Infinity Finance
Address: 7, Unit, 4A Ford Street, Stockport, Cheshire SK3 0BT, United Kingdom. Company Registration No: 6296225 Financial Services Authority Reg NO: 602506 God dag herr / fru Vi håper at vi møttes i en sunn tilstand? Vi er Storbritannia basert lån utlåner, kan vi tilby lån for business /

[PATCH] regmap: Use different lockdep class for each regmap init call

2015-06-30 Thread Nicolas Boichat
Lockdep validator complains about recursive locking and deadlock when two different regmap instances are called in a nested order. That happens anytime a regmap read/write call needs to access another regmap. This is because, for performance reason, lockdep groups all locks initialized by the

[PATCH] mmc: core: Set load on vmmc and vqmmc

2015-06-30 Thread Bjorn Andersson
Signed-off-by: Bjorn Andersson --- This is needed to get our regulators into hpm, to give enough power to our sdhci cards to run at higher clockrates - e.g. hs200. Documentation/devicetree/bindings/mmc/mmc.txt | 2 ++ drivers/mmc/core/core.c | 6 ++

Re: gcc feature request / RFC: extra clobbered regs

2015-06-30 Thread Jeff Law
On 06/30/2015 04:02 PM, H. Peter Anvin wrote: On 06/30/2015 02:55 PM, Andy Lutomirski wrote: On Tue, Jun 30, 2015 at 2:52 PM, H. Peter Anvin wrote: On 06/30/2015 02:48 PM, Andy Lutomirski wrote: On Tue, Jun 30, 2015 at 2:41 PM, H. Peter Anvin wrote: On 06/30/2015 02:37 PM, Jakub Jelinek

[PATCH V2] lib/bitmap.c: fix some parsing issues and code style

2015-06-30 Thread Pan Xinhui
In __bitmap_parselist we can accept whitespaces on head or tail during every parsing procedure. If input has valid ranges, there is no reason to reject the user. fixes are: 1) if input ends with ',', bit 0 might be set unexpectedly. now we check if any digit is available after every loop. 2) if

[PATCH] thermal: cpu_cooling: Iterate over all CPUs in clip_cpu mask to get frequency table

2015-06-30 Thread Pi-Cheng Chen
Sorry for the mistake I made when cherry-picking the patch. Fix and resend again. __cpufreq_cooling_register() might fail if some CPU other than first one in clip_cpu mask is present earlier e.g. CPU hotplug. Iterate all CPUs in the mask to handle this case. Signed-off-by: Pi-Cheng Chen ---

[PATCH 2/5] usb: phy: omap-otg: Replace deprecated API of extcon

2015-06-30 Thread Chanwoo Choi
This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() -

[PATCH 4/5] usb: renesas_usbhs: Replace deprecated API of extcon

2015-06-30 Thread Chanwoo Choi
This patch removes the deprecated API of extcon and then use the new extcon API with the unique id to indicate the each external connector (USB-HOST). - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Yoshihiro Shimoda Cc:

[PATCH 3/5] usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API

2015-06-30 Thread Chanwoo Choi
This patch uses the devm_extcon_dev_[allocate|register]() to manage the resource automatically and replace deprecated API as following: - extcon_[set|get]_cable_state(*edev, char *) -> extcon_[set|get]_cable_state_(*edev, id) Cc: Felipe Balbi Cc: Greg Kroah-Hartman Signed-off-by: Chanwoo Choi

[PATCH 1/5] usb: dwc3: omap: Replace deprecated API of extcon

2015-06-30 Thread Chanwoo Choi
This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() -

[PATCH 5/5] usb: phy: msm-usb: Replace deprecated API of extcon

2015-06-30 Thread Chanwoo Choi
This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() -

[PATCH 0/5] usb: Replace deprecated API of extcon

2015-06-30 Thread Chanwoo Choi
This patch removes the deprecated API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector. Th deprecated API with cable name as following: - int extcon_register_interest(struct extcon_specific_cable_nb *obj,

[PATCH] thermal: cpu_cooling: Iterate over all CPUs in clip_cpu mask to get frequency table

2015-06-30 Thread Pi-Cheng Chen
__cpufreq_cooling_register() might fail if some CPU other than first one in clip_cpu mask is present earlier e.g. CPU hotplug. Iterate all CPUs in the mask to handle this case. Signed-off-by: Pi-Cheng Chen --- drivers/thermal/cpu_cooling.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH v2 3/4] spi: mediatek: Add spi bus for Mediatek MT8173

2015-06-30 Thread Daniel Kurtz
Hi Leilk, Please see comments inline... On Mon, Jun 29, 2015 at 9:04 PM, Leilk Liu wrote: > This patch adds basic spi bus for MT8173. > > Signed-off-by: Leilk Liu > Signed-off-by: Eddie Huang > --- > drivers/spi/Kconfig | 9 + > drivers/spi/Makefile | 1 + >

Re: [PATCH] PM / Sleep: Use workqueue for user space wakeup sources garbage collector

2015-06-30 Thread Krzysztof Kozłowski
2015-07-01 11:48 GMT+09:00 SungEun Kim : > From: "cleaeye.kim" > > The synchronous synchronize_rcu in wakeup_source_remove makes user process > which writes to /sys/kernel/wake_unlock blocked sometimes. > > For example, when android eventhub tries to release wakelock, > this blocking process can

[GIT] Networking

2015-06-30 Thread David Miller
1) mlx4 driver bug fixes (TX queue wakeups, csum complete indications) from Ido Shamay, Eran Ben Elisha, and Or Gerlitz. 2) Missing unlock in error path of PTP support in renesas driver, from Dan Carpenter. 3) Add Vitesse 8641 phy IDs to vitesse PHY driver, from Shaohui Xie. 4) Bnx2x

Re: [PATCH] PM / Sleep: Use workqueue for user space wakeup sources garbage collector

2015-06-30 Thread Krzysztof Kozlowski
2015-07-01 11:48 GMT+09:00 SungEun Kim : > From: "cleaeye.kim" > > The synchronous synchronize_rcu in wakeup_source_remove makes user process > which writes to /sys/kernel/wake_unlock blocked sometimes. > > For example, when android eventhub tries to release wakelock, > this blocking process can

Re: [PATCH RFC tip/core/rcu 0/5] Expedited grace periods encouraging normal ones

2015-06-30 Thread Paul E. McKenney
On Tue, Jun 30, 2015 at 05:42:14PM -0700, Josh Triplett wrote: > On Tue, Jun 30, 2015 at 05:15:58PM -0700, Paul E. McKenney wrote: > > On Tue, Jun 30, 2015 at 04:46:33PM -0700, j...@joshtriplett.org wrote: > > > On Tue, Jun 30, 2015 at 03:12:24PM -0700, Paul E. McKenney wrote: > > > > On Tue, Jun

Re: [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-06-30 Thread Jeremy White
It's pointless to post a patch that you know has problems with it (i.e. it's not even in proper kernel coding style), as it will never be reviewed or even looked at. Thanks for the reply, and I'm sorry for the clumsy ask. I would still appreciate feedback on two points: 1. Is the basic

Re: [PATCH v2] hwmon: (nct7802) add temperature sensor type attribute

2015-06-30 Thread Guenter Roeck
Hi Constantine, On 06/29/2015 04:05 PM, Constantine Shulyupin wrote: From: const Sensor type: 3 diode (current mode), MD=1 4 thermistor, MD=2 Reference: Nuvoton Hardware Monitoring IC NCT7802Y 7.2.32 Mode Selection Register Location : Index 22h Signed-off-by: Constantine Shulyupin ---

Re: [PATCH V3] lib/bitmap.c: rewrite __bitmap_parse && __bitmap_parselist

2015-06-30 Thread Pan Xinhui
hi, all after a deep think, allocing a new buf is ugly. new patch "lib/bitmap.c: fix some parsing issues and code style" is sent out. any comments is welcome. :) thanks xinhui On 2015年06月30日 18:02, Pan Xinhui wrote: add __bitmap_parse_common to match any contents and return expected

[PATCH] lib/bitmap.c: fix some parsing issues and code style

2015-06-30 Thread Pan Xinhui
In __bitmap_parselist we can accept whitespaces on head or tail during every parsing procedure. If input has valid ranges, there is no reason to reject the user. fixes: 1) if input ends with ',', bit 0 might be set unexpectedly. now we check if any digit is available after every loop. 2) if

[PATCH 1/1] mem-hotplug: Handle node hole when initializing numa_meminfo.

2015-06-30 Thread Tang Chen
When parsing SRAT, all memory ranges are added into numa_meminfo. In numa_init(), before entering numa_cleanup_meminfo(), all possible memory ranges are in numa_meminfo. And numa_cleanup_meminfo() removes all ranges over max_pfn or empty. But, this only works if the nodes are continuous. Let's

Re: [Xen-devel] [PATCH RFC v2 0/5] Multi-queue support for xen-blkfront and xen-blkback

2015-06-30 Thread Jens Axboe
On 06/30/2015 08:21 AM, Marcus Granado wrote: On 13/05/15 11:29, Bob Liu wrote: On 04/28/2015 03:46 PM, Arianna Avanzini wrote: Hello Christoph, Il 28/04/2015 09:36, Christoph Hellwig ha scritto: What happened to this patchset? It was passed on to Bob Liu, who published a follow-up

Re: [PATCH net-next] test_bpf: extend tests for 32-bit endianness conversion

2015-06-30 Thread Alexei Starovoitov
On 6/26/15 8:25 AM, Xi Wang wrote: Currently "ALU_END_FROM_BE 32" and "ALU_END_FROM_LE 32" do not test if the upper bits of the result are zeros (the arm64 JIT had such bugs). Extend the two tests to catch this. Cc: Alexei Starovoitov Signed-off-by: Xi Wang looks good. Please resubmit when

[RFC PATCH 3/5] tracing/kprobe: Separate inc recursion count out of perf_trace_buf_prepare

2015-06-30 Thread He Kuang
Inside perf_trace_buf_prepare(), a recursion count is increased, the count was first introduced by commit 444a2a3bcd6d ("tracing, perf_events: Protect the buffer from recursion in perf") to protect the percpu data buffer from being overwritten. For future patch to enable eBPF saving data into

[RFC PATCH 5/5] tracing/kprobe: Combine extra trace buf into perf trace buf

2015-06-30 Thread He Kuang
Collect extra trace buffer data in the stage of preparing perf trace buffer. If extra perf trace buffer is valid, set invalid flag, extend the trace buffer size and append the data of extra buffer to perf trace buffer, so the combined data will be compatible to the orignal format and can be

[RFC PATCH 0/5] Make eBPF programs output data to perf event

2015-06-30 Thread He Kuang
The idea to let eBPF output data to perf sample event was first metioned in "[RFC PATCH v4 10/29] bpf tools: Collect map definitions from 'maps' section", and the output data is not limited to PMU counters but data like time latencies, cache misses or other things users want to record. This patch

[RFC PATCH 1/5] bpf: Put perf_events check ahead of bpf prog

2015-06-30 Thread He Kuang
When we add a kprobe point and record events by perf, the execution path of all threads on each cpu will enter this point, but perf may only record events on a particular thread or cpu at this kprobe point, a check on call->perf_events list filters out the threads which perf is not recording.

[RFC PATCH 4/5] bpf: Introduce function for outputing sample data to perf event

2015-06-30 Thread He Kuang
Add function to receive data from eBPF programs and fill that into perf extra trace buffer of the current context. In previous patch we make sure that the recursion flag protecting perf trace buffer is checked when bpf_prog is executed, so here we can safely fill the trace buffer. In order to get

[RFC PATCH 2/5] perf/trace: Add perf extra percpu trace buffer

2015-06-30 Thread He Kuang
Introduce another trace buffer besides perf_trace_buffer, so other utilities like bpf can generate and fill perf event data to it extraly and the data can be collected to the original buffer afterwards. The life cycle of this extra buffer is the same as the original one. Signed-off-by: He Kuang

Re: [PATCH 06/36] HMM: add HMM page table v2.

2015-06-30 Thread Mark Hairgrove
On Mon, 29 Jun 2015, Jerome Glisse wrote: > [...] > > Iterator is what protect against concurrent freeing of the directory so it > has to return to caller on directory boundary (for 64bits arch with 64bits > pte it has return every 512 entries). Otherwise pt_iter_fini() would have > to walk

[PATCH] PM / Sleep: Use workqueue for user space wakeup sources garbage collector

2015-06-30 Thread SungEun Kim
From: "cleaeye.kim" The synchronous synchronize_rcu in wakeup_source_remove makes user process which writes to /sys/kernel/wake_unlock blocked sometimes. For example, when android eventhub tries to release wakelock, this blocking process can occur, and eventhub can't get input event for a

Re: [PATCH v2 1/3] ACPI : introduce macros for using the ACPI specification version

2015-06-30 Thread Hanjun Guo
On 2015/7/1 5:15, Al Stone wrote: > On 06/30/2015 02:12 PM, Rafael J. Wysocki wrote: >> Hi Al, >> >> On Fri, Jun 19, 2015 at 12:36 AM, Al Stone wrote: >>> Add the ACPI_SPEC_VERSION() macro to build a proper version number from >>> a major and minor revision number. Add also the

[RFC PATCH v10 28/50] perf tools: Auto detecting kernel include options

2015-06-30 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)

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

2015-06-30 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 v10 19/50] bpf tools: Load eBPF programs in object files into kernel

2015-06-30 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 v10 26/50] perf tests: Add LLVM test for eBPF on-the-fly compiling

2015-06-30 Thread Wang Nan
Previous patch introduces 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 ++

[RFC PATCH v10 40/50] perf tools: Fix probe-event.h include

2015-06-30 Thread Wang Nan
Commit 7b6ff0bdbf4f7f429c2116cca92a6d171217449e ("perf probe ppc64le: Fixup function entry if using kallsyms lookup") adds 'struct map' into probe-event.h but not include "util/map.h" in it. This patch fixes it. Signed-off-by: Wang Nan --- tools/perf/util/probe-event.h | 1 + 1 file changed, 1

[RFC PATCH v10 29/50] perf record: Enable passing bpf object file to --event

2015-06-30 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 v10 38/50] perf record: Add clang options for compiling BPF scripts

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

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

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

[RFC PATCH v10 37/50] perf tools: Suppress probing messages when probing by BPF loading

2015-06-30 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:

[RFC PATCH v10 34/50] perf record: Load all eBPF object into kernel

2015-06-30 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 v10 31/50] perf tools: Parse probe points of eBPF programs during preparation

2015-06-30 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 v10 43/50] perf tools: Add BPF_PROLOGUE config options for further patches

2015-06-30 Thread Wang Nan
If both LIBBPF and DWARF is 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_GET_REG_OFFSET indicates an architecture supports converting name of a

[RFC PATCH v10 32/50] perf probe: Attach trace_probe_event with perf_probe_event

2015-06-30 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 v10 41/50] perf probe: Reset tev->args and tev->nargs when failure

2015-06-30 Thread Wang Nan
When failure occures in add_probe_trace_event(), tev->args is incomplete. Since information in tev may be used in further, this patch frees the allocated memory and set it to NULL to avoid dangling pointer. Signed-off-by: Wang Nan --- tools/perf/util/probe-finder.c | 4 1 file changed, 4

[RFC PATCH v10 33/50] perf record: Probe at kprobe points

2015-06-30 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 v10 42/50] perf tools: Move linux/filter.h to tools/include

2015-06-30 Thread Wang Nan
From: He Kuang This patch moves filter.h from include/linux/kernel.h to tools/include/linux/filter.h to enable other libraries use macros in it, like libbpf which will be introduced by further patches. Currenty, the moved filter.h only contains the useful macros needed by libbpf for not

[RFC PATCH v10 36/50] perf tools: Attach eBPF program to perf event

2015-06-30 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 v10 47/50] perf tools: Use same BPF program if arguments are identical

2015-06-30 Thread Wang Nan
This patch allows creating only one BPF program for different tevs in one pev, if their prologue 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 use qsort to sort tevs prior type mapping for performance.

[RFC PATCH v10 45/50] perf tools: Add prologue for BPF programs for fetching arguments

2015-06-30 Thread Wang Nan
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 passes at most

[RFC PATCH v10 49/50] perf probe: Init symbol as kprobe if any event is kprobe

2015-06-30 Thread Wang Nan
Before this patch, add_perf_probe_events() init symbol maps only for uprobe if the first 'struct perf_probe_event' passed to it is a uprobe event. This is a trick because 'perf probe''s command line syntax constrains the first elements of the probe_event arrays must be kprobes if there is one.

[RFC PATCH v10 46/50] perf tools: Generate prologue for BPF programs

2015-06-30 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 has at least one argument, simply skip

[RFC PATCH v10 48/50] perf record: Support custom vmlinux path

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

[RFC PATCH v10 44/50] perf tools: Introduce arch_get_reg_info() for x86

2015-06-30 Thread Wang Nan
From: He Kuang arch_get_reg_info() is a helper function which converts register name like "%rax" to offset of a register in 'struct pt_regs', which is required by BPF prologue generator. This patch replaces original string table by a 'struct reg_info' table, which records offset of registers

[RFC PATCH v10 50/50] perf tools: Support attach BPF program on uprobe events

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

[RFC PATCH v10 30/50] perf record: Compile scriptlets if pass '.c' to --event

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

[RFC PATCH v10 06/50] bpf tools: Read eBPF object from buffer

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

[RFC PATCH v10 17/50] bpf tools: Relocate eBPF programs

2015-06-30 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 v10 25/50] perf tools: Call clang to compile C source to object code

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

[RFC PATCH v10 09/50] bpf tools: Collect version and license from ELF sections

2015-06-30 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] mtd: spi-nor: Only set Micron quad-read mode when controller in 4-lane TX mode

2015-06-30 Thread beanhuo
>drivers/mtd/spi-nor/spi-nor.c | 2 ++ > 1 file changed, 2 insertions(+) >diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c >index e8f6131..10ba94f 100644 >--- a/drivers/mtd/spi-nor/spi-nor.c >+++ b/drivers/mtd/spi-nor/spi-nor.c >@@ -1398,6 +1398,8 @@ static int

[RFC PATCH v10 03/50] bpf tools: Introduce 'bpf' library and add bpf feature check

2015-06-30 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 v5 2/2] cpufreq: mediatek: Add MT8173 cpufreq driver

2015-06-30 Thread Pi-Cheng Chen
This patch implements MT8173 cpufreq driver. Signed-off-by: Pi-Cheng Chen --- drivers/cpufreq/Kconfig.arm | 7 + drivers/cpufreq/Makefile | 1 + drivers/cpufreq/mt8173-cpufreq.c | 520 +++ 3 files changed, 528 insertions(+) create mode

[RFC PATCH v10 21/50] bpf tools: Introduce accessors for struct bpf_object

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

[PATCH v5 0/2] Add Mediatek MT8173 cpufreq driver

2015-06-30 Thread Pi-Cheng Chen
MT8173 is a ARMv8 based SoC with 2 clusters. All CPUs in a single cluster share the same power and clock domain. This series tries to add cpufreq support for MT8173 SoC. changes in v5: - Move resource allocation code from init() into probe() and remove some unused functions due to this change -

[PATCH v5 1/2] dt-bindings: mediatek: Add MT8173 cpufreq driver binding

2015-06-30 Thread Pi-Cheng Chen
This patch adds device tree binding document for MT8173 cpufreq driver. Signed-off-by: Pi-Cheng Chen Reviewed-by: Michael Turquette --- .../devicetree/bindings/cpufreq/cpufreq-mt8173.txt | 145 + 1 file changed, 145 insertions(+) create mode 100644

[RFC PATCH v10 12/50] bpf tools: Collect eBPF programs from their own sections

2015-06-30 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 v10 35/50] perf tools: Add bpf_fd field to evsel and config it

2015-06-30 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,

[RFC PATCH v10 20/50] bpf tools: Introduce accessors for struct bpf_program

2015-06-30 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:

[RFC PATCH v10 08/50] bpf tools: Iterate over ELF sections to collect information

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

[RFC PATCH v10 00/50] perf tools: filtering events using eBPF programs

2015-06-30 Thread Wang Nan
This is the 10th version which tries to introduce eBPF programs to perf. Compare with v9 there are only some small changes: 1. Squash patch 2/50 and 3/50 in v9 together, never check host include/linux/bpf.h, so bpf feature check will always green. 2. Fix compiling error when

[RFC PATCH v10 27/50] perf tools: Auto detecting kernel build directory

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

[RFC PATCH v10 24/50] perf tools: Introduce llvm config options

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

[RFC PATCH v10 11/50] bpf tools: Collect symbol table from SHT_SYMTAB section

2015-06-30 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 v10 18/50] bpf tools: Introduce bpf_load_program() to bpf.c

2015-06-30 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 v10 16/50] bpf tools: Create eBPF maps defined in an object file

2015-06-30 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 v10 22/50] bpf tools: Link all bpf objects onto a list

2015-06-30 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 v10 14/50] bpf tools: Record map accessing instructions for each program

2015-06-30 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 v10 13/50] bpf tools: Collect relocation sections from SHT_REL sections

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

[RFC PATCH v10 07/50] bpf tools: Check endianness and make libbpf fail early

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

[RFC PATCH v10 04/50] bpf tools: Allow caller to set printing function

2015-06-30 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 v10 10/50] bpf tools: Collect map definitions from 'maps' section

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

[RFC PATCH v10 15/50] bpf tools: Add bpf.c/h for common bpf operations

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

[RFC PATCH v10 05/50] bpf tools: Open eBPF object file and do basic validation

2015-06-30 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 v10 02/50] tracing, perf: Implement BPF programs attached to uprobes

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

[RFC PATCH v10 01/50] bpf: Use correct #ifdef controller for trace_call_bpf()

2015-06-30 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 ftrace_event.h for

Re: [PATCH v2 0/3] Correct for ACPI 5.1->6.0 spec changes in MADT GICC entries

2015-06-30 Thread Hanjun Guo
On 2015/7/1 2:35, Rafael J. Wysocki wrote: > On Tue, Jun 30, 2015 at 8:25 PM, Rafael J. Wysocki wrote: >> Hi Al, >> >> On Tue, Jun 30, 2015 at 7:29 PM, Al Stone wrote: >>> On 06/30/2015 11:07 AM, Sudeep Holla wrote: Hi Al, On 18/06/15 23:36, Al Stone wrote: > In the ACPI 5.1

Re: [PATCH v6] extcon: arizona: Simplify pdata symantics for micd_dbtime

2015-06-30 Thread Chanwoo Choi
On 06/30/2015 09:32 PM, Charles Keepax wrote: > Currently micd_dbtime can be set to 0 for default, 1 for 4 measurements, > or a greater than 16-bit value for 2 measurements. This patch simplifies > the symantics to 2 for 2 measurements, 4 for 4 measurements and any > other value for the default. >

[GIT PULL] ARC updates for 4.2-rc1

2015-06-30 Thread Vineet Gupta
Hi Linus, I'm pleased to send this pull request which among others contains Linux port to HS38x cores based on new ARCv2 ISA from Synopsys. We've been working on this for more than a year now and it feels good to hand it over now. Some of the patches have been reviewed by experts: Peter and

  1   2   3   4   5   6   7   8   9   10   >