Re: [PATCH] stmmac: Add support for SIMATIC IOT2000 platform

2017-04-25 Thread Jan Kiszka
On 2017-04-25 09:30, Andy Shevchenko wrote: > On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: >> On 2017-04-24 23:27, Andy Shevchenko wrote: >>> On Mon, Apr 24, 2017 at 10:27 PM, Jan Kiszka wrote: The IOT2000 is industrial controller platform, derived from the Intel Galileo Gen2 boar

[PATCH 1/1] ARM: compressed/head.S: fix __nop macro rept number for ARMv7M

2017-04-25 Thread patrice.chotard
From: Patrice Chotard In zImage, _magic_sig is located at offset 0x24. But for ARMv7M architecture which enable CPU_THUMBONLY and !EFI_STUB kernel flag, _magic_sig is located at offset 0x14 00 46 00 46 00 46 00 46 00 46 00 46 00 46 0f f2 |.F.F.F.F.F.F.F.ò| 0010 15 0c 60 47 18 28

[PATCH 2/5 v2] soc: fsl: add flextimer module alarm driver for Layerscape

2017-04-25 Thread ying.zhang22455
From: Wang Dongsheng Signed-off-by: Zhang Ying-22455 --- Change from V1: - ftm_clean_alarm: FTM_MOD is 32bit width, modify ~0UL to ~0U. drivers/soc/fsl/layerscape/Kconfig | 10 ++ drivers/soc/fsl/layerscape/Makefile| 1 + drivers/soc/fsl/layerscape/ftm_alarm.c | 274

Re: [tip:x86/mm] x86: Convert the rest of the code to support p4d_t

2017-04-25 Thread Kirill A. Shutemov
On Tue, Apr 25, 2017 at 08:38:42AM +0200, Ingo Molnar wrote: > > * Kirill A. Shutemov wrote: > > > On Mon, Apr 24, 2017 at 11:42:34AM -0700, Dan Williams wrote: > > > > > > > > I cannot reproduce the issue. > > > > > > > > Could you share your kernel kernel config? > > > > > > Kernel config ava

[PATCH 1/5 v2] soc: fsl: add support for arm64/Layerscape SOC specific drivers

2017-04-25 Thread ying.zhang22455
From: Stuart Yoder Signed-off-by: Zhang Ying-22455 --- Change from V1: - remove FSL_SOC_DRIVERS drivers/soc/fsl/Kconfig | 3 +++ drivers/soc/fsl/Kconfig.arm | 16 drivers/soc/fsl/Makefile| 1 + 3 files changed, 20 insertions(+) create mode 100644 drivers/soc/fsl/Kco

[PATCH] drm/i915/gvt: fix typo: "supporte" -> "support"

2017-04-25 Thread Colin King
From: Colin Ian King trivial fix to typo in WARN_ONCE message Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index 0ad1a508e2af.

Re: [PATCH 2/2] sched/fair: Always propagate runnable_load_avg

2017-04-25 Thread Vincent Guittot
On 25 April 2017 at 10:46, Vincent Guittot wrote: > On 24 April 2017 at 22:14, Tejun Heo wrote: >> We noticed that with cgroup CPU controller in use, the scheduling >> latency gets wonky regardless of nesting level or weight >> configuration. This is easily reproducible with Chris Mason's >> sch

Re: [PATCH] x86/refcount: Implement fast refcount_t handling

2017-04-25 Thread Peter Zijlstra
On Mon, Apr 24, 2017 at 03:37:32PM -0700, Kees Cook wrote: > On Mon, Apr 24, 2017 at 3:01 PM, Peter Zijlstra wrote: > > It does not. It just got free'ed. Nothing will stop the free from > > happening (or already having happened). > > Well, yes, but that's kind of my point. Detecting inc-from-0 i

