Re: [PATCH v2 2/5] firmware: annotate thou shalt not request fw on init or probe

2016-08-24 Thread Daniel Vetter
On Fri, Jun 17, 2016 at 12:54 AM, Luis R. Rodriguez wrote: > Thou shalt not make firmware calls early on init or probe. > > systemd already ripped support out for the usermode helper > a while ago, there are still users that require the usermode helper, > however systemd's use of the usermode help

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-24 Thread Simon Guo
Hi Daniel, On Wed, Aug 24, 2016 at 12:21:23PM +1000, Daniel Axtens wrote: > Hi Simon, > > > The ckpt_regs usage in gpr32_set_common/gpr32_get_common() > > will lead to cppcheck error. > > > > [arch/powerpc/kernel/ptrace.c:2062]: (error) Uninitialized variable: > > ckpt_regs > > [arch/powerpc/kern

Re: [PATCH v3 2/5] firmware: annotate thou shalt not request fw on init or probe

2016-08-24 Thread Gabriel Paubert
On Tue, Aug 23, 2016 at 05:45:04PM -0700, mcg...@kernel.org wrote: [snip] > --- > Documentation/firmware_class/README| 20 > drivers/base/Kconfig | 2 +- > .../request_firmware-avoid-init-probe-init.cocci | 130 > + > 3

[PATCH 1/4] powerpc/book3s: Add a cpu table entry for different POWER9 revs

2016-08-24 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/cputable.h | 4 +++- arch/powerpc/kernel/cputable.c | 19 +++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 82026b41

[PATCH 2/4] powerpc/mm/radix: Use different RTS encoding for different POWER9 revs

2016-08-24 Thread Aneesh Kumar K.V
POWER9 DD1 uses RTS - 28 for the RTS value but other revisions use RTS - 31. This makes this distinction for the different revisions Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/radix.h | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/a

[PATCH 3/4] powerpc/mm/radix: Use different pte update sequence for different POWER9 revs

2016-08-24 Thread Aneesh Kumar K.V
POWER9 DD1 requires pte to be marked invalid (V=0) before updating it with the new value. This makes this distinction for the different revisions. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/32/pgtable.h | 3 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 5 +- arch/

[PATCH 4/4] powerpc/mm: Update the HID bit when switching from radix to hash

2016-08-24 Thread Aneesh Kumar K.V
Power9 DD1 requires to update the hid0 register when switching from hash to radix. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/reg.h | 3 +++ arch/powerpc/mm/hash_utils_64.c | 25 + arch/powerpc/mm/pgtable-radix.c | 28 3 fi

[PATCH 0/3] Optimisation of fs_enet ethernet driver

2016-08-24 Thread Christophe Leroy
This set optimises the freescale fs_enet ethernet driver: 1/ Merge of RX and TX NAPI functions in order to limit the amount of interrupts 2/ Do not unmap DMA when packets len is below copybreak, otherwise there is no benefit in copying the skb instead of allocating a new one 3/ Make copybreak value

[PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Christophe Leroy
Initially, a NAPI TX routine has been implemented separately from NAPI RX, as done on the freescale/gianfar driver. By merging NAPI RX and NAPI TX, we reduce the amount of TX completion interrupts. Handling of the budget in association with TX interrupts is based on indications provided at https:

[PATCH 2/3] net: fs_enet: don't unmap DMA when packet len is below copybreak

2016-08-24 Thread Christophe Leroy
When the length of the packet is below the defined copybreak limit, the received packet is copied into a newly allocated skb in order to reuse the skb. This is only interesting if it allow us to avoid a new DMA mapping. We shall therefore not DMA unmap and remap the skb->data. Instead, we invalidat

[PATCH 3/3] net: fs_enet: make rx_copybreak value configurable

2016-08-24 Thread Christophe Leroy
Measurement shows that on a MPC8xx running at 132MHz, the optimal limit is 112: * 114 bytes packets are processed in 147 TB ticks with higher copybreak * 114 bytes packets are processed in 148 TB ticks with lower copybreak * 128 bytes packets are processed in 154 TB ticks with higher copybreak * 12

Re: [PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Eric Dumazet
On Wed, 2016-08-24 at 12:36 +0200, Christophe Leroy wrote: > Initially, a NAPI TX routine has been implemented separately from > NAPI RX, as done on the freescale/gianfar driver. > > By merging NAPI RX and NAPI TX, we reduce the amount of TX completion > interrupts. > > Handling of the budget in

Re: [PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Eric Dumazet
On Wed, 2016-08-24 at 06:07 -0700, Eric Dumazet wrote: > I am afraid you could live lock here on SMP. > > You should make sure you do not loop forever, not assuming cpu is faster > than NIC. You are protected by the tx_lock spinlock, but this is fragile as you could very well remove this spinloc

Re: [PATCH 1/3] net: fs_enet: merge NAPI RX and NAPI TX

2016-08-24 Thread Christophe Leroy
Le 24/08/2016 à 15:07, Eric Dumazet a écrit : On Wed, 2016-08-24 at 12:36 +0200, Christophe Leroy wrote: Initially, a NAPI TX routine has been implemented separately from NAPI RX, as done on the freescale/gianfar driver. By merging NAPI RX and NAPI TX, we reduce the amount of TX completion in

[PATCH -next] ibmvnic: fix error return code in ibmvnic_probe()

2016-08-24 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the dma_map_single error handling case instead of 0, as done elsewhere in this function. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file chang

[PATCH -next] ibmvnic: convert to use simple_open()

2016-08-24 Thread Wei Yongjun
From: Wei Yongjun Remove an open coded simple_open() function and replace file operations references to the function with simple_open() instead. Generated by: scripts/coccinelle/api/simple_open.cocci Signed-off-by: Wei Yongjun --- drivers/net/ethernet/ibm/ibmvnic.c | 18 ++ 1

Re: [RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start

2016-08-24 Thread Daniel Lezcano
On 08/19/2016 12:26 AM, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > Currently all the idle states registered by a cpu-idle driver are > enabled by default. This patch adds a mechanism which allows the > driver to hint if an idle-state should start in a disabled state. The > cpu-idle

Re: [RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start

2016-08-24 Thread Balbir Singh
On 25/08/16 00:44, Daniel Lezcano wrote: > On 08/19/2016 12:26 AM, Gautham R. Shenoy wrote: >> From: "Gautham R. Shenoy" >> >> Currently all the idle states registered by a cpu-idle driver are >> enabled by default. This patch adds a mechanism which allows the >> driver to hint if an idle-state

Re: [RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start

2016-08-24 Thread Daniel Lezcano
On 08/24/2016 04:48 PM, Balbir Singh wrote: > > > On 25/08/16 00:44, Daniel Lezcano wrote: >> On 08/19/2016 12:26 AM, Gautham R. Shenoy wrote: >>> From: "Gautham R. Shenoy" >>> >>> Currently all the idle states registered by a cpu-idle driver are >>> enabled by default. This patch adds a mechani

Re: [PATCH 3/3] net: fs_enet: make rx_copybreak value configurable

2016-08-24 Thread Florian Fainelli
On 08/24/2016 03:36 AM, Christophe Leroy wrote: > Measurement shows that on a MPC8xx running at 132MHz, the optimal > limit is 112: > * 114 bytes packets are processed in 147 TB ticks with higher copybreak > * 114 bytes packets are processed in 148 TB ticks with lower copybreak > * 128 bytes packet

[PATCH] ALSA: snd-aoa: enable sound on PowerBook G4 12"

2016-08-24 Thread Aaro Koskinen
Enable sound on PowerBook G4 12". Signed-off-by: Aaro Koskinen --- sound/aoa/fabrics/layout.c | 8 sound/aoa/soundbus/i2sbus/core.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 8f71f7e..edc8681

Re: [PATCH] ALSA: snd-aoa: enable sound on PowerBook G4 12"

2016-08-24 Thread Johannes Berg
On Wed, 2016-08-24 at 20:57 +0300, Aaro Koskinen wrote: > Enable sound on PowerBook G4 12". Looks good to me, I assume you tested it and it works :) johannes > Signed-off-by: Aaro Koskinen > --- >  sound/aoa/fabrics/layout.c   | 8 >  sound/aoa/soundbus/i2sbus/core.c | 2 +- >  2 fil

Re: [PATCH] ALSA: snd-aoa: enable sound on PowerBook G4 12"

2016-08-24 Thread Aaro Koskinen
Hi, On Wed, Aug 24, 2016 at 09:43:23PM +0200, Johannes Berg wrote: > On Wed, 2016-08-24 at 20:57 +0300, Aaro Koskinen wrote: > > Enable sound on PowerBook G4 12". > > Looks good to me, I assume you tested it and it works :) Yes, I have this laptop in use. A.

[PATCH] powerpc/powernv/pci: Use kmalloc_array() in two functions

2016-08-24 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 24 Aug 2016 22:26:37 +0200 A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus reuse the corresponding function "kmalloc_array". This issue was detected by using the Coccinelle softwar

Re: [PATCH v2 2/5] firmware: annotate thou shalt not request fw on init or probe

2016-08-24 Thread Luis R. Rodriguez
On Wed, Aug 24, 2016 at 08:55:55AM +0200, Daniel Vetter wrote: > On Fri, Jun 17, 2016 at 12:54 AM, Luis R. Rodriguez wrote: > > Thou shalt not make firmware calls early on init or probe. <-- snip --> > > There are 4 offenders at this time: > > > > mcgrof@ergon ~/linux-next (git::20160609)$ expor

Re: [RFC PATCH] powerpc: fsl_pci: fix inbound ATMU entries for systems with >4G RAM

2016-08-24 Thread Scott Wood
On 08/24/2016 02:48 PM, Tillmann Heidsieck wrote: > For systems with >4G of RAM, the current implementation adds a second > inbound PCIe window starting at 128G this leaves all memory from 4G to > 128G inaccessible to inbound PCIe transactions. The second inbound window is at 256G, and it maps all

[RFC PATCH] powerpc: fsl_pci: fix inbound ATMU entries for systems with >4G RAM

2016-08-24 Thread Tillmann Heidsieck
For systems with >4G of RAM, the current implementation adds a second inbound PCIe window starting at 128G this leaves all memory from 4G to 128G inaccessible to inbound PCIe transactions. The according errors can be observed by using the EDAC driver for MPC85XX. This patch changes this behaviour

Re: [PATCH] powerpc/ptrace: Fix cppcheck issue in gpr32_set_common/gpr32_get_common.

2016-08-24 Thread Daniel Axtens
Simon Guo writes: > I think keeping tm_active argument for "ifndef CONFIG_PPC_TRANSACTIONAL_MEM" > case (with __maybe_unused prefix) will be somehow strange -- Whatever > value is provided in the caller function for tm_active, programmer might be > puzzled and cost sometime to think about it.

Re: PowerPC agpmode issues

2016-08-24 Thread Mike
Any improvement on your ends? Seems -1 is now the quirk. But does your trackpads work? Did an update after getting a new and the latest released powerbook up. Also found an interesting interface which can replace our ide drives, intended for ipod classics, but it can fit in the bay and has msata in

Re: PowerPC agpmode issues

2016-08-24 Thread Mathieu Malaterre
On Thu, Aug 25, 2016 at 5:09 AM, Mike wrote: > Any improvement on your ends? Seems -1 is now the quirk. But does your > trackpads work? Did an update after getting a new and the latest released > powerbook up. Also found an interesting interface which can replace our ide > drives, intended for ipo

[RFC PATCH v3 00/12] powerpc: "paca->soft_enabled" based local atomic operation implementation

2016-08-24 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of the patchs

[RFC PATCH v3 02/12] powerpc: Cleanup to use IRQ_DISABLE_MASK_* macros for paca->soft_enabled update

2016-08-24 Thread Madhavan Srinivasan
Replace the hardcoded values used when updating paca->soft_enabled with IRQ_DISABLE_MASK_* #def. No logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 2 +- arch/powerpc/include/asm/hw_irq.h| 15 --- arch/powerpc/include/asm/irqfl

[RFC PATCH v3 06/12] powerpc: Avoid using EXCEPTION_PROLOG_1 macro in MASKABLE_*

2016-08-24 Thread Madhavan Srinivasan
Currently we use both EXCEPTION_PROLOG_1 amd __EXCEPTION_PROLOG_1 in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_* to use only __EXCEPTION_PROLOG_1. There is not logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 4 ++-- 1 file chan

[RFC PATCH v3 01/12] powerpc: Add #defs for paca->soft_enabled flags

2016-08-24 Thread Madhavan Srinivasan
Two #defs IRQ_DISABLE_LEVEL_NONE and IRQ_DISABLE_LEVEL_LINUX are added to be used when updating paca->soft_enabled. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc

[RFC PATCH v3 08/12] powerpc: Introduce new mask bit for soft_enabled

2016-08-24 Thread Madhavan Srinivasan
Currently soft_enabled is used as the flag to determine the interrupt state. Patch extends the soft_enabled to be used as a mask instead of a flag. So, each MASKABLE_* macro will carry additionaly "bitmask" paramater to specify the interrupt maskable level. Signed-off-by: Madhavan Srinivasan ---

[RFC PATCH v3 09/12] powerpc: Add "bitmask" paramater to MASKABLE_* macros

2016-08-24 Thread Madhavan Srinivasan
Make it explicit the interrupt masking supported by a gievn interrupt handler. Patch correspondingly extends the MASKABLE_* macros with an addition's parameter. "bitmask" parameter is passed to SOFTEN_TEST macro to decide on masking the interrupt. Signed-off-by: Madhavan Srinivasan --- arch/powe

[RFC PATCH v3 10/12] powerpc: Add support to mask perf interrupts

2016-08-24 Thread Madhavan Srinivasan
To support masking of the PMI interrupts, couple of new interrupt handler macros are added MASKABLE_EXCEPTION_PSERIES_OOL and MASKABLE_RELON_EXCEPTION_PSERIES_OOL. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. Signe

[RFC PATCH v3 12/12] powerpc: rewrite local_t using soft_irq

2016-08-24 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of this patch

[RFC PATCH v3 11/12] powerpc: Support to replay PMIs

2016-08-24 Thread Madhavan Srinivasan
Code to replay the Performance Monitoring Interrupts(PMI). In the masked_interrupt handler, for PMIs we reset the MSR[EE] and return. In the __check_irq_replay(), replay the PMI interrupt by calling performance_monitor_common handler. Patch also adds a new soft_irq_set_mask() to update paca->soft_

[RFC PATCH v3 07/12] powerpc: Add new _EXCEPTION_PROLOG_1 macro

2016-08-24 Thread Madhavan Srinivasan
Factor out the EXCPETION_PROLOG_1 macro, so that STD_EXCEPTION_* and MASKABLE_EXCEPTION will have separate version. This is needed to support addition of new parameter "bitmask" for MASKABLE_* macros to specify the interrupt mask. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/e

[PATCH] powerpc: Remove suspect CONFIG_PPC_BOOK3E #ifdefs in nohash/64/pgtable.h

2016-08-24 Thread Rui Teng
There are three #ifdef CONFIG_PPC_BOOK3E sections in nohash/64/pgtable.h. And there should be no configurations possible which use nohash/64/pgtable.h but don't also enable CONFIG_PPC_BOOK3E. Suggested-by: Michael Ellerman Signed-off-by: Rui Teng --- arch/powerpc/include/asm/nohash/64/pgtable.h

[RFC PATCH v3 03/12] powerpc: move set_soft_enabled()

2016-08-24 Thread Madhavan Srinivasan
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c. this way updation of paca->soft_enabled can be forced wherever possible. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 6 ++ arch/powerpc/kernel/irq.c | 6 -- 2 files changed, 6 insert

[RFC PATCH v3 04/12] powerpc: Use set_soft_enabled api to update paca->soft_enabled

2016-08-24 Thread Madhavan Srinivasan
Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/kernel/irq.c | 2 +- arch/powerpc/kernel/setup_64.c | 4 ++-- arch/powerpc/kernel/time.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/includ

[RFC PATCH v3 05/12] powerpc: reverse the soft_enable logic

2016-08-24 Thread Madhavan Srinivasan
"paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0 Disabled (PMI and HMI not masked) 1 1 Enabled "paca->soft_enabled" is initialized to 1 to make the interripts