[PATCH v2 3/5] powerpc/boot: Ensure _zimage_start is a weak symbol

2018-09-13 Thread Joel Stanley
with GCC. $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ 0058 w .text _zimage_start Reported to clang as https://bugs.llvm.org/show_bug.cgi?id=38921 [1] https://groups.google.com/forum/#!topic/fa.openbsd.tech/PAgKKen2YCY Signed-off-by: Joel Stanley

[PATCH v2 2/5] powerpc/boot: Fix crt0.S syntax for clang

2018-09-13 Thread Joel Stanley
^ Enclosing RELACOUNT in () makes it is happy. Tested with GCC 8 and Clang 8 (trunk). Reported to clang as https://bugs.llvm.org/show_bug.cgi?id=38945 Signed-off-by: Joel Stanley --- v2: Fix for !powerpc64 too, add bug link to commit message --- arch/powerpc/boot/crt0.S | 4

[PATCH v2 1/5] powerpc/Makefiles: Fix clang/llvm build

2018-09-13 Thread Joel Stanley
lure. Fix this by calling the assembler with -mcpu=power8 if as supports it, else fall back to power4. Suggested-by: Nicholas Piggin Signed-off-by: Anton Blanchard Signed-off-by: Joel Stanley --- arch/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerp

[PATCH v2 0/5] powerpc: Clang build fixes

2018-09-13 Thread Joel Stanley
] https://bugs.llvm.org/show_bug.cgi?id=38887 [3] https://github.com/clangBuiltLinux/linux/issues Anton Blanchard (2): powerpc/Makefiles: Fix clang/llvm build powerpc: Fix duplicate const clang warning in user access code Joel Stanley (3): powerpc/boot: Fix crt0.S syntax for clang powerpc

Re: [PATCH 1/2] powerpc/boot: Fix crt0.S syntax for clang

2018-09-13 Thread Joel Stanley
On Tue, 11 Sep 2018 at 21:02, Segher Boessenkool wrote: > > On Mon, Sep 10, 2018 at 06:57:13PM +1000, Joel Stanley wrote: > > Clang's assembler does not like the syntax of the cmpdi: > > > > arch/powerpc/boot/crt0.S:168:22: error: unexpected modifier on variable > >

[PATCH 2/2] powerpc/boot: Ensure _zimage_start is a weak symbol

2018-09-10 Thread Joel Stanley
with GCC. $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ 0058 w .text _zimage_start [1] https://groups.google.com/forum/#!topic/fa.openbsd.tech/PAgKKen2YCY Signed-off-by: Joel Stanley --- arch/powerpc/boot/crt0.S | 2 +- 1 file changed, 1 insertion

[PATCH 1/2] powerpc/boot: Fix crt0.S syntax for clang

2018-09-10 Thread Joel Stanley
^ Enclosing RELACOUNT in () makes it is happy. Tested with GCC 8 and Clang 8 (trunk). Signed-off-by: Joel Stanley --- arch/powerpc/boot/crt0.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index dcf2f15e6797

[PATCH 0/2] powerpc: Clang build fixes

2018-09-10 Thread Joel Stanley
Anton's patch[2]. [1] https://reviews.llvm.org/D50965 [2] http://git.kernel.org/torvalds/c/b91c1e3e7a6f22a6b898e345b745b6a43273c973 Joel Stanley (2): powerpc/boot: Fix crt0.S syntax for clang powerpc/boot: Ensure _zimage_start is a weak symbol arch/powerpc/boot/crt0.S | 4 ++-- 1 file changed, 2

[PATCH v2] powerpc/Makefiles: Fix clang/llvm build

2018-09-06 Thread Joel Stanley
lure. Fix this by calling the assembler with -mcpu=power8 if as supports it, else fall back to power4. Suggested-by: Nicholas Piggin Signed-off-by: Anton Blanchard Signed-off-by: Joel Stanley --- arch/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerp

[PATCH] powerpc/powernv: Don't select the cpufreq governors

2018-08-20 Thread Joel Stanley
Deciding wich govenors should be built into the kernel can be left to users to configure. Fixes: 81f359027a3a ("cpufreq: powernv: Select CPUFreq related Kconfig options for powernv") Signed-off-by: Joel Stanley --- arch/powerpc/platforms/powernv/Kconfig | 5 - 1 file changed, 5

