By default, 5% of system RAM is reserved for preserving boot memory.
Alternatively, a user can specify the amount of memory to reserve.
See Documentation/powerpc/firmware-assisted-dump.txt for details. In
addition to the memory reserved for preserving boot memory, some more
memory is reserved, to s
Hi,
I'm sitting on a few performance improvements that I'm hoping to
try get polished up enough to merge, but it's taking a while, so
I juts post them out for review because I think most are at the
stage where they are good enough to start getting some reviews on.
After this series, light weight
After bc3551257a ("powerpc/64: Allow for relocation-on interrupts from
guest to host"), a getppid() system call goes from 307 cycles to 358
cycles (+17%). This is due significantly to the scratch SPR used by the
hypercall.
It turns out there are a some volatile registers common to both system
call
The syscall exit code that branches to restore_math is quite
heavyweight on Book3S, consisting of 2 mtmsr instructions. This
case can happen even if restore_math decides there is nothing
to do due to lazy math restore.
Check for lazy restore before calling restore_math. Move most
of that case out
This simplifies the asm and fixes irq-off tracing over sleep
instructions.
Also move powersave_nap check for POWER8 into C code, and move
PSSCR register value calculation for POWER9 into C.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/machdep.h | 1 +
arch/powerpc/include
When the CPU wakes from low power state, it begins at the system reset
interrupt with the exception that caused the wakeup encoded in SRR1.
Today, powernv idle wakeup ignores the wakeup reason (except a special
case for HMI), and the regular interrupt corresponding to the
exception will fire after
msgsnd doorbell exceptions are cleared when the doorbell interrupt is
taken. However if a doorbell exception causes a system reset interrupt
wake from power saving state, the message is not cleared. Processing
the doorbell from the system reset interrupt requires msgclr to avoid
taking the exceptio
Have the system reset idle wakeup handlers branched to in real mode
with the 0xc... kernel address applied. This allows simplifications
of avoiding rfid when switching to virtual mode in the wakeup handler.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/exception-64s.h | 17
Idle code now always runs at the 0xc... effective address whether
in real or virtual mode. This means rfid can be ditched, along
with a lot of SRR manipulations.
In the wakeup path, carry SRR1 around in r12. Use mtmsrd to change
MSR states as required.
I haven't tested KVM with this yet.
---
arc
local_irq_enable can cause interrupts to be taken which could
take significant amount of processing time. The idle process
should set its polling flag before this, so another process that
wakes it during this time will not have to send an IPI.
Expand the TIF_POLLING_NRFLAG coverage to as large as
Ensure these don't get put into bouncing cachelines.
Signed-off-by: Nicholas Piggin
---
drivers/cpuidle/cpuidle-powernv.c | 10 +-
drivers/cpuidle/cpuidle-pseries.c | 8
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-powernv.c
b/drivers/
The CTRL register is read-only except bit 63 which is the run
latch control. This means it can be updated with a mtspr rather
than mfspr/mtspr.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/process.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/
A memory barrier is not required after the task wakes up,
only if we clear the polling flag before waking. The case
where we have work to do is the important one, so optimise
for it.
Signed-off-by: Nicholas Piggin
---
drivers/cpuidle/cpuidle-powernv.c | 11 +--
drivers/cpuidle/cpuidle-ps
Commit 4387e9ff25 ("[POWERPC] Fix PMU + soft interrupt disable bug")
hard disabled interrupts over the low level context switch, because
the SLB management can't cope with a PMU interrupt accesing the stack
in that window.
Radix based kernel mapping does not use the SLB so it does not require
inte
There is no need to break reservation in _switch, because we are
guranteed that context switch path will include a larx/stcx.
Comment the guarantee and remove the reservation clear from _switch.
This is worth 1-2% in context switch performance.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/ke
The hwsync in the context switch code to prevent MMIO access being
reordered from the point of view of a single process if it gets
migrated to a different CPU is not required because there is an hwsync
performed earlier in the context switch path.
Comment this so it's clear enough if anything chan
Hi maintainers,
Is this patch series (v6) OK for merging?
Thanks
Jin Yao
On 4/20/2017 5:36 PM, Jiri Olsa wrote:
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote:
v6:
Update according to the review comments from
Jiri Olsa . Major modifications are:
1. Move that multiline
Changes in v2:
* Reordered addition to ioctls.h to follow correct hex ordering.
Aleksa Sarai (1):
tty: add TIOCGPTPEER ioctl
arch/alpha/include/uapi/asm/ioctls.h | 1 +
arch/mips/include/uapi/asm/ioctls.h| 1 +
arch/parisc/include/uapi/asm/ioctls.h | 1 +
arch/powerpc/include/uapi
When opening the slave end of a PTY, it is not possible for userspace to
safely ensure that /dev/pts/$num is actually a slave (in cases where the
mount namespace in which devpts was mounted is controlled by an
untrusted process). In addition, there are several unresolvable
race conditions if usersp
From: Christophe Lombard
This patch exports a in-kernel 'library' API which can be called by
other drivers to help interacting with an IBM XSL on a POWER9 system.
The XSL (Translation Service Layer) is a stripped down version of the
PSL (Power Service Layer) used in some cards such as the Mellan
Christophe Leroy writes:
> Only the get_user() in store_updates_sp() has to be done outside
> the mm semaphore. All the comparison can be done within the semaphore,
> so only when really needed.
>
> As we got a DSI exception, the address pointed by regs->nip is
> obviously valid, otherwise we wou
During an eeh call to cxl_remove can result in double free_irq of
psl,slice interrupts. This can happen if perst_reloads_same_image == 1
and call to cxl_configure_adapter() fails during slot_reset
callback. In such a case we see a kernel oops with following back-trace:
Oops: Kernel access of bad a
Le 02/06/2017 à 11:26, Michael Ellerman a écrit :
Christophe Leroy writes:
Only the get_user() in store_updates_sp() has to be done outside
the mm semaphore. All the comparison can be done within the semaphore,
so only when really needed.
As we got a DSI exception, the address pointed by re
Nicholas Piggin writes:
> On Fri, 2 Jun 2017 15:14:47 +1000
> Michael Ellerman wrote:
>
>> In commit 8c272261194d ("powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID"), we
>> switched to the generic implementation of cpu_to_node(), which uses a percpu
>> variable to hold the NUMA node for each CPU.
On Fri, Jun 2, 2017 at 10:48 AM, Aleksa Sarai wrote:
> When opening the slave end of a PTY, it is not possible for userspace to
> safely ensure that /dev/pts/$num is actually a slave (in cases where the
> mount namespace in which devpts was mounted is controlled by an
> untrusted process). In addi
From: Benjamin Herrenschmidt
> Sent: 31 May 2017 03:26
...
> We might also need a way to provide the "initiator" with translated DMA
> addresses that allow to target the receiver.
Related to that is the ability to allocate memory that two (or more)
PCIe devices can DMA to/from.
That can be useful
On Fri, 2017-06-02 at 11:39 +0200, Christophe LEROY wrote:
> The difference between get_user() and __get_user() is that get_user()
> performs an access_ok() in addition.
>
> Doesn't access_ok() only checks whether addr is below TASK_SIZE to
> ensure it is a valid user address ?
Do you have a me
Le 02/06/2017 à 14:11, Benjamin Herrenschmidt a écrit :
On Fri, 2017-06-02 at 11:39 +0200, Christophe LEROY wrote:
The difference between get_user() and __get_user() is that get_user()
performs an access_ok() in addition.
Doesn't access_ok() only checks whether addr is below TASK_SIZE to
ensu
Hi Ben,
On Wed, Feb 22, 2017 at 8:02 PM, Linux Kernel Mailing List
wrote:
> Web:
> https://git.kernel.org/torvalds/c/2717a33d60745f2f72e521cdaedf79b00f66f8ca
> Commit: 2717a33d60745f2f72e521cdaedf79b00f66f8ca
> Parent: 470a36a8c014e5cac7bb2df382948597f7ec1b2c
> Refname:refs/he
Signed-off-by: Geert Uytterhoeven
Acked-by: Rob Herring
---
v3:
- No changes,
v2:
- Add Acked-by.
---
Documentation/devicetree/booting-without-of.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/booting-without-of.txt
b/Documentation/devicetr
Fixes: fd913ef7ce619467 ("Bluetooth: btusb: Add out-of-band wakeup support")
Signed-off-by: Geert Uytterhoeven
---
v3:
- New.
---
Documentation/devicetree/bindings/net/btusb.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/btusb.txt
Hi all,
This patch series fixes misspellings of various standard DT properties
in DT binding documentation, DTS files, and examples.
While most of these are harmless, some of them may cause hard-to-debug
failures.
Changes compared to v3:
- Drop patches that have been applied already,
Fixes: 8cceda5349377e30 ("dt-bindings: Add bindings for the Amlogic Meson
dw-hdmi extension")
Signed-off-by: Geert Uytterhoeven
---
v3:
- New.
---
Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/Documentat
Signed-off-by: Geert Uytterhoeven
Acked-by: Rob Herring
---
v3:
- No changes,
v2:
- Add Acked-by.
---
arch/powerpc/boot/dts/acadia.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/dts/acadia.dts b/arch/powerpc/boot/dts/acadia.dts
index 57291f61ffe702
Signed-off-by: Geert Uytterhoeven
Acked-by: Rob Herring
Acked-by: Chanho Min
---
v3:
- Add Acked-by,
v2:
- Add Acked-by,
- Rebased.
---
arch/arm64/boot/dts/lg/lg1312.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/lg/lg1312.dtsi
b/arch/arm64/
Signed-off-by: Geert Uytterhoeven
Acked-by: Chanho Min
---
v3:
- Add Acked-by,
v2:
- New.
---
arch/arm64/boot/dts/lg/lg1313.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/lg/lg1313.dtsi
b/arch/arm64/boot/dts/lg/lg1313.dtsi
index e703e1149c75708
On Fri, 02 Jun 2017 19:54:32 +1000
Michael Ellerman wrote:
> >> @@ -672,10 +672,19 @@ static void __init pcpu_fc_free(void *ptr, size_t
> >> size)
> >>
> >> static int pcpu_cpu_distance(unsigned int from, unsigned int to)
> >> {
> >> - if (cpu_to_node(from) == cpu_to_node(to))
> >> -
A deadlock problem was detected in the hot-add CPU operation when
modifying a Shared CPU Topology configuration on powerpc. We have
a case where the cpu_hotplug_begin locks 'cpu_hotplug.lock' in one
thread, and then a call to get_online_cpus attempts to acquire the
same lock from lower in the sam
Hi Nicholas,
[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3]
[cannot apply to powerpc/next next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commits/Nicholas
On Fri, 2017-06-02 at 14:39 +0200, Geert Uytterhoeven wrote:
>
> > diff --git a/arch/powerpc/platforms/powernv/opal-irqchip.c
> > b/arch/powerpc/platforms/powernv/opal-irqchip.c
> > index 998316bf2dad..ecdcba9d1220 100644
> > --- a/arch/powerpc/platforms/powernv/opal-irqchip.c
> > +++ b/arch/powe
On Thu, 1 Jun 2017, Hugh Dickins wrote:
> Thanks a lot for working that out. Makes sense, fully understood now,
> nothing to worry about (though makes one wonder whether it's efficient
> to use ctors on high-alignment caches; or whether an internal "zero-me"
> ctor would be useful).
Use kzalloc
On Thu, 1 Jun 2017, Hugh Dickins wrote:
> SLUB versus SLAB, cpu versus memory? Since someone has taken the
> trouble to write it with ctors in the past, I didn't feel on firm
> enough ground to recommend such a change. But it may be obvious
> to someone else that your suggestion would be better
Le 02/06/2017 à 11:35, Vaibhav Jain a écrit :
During an eeh call to cxl_remove can result in double free_irq of
psl,slice interrupts. This can happen if perst_reloads_same_image == 1
and call to cxl_configure_adapter() fails during slot_reset
callback. In such a case we see a kernel oops with f
Fix error path if we can't copy user structure on
CXL_IOCTL_START_WORK ioctl.
Signed-off-by: Frederic Barrat
Cc: sta...@vger.kernel.org
---
drivers/misc/cxl/file.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c
index 17
Hi Fred,
Good catch.
Frederic Barrat writes:
> Fix error path if we can't copy user structure on
> CXL_IOCTL_START_WORK ioctl.
>
> Signed-off-by: Frederic Barrat
> Cc: sta...@vger.kernel.org
> ---
> drivers/misc/cxl/file.c | 6 ++
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff
During an eeh call to cxl_remove can result in double free_irq of
psl,slice interrupts. This can happen if perst_reloads_same_image == 1
and call to cxl_configure_adapter() fails during slot_reset
callback. In such a case we see a kernel oops with following back-trace:
Oops: Kernel access of bad a
Frederic Barrat writes:
>> +irq_find_mapping(NULL, afu->native->psl_virq))
>
> ^^^
> Shouldn't it be psl_hwirq?
>
Thanks for catching this Fred. I have sent a v2 patch fixing this.
--
Vaibhav Jain
Linux Technology Center, IBM India
Currently tsk->thread->load_vec and load_fp are not initialized during a
task creation, which set garbage to these variables (non-zero value).
These variables will be checked later at restore_math() to validate if the
FP and vectors are being utilized. Since these values might be non-zero,
the res
Hi Breno,
> Currently tsk->thread->load_vec and load_fp are not initialized
> during a task creation, which set garbage to these variables
> (non-zero value).
Nice catch! It seems like we should zero load_tm too though?
Acked-by: Anton Blanchard
Anton
> These variables will be checked later a
Add myself as the maintainer for drivers/fsl/soc/ and fix the scope for
device tree bindings.
Signed-off-by: Li Yang
---
MAINTAINERS | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index d24240b..1807d3f 100644
--- a/MAINTAINERS
+++ b/MAINTAINER
Signed-off-by: Li Yang
---
MAINTAINERS | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1807d3f..5a39d4a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5285,7 +5285,7 @@ S:Maintained
F: drivers/video/fbdev/fsl-diu-fb.*
FREES
Currently tsk->thread->load_vec and load_fp are not initialized during a
task creation, which set garbage to these variables (non-zero value).
These variables will be checked later at restore_math() to validate if the
FP and vectors are being utilized. Since these values might be non-zero,
the res
On Fri, 2017-06-02 at 18:20 -0500, Li Yang wrote:
> Add myself as the maintainer for drivers/fsl/soc/ and fix the scope for
> device tree bindings.
>
> Signed-off-by: Li Yang
> ---
> MAINTAINERS | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAIN
On Mon, May 29, 2017 at 6:00 PM, Christophe LEROY
wrote:
>
>
> Le 25/05/2017 à 18:45, kbuild test robot a écrit :
>>
>> Hi Balbir,
>>
>> [auto build test ERROR on powerpc/next]
>> [also build test ERROR on v4.12-rc2 next-20170525]
>> [if your patch is applied to the wrong git tree, please drop us
54 matches
Mail list logo