Re: [PATCH V9 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request

2017-04-25 Thread Marc Zyngier
On 25/04/17 09:34, Daniel Lezcano wrote: > On Tue, Apr 25, 2017 at 08:38:56AM +0100, Marc Zyngier wrote: >> On 24/04/17 20:59, Daniel Lezcano wrote: >>> On Mon, Apr 24, 2017 at 08:14:54PM +0100, Marc Zyngier wrote: On 24/04/17 19:59, Daniel Lezcano wrote: > On Mon, Apr 24, 2017 at 07:46:43

Re: [PATCH net v3] bridge: ebtables: fix reception of frames DNAT-ed to bridge device/port

2017-04-25 Thread Pablo Neira Ayuso
On Wed, Apr 19, 2017 at 09:47:33PM +0200, Linus Lüssing wrote: > When trying to redirect bridged frames to the bridge device itself or > a bridge port (brouting) via the dnat target then this currently fails: > > The ethernet destination of the frame is dnat'ed to the MAC address of > the bridge d

[PATCH 2/2] x86_64/kexec: Use PUD level 1GB page for identity mapping if available

2017-04-25 Thread Xunlei Pang
Kexec setups all identity mappings before booting into the new kernel, and this will cause extra memory consumption for paging structures which is quite considerable on modern machines with huge memory. E.g. On one 32TB machine, in kdump case, it could waste around 128MB (around 4MB/TB) from the r

[PATCH 1/2] x86/mm/ident_map: Add PUD level 1GB page support

2017-04-25 Thread Xunlei Pang
The current kernel_ident_mapping_init() creates the identity mapping using 2MB page(PMD level), this patch adds the 1GB page(PUD level) support. This is useful on large machines to save some reserved memory (as paging structures) in the kdump case when kexec setups up identity mappings before boot

Re: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-25 Thread Jisheng Zhang
Hi Peter, On Tue, 25 Apr 2017 16:29:48 +0800 Peter Chen wrote: > On Mon, Apr 24, 2017 at 12:35:51PM +, Jisheng Zhang wrote: > > Fix below NULL pointer dereference. we set ci->roles[CI_ROLE_GADGET] > > too early in ci_hdrc_gadget_init(), if udc_start() fails due to some > > reason, the ci->rol

Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

2017-04-25 Thread Andy Shevchenko
On Tue, Apr 25, 2017 at 10:31 AM, Peter Meerwald-Stadler wrote: > >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. >

RE: [PATCH] usb: chipidea: udc: fix NULL pointer dereference if udc_start failed

2017-04-25 Thread Peter Chen
>> > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c >> > index f88e9157fad0..60a786c87c06 100644 >> > --- a/drivers/usb/chipidea/udc.c >> > +++ b/drivers/usb/chipidea/udc.c >> > @@ -1984,6 +1984,7 @@ static void udc_id_switch_for_host(struct >> > ci_hdrc *ci) int ci_hdrc_ga

Re: [linux-sunxi] [PATCH v4 09/10] arm64: allwinner: a64: enable AXP803 regulators for Pine64

2017-04-25 Thread Andre Przywara
Hi, On 24/04/17 17:01, Icenowy Zheng wrote: > Add support of AXP803 regulators in the Pine64 device tree, in order to > enable many future functionalities, e.g. Wi-Fi. In general that's quite some code to just achieve some device power plane switching, but that's another discussion, I guess ;-)

Re: [RFC] minimum gcc version for kernel: raise to gcc-4.3 or 4.6?

2017-04-25 Thread Suzuki K Poulose
On 16/04/17 20:52, Kees Cook wrote: Was there a conclusion to this discussion? I didn't see anything definitive in the thread... Notes below... On Fri, Dec 16, 2016 at 3:14 AM, Arnd Bergmann wrote: [Fixed linux-arm-kernel mailing list address, sorry for the duplicate, I'm not reposting all t