[PATCH] powerpc: configs: Update skiroot defconfig

2018-08-19 Thread Joel Stanley
-by: Joel Stanley --- arch/powerpc/configs/skiroot_defconfig | 148 ++--- 1 file changed, 110 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig index 6bd5e7261335..a3db40d15efd 100644 --- a/arch/powerpc

Re: [PATCH] powerpc/perf: Remove sched_task function defined for thread-imc

2018-08-01 Thread Joel Stanley
when thread-imc events are grouped with software pmu events, > perf_pmu_sched_task hits the WARN_ON_ONCE condition, since software PMUs are > assumed not to have a sched_task defined. > > Patch to move the thread_imc enable/disable opal call back from sched_task to > event_[add/del] functio

[PATCH] powerpc: Remove Power8 DD1 from cputable

2018-07-11 Thread Joel Stanley
This was added to support an early version of Power8 that did not have working doorbells. These machines were not publicly available, and all of the internal users have long since upgraded. Signed-off-by: Joel Stanley --- arch/powerpc/include/asm/cputable.h | 15 +++ arch/powerpc

Re: [PATCH v4] watchdog: add SPDX identifiers for watchdog subsystem

2018-03-01 Thread Joel Stanley
peed_wdt.c | 5 +--- Acked-by: Joel Stanley <j...@jms.id.au> Cheers, Joel

Re: [PATCH 07/11] powerpc/64s: Add support for RFI flush of L1-D cache

2018-01-08 Thread Joel Stanley
On Mon, Jan 8, 2018 at 8:54 AM, Michael Ellerman wrote: > On some CPUs we can prevent the Meltdown vulnerability by flushing the > L1-D cache on exit from kernel to user mode, and from hypervisor to > guest. Super minor nitpicks below. Don't let this hold up your work. >

Re: [PATCH] powerpc/tm: P9 disabled suspend mode workaround

2017-10-05 Thread Joel Stanley
On Thu, Oct 5, 2017 at 2:25 PM, Michael Neuling wrote: > Each POWER9 core is made of two super slices. Each super slice can > only have one thread at a time in TM suspend mode. The super slice > restricts ever entering a state where both threads are in suspend by > aborting

[PATCH v2] powerpc: configs: Add Skiroot defconfig

2017-10-03 Thread Joel Stanley
This configuration is used by the OpenPower firmware for it's Linux-as-bootloader implementation. Also known as the Petitboot kernel, this configuration broke in 4.12 (CPU_HOTPLUG=n), so add it to the upstream tree in order to get better coverage. Signed-off-by: Joel Stanley <j...@jms.id

[PATCH] powerpc: configs: Add Skiroot defconfig

2017-07-10 Thread Joel Stanley
This configuration is used by the OpenPower firmware for it's Linux-as-bootloader implementation. Also known as the Petitboot kernel, this configuration broke in 4.12 (CPU_HOTPLUG=n), so add it to the upstream tree in order to get better coverage. Signed-off-by: Joel Stanley <j...@jms.id

[PATCH] powerpc/powernv/idle: Put pnv_cpu_offline behind HOTPLUG_CPU

2017-07-02 Thread Joel Stanley
PU, so fix the build error by putting this code behind the same gard. Fixes: 900612315788 ("powerpc/powernv/smp: Add busy-wait loop as fall back for CPU-Hotplug"). Cc: <sta...@vger.kernel.org> # 4.12 Signed-off-by: Joel Stanley <j...@jms.id.au> --- arch/powerpc/platforms/powernv

Re: [PATCH 0/4] Support for the FSP2 476fpe board in arch/powerpc

2017-05-15 Thread Joel Stanley
Hey Ivan, Please use j...@jms.id.au when you cc me on patches. That other address won't work for most people. Cheers, Joel On Mon, May 15, 2017 at 10:37 PM, Ivan Mikhaylov wrote: > This adds support for the FSP2 (476fpe) board. This includes code in >

Re: [v8] powerpc/powernv: add 'firmware/exports' attributes to sysfs

2017-04-09 Thread Joel Stanley
On Thu, Apr 6, 2017 at 4:37 PM, Oliver O'Halloran wrote: > On Thu, Mar 30, 2017 at 10:28 AM, Matt Brown > wrote: >> The HDAT data area is consumed by skiboot and turned into a device-tree. In >> some cases we would like to look directly at the HDAT.

