Re: [PATCH] block: correctly fallback for zeroout

2016-05-28 Thread Christoph Hellwig
On Thu, May 26, 2016 at 11:08:14AM -0700, Shaohua Li wrote: > -int blkdev_issue_discard(struct block_device *bdev, sector_t sector, > - sector_t nr_sects, gfp_t gfp_mask, unsigned long flags) > +static int do_blkdev_issue_discard(struct block_device *bdev, sector_t > sector, We've spl

Re: [4.1.x -- 4.6.x and probably HEAD] Reproducible unprivileged panic/TLB BUG on sparc via a stack-protected rt_sigaction() ka_restorer, courtesy of the glibc testsuite

2016-05-28 Thread David Miller
From: Nick Alcock Date: Fri, 27 May 2016 14:19:27 +0100 > The only difference between the two series above is that in the crashing > series, the ka_restorer stub functions __rt_sigreturn_stub and > __sigreturn_stub (on sparc32) and __rt_sigreturn_stub (on sparc64) get > stack-protected; in the no

Re: Build errors in mainline due to "fs/namei.c:,Add hashlen_string() function"

2016-05-28 Thread George Spelvin
Thank you or the prompt report which saved me the greater embarrassment of seeing the bug in -rc1.

[PATCH] Rename other copy of hash_string to hashlen_string

2016-05-28 Thread George Spelvin
The original name was simply hash_string(), but that conflicted with a function with that name in drivers/base/power/trace.c, and I decided that calling it "hashlen_" was better anyway. But you have to do it in two places. Signed-off-by: George Spelvin Fixes: fcfd2fbf22d2587196890103d41e3d554c47

Re: Build errors in mainline due to "fs/namei.c:,Add hashlen_string() function"

2016-05-28 Thread George Spelvin
> Reverting 468a9428521e, 2a18da7a9c78, and fcfd2fbf22d2 fixed the problem > for me in a couple of test builds, but I don't know if all three patches > need to be reverted, or if reverting those patches fixes the problem for > all builds, or if the revert is sufficient. Oh, fuck me so fucking hard

Build errors in mainline due to "fs/namei.c:,Add hashlen_string() function"

2016-05-28 Thread Guenter Roeck
I see: fs/dcache.c:1673: undefined reference to `hashlen_string' For: total: 148 pass: 22 fail: 126 I didn't bisect, but I strongly suspect commit fcfd2fbf22d2 ("fs/namei.c: Add hashlen_string() function") because the new function is not provided if DCACHE_WORD_ACCESS is not enabled. Th

Re: [PATCH 4/4] pwm: add ChromeOS EC PWM driver

2016-05-28 Thread Gwendal Grignou
On Fri, May 27, 2016 at 6:39 PM, Brian Norris wrote: > Use the new ChromeOS EC EC_CMD_PWM_{GET,SET}_DUTY commands to control > one or more PWMs attached to the Embedded Controller. Because the EC > allows us to modify the duty cycle (as a percentage, where U16_MAX is > 100%) but not the period, we

Re: [PATCH 3/4] doc: dt: pwm: add binding for ChromeOS EC PWM

2016-05-28 Thread Gwendal Grignou
Instead of using device tree, assuming you have firmware control, another way could be to add a firmware feature: for instance, there is one EC_FEATURE_PWM_FAN, the fan PWM, one for the keyboard lightning as well. (see num ec_feature_code) By adding one more, you let cros_ec_dev load the platform d

Re: [4.1.x -- 4.6.x and probably HEAD] Reproducible unprivileged panic/TLB BUG on sparc via a stack-protected rt_sigaction() ka_restorer, courtesy of the glibc testsuite

2016-05-28 Thread David Miller
From: David Miller Date: Fri, 27 May 2016 15:51:37 -0700 (PDT) > I'm trying to figure out the same thing myself. Ok, mystery solved. The basic problem is that we don't handle unaligned stacks on return to userspace %100 properly. We would also no handle a stack whose access would trigger a bu

[PATCH] Input: /input/input-mt.c Emit BTN_TOO_FINGER in function input_mt_report_pointer_emulation if touchpad meets hover condition Signed-off-by: KT Liao

2016-05-28 Thread KT Liao
--- drivers/input/input-mt.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c index 54fce56..b89aaa7 100644 --- a/drivers/input/input-mt.c +++ b/drivers/input/input-mt.c @@ -218,8 +218,17 @@ void input_mt_report_poi

Re: [PATCH 5/7] zram: use crypto api to check alg availability

2016-05-28 Thread Sergey Senozhatsky
Hello, On (05/27/16 18:04), Minchan Kim wrote: > > It is fundamentally impossible to get a list of all *potential* > > algorithms if you allow loadable modules. By definition someone > > could load a new module and thus introduce a new algorithm. > > Thanks for the quick response. I understand n

Hello

2016-05-28 Thread program12
Hi, I am Kristi and i saw your contact through google page of your country which impress me and i feel we can be friends to share ideals and reason together for good,if not bad then let us know more about each other and i hope there will be no problem for us to be friend with no bad intention.Yo

[PATCH 1/1] iio: light: Added CM36672 Proximity Sensor Driver.

2016-05-28 Thread Kevin Tsai
Added Vishay Capella CM36672 Proximity Sensor IIO driver. Support both ACPI and Device Tree. Signed-off-by: Kevin Tsai --- .../devicetree/bindings/i2c/trivial-devices.txt| 1 + .../devicetree/bindings/iio/light/cm36672.txt | 54 ++ MAINTAINERS

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-28 Thread Rafael J. Wysocki
On Thu, May 26, 2016 at 9:16 AM, Viresh Kumar wrote: > On 25-05-16, 19:53, Steve Muckle wrote: >> The slow-path frequency transition path is relatively expensive as it >> requires waking up a thread to do work. Should support be added for >> remote CPU cpufreq updates that is also expensive since

[PATCH] x86: Add early quirk to reset Apple AirPort card

2016-05-28 Thread Lukas Wunner
The EFI firmware on Macs contains a full-fledged network stack for downloading OS X images from osrecovery.apple.com. Unfortunately on Macs introduced 2011 and 2012, EFI brings up the Broadcom 4331 wireless card on every boot and leaves it enabled even after ExitBootServices has been called. The ca

[PATCH V6 3/8] vfio: platform: add support for ACPI probe

2016-05-28 Thread Sinan Kaya
The code is using the compatible DT string to associate a reset driver with the actual device itself. The compatible string does not exist on ACPI based systems. HID is the unique identifier for a device driver instead. Signed-off-by: Sinan Kaya --- drivers/vfio/platform/vfio_platform_common.c

[PATCH V6 5/8] vfio: platform: call _RST method when using ACPI

2016-05-28 Thread Sinan Kaya
The device tree code checks for the presence of a reset driver and calls the of_reset function pointer by looking up the reset driver as a module. ACPI defines _RST method to perform device level reset. After the _RST method is executed, the OS can resume using the device. _RST method is expected

[PATCH V6 7/8] vfio: platform: check reset call return code during open

2016-05-28 Thread Sinan Kaya
Open call is ignoring the return code from reset call and can potentially continue even though reset call failed. If reset_required module parameter is set, this patch is going to validate the return code and will abort open if reset fails. Signed-off-by: Sinan Kaya --- drivers/vfio/platform/vf

[PATCH V6 4/8] vfio: platform: add extra debug info argument to call reset

2016-05-28 Thread Sinan Kaya
Getting ready to bring out extra debug information to the caller so that more verbose information can be printed when an error is observed. Signed-off-by: Sinan Kaya --- drivers/vfio/platform/vfio_platform_common.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH V6 1/8] vfio: platform: move reset call to a common function

2016-05-28 Thread Sinan Kaya
The reset call sequence seems to replicate itself multiple times across the file. Grouping them together for maintenance reasons. Signed-off-by: Sinan Kaya Reviewed-by: Eric Auger --- drivers/vfio/platform/vfio_platform_common.c | 30 +--- 1 file changed, 14 insertions(+

[PATCH V6 8/8] vfio: platform: check reset call return code during release

2016-05-28 Thread Sinan Kaya
Release call is ignoring the return code from reset call and can potentially continue even though reset call failed. If reset_required module parameter is set, this patch is going to validate the return code and will cause stack dump with WARN_ON and warn the user of failure. Signed-off-by: Sinan

[PATCH V6 2/8] vfio: platform: determine reset capability

2016-05-28 Thread Sinan Kaya
Creating a new function to determine if this driver supports reset function or not. This is an attempt to abstract device tree calls from the rest of the code. Signed-off-by: Sinan Kaya Reviewed-by: Eric Auger --- drivers/vfio/platform/vfio_platform_common.c | 7 ++- 1 file changed, 6 inser

[PATCH V6 6/8] vfio, platform: make reset driver a requirement by default

2016-05-28 Thread Sinan Kaya
The code was allowing platform devices to be used without a supporting VFIO reset driver. The hardware can be left in some inconsistent state after a guest machine abort. The reset driver will put the hardware back to safe state and disable interrupts before returning the control back to the host

[PATCH] of: irq: don't return 0 from of_irq_get()

2016-05-28 Thread Sergei Shtylyov
of_irq_get() returns 0 iff irq_create_of_mapping() call fails. Returning both error code and 0 on failure is a sign of a misdesigned API. Return -ENXIO instead like one of the callers, platform_get_irq(), does; fix up the kernel-doc as well... Signed-off-by: Sergei Shtylyov --- The patch is aga

Re: pxa_defconfig runtime failures due to 'ARM: pxa: activate pinctrl for device-tree machines'

2016-05-28 Thread Guenter Roeck
On 05/28/2016 01:24 AM, Robert Jarzmik wrote: Guenter Roeck writes: Hi, your mainline commit f806dac5938b ("ARM: pxa: activate pinctrl for device-tree machines") causes various non-devicetree systems to fail with the following error messages when running a pxa_defconfig image. Ah yes, you're

Re: [PATCH] devicetree - document using aliases to set spi bus number.

2016-05-28 Thread Christer Weinigel
On 05/27/2016 08:36 PM, Mark Brown wrote: Personally the way I parse this situation is that the kernel is taking a look at what's in the DT and making an effort to present it usefully in the running systems. Fixing our current interpretation in stone as a supported thing when we don't have to m

Re: [PATCH v3 00/10] String hash improvements

2016-05-28 Thread George Spelvin
Oh! I based in on 0fed3ac866eabf01924457921ee3684c8e4c9005, which I hope makes sense.

[PATCH] platform: don't return 0 from platform_get_irq[_byname]() on error

2016-05-28 Thread Sergei Shtylyov
of_irq_get[_byname]() return 0 iff irq_create_of_mapping() call fails. Returning both error code and 0 on failure is a sign of a misdesigned API. We should rely on the platform IRQ resource in this case, not return 0, especially as 0 can be a valid IRQ resource too... Fixes: aff008ad813c ("plat

Re: [PATCH v3 00/10] String hash improvements

2016-05-28 Thread Linus Torvalds
On Sat, May 28, 2016 at 12:57 PM, George Spelvin wrote: > Okay, Linus, it's still warm from the oven, but I think it's fully baked. Hmm. Whioch commit did you use as a base for this? It's not plain 4.6, but it's not toay's git either. I did find a point where this applies, but it would be even b

[PATCH] of: irq: fix of_irq_get[_byname]() kernel-doc

2016-05-28 Thread Sergei Shtylyov
The kernel-doc for the of_irq_get[_byname]() is clearly inadequate in describing the return values -- of_irq_get_byname() is documented better than of_irq_get() but it still doesn't mention that 0 is returned iff irq_create_of_mapping() fails (it doesn't return an error code in this case). Docume

[PATCH v3 04/10] Change hash_64() return value to 32 bits

2016-05-28 Thread George Spelvin
That's all that's ever asked for, and it makes the return type of hash_long() consistent. It also allows (upcoming patch) an optimized implementation of hash_64 on 32-bit machines. I tried adding a BUILD_BUG_ON to ensure the number of bits requested was never more than 32 (most callers use a comp

[PATCH v3 02/10] fs/namei.c: Add hashlen_string() function

2016-05-28 Thread George Spelvin
We'd like to make more use of the highly-optimized dcache hash functions throughout the kernel, rather than have every subsystem create its own, and a function that hashes basic null-terminated strings is required for that. (The name is to emphasize that it returns both hash and length.) It's act

[PATCH v3 03/10] : Define hash_str() in terms of hashlen_string()

2016-05-28 Thread George Spelvin
Finally, the first use of previous two patches: eliminate the separate ad-hoc string hash functions in the sunrpc code. Now hash_str() is a wrapper around hash_string(), and hash_mem() is likewise a wrapper around full_name_hash(). Note that sunrpc code *does* call hash_mem() with a zero length,

[PATCH v3 07/10] : Add support for architecture-specific functions

2016-05-28 Thread George Spelvin
This is just the infrastructure; there are no users yet. This is modelled on CONFIG_ARCH_RANDOM; a CONFIG_ symbol declares the existence of . That file may define its own versions of various functions, and define HAVE_* symbols (no CONFIG_ prefix!) to suppress the generic ones. Included is a sel

[PATCH v3 06/10] fs/namei.c: Improve dcache hash function

2016-05-28 Thread George Spelvin
Patch 0fed3ac866 improved the hash mixing, but the function is slower than necessary; there's a 7-instruction dependency chain (10 on x86) each loop iteration. Word-at-a-time access is a very tight loop (which is good, because link_path_walk() is one of the hottest code paths in the entire kernel)

[PATCH v3 09/10] microblaze: Add

2016-05-28 Thread George Spelvin
Microblaze is an FPGA soft core that can be configured various ways. If it is configured without a multiplier, the standard __hash_32() will require a call to __mulsi3, which is a slow software loop. Instead, use a shift-and-add sequence for the constant multiply. GCC knows how to do this, but it

[PATCH v3 01/10] Pull out string hash to

2016-05-28 Thread George Spelvin
... so they can be used without the rest of The hashlen_* macros will make sense next patch. Signed-off-by: George Spelvin --- include/linux/dcache.h | 27 + include/linux/stringhash.h | 72 ++ 2 files changed, 73 insertions(+), 2

[PATCH v3 10/10] h8300: Add

2016-05-28 Thread George Spelvin
This will improve the performance of hash_32() and hash_64(), but due to complete lack of multi-bit shift instructions on H8, performance will still be bad in surrounding code. Designing H8-specific hash algorithms to work around that is a separate project. (But if the maintainers would like to g

[PATCH v3 08/10] m68k: Add

2016-05-28 Thread George Spelvin
This provides a multiply by constant GOLDEN_RATIO_32 = 0x61C88647 for the original mc68000, which lacks a 32x32-bit multiply instruction. Yes, the amount of optimization effort put in is excessive. :-) Shift-add chain found by Yevgen Voronenko's Hcub algorithm at http://spiral.ece.cmu.edu/mcm/gen

[PATCH v3 00/10] String hash improvements

2016-05-28 Thread George Spelvin
Okay, Linus, it's still warm from the oven, but I think it's fully baked. Special thanks to J. Bruce Fields for testing and finding bugs in v1. (I learned some humbling lessons about "obviously correct" code.) On the arch-specific front, the m68k assembly has been tested in a standalone test harn

[PATCH v3 05/10] Eliminate bad hash multipliers from hash_32() and hash_64()

2016-05-28 Thread George Spelvin
The "simplified" prime multipliers made very bad hash functions, so get rid of them. This completes the work of 689de1d6ca. To avoid the inefficiency which was the motivation for the "simplified" multipliers, hash_64() on 32-bit systems is changed to use a different algorithm. It makes two calls

Re: [PATCH v5 1/4] isa: Allow ISA-style drivers on modern systems

2016-05-28 Thread Linus Torvalds
On Fri, May 27, 2016 at 3:08 PM, William Breathitt Gray wrote: > Several modern devices, such as PC/104 cards, are expected to run on > modern systems via an ISA bus interface. Since ISA is a legacy interface > for most modern architectures, ISA support should remain disabled in > general. Support

Re: [PATCH] crypto: s5p-sss - Use consistent indentation for variables and members

2016-05-28 Thread Vladimir Zapolskiy
Hi Krzysztof, On 27.05.2016 14:49, Krzysztof Kozlowski wrote: > Bring some consistency by: > 1. Replacing fixed-space indentation of structure members with just >tabs. > 2. Remove indentation in declaration of local variable between type and >name. Driver was mixing usage of such indentat

[PULL REQUEST] i2c for 4.7

2016-05-28 Thread Wolfram Sang
Linus, here is the pull request from I2C with the fix for a regression introduced yesterday. The regression didn't show up here locally because I did not have PAGE_POISONING enabled. And buildbots discovered this only after it hit your tree. Thanks to Dan for the quick response. Really sorry about

Re: [PATCH 2/4] dt-bindings: Update Renesas R-Car FCP DT binding

2016-05-28 Thread Geert Uytterhoeven
Hi Kieran, On Fri, May 27, 2016 at 7:19 PM, Kieran Bingham wrote: > The FCP driver, can also support the FCPF variant for FDP1 compatible > processing. > > Signed-off-by: Kieran Bingham Thanks for your patch! > --- > Documentation/devicetree/bindings/media/renesas,fcp.txt | 3 ++- > 1 file ch

Re: [PATCH 3/4] dt-bindings: Document Renesas R-Car FCP power-domains usage

2016-05-28 Thread Geert Uytterhoeven
Hi Kieran, On Fri, May 27, 2016 at 7:19 PM, Kieran Bingham wrote: > The example misses the power-domains usage, and documentation that the > property is used by the node. > > Signed-off-by: Kieran Bingham Thanks for your patch! > --- > Documentation/devicetree/bindings/media/renesas,fcp.txt |

Re: 4.7-rc0: redshift stopped working on intel display

2016-05-28 Thread Pavel Machek
On Sat 2016-05-28 12:12:06, Pavel Machek wrote: > Hi! > > It looks like redshift stopped working. Even pretty crazy settings > have no visible effect: > > pavel@amd:~$ redshift -O 1500 -g 6.6:6.6:6.6 > Using method `randr'. > pavel@amd:~$ redshift -x > Using method `randr'. > pavel@amd:~$ uname -

Re: [PATCH] mtd: brcmnand: Add v7.2 controller support

2016-05-28 Thread Thomas Petazzoni
Hello, On Fri, 27 May 2016 14:58:11 -0700, Florian Fainelli wrote: > + if (ctrl->nand_version >= 0x0702) > + bits = 7; > if (ctrl->nand_version >= 0x0600) Don't you want an "else if" here ? Otherwise, even for the 7.2 version of your controller bits will be set to 1. Ditt

Re: [PATCH 2/3] iio: adc: mxs-lradc: Add support for adc driver

2016-05-28 Thread Ksenija Stanojević
On Sun, May 1, 2016 at 6:38 PM, Jonathan Cameron wrote: > On 29/04/16 12:48, Ksenija Stanojevic wrote: >> Add mxs-lradc adc driver. >> >> Signed-off-by: Ksenija Stanojevic > Mostly looking good. A few nitpicks and suggestions inline. > > Jonathan >> --- >> drivers/iio/adc/Kconfig | 37

Re: [PATCH 3/3] input: touchscreen: mxs-lradc: Add support for touchscreen

2016-05-28 Thread Ksenija Stanojević
On Sat, Apr 30, 2016 at 1:36 AM, Dmitry Torokhov wrote: > Hi Ksenija, > > On Fri, Apr 29, 2016 at 01:49:11PM +0200, Ksenija Stanojevic wrote: >> Add mxs-lradc touchscreen driver. >> >> Signed-off-by: Ksenija Stanojevic >> --- >> drivers/input/touchscreen/Kconfig| 14 +- >> drivers/input

Re: [PATCH 3/3] input: touchscreen: mxs-lradc: Add support for touchscreen

2016-05-28 Thread Ksenija Stanojević
On Sun, May 1, 2016 at 6:47 PM, Jonathan Cameron wrote: > On 29/04/16 12:49, Ksenija Stanojevic wrote: >> Add mxs-lradc touchscreen driver. >> >> Signed-off-by: Ksenija Stanojevic > The only real thing this raises for me is why we are grabbing IRQs that I > don't think this driver even cares abou

Re: [PATCH v5 3/4] iio: stx104: Allow build for X86_64

2016-05-28 Thread Jonathan Cameron
On 27/05/16 23:09, William Breathitt Gray wrote: > With the introduction of the ISA_BUS_API Kconfig option, ISA-style > drivers may be built for X86_64 architectures. This patch changes the > ISA Kconfig option dependency of the Apex Embedded Systems STX104 DAC > driver to ISA_BUS_API, thus allowin

[PATCH] saa7164: Replace if and BUG with BUG_ON

2016-05-28 Thread Amitoj Kaur Chawla
Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @@ expression E,f; @@ ( if (<+... f(...) ...+>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) Signed-off-by: A

[PATCH] mtd: Replace if and BUG with BUG_ON

2016-05-28 Thread Amitoj Kaur Chawla
Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @@ expression E,f; @@ ( if (<+... f(...) ...+>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) Signed-off-by: A

Re: [PATCH] Revert "i2c: dev: switch from register_chrdev to cdev API"

2016-05-28 Thread Wolfram Sang
> These kinds of use after frees don't always cause a runtime problem. I > found it using static analysis, but I bet you could detect it if you > enabled kasan. The other option is to enable PAGE_POISONING? Thanks, PAGE_POISONING did trigger the issue. So, I now picked up your patch instead of

[GIT PULL] platform/chrome: Driver and binding changes for 4.7

2016-05-28 Thread Olof Johansson
Hi Linus, The following changes since commit c3b46c73264b03000d1e18b22f5caf63332547c9: Linux 4.6-rc4 (2016-04-17 19:13:32 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform.git tags/chrome-platform for you to fetch changes up

Re: [PATCH] Revert "platform/chrome: chromeos_laptop: Add Leon Touch"

2016-05-28 Thread Olof Johansson
On second thought, I went with the revert instead. Generating pull request now. -Olof On Fri, May 27, 2016 at 7:37 PM, Olof Johansson wrote: > On Thu, May 26, 2016 at 4:07 AM, Enric Balletbo i Serra > wrote: >> Hi Benson, Olof >> >> On 26/05/16 03:59, Benson Leung wrote: >>> This reverts commi

Re: [PATCH V3] mtd: nand: add Loongson1 NAND driver

2016-05-28 Thread Kelvin Cheung
Hi Boris, I have the same feeling as Mychaela, and suffered from the 'high-level controllers' as well. Looking forward to your review, thanks! Best regards, Keguang Zhang On 05/28/2016 08:12 PM, Boris Brezillon wrote: > Hi Kelvin, > > On Sat, 28 May 2016 17:54:10 +0800 > Keguang Zhang wrote: >

[PATCH perf/core v9 11/16] perf probe: Accept %sdt and %cached event name

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu To improbe usability, support %[PROVIDER:]SDTEVENT format to add new probes on SDT and cached events. e.g. # perf probe -x /lib/libc-2.17.so %lll_lock_wait_private Added new event: sdt_libc:lll_lock_wait_private (on %lll_lock_wait_private in /usr/lib/libc

[PATCH perf/core v9 06/16] perf probe: Show all cached probes

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu perf probe --list shows all cached probes when --cache is given. Each caches are shown with on which binary that probed. e.g. - # perf probe --cache vfs_read \$params # perf probe --cache -x /lib64/libc-2.17.so getaddrinfo \$params # perf probe --cache --list

[PATCH perf/core v9 15/16] perf probe: Support @BUILDID or @FILE suffix for SDT events

2016-05-28 Thread Masami Hiramatsu
Support @BUILDID or @FILE suffix for SDT events. This allows perf to add probes on SDTs/pre-cached events on given FILE or the file which has given BUILDID (also, this complements BUILDID.) For example, both gcc and libstdc++ has same SDTs as below. If you would like to add a probe on sdt_libstdcxx

[PATCH perf/core v9 08/16] perf/sdt: ELF support for SDT

2016-05-28 Thread Masami Hiramatsu
From: Hemant Kumar This patch serves the initial support to identify and list SDT events in binaries. When programs containing SDT markers are compiled, gcc with the help of assembler directives identifies them and places them in the section ".note.stapsdt". To find these markers from the bina

[PATCH perf/core v9 13/16] perf-list: Skip SDTs placed in invalid binaries

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Skip SDTs placed in invalid (non-exist, or older version) binaries. Note that perf-probe --cache --list and perf-probe --cache --del still handle all the caches including invalid binaries. Signed-off-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu --- Changes in v7

[PATCH perf/core v9 10/16] perf buildid-cache: Scan and import user SDT events to probe cache

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu perf buildid-cache --add scans given binary and add the SDT events to probe cache. "sdt_" prefix is appended for all SDT providers to avoid event-name clash with other pre-defined events. It is possible to use the cached SDT events as other cached events, via perf probe --

[PATCH perf/core v9 07/16] perf probe: Remove caches when --cache is given

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu perf-probe --del removes caches when --cache is given. Note that the delete pattern is not same as normal events. If you cached probes with event name, --del "eventname" works as expected. However, if you skipped it, the cached probes doesn't have actual event name. In tha

[PATCH perf/core v9 16/16] perf probe: Support a special SDT probe format

2016-05-28 Thread Masami Hiramatsu
Support a special SDT probe format which can omit the '%' prefix only if the SDT group name starts with "sdt_". So, for example both of "%sdt_libc:setjump" and "sdt_libc:setjump" are acceptable for perf probe --add. Suggested-by: Brendan Gregg Signed-off-by: Masami Hiramatsu --- tools/perf/Docu

[PATCH perf/core v9 14/16] perf probe: Allow wildcard for cached events

2016-05-28 Thread Masami Hiramatsu
Allo glob wildcard for reusing cached/SDT events. This also automatically find the target binaries, e.g. # perf probe -a %sdt_libc:\* This example adds probes for all SDT in libc. Note that the SDTs must have been scanned by perf buildid-cache. Signed-off-by: Masami Hiramatsu --- Changes in

[PATCH perf/core v9 12/16] perf-list: Show SDT and pre-cached events

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Show SDT and pre-cached events by perf-list with "sdt". This also shows the binary and build-id where the events are placed only when there are same name events on different binaries. e.g. # perf list sdt List of pre-defined events (to be used in -e): sdt_l

[PATCH perf/core v9 05/16] perf probe: Use cache entry if possible

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Before analyzing debuginfo, try to find a corresponding entry from probe cache always. This does not depend on --cache, the --cache enables to store/update cache, but looking up the cache is always enabled. Signed-off-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu

[PATCH perf/core v9 09/16] perf probe: Add group name support

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Allow user to set group name for adding new event. Note that user must ensure that the group name doesn't conflict with existing group name carefully. E.g. Existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can h

[PATCH perf/core v9 01/16] perf-symbol: Introduce filename__readable to check readability

2016-05-28 Thread Masami Hiramatsu
Introduce filename__readable to check readability by opening the file directly. Since the access(R_OK) just checks the readability based on real UID/GID, it is ignored that the effective UID/GID and capabilities for some special file (e.g. /proc/kcore). filename__readable() directly opens given fil

[PATCH perf/core v9 03/16] perf-buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Use path/to/bin/buildid/elf instead of path/to/bin/buildid to store corresponding elf binary. This also stores vdso in buildid/vdso, kallsyms in buildid/kallsyms. Note that the existing caches are not updated until user adds or updates the cache. Anyway, if there is the ol

[PATCH perf/core v9 00/16] perf-probe --cache and SDT support

2016-05-28 Thread Masami Hiramatsu
Hi, Here is the 9th version of the patchset for probe-cache and initial SDT support. The previous version is here; https://lkml.org/lkml/2016/5/14/107 This version just fixes 2 points according to Hemant's comment, and split out the filename__readable() patch. Changes in v9: - [1/16,2/16] sp

[PATCH perf/core v9 04/16] perf probe: Add --cache option to cache the probe definitions

2016-05-28 Thread Masami Hiramatsu
From: Masami Hiramatsu Add --cache option to cache the probe definitions. This just saves the result of the dwarf analysis to probe cache. Signed-off-by: Masami Hiramatsu Signed-off-by: Masami Hiramatsu --- Changes in v6: - Remove unneeded O_APPEND from open(). (Thanks Namhyung!) - Fix to

[PATCH perf/core v9 02/16] perf symbol: Cleanup the code flow of dso__find_kallsyms

2016-05-28 Thread Masami Hiramatsu
Cleanup the code flow of dso__find_kallsyms() to remove redundant checking code and add some comment for readability. Signed-off-by: Masami Hiramatsu --- Changes in v9: - Split into filename__readable() and others. Changes in v8: - Add comments why we can't use access(R_OK) for /proc/kcore

[PATCH] befs/linuxvfs: remove unneeded initialization

2016-05-28 Thread Luis de Bethencourt
res is initialized to 0 in befs_get_block() but this value will be overwritten before it is used. Signed-off-by: Luis de Bethencourt --- Hi, Saw this small issue while reading the code. BeFS is very interesting, and reading this code is very educational after reading Dominic Giampaolo's book. W

Re: [PATCH v2] tracing: Choose static tp_printk buffer by explicit nesting count

2016-05-28 Thread Namhyung Kim
Hi Andy, On Fri, May 27, 2016 at 4:00 AM, Andy Lutomirski wrote: > Currently, the trace_printk code chooses which static buffer to use based > on what type of atomic context (NMI, IRQ, etc) it's in. Simplify the > code and make it more robust: simply count the nesting depth and choose > a buffer

Re: [linux-sunxi] Re: [PATCH] regulator: axp20x: Add support for the (external) drivebus regulator

2016-05-28 Thread Hans de Goede
Hi, On 16-05-16 19:06, Chen-Yu Tsai wrote: Hi, On Sun, May 15, 2016 at 1:55 AM, Hans de Goede wrote: The axp20x pmics have 2 power inputs, one called ACIN which is intended for to be supplied via a powerbarrel on the board and one called VBUS which is intended to be supplied via an otg connec

Re: [Patch v4 9/9] iommu/amd: Check the validation of irq table and domain id

2016-05-28 Thread Wan Zongshun
Original Message From: Baoquan HE If not valid just skip reserving the old domain id. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c | 4 drivers/iommu/amd_iommu_init.c | 5 +++-- drivers/iommu/amd_iommu_types.h | 5 + 3 files changed, 8 insertion

Re: [Patch v4 7/9] iommu/amd: copy old trans table from old kernel

2016-05-28 Thread Wan Zongshun
Original Message From: Baoquan HE Here several things need be done: 1) Initialize amd_iommu_dev_table because it was set several times since kdump kernel reboot. We don't need the set because we will copy the content from old kernel. 2) Re-enable event/cmd buffer 3) In

Re: [PATCH] cpufreq: stats: Make the stats code non-modular

2016-05-28 Thread Rafael J. Wysocki
On Thursday, May 26, 2016 10:29:45 AM Viresh Kumar wrote: > On 26-05-16, 00:23, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > The modularity of cpufreq_stats is quite problematic. > > > > First off, the usage of policy notifiers for the initialization > > and cleanup in the cpufre

Re: [PATCH] ntb_tool: Fix infinite loop bug when writing spad/peer_spad file

2016-05-28 Thread Allen Hubbe
On Fri, May 27, 2016 at 4:38 PM, Logan Gunthorpe wrote: > If you tried to write two spads in one line, as per the example: > > root@peer# echo '0 0x01010101 1 0x7f7f7f7f' > $DBG_DIR/peer_spad > > then the CPU would freeze in an infinite loop. > > This wasn't immediately obvious but 'pos' was not i

[PATCH] um: Eliminate null test after alloc_bootmem

2016-05-28 Thread Amitoj Kaur Chawla
alloc_bootmem function never returns NULL. Thus a NULL test after a call to this function is unnecessary. The Coccinelle semantic patch used to make this change is follows: @@ expression E; statement S; @@ E = alloc_bootmem(...) ... when != E - if (E == NULL) S Signed-off-by: Amitoj Kaur Chawla

Re: [Patch v4 6/9] iommu/amd: Add function copy_dev_tables

2016-05-28 Thread Wan Zongshun
Original Message Add function copy_dev_tables to copy old DTE of the 1st kernel to the new DTE table. Since all iommu share the same DTE table the copy only need be done once as long as the physical address of old DTE table is retrieved from iommu reg. Besides the old domain i

[PATCH] drbd: Replace if and BUG with BUG_ON

2016-05-28 Thread Amitoj Kaur Chawla
Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @ disable unlikely @ expression E,f; @@ ( if (<+... f(...) ...+>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BU

Re: [Patch v4 3/9] iommu/amd: Detect pre enabled translation

2016-05-28 Thread Wan Zongshun
Original Message Add functions to check whether translation is already enabled in IOMMU. Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu_init.c | 25 + drivers/iommu/amd_iommu_types.h | 4 2 files changed, 29 insertions(+) diff --git a/

[PATCH 3/3 V2] pvclock: Get rid of __pvclock_read_cycles in function pvclock_read_flags

2016-05-28 Thread Minfei Huang
There is a generic function __pvclock_read_cycles to be used to get both flags and cycles. For function pvclock_read_flags, it's useless to get cycles value. To make this function be more effective, get this variable flags directly in function. Signed-off-by: Minfei Huang --- v1: - Get rid of __p

Re: [PATCH v6 06/11] perf tools: Extract local libunwind code out of unwind-libunwind.c

2016-05-28 Thread Wangnan (F)
On 2016/5/28 19:59, He Kuang wrote: This patch extracts codes related to specific arithecture out of unwind-libunwind.c. The extrated part are only built if local libunwind is supported. Signed-off-by: He Kuang --- tools/perf/util/Build| 1 + tools/perf/util/unwind-li

Re: [PATCH V3] mtd: nand: add Loongson1 NAND driver

2016-05-28 Thread Boris Brezillon
Hi Kelvin, On Sat, 28 May 2016 17:54:10 +0800 Keguang Zhang wrote: > From: Kelvin Cheung > > This patch adds NAND driver for Loongson1B. I think your controller matches Mychaela's "high-level NAND controller" definition [1]. Mychaela, can you confirm the Loongson controller looks like yours?

[PATCH v6 08/11] perf tools: Show warnings for unsupported cross-platform unwind

2016-05-28 Thread He Kuang
Currently, perf script uses host unwind methods to parse perf.data callchain info regardless of the target architecture. So we get wrong result without any warnings when unwinding callchains of x86(32-bit) on x86(64-bit) machine. This patch shows warning messages when we do remote unwind x86(32-bi

[PATCH v6 03/11] perf tools: Introducing struct unwind_libunwind_ops for local unwind

2016-05-28 Thread He Kuang
Currently, libunwind operations are fixed, and they are chosen according to the host architecture. This will lead a problem that if a thread is run as x86_32 on x86_64 machine, perf will use libunwind methods for x86_64 to parse the callchain and get wrong result. This patch changes the fixed meth

Re: [PATCH 3/3] pvclock: Add a new wrapper function to only get variable flags

2016-05-28 Thread Minfei Huang
On 05/27/16 at 06:06P, Paolo Bonzini wrote: > > > On 27/05/2016 17:40, Andy Lutomirski wrote: > > On Thu, May 26, 2016 at 11:17 PM, Minfei Huang wrote: > >> There is a generic function __pvclock_read_cycles to be used to get both > >> flags and cycles. For function pvclock_read_flags, it's usele

[PATCH v6 05/11] perf tools: Separate local/remote libunwind config

2016-05-28 Thread He Kuang
CONFIG_LIBUNWIND/NO_LIBUNWIND are changed to CONFIG_LOCAL_LIBUNWIND/NO_LOCAL_LIBUNWIND for retaining local unwind features. The new CONFIG_LIBUNWIND stands for either local or remote or both unwind are supported. Signed-off-by: He Kuang --- tools/perf/arch/arm/util/Build | 2 +- tools/perf/a

[PATCH v6 00/11] Add support for remote unwind

2016-05-28 Thread He Kuang
v5 url: http://thread.gmane.org/gmane.linux.kernel/2226821 Currently, perf script uses host unwind methods(local unwind) to parse perf.data callchain info regardless of the target architecture. So we get wrong result and no promotion when do remote unwind on other platforms/machines. This patch

[PATCH v6 04/11] perf tools: Move unwind__prepare_access from thread_new into thread__insert_map

2016-05-28 Thread He Kuang
For determine the libunwind methods to use, we should get the 32bit/64bit information from maps of a thread. When a thread is newly created, the information is not prepared. This patch moves unwind__prepare_access() into thread__insert_map() so we can get the information we need from maps. Signed-

[PATCH v6 02/11] perf tools: Decouple thread->address_space on libunwind

2016-05-28 Thread He Kuang
Currently, the type of thread->addr_space is unw_addr_space_t, which is a pointer defined in libunwind headers. For local libunwind, we can simple include "libunwind.h", but for remote libunwind, the header file is depends on the target libunwind platform. This patch uses 'void *' instead to decoup

[PATCH v6 10/11] perf callchain: Support x86 target platform

2016-05-28 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/Build | 1 + tools/perf/arch/x86/util/unwind-libunwind.c| 7 --- tools/perf/arch/x86/util/unwind-libunwind_x86_32.c | 21 + tools/perf/u

[PATCH v6 01/11] perf tools: Use LIBUNWIND_DIR for remote libunwind feature check

2016-05-28 Thread He Kuang
Pass LIBUNWIND_DIR to feature check flags for remote libunwind tests. So perf can be able to detect remote libunwind libraries from arbitrary directory. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/perf/config/Makefile

[PATCH v6 09/11] perf tools: Change fixed name of libunwind__arch_reg_id to macro

2016-05-28 Thread He Kuang
For local libunwind, it uses the fixed methods to convert register id according to the host platform, but in remote libunwind, this convert function should be the one for remote architechture. This patch changes the fixed name to macro and code for each remote platform can be compiled indivadually.

[PATCH v6 07/11] perf tools: Export normalize_arch() function

2016-05-28 Thread He Kuang
Export normalize_arch() function, so other part of perf can get normalized form of arch string. Signed-off-by: He Kuang --- tools/perf/arch/common.c | 2 +- tools/perf/arch/common.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/common.c b/tools/perf/arch/co

  1   2   >