RE: [PATCH v6 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-25 Thread Ryan Chen
Hello All, ASPEED_I2CD_M_SDA_DRIVE_1T_EN, ASPEED_I2CD_SDA_DRIVE_1T_EN is specific for some case usage. For example, if i2c bus is use on "high speed" and "single slave and master" and i2c bus is too long. It need drive SDA or SCL less lunacy. It would enable it.

[PATCH] x86/mm/64: Fix crash in remove_pagetable()

2017-04-25 Thread Kirill A. Shutemov
remove_pagetable() does page walk using p*d_page_vaddr() plus cast. It's not canonical approach -- we usually use p*d_offset() for that. It works fine as long as all page table levels are present. We broke the invariant by introducing folded p4d page table level. As result, remove_pagetable() int

Re: [linux-sunxi] [PATCH v4 09/10] arm64: allwinner: a64: enable AXP803 regulators for Pine64

2017-04-25 Thread Icenowy Zheng
于 2017年4月25日 GMT+08:00 下午5:24:13, Andre Przywara 写到: >Hi, > >On 24/04/17 17:01, Icenowy Zheng wrote: >> Add support of AXP803 regulators in the Pine64 device tree, in order >to >> enable many future functionalities, e.g. Wi-Fi. > >In general that's quite some code to just achieve some device pow

RE: [PATCH 0/9] sched_clock fixes

2017-04-25 Thread Lofstedt, Marta
Hi Peterz, I tested your patch-set on the same Core2 machine as where we discovered the regression. With the tsc=unstable boot param that passrate has improved significantly; 350 fails -> 15 fails. BR, Marta > -Original Message- > From: Peter Zijlstra [mailto:pet...@infradead.org] > S

Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

2017-04-25 Thread Jan Kiszka
On 2017-04-25 09:31, Peter Meerwald-Stadler wrote: > >> This is an upstream port of an IIO driver for the TI ADC108S102 and >> ADC128S102. The former can be found on the Intel Galileo Gen2 and the >> Siemens SIMATIC IOT2000. For those boards, ACPI-based enumeration is >> included. > > comments be

Re: [PATCH v2 11/18] dt-bindings: pinctrl: Add bindings for Cirrus Logic Madera codecs

2017-04-25 Thread Linus Walleij
On Mon, Apr 24, 2017 at 6:08 PM, Richard Fitzgerald wrote: > This is the binding description of the pinctrl driver for Cirru Logic > Madera codecs. The binding uses the generic pinctrl binding so the main > purpose here is to describe the device-specific names for groups and > functions. > > Sig

Re: [PATCH 1/2] net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360.

2017-04-25 Thread Sergei Shtylyov
Hello! On 4/25/2017 12:50 AM, Eric Anholt wrote: Cygnus is a small family of SoCs, of which we currently have devicetree for BCM11360 and BCM58300. The 11360's B53 is mostly the same as 58xx, just requiring a tiny bit of setup that was previously missing. Signed-off-by: Eric Anholt --- Docu

Re: [PATCH v6 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-25 Thread Benjamin Herrenschmidt
On Tue, 2017-04-25 at 08:50 +, Ryan Chen wrote: > Hello All, > ASPEED_I2CD_M_SDA_DRIVE_1T_EN, > ASPEED_I2CD_SDA_DRIVE_1T_EN is specific for some case usage.  > For example, if i2c bus is use on "high speed" and > "single slave and master" and i2c bus is too long. It

Re: [BUG] x86: failed to boot a kernel on a Ryzen machine

2017-04-25 Thread Borislav Petkov
On Mon, Apr 24, 2017 at 10:09:04PM +0900, Satoru Takeuchi wrote: > At Mon, 24 Apr 2017 14:48:46 +0200, > Borislav Petkov wrote: > > > > On Mon, Apr 24, 2017 at 09:39:12PM +0900, Satoru Takeuchi wrote: > > > I used the following auto-test tool (its backend is ktest). > > > > > > https://github.com

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jan Kara
On Mon 24-04-17 13:14:36, Jeff Layton wrote: > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > > This ensures that we see errors on fsync when writeback fails. > > > > > > Signed-off-by: Jeff Layton > > > > Hum, but do we really want to clo

Re: [PATCH 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-25 Thread Sergei Shtylyov
Hello. On 4/25/2017 12:50 AM, Eric Anholt wrote: Cygnus has a single amac controller connected to the B53 switch with 2 PHYs. On the BCM911360_EP platform, those two PHYs are connected to the external ethernet jacks. My spell checker trips on "amac" and "ethernet" -- perhaps they need ca

Re: bfq-mq performance comparison to cfq

2017-04-25 Thread Juri Lelli
Hi, sorry if I jump into this interesting conversation, but I felt some people might have missed this and might be interested as well (even if from a slightly different POW). Let me Cc them (Patrick, Morten, Peter, Joel, Andres). On 19/04/17 09:02, Paolo Valente wrote: > > > Il giorno 19 apr 201

Re: [PATCH 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.

2017-04-25 Thread Sergei Shtylyov
On 4/25/2017 12:50 AM, Eric Anholt wrote: Cygnus has a single amac controller connected to the B53 switch with 2 PHYs. On the BCM911360_EP platform, those two PHYs are connected to the external ethernet jacks. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm-cygnus.dtsi | 60 +++

Re: [PATCH v2 10/18] pinctrl: madera: Add driver for Cirrus Logic Madera codecs

2017-04-25 Thread Linus Walleij
On Mon, Apr 24, 2017 at 6:08 PM, Richard Fitzgerald wrote: > These codecs have a variable number of I/O lines each of which > is individually selectable to a wide range of possible functions. > > The functionality is slightly different from the traditional muxed > GPIO since most of the functions

Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

2017-04-25 Thread Andy Shevchenko
+Cc: Mika On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: > On 2017-04-24 23:25, Andy Shevchenko wrote: >> On Mon, Apr 24, 2017 at 11:32 PM, Jan Kiszka wrote: >>> On 2017-04-24 22:05, Andy Shevchenko wrote: On Mon, 2017-04-24 at 21:28 +0200, Jan Kiszka wrote: > This is an upstream po

Re: [PATCH v2 13/18] dt-bindings: gpio: Add bindings for GPIO on Cirrus Logic Madera codecs

2017-04-25 Thread Linus Walleij
On Mon, Apr 24, 2017 at 6:08 PM, Richard Fitzgerald wrote: > The Cirrus Logic Madera codecs have a range of GPIO pins that can be > used as single-bit logic input or output. These are presented as a > standard GPIO binding. > > The second cell in a GPIO binding is currently reserved for future us

Re: [PATCH] stmmac: Add support for SIMATIC IOT2000 platform

2017-04-25 Thread Andy Shevchenko
On Tue, Apr 25, 2017 at 12:00 PM, Jan Kiszka wrote: > On 2017-04-25 09:30, Andy Shevchenko wrote: >> On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: >>> On 2017-04-24 23:27, Andy Shevchenko wrote: On Mon, Apr 24, 2017 at 10:27 PM, Jan Kiszka wrote: > The IOT2000 is industrial c

[PATCH] usb: gadget: f_fs: avoid out of bounds access on comp_desc

2017-04-25 Thread William Wu
Companion descriptor is only used for SuperSpeed endpoints, if the endpoints are HighSpeed or FullSpeed, the Companion descriptor will not allocated, so we can only access it if gadget is SuperSpeed. I can reproduce this issue on Rockchip platform rk3368 SoC which supports USB 2.0, and use functio

[PATCH] usb: chipidea: properly handle host or gadget initialization failure

2017-04-25 Thread Jisheng Zhang
If ci_hdrc_host_init() or ci_hdrc_gadget_init() returns error and the error != -ENXIO, as Peter pointed out, "it stands for initialization for host or gadget has failed", so we'd better return failure rather continue. Signed-off-by: Jisheng Zhang --- drivers/usb/chipidea/core.c | 25

Re: [PATCH V9 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request

2017-04-25 Thread Daniel Lezcano
On Tue, Apr 25, 2017 at 10:10:12AM +0100, Marc Zyngier wrote: [ ... ] > Maybe you could explain why you think this interrupt is relevant to what > you're trying to achieve? > >>> > >>> If this interrupt does not happen on the host, we don't care. > >> > >> All interrupts happen on the h

RE: [PATCH v6 4/5] i2c: aspeed: added driver for Aspeed I2C

2017-04-25 Thread Ryan Chen
Thanks Ryan. Can you shed some light on the meaning of the high-speed bit as well please ? About ASPEED_I2CD_M_HIGH_SPEED_EN, it is support for I2C specification "High speed transfer". And also device need support it. If you just speed up the I2C bus clock, you don’t have to enable ASPEED_I2CD

Re: [PATCH 3/6] drm: fourcc byteorder: add bigendian support to drm_mode_legacy_fb_format

2017-04-25 Thread Ville Syrjälä
On Tue, Apr 25, 2017 at 12:18:52PM +0900, Michel Dänzer wrote: > On 24/04/17 03:25 PM, Gerd Hoffmann wrote: > > Return correct fourcc codes on bigendian. Drivers must be adapted to > > this change. > > > > Signed-off-by: Gerd Hoffmann > > Just to reiterate, this won't work for the radeon driver

[PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Honggang LI
From: Honggang Li Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the size of headroom to avoid skb_under_panic. [ 122.871493] ipoib_hard_header: skb->head= 8808179d9400, skb->data= 8808179d9420, skb

[PATCH v2] iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed

2017-04-25 Thread sunil . kovvuri
From: Sunil Goutham For software initiated address translation, when domain type is IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior i.e return the same IOVA as translated address. This patch is an extension to Will Deacon's patchset "Implement SMMU passthrough using the default dom

Re: [PATCH] net: hso: fix module unloading

2017-04-25 Thread Johan Hovold
On Mon, Apr 24, 2017 at 09:18:39PM +0200, Andreas Kemnade wrote: > keep tty driver until usb driver is unregistered > rmmod hso > produces traces like this without that: Yeah, a blatant use-after-free. > Signed-off-by: Andreas Kemnade Reviewed-by: Johan Hovold > --- > drivers/net/usb/hso.c |

Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2017-04-25 Thread Jon Hunter
On 25/04/17 05:15, Vivek Gautam wrote: > On 04/24/2017 06:15 PM, Jon Hunter wrote: >> On 18/04/17 12:21, Vivek Gautam wrote: >>> Make use of reset_control_array_*() set of APIs to manage >>> an array of reset controllers available with the device. >> Before we apply this patch, I need to check to

Re: [PATCH] stmmac: Add support for SIMATIC IOT2000 platform

2017-04-25 Thread Jan Kiszka
On 2017-04-25 11:46, Andy Shevchenko wrote: > On Tue, Apr 25, 2017 at 12:00 PM, Jan Kiszka wrote: >> On 2017-04-25 09:30, Andy Shevchenko wrote: >>> On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: On 2017-04-24 23:27, Andy Shevchenko wrote: > On Mon, Apr 24, 2017 at 10:27 PM, Jan Kisz

Re: [PATCH] stmmac: Add support for SIMATIC IOT2000 platform

2017-04-25 Thread Jan Kiszka
On 2017-04-25 12:07, Jan Kiszka wrote: > On 2017-04-25 11:46, Andy Shevchenko wrote: >> On Tue, Apr 25, 2017 at 12:00 PM, Jan Kiszka wrote: >>> On 2017-04-25 09:30, Andy Shevchenko wrote: On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: > On 2017-04-24 23:27, Andy Shevchenko wrote: >>>

Re: [PATCH 1/2] dax: prevent invalidation of mapped DAX entries

2017-04-25 Thread Jan Kara
On Thu 20-04-17 21:44:36, Ross Zwisler wrote: > dax_invalidate_mapping_entry() currently removes DAX exceptional entries > only if they are clean and unlocked. This is done via: > > invalidate_mapping_pages() > invalidate_exceptional_entry() > dax_invalidate_mapping_entry() > > However, fo

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Yuval Shaia
On Tue, Apr 25, 2017 at 05:55:55PM +0800, Honggang LI wrote: > From: Honggang Li > > Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which > is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the > size of headroom to avoid skb_under_panic. > > [ 122.871493] ipoib_

Re: about CPU QoS in KVM

2017-04-25 Thread Juri Lelli
Hi, just noticed this and thought I might just jump in. :) On 20/04/17 16:00, Paolo Bonzini wrote: > Adding Rik. > > Paolo > > On 20/04/2017 15:32, Gonglei (Arei) wrote: > > Hi all, > > > > Currently, KVM do the CPU resource reservation by the cgroup mechanism > > which can't do entire accurat

Re: [alsa-devel] [PATCH 1/2] ASoC: codec: wm9860: avoid maybe-uninitialized warning

2017-04-25 Thread Daniel Baluta
On Mon, Apr 24, 2017 at 6:27 PM, Arnd Bergmann wrote: > On Mon, Apr 24, 2017 at 3:15 PM, Daniel Baluta > wrote: >> On Fri, Apr 21, 2017 at 5:46 PM, Arnd Bergmann wrote: >>> On Fri, Apr 21, 2017 at 3:07 PM, Daniel Baluta >>> wrote: The new PLL configuration code triggers a harmless warnin

Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus'

2017-04-25 Thread Lukasz Luba
Hi Viresh, I have run the newest version (6a883ddf73cd). It looks correct (tests are passing so far). Feel free to add Tested-by: Lukasz Luba I would like to go through the code before it got merged, though. If you are planing to post v4, I can test and review it this week. Regards, Lukasz

Re: [PATCH V9 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request

2017-04-25 Thread Marc Zyngier
On 25/04/17 10:49, Daniel Lezcano wrote: > On Tue, Apr 25, 2017 at 10:10:12AM +0100, Marc Zyngier wrote: [...] >>> +static inline void setup_timings(struct irq_desc *desc, struct irqaction >>> *act) >>> +{ >>> + /* >>> +* We don't need the measurement because the idle code already >>> +

Re: [PATCH V9 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request

2017-04-25 Thread Christoffer Dall
On Tue, Apr 25, 2017 at 11:49:27AM +0200, Daniel Lezcano wrote: [...] > > > > The idle code is very much *not* aware of anything concerning that guest > > timer. > > Just for my own curiosity, if there are two VM (VM1 and VM2). VM1 sets a > timer1 > at and exits, VM2 runs and sets a timer2 at

Re: [PATCH] x86/refcount: Implement fast refcount_t handling

2017-04-25 Thread Peter Zijlstra
On Fri, Apr 21, 2017 at 03:09:39PM -0700, Kees Cook wrote: > +static __always_inline void refcount_inc(refcount_t *r) > +{ > + asm volatile(LOCK_PREFIX "incl %0\n\t" > + REFCOUNT_CHECK_OVERFLOW(4) > + : [counter] "+m" (r->refs.counter) > + : : "cc", "cx"); >

Re: [PATCH v3 3/4] zram: make deduplication feature optional

2017-04-25 Thread Sergey Senozhatsky
Hello, On (04/21/17 10:14), js1...@gmail.com wrote: [..] > int zram_dedup_init(struct zram *zram, size_t num_pages); > void zram_dedup_fini(struct zram *zram); > +#else > + > +static inline u64 zram_dedup_dup_size(struct zram *zram) { return 0; } > +static inline u64 zram_dedup_meta_size(struct

Re: [PATCH] drm: fourcc byteorder: brings header file comments in line with reality.

2017-04-25 Thread Ville Syrjälä
On Tue, Apr 25, 2017 at 10:12:37AM +0900, Michel Dänzer wrote: > On 24/04/17 10:03 PM, Ville Syrjälä wrote: > > On Mon, Apr 24, 2017 at 03:57:02PM +0900, Michel Dänzer wrote: > >> On 22/04/17 07:05 PM, Ville Syrjälä wrote: > >>> On Fri, Apr 21, 2017 at 06:14:31PM +0200, Gerd Hoffmann wrote: >

Re: [PATCH v2 10/18] pinctrl: madera: Add driver for Cirrus Logic Madera codecs

2017-04-25 Thread Richard Fitzgerald
On Tue, 2017-04-25 at 11:41 +0200, Linus Walleij wrote: > On Mon, Apr 24, 2017 at 6:08 PM, Richard Fitzgerald > wrote: > > > These codecs have a variable number of I/O lines each of which > > is individually selectable to a wide range of possible functions. > > > > The functionality is slightly d

[PATCH V4 00/17] thermal: cpu_cooling: improve interaction with cpufreq core

2017-04-25 Thread Viresh Kumar
Hi Guys, The cpu_cooling driver is designed to use CPU frequency scaling to avoid high thermal states for a platform. But it wasn't glued really well with cpufreq core. For example clipped-cpus is copied from the policy structure and its much better to use the policy->cpus (or related_cpus) fields

[PATCH V4 01/17] thermal: cpu_cooling: Avoid accessing potentially freed structures

2017-04-25 Thread Viresh Kumar
After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call get_level() and that can cause kernel to crash. Drop the lock after we are done using the structure. Cc: 4.2+ # 4.2+ Fixes: 02373d7c69b4 ("thermal: cpu_cooling: fix lockdep problems in cpu_cooling") Signed-

[PATCH V4 02/17] thermal: cpu_cooling: rearrange globals

2017-04-25 Thread Viresh Kumar
Just to make it look better. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index be29489dd247..ce94aafed25d 100644 --- a/drive

[PATCH V4 07/17] thermal: cpu_cooling: use cpufreq_policy to register cooling device

2017-04-25 Thread Viresh Kumar
The CPU cooling driver uses the cpufreq policy, to get clip_cpus, the frequency table, etc. Most of the callers of CPU cooling driver's registration routines have the cpufreq policy with them, but they only pass the policy->related_cpus cpumask. The __cpufreq_cooling_register() routine then gets th

[PATCH V4 06/17] thermal: cpu_cooling: get rid of a variable in cpufreq_set_cur_state()

2017-04-25 Thread Viresh Kumar
'cpu' is used at only one place and there is no need to keep a separate variable for it. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu

Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus'

2017-04-25 Thread Viresh Kumar
On 25-04-17, 11:19, Lukasz Luba wrote: > Hi Viresh, > > I have run the newest version (6a883ddf73cd). > It looks correct (tests are passing so far). > Feel free to add > Tested-by: Lukasz Luba > > I would like to go through the code before > it got merged, though. > > If you are planing to post

[PATCH V4 05/17] thermal: cpu_cooling: remove cpufreq_cooling_get_level()

2017-04-25 Thread Viresh Kumar
There is only one user of cpufreq_cooling_get_level() and that already has pointer to the cpufreq_cdev structure. It can directly call get_level() instead and we can get rid of cpufreq_cooling_get_level(). Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 33

[PATCH V4 12/17] thermal: cpu_cooling: merge frequency and power tables

2017-04-25 Thread Viresh Kumar
The cpu_cooling driver keeps two tables: - freq_table: table of frequencies in descending order, built from policy->freq_table. - power_table: table of frequencies and power in ascending order, built from OPP table. If the OPPs are used for the CPU device then both these tables are actually

[PATCH V4 13/17] thermal: cpu_cooling: create structure for idle time stats

2017-04-25 Thread Viresh Kumar
We keep two arrays for idle time stats and allocate memory for them separately. It would be much easier to follow if we create an array of idle stats structure instead and allocate it once. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 53 +++

[PATCH V4 16/17] thermal: cpu_cooling: 'freq' can't be zero in cpufreq_state2power()

2017-04-25 Thread Viresh Kumar
The frequency table shouldn't have any zero frequency entries and so such a check isn't required. Though it would be better to make sure 'state' is within limits. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 7 --- 1 file changed, 4 insertions(+), 3

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-25 Thread Heikki Krogerus
Hi Guenter, On Fri, Apr 21, 2017 at 03:15:52PM -0700, Guenter Roeck wrote: > +/* > + * Logging > + */ > + > +#ifdef CONFIG_DEBUG_FS > + > +static bool tcpm_log_full(struct tcpm_port *port) > +{ > + return port->logbuffer_tail == > + (port->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;

[PATCH V4 17/17] thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device

2017-04-25 Thread Viresh Kumar
This shrinks the size of the structure on arm64 by 8 bytes by avoiding padding of 4 bytes at two places. Also add missing doc comment for freq_table Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 15 --- 1 file changed, 8 insertions(+), 7 del

[PATCH V4 15/17] thermal: cpu_cooling: don't store cpu_dev in cpufreq_cdev

2017-04-25 Thread Viresh Kumar
'cpu_dev' is used by only one function, get_static_power(), and it wouldn't be time consuming to get the cpu device structure within it. This would help removing cpu_dev from struct cpufreq_cooling_device. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 22

[PATCH V4 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus'

2017-04-25 Thread Viresh Kumar
'allowed_cpus' is a copy of policy->related_cpus and can be replaced by it directly. At some places we are only concerned about online CPUs and policy->cpus can be used there. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 81 +

[PATCH V4 14/17] thermal: cpu_cooling: get_level() can't fail

2017-04-25 Thread Viresh Kumar
The frequency passed to get_level() is returned by cpu_power_to_freq() and it is guaranteed that get_level() can't fail. Get rid of error code. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 20 +--- 1 file changed, 5 insertions(+), 15 de

[PATCH V4 10/17] thermal: cpu_cooling: OPPs are registered for all CPUs

2017-04-25 Thread Viresh Kumar
The OPPs are registered for all CPUs of a cpufreq policy now and we don't need to run the loop in build_dyn_power_table(). Just check for the policy->cpu and we should be fine. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 26 +++---

[PATCH V4 09/17] thermal: cpu_cooling: store cpufreq policy

2017-04-25 Thread Viresh Kumar
The cpufreq policy can be used by the cpu_cooling driver, lets store it in the cpufreq_cooling_device structure. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/th

[PATCH V4 08/17] cpufreq: create cpufreq_table_count_valid_entries()

2017-04-25 Thread Viresh Kumar
We need such a routine at two places already, lets create one. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/cpufreq/cpufreq_stats.c | 13 - drivers/thermal/cpu_cooling.c | 22 +- include/linux/cpufreq.h | 14 ++ 3 files cha

[PATCH V4 03/17] thermal: cpu_cooling: Name cpufreq cooling devices as cpufreq_cdev

2017-04-25 Thread Viresh Kumar
Objects of "struct cpufreq_cooling_device" are named a bit inconsistently. Lets use cpufreq_cdev everywhere. Also note that the lists containing such devices is renamed similarly too. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 248

[PATCH V4 04/17] thermal: cpu_cooling: replace cool_dev with cdev

2017-04-25 Thread Viresh Kumar
Objects of "struct thermal_cooling_device" are named a bit inconsistently. Lets use cdev everywhere. Signed-off-by: Viresh Kumar Tested-by: Lukasz Luba --- drivers/thermal/cpu_cooling.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/d

Re: [PATCH RFC 0/5] *** SPI Slave mode support ***

2017-04-25 Thread Mark Brown
On Mon, Apr 24, 2017 at 12:55:21PM +0200, Geert Uytterhoeven wrote: > On Fri, Apr 14, 2017 at 7:39 AM, Jiada Wang wrote: > > Our use case is to use spidev as an interface to communicate with external > > SPI master devices. > > meanwhile the SPI bus controller can also act as master device to sen

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Or Gerlitz
On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: > From: Honggang Li > > Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which > is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the > size of headroom to avoid skb_under_panic. sounds terrible, ipoib bonding is

Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2017-04-25 Thread Philipp Zabel
On Tue, 2017-04-25 at 11:05 +0100, Jon Hunter wrote: > On 25/04/17 05:15, Vivek Gautam wrote: > > On 04/24/2017 06:15 PM, Jon Hunter wrote: > >> On 18/04/17 12:21, Vivek Gautam wrote: > >>> Make use of reset_control_array_*() set of APIs to manage > >>> an array of reset controllers available with

Re: [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jeff Layton
On Tue, 2017-04-25 at 10:17 +0200, Jan Kara wrote: > On Mon 24-04-17 13:14:36, Jeff Layton wrote: > > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote: > > > On Mon 24-04-17 09:22:49, Jeff Layton wrote: > > > > This ensures that we see errors on fsync when writeback fails. > > > > > > > > Signed-

Re: [PATCH v2] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-25 Thread Maksim Salau
> + } else if (object_is_on_stack(urb->transfer_buffer)) { > + WARN_ONCE(1, "transfer buffer is on stack\n"); > + ret = -EAGAIN; > } else { Hi, Has anyone considered a fail-safe mode? I.e.: if a buff

Re: [PATCH 1/1] power: Fix unchecked return value of devm_kzalloc

2017-04-25 Thread Pali Rohár
On Monday 24 April 2017 16:22:08 Pan Bian wrote: > Function devm_kzalloc() will return a NULL pointer. However, in function > isp1704_charger_probe(), the return value of devm_kzalloc() is directly > used without validation. This may result in a bad memory access bug. > > Signed-off-by: Pan Bian

Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

2017-04-25 Thread Jan Kiszka
On 2017-04-25 11:42, Andy Shevchenko wrote: > +Cc: Mika > > On Tue, Apr 25, 2017 at 8:44 AM, Jan Kiszka wrote: >> On 2017-04-24 23:25, Andy Shevchenko wrote: >>> On Mon, Apr 24, 2017 at 11:32 PM, Jan Kiszka wrote: On 2017-04-24 22:05, Andy Shevchenko wrote: > On Mon, 2017-04-24 at 21:28

Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2017-04-25 Thread Jon Hunter
On 25/04/17 11:33, Philipp Zabel wrote: > On Tue, 2017-04-25 at 11:05 +0100, Jon Hunter wrote: >> On 25/04/17 05:15, Vivek Gautam wrote: >>> On 04/24/2017 06:15 PM, Jon Hunter wrote: On 18/04/17 12:21, Vivek Gautam wrote: > Make use of reset_control_array_*() set of APIs to manage > a

[no subject]

2017-04-25 Thread Kamil Kamiński
Hey, Is there an easy way to burst CPU resources with cgroups when needed? For example I'm restricting 20% of CPU and for example i want to allow it to use 100% of CPU for 30 sec. Or maybe is there a function that will indicate when app will consume all resources? Then I will just switch her PID

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Honggang LI
On Tue, Apr 25, 2017 at 01:32:59PM +0300, Or Gerlitz wrote: > On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: > > From: Honggang Li > > > > Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which > > is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the > > size

Re: Review request: draft ioctl_userfaultfd(2) manual page

2017-04-25 Thread Michael Kerrisk (man-pages)
Hi Mike, On 25 April 2017 at 10:00, Mike Rapoport wrote: > Hello Michael, > > On Fri, Apr 21, 2017 at 01:41:18PM +0200, Michael Kerrisk (man-pages) wrote: >> Hi Mike, >> > > [...] > >> > >> > Yes. >> > Just the future is only a week or two from today as we are at 4.11-rc7 :) >> >> Yes, I understa

Re: [RFC] x86/tboot: add an option to disable iommu force on

2017-04-25 Thread Joerg Roedel
On Mon, Apr 24, 2017 at 09:50:59AM -0700, Shaohua Li wrote: > Hi Joerg, > > Is Ning's answer sufficient to justify merging the patch? Yes, I will take it if you repost without the RFC tag and when you add documentation for the new command-line parameter. I think a kernel-log message about the po

Re: [PATCH] ACPI / GED: use late init to allow other drivers init

2017-04-25 Thread Rafael J. Wysocki
On Tue, Apr 25, 2017 at 3:43 AM, Sinan Kaya wrote: > >> My point is that nothing guarantees a specific ordering or timing of >> module loading in general, so moving stuff to different initcall >> levels does not really help 100% of the time. >> > > Are you talking about init vs. probe in general?

Re: [PATCH v2] sched/cfs: make util/load_avg more stable

2017-04-25 Thread Dietmar Eggemann
On 19/04/17 17:54, Vincent Guittot wrote: > In the current implementation of load/util_avg, we assume that the ongoing > time segment has fully elapsed, and util/load_sum is divided by LOAD_AVG_MAX, > even if part of the time segment still remains to run. As a consequence, this > remaining part is

Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2017-04-25 Thread Vivek Gautam
On 04/25/2017 04:24 PM, Jon Hunter wrote: On 25/04/17 11:33, Philipp Zabel wrote: On Tue, 2017-04-25 at 11:05 +0100, Jon Hunter wrote: On 25/04/17 05:15, Vivek Gautam wrote: On 04/24/2017 06:15 PM, Jon Hunter wrote: On 18/04/17 12:21, Vivek Gautam wrote: Make use of reset_control_array_*()

Re: [PATCH 2/2] dax: fix data corruption due to stale mmap reads

2017-04-25 Thread Jan Kara
On Thu 20-04-17 21:44:37, Ross Zwisler wrote: > Users of DAX can suffer data corruption from stale mmap reads via the > following sequence: > > - open an mmap over a 2MiB hole > > - read from a 2MiB hole, faulting in a 2MiB zero page > > - write to the hole with write(3p). The write succeeds bu

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Erez Shitrit
On Tue, Apr 25, 2017 at 1:32 PM, Or Gerlitz wrote: > On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: >> From: Honggang Li >> >> Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which >> is smaller than IPOIB_HARD_LEN. ipoib_hard_header should check the >> size of headroom t

Re: [PATCH V3 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers

2017-04-25 Thread Jon Hunter
On 25/04/17 12:06, Vivek Gautam wrote: > On 04/25/2017 04:24 PM, Jon Hunter wrote: >> On 25/04/17 11:33, Philipp Zabel wrote: >>> On Tue, 2017-04-25 at 11:05 +0100, Jon Hunter wrote: On 25/04/17 05:15, Vivek Gautam wrote: > On 04/24/2017 06:15 PM, Jon Hunter wrote: >> On 18/04/17 12:2

[PATCH 0/3] HSI: omap_ssi: Fine-tuning for two function implementations

2017-04-25 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 25 Apr 2017 12:52:10 +0200 Three update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use devm_kcalloc() in ssi_add_controller() Fix a typo in a comment line Delete an error message for a failed memory allocation i

[PATCH] mm/madvise: Enable (soft|hard) offline of HugeTLB pages at PGD level

2017-04-25 Thread Anshuman Khandual
Though migrating gigantic HugeTLB pages does not sound much like real world use case, they can be affected by memory errors. Hence migration at the PGD level HugeTLB pages should be supported just to enable soft and hard offline use cases. While allocating the new gigantic HugeTLB page, it should

Re: [RFC PATCH 0/4] PM / Domains: Add support for explicit control of PM domains

2017-04-25 Thread Jon Hunter
On 28/03/17 15:13, Jon Hunter wrote: > The current generic PM domain framework (GenDP) only allows a single > PM domain to be associated with a given device. There are several > use-cases for various system-on-chip devices where it is necessary for > a PM domain consumer to control more than one P

Revised statx(2) man page for review

2017-04-25 Thread Michael Kerrisk (man-pages)
Hello David, et al., I merged your statx(2) page, and edited somewhat heavily. (The merged page source has been pushed to Git.) Could you please carefully review the text below, in case I added any errors. There is one question in a FIXME below. Could you please take a look at that also. Your

Re: [PATCH] IB/IPoIB: Check the headroom size

2017-04-25 Thread Or Gerlitz
On Tue, Apr 25, 2017 at 2:11 PM, Erez Shitrit wrote: > On Tue, Apr 25, 2017 at 1:32 PM, Or Gerlitz wrote: >> On Tue, Apr 25, 2017 at 12:55 PM, Honggang LI wrote: >>> From: Honggang Li >>> >>> Minimal hard_header_len set by bond_compute_features is ETH_HLEN, which >>> is smaller than IPOIB_HARD_

[PATCH 1/3] HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller()

2017-04-25 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 25 Apr 2017 11:20:41 +0200 * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle so

<    2   3   4   5   6   7   8   9   10   >