Re: [PATCH 05/12] drm/ast: Fix calculation of MCLK

2017-02-23 Thread Joel Stanley
On Fri, Feb 24, 2017 at 1:08 PM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > On Fri, 2017-02-24 at 12:54 +1030, Joel Stanley wrote: >> On Fri, Feb 24, 2017 at 9:23 AM, Benjamin Herrenschmidt >> <b...@kernel.crashing.org> wrote: >> > Some brac

Re: [PATCH v5 2/12] drm/ast: Handle configuration without P2A bridge

2017-02-23 Thread Joel Stanley
CU 0x40 D[12] to detect the window is > closed as to not trigger a bus error by just "trying". > (change provided by Y.C. Chen) > v4. [BenH] > - Only devices with the AST2000 PCI ID have a P2A bridge > - Update the P2A presence test to account for VGA only >

Re: [PATCH 07/12] drm/ast: Fixed vram size incorrect issue on POWER

2017-02-23 Thread Joel Stanley
.C. Chen <yc_c...@aspeedtech.com> Acked-by: Joel Stanley <j...@jms.id.au> > --- > drivers/gpu/drm/ast/ast_main.c | 6 +++--- > drivers/gpu/drm/ast/ast_post.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-)

Re: [PATCH 05/12] drm/ast: Fix calculation of MCLK

2017-02-23 Thread Joel Stanley
On Fri, Feb 24, 2017 at 9:23 AM, Benjamin Herrenschmidt wrote: > Some braces were missing causing an incorrect calculation. > > Y.C. Chen from Aspeed provided me with the right formula > which I tested on AST2400 and 2500. Y. C. Chen, can you point out this calculation

Re: [PATCH 04/12] drm/ast: Remove spurrious include

2017-02-23 Thread Joel Stanley
On Fri, Feb 24, 2017 at 9:23 AM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > --- > drivers/gpu/drm/ast/ast_main.c | 2 -- > 1 file changed, 2 deletions(-)

Re: [PATCH 01/12] drm/ast: Fix AST2400 POST failure without BMC FW or VBIOS

2017-02-23 Thread Joel Stanley
reviously by either the BMC own FW > or the VBIOS. This fixes it. > > Signed-off-by: Y.C. Chen <yc_c...@aspeedtech.com> > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > --- > drivers/gpu/drm/ast/ast_post.c | 38 +

Re: [PATCH 06/12] drm/ast: Base support for AST2500

2017-02-23 Thread Joel Stanley
d for coding style > mostly by Ben. This doesn't contain the BMC DRAM POST code which > is in a separate patch. > > Signed-off-by: Y.C. Chen <yc_c...@aspeedtech.com> > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au>

Re: [PATCH 08/12] drm/ast: Factor mmc_test code in POST code

2017-02-23 Thread Joel Stanley
> most of them return a boolean, some return a u32. > > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > -- > > v2. - Keep the split between the "test" and "test2" functions > as they

Re: [PATCH 12/12] drm/ast: Call open_key before enable_mmio in POST code

2017-02-23 Thread Joel Stanley
> Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > --- > drivers/gpu/drm/ast/ast_post.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 10/12] drm/ast: POST code for the new AST2500

2017-02-23 Thread Joel Stanley
tes from Aspeed (Y.C. Chen) and has been cleaned > up for coding style purposes by BenH. > > Signed-off-by: Y.C. Chen <yc_c...@aspeedtech.com> > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > -- > > v2

Re: [PATCH 09/12] drm/ast: Rename ast_init_dram_2300 to ast_post_chip_2300

2017-02-23 Thread Joel Stanley
> > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > --- > drivers/gpu/drm/ast/ast_post.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH 03/12] drm/ast: const'ify mode setting tables

2017-02-23 Thread Joel Stanley
On Fri, Feb 24, 2017 at 9:23 AM, Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > And fix some comment alignment & space/tabs while at it > > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> Acked-by: Joel Stanley <j...@jms.id.au> > --

Re: [PATCH 02/12] drm/ast: Handle configuration without P2A bridge

2017-02-23 Thread Joel Stanley
On Fri, Feb 24, 2017 at 9:23 AM, Benjamin Herrenschmidt wrote: > static int ast_get_dram_info(struct drm_device *dev) > { > + struct device_node *np = dev->pdev->dev.of_node; > struct ast_private *ast = dev->dev_private; > - uint32_t data, data2; >

Re: [PATCH] powerpc: opal-msglog: Report size of memcons log

2017-01-25 Thread Joel Stanley
On Wed, Jan 25, 2017 at 1:33 PM, Michael Ellerman <m...@ellerman.id.au> wrote: > Michael Ellerman <m...@ellerman.id.au> writes: > >> Joel Stanley <j...@jms.id.au> writes: >> >>> The OPAL memory console is reported to be size zero, as we do not

[PATCH] powerpc: opal-msglog: Report size of memcons log

2017-01-12 Thread Joel Stanley
The OPAL memory console is reported to be size zero, as we do not initialise the struct attr with any size information due to the size being variable. This leads users to think that the console is empty. Instead report the maximum size. Signed-off-by: Joel Stanley <j...@jms.id.au> ---

Re: powerpc: cmp -> cmpd for 64-bit

2016-12-13 Thread Joel Stanley
On Wed, Oct 26, 2016 at 8:51 PM, Michael Ellerman wrote: > On Thu, 2016-06-10 at 13:42:19 UTC, Segher Boessenkool wrote: >> PowerPC's "cmp" instruction has four operands. Normally people write >> "cmpw" or "cmpd" for the second cmp operand 0 or 1. But,

Re: [PATCH] powerpc: Define and use PPC_ELF_ABI_v2

2016-04-29 Thread Joel Stanley
ichael Ellerman <m...@ellerman.id.au> Reviewed-by: Joel Stanley <j...@jms.id.au> > --- > arch/powerpc/include/asm/code-patching.h | 6 +++--- > arch/powerpc/include/asm/ftrace.h| 2 +- > arch/powerpc/include/asm/kprobes.h | 4 ++-- > arch/powerpc/include/a

Re: error while trying to compile linux kernel with powerpc arch

2016-04-28 Thread Joel Stanley
Hello, On Thu, Apr 28, 2016 at 2:13 AM, Marwa Hamza wrote: > hello > every time i try to compile the linux kernel with arch=powerpc i got this > error > > WRAP arch / powerpc / boot / zImage.pseries > powerpc-linux-gnu-ld: unrecognized emulation mode: -T > Emulations

Re: [PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Joel Stanley
On Wed, Mar 2, 2016 at 12:06 PM, Michael Ellerman wrote: > We'd like folks working on drivers for powerpc to also Cc linuxppc-dev, > so we can be aware of what's going on in drivers and/or review the > changes. > > So add patterns to the powerpc MAINTAINERS section to catch

Re: [PATCH 1/3] powerpc/powernv: Add powernv_defconfig

2016-02-23 Thread Joel Stanley
t and the Intel ethernet drivers, but this is a good start. > > Signed-off-by: Jeremy Kerr <j...@ozlabs.org> Acked-by: Joel Stanley <j...@jms.id.au> > --- > arch/powerpc/configs/powernv_defconfig | 307 > + > 1 file changed, 307 ins

Re: [PATCH V3 1/2] powerpc/powernv: new function to access OPAL msglog

2016-02-11 Thread Joel Stanley
in xmon as well. > > Refactor the OPAL msglog code to create a new function, opal_msglog_copy(), > that copies to an arbitrary buffer. Separate the initialisation code into > generic memcons init and sysfs file creation. > > Signed-off-by: Andrew Donnellan <andrew.donnel...@au1.ib

Re: [PATCH V2 1/2] powerpc/powernv: new function to access OPAL msglog

2016-02-10 Thread Joel Stanley
On Tue, Feb 9, 2016 at 5:47 PM, Andrew Donnellan wrote: > Currently, the OPAL msglog/console buffer is exposed as a sysfs file, with > the sysfs read handler responsible for retrieving the log from the OPAL > buffer. We'd like to be able to use it in xmon as well. >

Re: [PATCH] powerpc/eeh: Fix PE location code

2016-01-19 Thread Joel Stanley
Hello Gavin, On Wed, Dec 2, 2015 at 3:55 PM, Gavin Shan wrote: > In eeh_pe_loc_get(), the PE location code is retrieved from the > "ibm,loc-code" property of the device node for the bridge of the > PE's primary bus. It's not correct because the property indicates > the

[kexec-lite 2/3] Add licence file

2015-08-31 Thread Joel Stanley
All of the source files contain the GPL2+ notice. Signed-off-by: Joel Stanley <j...@jms.id.au> --- COPYING | 339 1 file changed, 339 insertions(+) create mode 100644 COPYING diff --git a/COPYING b/COPYING new file mode

[kexec-lite 1/3] Add dependencies to the readme

2015-08-31 Thread Joel Stanley
Signed-off-by: Joel Stanley <j...@jms.id.au> --- README.md | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ca9ff2..4540d29 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,11 @@ kexec-lite == -A simple kexec for fla

[kexec-lite 3/3] Bump version to 1.0

2015-08-31 Thread Joel Stanley
Signed-off-by: Joel Stanley <j...@jms.id.au> --- kexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kexec.c b/kexec.c index a9f108e..d87d617 100644 --- a/kexec.c +++ b/kexec.c @@ -40,7 +40,7 @@ #include "kexec_memory_map.h" #include "kexec_tra

Re: [PATCH v4 3/6] cpufreq: powernv: Register for OCC related opal_message notification

2015-07-15 Thread Joel Stanley
Hello, On Mon, 2015-07-13 at 19:39 +0530, Shilpasri G Bhat wrote: diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index d0c18c9..1f59958 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -414,6 +415,71 @@ static

Re: [PATCH v2 1/2] powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform

2015-05-07 Thread Joel Stanley
Hello Vipin, On Thu, May 7, 2015 at 7:00 PM, Vipin K Parashar vi...@linux.vnet.ibm.com wrote: This patch adds support for FSP EPOW (Early Power Off Warning) and DPO (Delayed Power Off) events support for PowerNV platform. I reviewed this patch for the changes it made to the existing poweroff

Re: ppc64le crash in dm on 4.1+

2015-04-30 Thread Joel Stanley
On Fri, May 1, 2015 at 1:18 AM, Mike Snitzer snit...@redhat.com wrote: I just booted 3d99e3fe13d473ac4578c37f477a59b829530764 (linus' tree as of this morning) on a Tuletta and got the following: This is fixed with the following commit (which I just sent to Linus for 4.1-rc2 inclusion):

ppc64le crash in dm on 4.1+

2015-04-29 Thread Joel Stanley
Hello, I just booted 3d99e3fe13d473ac4578c37f477a59b829530764 (linus' tree as of this morning) on a Tuletta and got the following: [ 41.409033] Unable to handle kernel paging request for data at address 0x00d0 [ 41.409125] Faulting instruction address: 0xc0c29068 cpu 0x23:

[PATCH] powerpc/powernv: Silence SYSPARAM warning on boot

2015-04-29 Thread Joel Stanley
-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal-sysparam.c | 31 +- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc/platforms/powernv/opal-sysparam.c index 9d1acf2..2e52b47

[PATCH v2 2/3] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-04-01 Thread Joel Stanley
-by: Joel Stanley j...@jms.id.au --- V2: - remove unused return value from orderly_* - use correct command in orderly_poweroff - the reboot command will not have a proc knob to control it, so it can be made const and static include/linux/reboot.h | 3 ++- kernel/reboot.c| 53

[PATCH v2 3/3] powerpc/powernv: Reboot when requested by firmware

2015-04-01 Thread Joel Stanley
Use orderly_reboot so userspace will to shut itself down via the reboot path. This is required for graceful reboot initiated by the BMC, such as when a user uses ipmitool to issue a 'chassis power cycle' command. Signed-off-by: Joel Stanley j...@jms.id.au Acked-by: Michael Ellerman m

[PATCH v2 1/3] envctrl: Ignore orderly_poweroff return value

2015-04-01 Thread Joel Stanley
orderly_poweroff() unconditionally returns 0, so remove the dead code that checks the return value. A future patch will change the return type to void. Signed-off-by: Joel Stanley j...@jms.id.au --- drivers/sbus/char/bbc_envctrl.c | 3 +-- drivers/sbus/char/envctrl.c | 7 +-- 2 files

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Joel Stanley
Hi Andrew, On Wed, Apr 1, 2015 at 9:09 AM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 30 Mar 2015 12:45:32 +1030 Joel Stanley j...@jms.id.au wrote: The kernel has orderly_poweroff which allows the kernel to initiate a graceful shutdown of userspace, by running /sbin/poweroff

Re: [PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-31 Thread Joel Stanley
On Wed, Apr 1, 2015 at 3:22 PM, Anshuman Khandual khand...@linux.vnet.ibm.com wrote: +static int __orderly_poweroff(bool force) +{ + int ret; + + ret = run_cmd(reboot_cmd); Would it be poweroff_cmd instead of reboot_cmd ? Dont see poweroff_cmd getting used. Yes, good catch.

[PATCH 2/2] powerpc/powernv: Reboot when requested by firmware

2015-03-29 Thread Joel Stanley
Use orderly_reboot so userspace will to shut itself down via the reboot path. This is required for graceful reboot initiated by the BMC, such as when a user uses ipmitool to issue a 'chassis power cycle' command. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal

[PATCH 1/2] kernel/reboot.c: Add orderly_reboot for graceful reboot

2015-03-29 Thread Joel Stanley
on platforms that do not use ACPI. Signed-off-by: Joel Stanley j...@jms.id.au --- include/linux/reboot.h | 1 + kernel/reboot.c| 51 +++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/include/linux/reboot.h b/include/linux/reboot.h

Re: [PATCH v2] powernv: Add OPAL soft-poweroff routine

2015-02-10 Thread Joel Stanley
On Mon, Feb 9, 2015 at 8:09 PM, Vasant Hegde hegdevas...@linux.vnet.ibm.com wrote: + +#define SOFT_OFF 0x00 +#define SOFT_REBOOT 0x01 Better move these macros to opal.h as its coming from OPAL API? Okay. Mpe has already merged this, so I'll send a follow up. Also I think its to merge this

[PATCH v2] powernv: Add OPAL soft-poweroff routine

2015-01-29 Thread Joel Stanley
Register a notifier for a OPAL message indicating that the machine should prepare itself for a graceful power off. OPAL will tell us if the power off is a reboot or shutdown, but for now we perform the same orderly_poweroff action. Signed-off-by: Joel Stanley j...@jms.id.au --- v2: - combine

[PATCH] powernv: Add OPAL soft-poweroff routine

2015-01-29 Thread Joel Stanley
Register a notifier for a OPAL message indicating that the machine should prepare itself for a graceful power off. OPAL will tell us if the power off is a reboot or shutdown, but for now we perform the same orderly_poweroff action. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc

Re: [PATCH] cpuidle/powernv: Re-enable fastsleep at boot time

2014-11-18 Thread Joel Stanley
Hey Preeti, On Tue, Nov 18, 2014 at 5:26 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Commit dcb18694 Fix ipi on palmeto disabled fastsleep at boot time. I couldn't find this commit in any tree; upstream, mpe's next, nor powerkvm. I remember testing this as a workaround for the

Re: [PATCH] powerpc: Add POWER8 features to CPU_FTRS_POSSIBLE/ALWAYS

2014-08-06 Thread Joel Stanley
. Regardless they should all be in both masks so as to avoid any future bugs when the set of ALWAYS/POSSIBLE bits changes, or the masks themselves change. Signed-off-by: Michael Ellerman m...@ellerman.id.au Thanks for catching that. Acked-by: Joel Stanley j...@jms.id.au

[PATCH] powerpc: Add cputable definition for POWER8 DD1

2014-07-17 Thread Joel Stanley
.kernel_init_freeable+0x25c/0x33c .kernel_init+0x1c/0x120 .ret_from_kernel_thread+0x58/0x7c Fixes: d4e58e5928f8 (powerpc/powernv: Enable POWER8 doorbell IPIs) Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm/cputable.h | 1 + arch/powerpc/kernel/cputable.c | 20

[PATCH v2 0/3] POWER8 PMU bugfixes

2014-07-08 Thread Joel Stanley
and pointed out the fix. V2: Add comment from mpe Joel Stanley (3): powerpc/kvm: Remove redundant save of SIER AND MMCR2 powerpc/perf: Add PPMU_ARCH_207S define powerpc/perf: Clear MMCR2 when enabling PMU arch/powerpc/include/asm/perf_event_server.h | 3 +-- arch/powerpc/kvm

[PATCH v2 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

2014-07-08 Thread Joel Stanley
into MMCR2 will most likely have the effect of freezing counters. Fixes: 72cde5a88d37 (KVM: PPC: Book3S HV: Save/restore host PMU registers that are new in POWER8) Cc: sta...@vger.kernel.org Signed-off-by: Joel Stanley j...@jms.id.au Acked-by: Michael Ellerman m...@ellerman.id.au Acked-by: Paul

[PATCH v2 2/3] powerpc/perf: Add PPMU_ARCH_207S define

2014-07-08 Thread Joel Stanley
Instead of separate bits for every POWER8 PMU feature, have a single one for v2.07 of the architecture. This saves us adding a MMCR2 define for a future patch. Cc: sta...@vger.kernel.org Signed-off-by: Joel Stanley j...@jms.id.au Acked-by: Michael Ellerman m...@ellerman.id.au --- arch/powerpc

[PATCH v2 3/3] powerpc/perf: Clear MMCR2 when enabling PMU

2014-07-08 Thread Joel Stanley
to ensure that it is in a defined state when it starts using it. Fixes: e05b9b9e5c10 (powerpc/perf: Power8 PMU support) Cc: sta...@vger.kernel.org Signed-off-by: Joel Stanley j...@jms.id.au Acked-by: Michael Ellerman m...@ellerman.id.au --- arch/powerpc/perf/core-book3s.c | 3 +++ 1 file changed

[PATCH 0/3] POWER8 PMU bugfixes

2014-07-03 Thread Joel Stanley
and pointed out the fix. Joel Stanley (3): powerpc/kvm: Remove redundant save of SIER AND MMCR2 powerpc/perf: Add PPMU_ARCH_207S define powerpc/perf: Clear MMCR2 when enabling PMU arch/powerpc/include/asm/perf_event_server.h | 3 +-- arch/powerpc/kvm/book3s_hv_interrupts.S | 5 - arch

[PATCH 1/3] powerpc/kvm: Remove redundant save of SIER AND MMCR2

2014-07-03 Thread Joel Stanley
These two registers are already saved in the block above. Aside from being unnecessary, by the time we get down to the second save location r8 no longer contains MMCR2, so we are clobbering the saved value with PMC5. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/kvm

[PATCH 2/3] powerpc/perf: Add PPMU_ARCH_207S define

2014-07-03 Thread Joel Stanley
Instead of separate bits for every POWER8 PMU feature, have a single one for v2.07 of the architecture. This saves us adding a MMCR2 define for a future patch. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm/perf_event_server.h | 3 +-- arch/powerpc/perf/core-book3s.c

[PATCH 3/3] powerpc/perf: Clear MMCR2 when enabling PMU

2014-07-03 Thread Joel Stanley
to ensure that it is in a defined state when it starts using it. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/perf/core-book3s.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index a2ff1bd..bae697c 100644

Re: [PATCH] powerpc, kexec: Fix Processor X is stuck issue during kexec from ST mode

2014-06-12 Thread Joel Stanley
Hi Srivatsa, On Sat, Jun 7, 2014 at 7:16 AM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: And with the following hunk added (which I had forgotten earlier), it worked just fine on powernv :-) How are the patches coming along? I just hung a machine here while attempting to kexec.

[PATCH] powerpc/powernv: Fix reading of OPAL msglog

2014-06-10 Thread Joel Stanley
and return early. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal-msglog.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal-msglog.c b/arch/powerpc/platforms/powernv/opal-msglog.c index 1bb25b9..44ed78a

[PATCH 0/5] powerpc/powernv: OPAL sysparam sysfs fixes

2014-04-24 Thread Joel Stanley
These fix the issues I saw when testing the sysparam sysfs API. As some of the parameters are not available on the machine I was using, the error paths in the sysfs and OPAL code are tested, and were found to have some bugs. Joel Stanley (5): powerpc/powernv: Fix sysparam sysfs error handling

[PATCH 1/5] powerpc/powernv: Fix sysparam sysfs error handling

2014-04-24 Thread Joel Stanley
-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal-sysparam.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc/platforms/powernv/opal-sysparam.c index 0bd249a..cdaf145 100644 --- a/arch/powerpc

[PATCH 2/5] powerpc/powernv: Use ssize_t for sysparam return values

2014-04-24 Thread Joel Stanley
The OPAL calls are returning int64_t values, which the sysparam code stores in an int, and the sysfs callback returns ssize_t. Make code a easier to read by consistently using ssize_t. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal-sysparam.c | 11

[PATCH 3/5] powerpc/powernv: Check sysfs size before copying

2014-04-24 Thread Joel Stanley
The sysparam code currently uses the userspace supplied number of bytes when memcpy()ing in to a local 64-byte buffer. Limit the maximum number of bytes by the size of the buffer. --- arch/powerpc/platforms/powernv/opal-sysparam.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 4/5] powerpc/powernv: Fix typos in sysparam code

2014-04-24 Thread Joel Stanley
--- arch/powerpc/platforms/powernv/opal-sysparam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc/platforms/powernv/opal-sysparam.c index 21fdc0a..4b3367b 100644 ---

[PATCH 5/5] powerpc/powernv: Check sysparam size before creation

2014-04-24 Thread Joel Stanley
it at discovery time, and if the parameter is too large, do not create a sysfs entry for it. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/platforms/powernv/opal-sysparam.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal-sysparam.c b/arch/powerpc

Re: [PATCH 6/6] powerpc/powernv: Add support for POWER8 split core on powernv

2014-04-23 Thread Joel Stanley
Hi Mikey, On Thu, Apr 24, 2014 at 11:02 AM, Michael Neuling mi...@neuling.org wrote: +static DEVICE_ATTR(subcores_per_core, 0600, + show_subcores_per_core, store_subcores_per_core); Can we make this 644, so users can query the state of the system without being root? This is

Re: [PATCH 1/2] powerpc/powernv: Add OPAL message log interface

2014-03-31 Thread Joel Stanley
On Mon, Mar 31, 2014 at 10:29 PM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: + conbuf = phys_to_virt(be64_to_cpu(mc-obuf_phys)); + wrapped = be32_to_cpu(mc-out_pos) MEMCONS_OUT_POS_WRAP; + out_pos = be32_to_cpu(mc-out_pos) MEMCONS_OUT_POS_MASK; + Are there ordering

[PATCH v2 0/2] OPAL message log interface

2014-03-31 Thread Joel Stanley
reading header and data - Only read out_pos once - Check the return code before adding it to the number of bytes read Unlike V1, this version correctly reads out a wrapped buffer. Joel Stanley (2): powerpc/powernv: Add OPAL message log interface powerpc/powernv: Add invalid OPAL call arch

[PATCH v2 1/2] powerpc/powernv: Add OPAL message log interface

2014-03-31 Thread Joel Stanley
OPAL provides an in-memory circular buffer containing a message log populated with various runtime messages produced by the firmware. Provide a sysfs interface /sys/firmware/opal/msglog for userspace to view the messages. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm

[PATCH v2 2/2] powerpc/powernv: Add invalid OPAL call

2014-03-31 Thread Joel Stanley
This call will not be understood by OPAL, and cause it to add an error to it's log. Among other things, this is useful for testing the behaviour of the log as it fills up. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms

[PATCH 0/2] OPAL message log interface

2014-03-27 Thread Joel Stanley
', but all other references are to the OPAL message log. They have been tested on a POWER7+ machine running some recent firmware. Joel Stanley (2): powerpc/powernv: Add OPAL message log interface powerpc/powernv: Add invalid OPAL call arch/powerpc/include/asm/opal.h| 6 ++ arch

[PATCH 1/2] powerpc/powernv: Add OPAL message log interface

2014-03-27 Thread Joel Stanley
OPAL provides an in-memory circular buffer containing a message log populated with various runtime messages produced by the firmware. Provide a sysfs interface /sys/firmware/opal/messages for userspace to view the messages. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm

[PATCH 2/2] powerpc/powernv: Add invalid OPAL call

2014-03-27 Thread Joel Stanley
This call will not be understood by OPAL, and cause it to add an error to it's log. Among other things, this is useful for testing the behaviour of the log as it fills up. Signed-off-by: Joel Stanley j...@jms.id.au --- arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms

<    1   2   3