Re: [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access

2015-04-01 Thread Stewart Smith
r > Signed-off-by: Jeremy Kerr > Signed-off-by: Joel Stanley Acking that firmware calls are merged into skiboot. Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/powernv: Add opal-prd channel

2015-04-01 Thread Stewart Smith
t; Signed-off-by: Jeremy Kerr Acking that firmware interface is merged into skiboot and OPAL call number is correct. Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/powernv: Remove powernv RTAS support

2015-04-06 Thread Stewart Smith
Michael Ellerman writes: >> The only current place I could think this could be remotely possible >> would be in simulator... and we should instead make the OPAL calls work >> properly in the simulator for all the RTAS functionality (that we care >> about). > > If you mean mambo, I tested that, at

Re: [PATCH 1/2] powerpc/powernv: display reason for Malfunction Alert HMI.

2015-04-09 Thread Stewart Smith
ic. > > Signed-off-by: Mahesh Salgaonkar Acked in a the-api-is-present-in-firmware capacity. Although patch should be against opal-api.h now rather than opal.h, so that needs fixing before merging. So, Somewhat-Nearly-Acked-by: Stewart Smith

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-15 Thread Stewart Smith
Jacek Anaszewski writes: >> +static struct platform_driver powernv_led_driver = { >> +.probe = powernv_led_probe, >> +.remove = powernv_led_remove, >> +.driver = { >> +.name = "powernv-led-driver", >> +.owner = THIS_MODULE, >> +.of_match_table = pow

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-21 Thread Stewart Smith
Vasant Hegde writes: > On 04/16/2015 12:20 AM, Stewart Smith wrote: >> Jacek Anaszewski writes: >>>> +static struct platform_driver powernv_led_driver = { >>>> + .probe = powernv_led_probe, >>>> + .remove = powernv_led_remove, >>>> +

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-23 Thread Stewart Smith
Jacek Anaszewski writes: >> These device tree comes from out firmware ... which is immutable . > > How the firmware is related to kernel? These bindings are for kernel, > not for the firmware. > > DT bindings are compiled to *.dtb file which is concatenated with > zImage. During system boot device

Re: [PATCH v2 2/2] leds/powernv: Add driver for PowerNV platform

2015-04-28 Thread Stewart Smith
Jacek Anaszewski writes: > Is the DT node we are discussing used by some other drivers than the > LED class driver? Or is it required in this form by other components of > your platform? OS kernels are the chief consumers, Linux being the overwhelmingly major one here. But this is what firmware

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

2015-05-11 Thread Stewart Smith
trigg writes: >> --- a/arch/powerpc/include/asm/opal-api.h >> +++ b/arch/powerpc/include/asm/opal-api.h >> @@ -730,6 +730,36 @@ struct opal_i2c_request { >> __be64 buffer_ra; /* Buffer real address */ >> }; >> >> +/* >> + * EPOW status sharing (OPAL and the host) >> + * >> +

Re: [PATCH 3/3 v2] powerpc/powernv: Add opal-prd channel

2015-05-21 Thread Stewart Smith
Gupta > Signed-off-by: Jeremy Kerr Firmware bits are merged, available in current stable, skiboot-5.0.2 Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc: Add macros for the ibm_architecture_vec[] lengths

2014-09-08 Thread Stewart Smith
t least as correct as the code was before... so, Reviewed-by: Stewart Smith (not actually compiled or tested or anything, but my internal C preprocesser says it looks okay :) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [1/4] powerpc/powernv: Sync header with firmware

2014-10-02 Thread Stewart Smith
Michael Ellerman writes: >> +OpalEjtIoaDmaWriteMemTarget = 19, >> +}; > > I realise these come from the skiboot source, but they're just too ugly. > > Please use kernel style naming, like most of the rest of the file, eg: > > OPAL_ERR_INJECT_IOA_BUS_ERR You know what, I think I'd fe

Re: [PATCH 1/4] powerpc/powernv: Add OPAL check token call

2014-10-06 Thread Stewart Smith
l Neuling (checked the firmware code) Reviewed-by: Stewart Smith (although should we be checking if the call returns OPAL_PARAMETER? The opal call will return that if booting on firmware without OPAL_CHECK_TOKEN.. which granted, is pretty old firmware that I don't *think* we had leave the lab..

Re: [PATCH] powerpc/powernv: Fallback to old HMI handling behavior for old firmware

2014-10-06 Thread Stewart Smith
andler(OPAL_SOFTPATCH_HANDLER, 0, > glue); So.. that all looks fine, but another note: why are we doing the OPAL_SOFTPATCH_HANDLER and why is it all #if 0 out in skiboot? for this patch: Reviewed-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v8] powerpc/powernv: Poweroff (EPOW, DPO) events support for PowerNV platform

2015-06-10 Thread Stewart Smith
Vipin K Parashar writes: > This patch adds support for FSP (Flexible Service Processor) > EPOW (Early Power Off Warning) and DPO (Delayed Power Off) events for Not restricted to FSP systems, it's a generic OPAL API that any platform could implement. __

Re: [PATCH] powerpc/powernv: fix construction of opal PRD messages

2015-06-15 Thread Stewart Smith
t the > message body doesn't overlap the list_head. > > We also clarify the memcpy of the message, as we're copying unnecessary > bytes at the end of the message data. > > Signed-off-by: Jeremy Kerr Acked-by: Stewart Smith ___

Re: [PATCH 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-07 Thread Stewart Smith
, in which case this gives us the best chance for compatibility. Reviewed-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH V2 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-07 Thread Stewart Smith
Michael Ellerman writes: > On Wed, 2015-07-08 at 14:37 +1000, Samuel Mendoza-Jonas wrote: >> On powernv secondary cpus are returned to OPAL, and will then enter the >> target kernel in big-endian. However if it is set the HILE bit will persist, >> causing the first exception in the target kernel t

Re: [PATCH V2 2/2] powerpc/kexec: Reset HILE before kexec_sequence

2015-07-09 Thread Stewart Smith
Michael Ellerman writes: >> > I think a better API would be that opal_return_cpu() deals with this under >> > the >> > covers. I think we talked about that, so maybe there was some reason that >> > wasn't possible. >> >> opal_return_cpu() acts on current CPU which if we started flipping HILE >>

Re: [PATCH] rtc/rtc-opal: Enable alarms only when opal supports tpo

2015-07-14 Thread Stewart Smith
> > This patch fixes this issue by setting opal_rtc_ops.read/set_alarm > callback pointers only when tpo is supported. > > Acked-by: Michael Neuling > Acked-by: Neelesh Gupta > Signed-off-by: Vaibhav Jain Acked-by: Stewart Smith FWIW I'm updating OPAL docs with this. The TPO ca

Re: [RFC PATCH] powerpc/kexec: Wait 1s for secondaries to enter OPAL

2015-07-26 Thread Stewart Smith
Samuel Mendoza-Jonas writes: > Always include a timeout when waiting for secondary cpus to enter OPAL > in the kexec path, rather than only when crashing. This *sounds* reasonable... but I wonder what actual worse case could be and why we'd get stuck too long waiting for things? What was the ori

Re: [RFC PATCH] powerpc/kexec: Wait 1s for secondaries to enter OPAL

2015-07-29 Thread Stewart Smith
Benjamin Herrenschmidt writes: > On Tue, 2015-07-28 at 16:13 +1000, Samuel Mendoza-Jonas wrote: > >> "It sounds reasonable" was more or less the inspiration :) >> While I was going over some of the code relating to the previous kexec >> fix with Ben he pointed this out and suggested there wasn't >

Re: [PATCH v5 2/6] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-08-09 Thread Stewart Smith
Shilpasri G Bhat writes: > Add OPAL_MSG_OCC message definition to opal_message_type to receive > OCC events like reset, load and throttled. Host performance can be > affected when OCC is reset or OCC throttles the max Pstate. > We can register to opal_message_notifier to receive OPAL_MSG_OCC type

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

2015-08-09 Thread Stewart Smith
Shilpasri G Bhat writes: > diff --git a/drivers/cpufreq/powernv-cpufreq.c > b/drivers/cpufreq/powernv-cpufreq.c > index d0c18c9..a634199 100644 > --- a/drivers/cpufreq/powernv-cpufreq.c > +++ b/drivers/cpufreq/powernv-cpufreq.c > @@ -33,6 +33,7 @@ > #include > #include > #include /* Require

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

2015-08-10 Thread Stewart Smith
Shilpasri G Bhat writes: >> Also, do we export this information via sysfs somewhere? It would seem >> to want to go along with other cpufreq/cpu info there. > > No we don't export the throttling status of the cpu via sysfs. Since the > throttling state is common across the chip, the per_cpu export

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-25 Thread Stewart Smith
Gavin Shan writes: > On Mon, Jun 23, 2014 at 04:36:44PM +1000, Michael Neuling wrote: >>On Mon, 2014-06-23 at 12:14 +1000, Gavin Shan wrote: >>> The patch implements one OPAL firmware sysfs file to support PCI error >>> injection: "/sys/firmware/opal/errinjct", which will be used like the >>> way

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-25 Thread Stewart Smith
Gavin Shan writes: > +static struct kobj_attribute errinjct_attr = > + __ATTR(errinjct, 0600, NULL, errinjct_store); May also be good to have a read method that either lists current injected errors? I guess it depends on if they're one time errors or persistent errors too. __

[PATCH] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-03 Thread Stewart Smith
cross the board of STREAM benchmark results with this patch. Based on preliminary investigation and microbenchmarks by Prerna Saxena Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/kvm_host.h |1 + arch/powerpc/include/asm/ppc-opcode.h | 10 +++ arch/powerpc/in

[PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-07 Thread Stewart Smith
cross the board of STREAM benchmark results with this patch. Based on preliminary investigation and microbenchmarks by Prerna Saxena Signed-off-by: Stewart Smith -- changes since v1: - s/mppe/mpp_buffer/ - add MPP_BUFFER_ORDER define. --- arch/powerpc/include/asm/kvm_host.h |1 + arch/

Re: [PATCH v2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-08 Thread Stewart Smith
Hi! Thanks for review, much appreciated! Alexander Graf writes: > On 08.07.14 07:06, Stewart Smith wrote: >> @@ -1528,6 +1535,7 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc) >> int i, need_vpa_update; >> int srcu_idx; >> struct kvm_vcpu *vcpus

[PATCH v3] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-16 Thread Stewart Smith
cross the board of STREAM benchmark results with this patch. Based on preliminary investigation and microbenchmarks by Prerna Saxena Signed-off-by: Stewart Smith -- changes since v2: - based on feedback from Alexander Graf: - move save and restore of cache to separate functions - mov

Re: [PATCH v3] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-17 Thread Stewart Smith
Paul Mackerras writes: > On Thu, Jul 17, 2014 at 01:19:57PM +1000, Stewart Smith wrote: > >> The POWER8 processor has a Micro Partition Prefetch Engine, which is >> a fancy way of saying "has way to store and load contents of L2 or >> L2+MRU way of L3 cache".

Re: [PATCH v3] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-17 Thread Stewart Smith
Alexander Graf writes: >> diff --git a/arch/powerpc/include/asm/kvm_host.h >> b/arch/powerpc/include/asm/kvm_host.h >> index 1eaea2d..5769497 100644 >> --- a/arch/powerpc/include/asm/kvm_host.h >> +++ b/arch/powerpc/include/asm/kvm_host.h >> @@ -305,6 +305,8 @@ struct kvmppc_vcore { >> u32 a

[PATCH v4 0/2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV

2014-07-17 Thread Stewart Smith
changes since v3: - use kvmppc namespace - MPP_BUFFER_ORDER of 3 not 4, as we only need 32k and it's already 32k aligned - split out kvmppc_vcore_create in separate patch - give a variable a better name: s/tmp/mpp_addr/ - logmpp becomes static inline function Stewart Smith (2): Split out s

[PATCH v4 2/2] Use the POWER8 Micro Partition Prefetch Engine in KVM HV on POWER8

2014-07-17 Thread Stewart Smith
cross the board of STREAM benchmark results with this patch. Based on preliminary investigation and microbenchmarks by Prerna Saxena Signed-off-by: Stewart Smith -- changes since v3: - use kvmppc namespace - MPP_BUFFER_ORDER of 3 not 4, as we only need 32k and it's already 32k

[PATCH v4 1/2] Split out struct kvmppc_vcore creation to separate function

2014-07-17 Thread Stewart Smith
No code changes, just split it out to a function so that with the addition of micro partition prefetch buffer allocation (in subsequent patch) looks neater and doesn't require excessive indentation. Signed-off-by: Stewart Smith --- arch/powerpc/kvm/book3s_hv.c |

Re: [PATCH 2/2] powerpc/powernv: Improve error message

2014-07-23 Thread Stewart Smith
Vasant Hegde writes: > Presently we only support initiating Service Processor dump from host. > Hence update sysfs message. Also update couple of other error/info > messages. > > Signed-off-by: Vasant Hegde Acked-by: Stewart Smith _

Re: [PATCH 2/2] powerpc/powernv: Interface to add opal dump region

2014-07-23 Thread Stewart Smith
Vasant Hegde writes: > PowerNV platform is capable of capturing host memory region when system > crashes (because of host/firmware). We have new OPAL API to register > memory region to be capture when system crashes. > > This patch adds support for new API and also registers kernel log > buffer.

Re: [PATCH 1/2] powerpc/powernv: Change BUG_ON to WARN_ON in elog code

2014-07-23 Thread Stewart Smith
gt; Signed-off-by: Ananth N Mavinakayanahalli > Acked-by: Deepthi Dharwar So, it turns out the BUG_ON actually caught an FSP bug, at the very least in their documentation. The WARN_ON is probably the best thing we can do, along with the OPAL/skiboot side fixes that I've mentioned s

Re: [PATCH 1/4] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-07-28 Thread Stewart Smith
rld. Certainly the host really shouldn't BUG() for what is really a guest issue (actually.. this would be a good DoS attack on < Power8 host). Reviewed-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH] powerpc/powernv: Read opal error log and export it through sysfs interface.

2014-02-20 Thread Stewart Smith
Mahesh J Salgaonkar writes: > This patch adds support to read error logs from OPAL and export them > to userspace through sysfs interface /sys/firmware/opa/opal-elog. I think we could provide a better interface with instead having a file per log message appear in sysfs. We're never going to

[PATCH v2] powernv: don't attempt to refetch the FSP dump until the user has explicitly acked it.

2014-02-20 Thread Stewart Smith
retrieve the dump, leaving us with a dump in linux that was the correct size but all zeros. Changes since v1: fixed typo Signed-off-by: Stewart Smith Acked-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/powernv/opal-dump.c |8 1 file changed, 8 insertions(+) diff --git a/arch

Re: [PATCH v2] powernv: don't attempt to refetch the FSP dump until the user has explicitly acked it.

2014-02-20 Thread Stewart Smith
Michael Neuling writes: > Stewart Smith wrote: > >> This fixes a bug where we would get two events from OPAL with DUMP_AVAIL >> set (which is valid for OPAL to do) and in the second run of extract_dump() >> we would fail to free the memory previously allocated for the du

[PATCH] powerpc/powernv Platform dump interface

2014-02-24 Thread Stewart Smith
ot; when OPAL starts notifying us of all the dumps present. Signed-off-by: Stewart Smith --- Documentation/ABI/stable/sysfs-firmware-opal-dump | 29 ++ arch/powerpc/include/asm/opal.h | 12 + arch/powerpc/platforms/powernv/Makefile |2 +- arch/powerpc

Re: [PATCH] powerpc/powernv: Read opal error log and export it through sysfs interface.

2014-02-25 Thread Stewart Smith
Mahesh Jagannath Salgaonkar writes: >> I think we could provide a better interface with instead having a file >> per log message appear in sysfs. We're never going to have more than 128 >> of these at any one time on the Linux side, so it's not going to bee too >> many files. > > It is not jus

[PATCH v2] powerpc/powernv Platform dump interface

2014-02-25 Thread Stewart Smith
st work" when OPAL starts notifying us of all the dumps present. Changes since v1: - Add support for getting dump type from OPAL through new OPAL call (falling back to old OPAL_DUMP_INFO call if OPAL_DUMP_INFO2 isn't supported) - use dump type in directory name for

[PATCH] powerpc/powernv: Read OPAL error log and export it through sysfs

2014-02-27 Thread Stewart Smith
ested this pretty extensively and am rather confident that the linux side of things works rather well. There is currently an issue with the service processor side of things for >128 error logs though. Signed-off-by: Stewart Smith --- Documentation/ABI/stable/sysfs-firmwar

[PATCH v3] powerpc/powernv Platform dump interface

2014-03-02 Thread Stewart Smith
v1: - Add support for getting dump type from OPAL through new OPAL call (falling back to old OPAL_DUMP_INFO call if OPAL_DUMP_INFO2 isn't supported) - use dump type in directory name for dump Signed-off-by: Stewart Smith --- Documentation/ABI/stable/sysfs-firmware-opal-dump |

Re: [PATCH v3] powerpc/powernv Platform dump interface

2014-03-04 Thread Stewart Smith
Vasant Hegde writes: >> +Each dump has the following files: >> +id: An ASCII representation of the dump ID >> +in hex (e.g. '0x01') >> +type: An ASCII representation of the type of >> +

Re: [PATCH v3] powerpc/powernv Platform dump interface

2014-03-04 Thread Stewart Smith
Vasant Hegde writes: >> index 000..32fe7f5 >> --- /dev/null >> +++ b/Documentation/ABI/stable/sysfs-firmware-opal-dump >> @@ -0,0 +1,41 @@ >> +What: /sys/firmware/opal/dump >> +Date: Feb 2014 >> +Contact:Stewart Sm

Re: [PATCH] powerpc/powernv: Read OPAL error log and export it through sysfs

2014-03-04 Thread Stewart Smith
Vasant Hegde writes: >> +int64_t opal_send_ack_elog(uint64_t log_id); > > Stewart, > > Why are you creating 64bit log ID when actual ID is 32bit ? IIRC it's what OPAL gives us, even though FSP MBOX spec says 32bit. ___ Linuxppc-dev mailing list Linuxp

Re: [PATCH] powerpc/powernv: Read OPAL error log and export it through sysfs

2014-03-04 Thread Stewart Smith
Benjamin Herrenschmidt writes: > On Wed, 2014-03-05 at 08:56 +0530, Vasant Hegde wrote: >> On 03/05/2014 07:26 AM, Stewart Smith wrote: >> > Vasant Hegde writes: >> >>> +int64_t opal_send_ack_elog(uint64_t log_id); >> >> >> >> Stewart, &

Re: [PATCH] powerpc/powernv: Infrastructure to support OPAL async completion

2014-03-11 Thread Stewart Smith
Neelesh Gupta writes: > diff --git a/arch/powerpc/platforms/powernv/opal-async.c > b/arch/powerpc/platforms/powernv/opal-async.c > new file mode 100644 > index 000..cd0c135 > --- /dev/null > +++ b/arch/powerpc/platforms/powernv/opal-async.c > @@ -0,0 +1,203 @@ > +/* > + * PowerNV OPAL asynchr

Re: [PATCH 1/4] powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs

2014-03-26 Thread Stewart Smith
Anton Blanchard writes: > Using size_t in our APIs is asking for trouble, especially > when some OPAL calls use size_t pointers. > > Signed-off-by: Anton Blanchard Reviewed-by: Stewart Smith > --- > > Index: b/arch/power

Re: [PATCH 4/4] powerpc/powernv: Fix little endian issues OPAL error log code

2014-03-26 Thread Stewart Smith
Anton Blanchard writes: > Fix little endian issues with the OPAL error log code. > > Signed-off-by: Anton Blanchard Reviewed-by: Stewart Smith Do we also need any magic for the getting of error logs themselves? You may want to check the md5 of the logs themselves on

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

2014-03-30 Thread Stewart Smith
Joel Stanley writes: > 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. Acked-by: Stewart Smith

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-30 Thread Stewart Smith
Greg Kurz writes: > struct rtas_error_log { > +#ifdef __BIG_ENDIAN__ > + /* Byte 0 */ > unsigned long version:8;/* Architectural version */ > + /* Byte 1 */ I think it would be great if we got rid of the usage of bitfields. As soon as the mood of the compiler change

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-31 Thread Stewart Smith
Greg Kurz writes: > On Mon, 31 Mar 2014 09:27:16 +1100 > Stewart Smith wrote: >> Greg Kurz writes: >> > struct rtas_error_log { >> > +#ifdef __BIG_ENDIAN__ >> > + /* Byte 0 */ >> >unsigned long version:8;/* Architectural v

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-31 Thread Stewart Smith
Benjamin Herrenschmidt writes: > On Mon, 2014-03-31 at 09:27 +1100, Stewart Smith wrote: >> Greg Kurz writes: >> > struct rtas_error_log { >> > +#ifdef __BIG_ENDIAN__ >> > + /* Byte 0 */ >> >unsigned long version:8;/* Architect

Re: [PATCH v2] powerpc/le: enable RTAS events support

2014-04-07 Thread Stewart Smith
n Fontenot > Signed-off-by: Greg Kurz Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc/powernv Adapt opal-elog and opal-dump to new sysfs_remove_file_self API from (removed) sysfs_schedule_callback

2014-04-09 Thread Stewart Smith
A merge fix for powernv opal-dump and opal-elog code with driver-next Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-dump.c |9 ++--- arch/powerpc/platforms/powernv/opal-elog.c |9 ++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/arch

Re: [PATCH 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-20 Thread Stewart Smith
on crash every time you boot. Reviewed-by: Stewart Smith > --- > arch/powerpc/platforms/powernv/opal.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/powerpc/platforms/powernv/opal.c > b/arch/powerpc/platforms/powernv/opal.c > index f10b9ec..1db11

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-22 Thread Stewart Smith
Pranith Kumar writes: > On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman > wrote: >> On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote: >>> When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get() >>> return 0. Check for these return values and skip registering the dump

Re: [PATCH V2] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-28 Thread Stewart Smith
falling back looks good. (I find the hardcoding of snooze in the driver a bit odd, as is the hardcoding of max power states to 8 - which could bite us in the future if a future processor has more states... but these aren't problems with this patch) Acked-by: Stewart Smith __

Re: [PATCH V2] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-28 Thread Stewart Smith
Preeti U Murthy writes: > On 01/28/2015 02:45 PM, Stewart Smith wrote: >> Preeti U Murthy writes: >>> The device tree now exposes the residency values for different idle states. >>> Read >>> these values instead of calculating residency from the latency va

Re: [PATCH V3] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-01 Thread Stewart Smith
rthy Same acked-by as before, from perspective of "I merged the firmware side of things" and things look godo in relation to firmware PoV. Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-02-09 Thread Stewart Smith
-off-by: Joel Stanley I merged the firmware side of things, this looks like it implements what firmware exports. Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 02/18] powerpc/powernv: synchronize OPAL calls and return codes with firmware

2015-02-09 Thread Stewart Smith
This just leaves us with CXL vs CAPI as differences in the list of OPAL calls between opal.h in firmware and opal.h in Linux. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm

[PATCH 03/18] powerpc/powernv: s/OPAL_PCI_SET_PHB_CXL_MODE/OPAL_PCI_SET_PHB_CAPI_MODE/ to match firmware

2015-02-09 Thread Stewart Smith
OPAL/IBM calls it CAPI and Linux calls it CXL because CAPI was taken. In order to have opal.h match between firmware and Linux, we're going to just deal with one call used in a place be CAPI rather than CXL to match what's in firmware. Signed-off-by: Stewart Smith --- arch/powerpc/i

[PATCH 05/18] powerpc/powernv: synchronize opal.h whitespace with firmware

2015-02-09 Thread Stewart Smith
reduces the diff between linux and firmware header files significantly. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 51 +++ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc

[PATCH 10/18] powerpc/powernv: move OPAL API prototypes to opal-api.h

2015-02-09 Thread Stewart Smith
To further the cause of syncing opal.h between firmware and linux, move the function prototypes that were in opal.h out to opal-api.h and fix the associated includes. There are still a few places where opal.h is adequate. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal-api.h

[PATCH 15/18] powerpc/powernv: sync #includes in opal.h with firmware

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 2aaa861..b60a25a 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc

[PATCH 18/18] powerpc/powernv: s/OpalM64EnableAction/OpalM64Action/ and __be64 annotation

2015-02-09 Thread Stewart Smith
This finally syncs the content of opal.h between linux and firmware Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 68ce7ef

[PATCH 07/18] powerpc/powernv: make whitespace for OPAL_PM_* defines match firmware

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 7075f57..31b9656 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc

[PATCH 17/18] powerpc/powernv: s/u8/uint8_t/ to match firmware in opal.h

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 2441f36..68ce7ef 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc

[PATCH 13/18] powerpc/powernv: add remaining missing enums to opal.h

2015-02-09 Thread Stewart Smith
Some enums in firmware opal.h were missing from linux opal.h, add them. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h

[PATCH 16/18] powerpc/powernv: move SG_ENTRIES_PER_NODE to linux-specific opal-api.h

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal-api.h |4 arch/powerpc/include/asm/opal.h |4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h index c4009dd..172d08e

[PATCH 00/18] sync opal.h with firmware

2015-02-09 Thread Stewart Smith
e. In the process of doing this, I fixed a few things in firmware too, so this matches skiboot at 4681ed9, which is a little after the most recent skiboot release (4.1.1). The biggest change is moving the function prototypes for API calls out to opal-api.h. Stewart Smith (18): powerpc/powernv:

[PATCH 01/18] powerpc/powernv: sync OPAL API tokens with skiboot

2015-02-09 Thread Stewart Smith
This patch just matches whitespace and comments between the opal.h from firmware and that in linux. No addition/removal. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b

[PATCH 04/18] powerpc/powernv: relocate struct opal_sg_entry in opal.h to same place it is in firmware

2015-02-09 Thread Stewart Smith
For whatever reason these structures were in different places. Now they are not. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 48 +++ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b

[PATCH 06/18] powerpc/powernv: move OPAL_DUMP_REGION defines in opal.h to same place as in firmware opal.h

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 9ca5167..7075f57 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch

[PATCH 08/18] powerpc/powernv: Move OpalSysparamPerm, OpalMessageType in opal.h to match firmware

2015-02-09 Thread Stewart Smith
For whatever strange reason, these two structures were in different locations in opal.h in firmware and opal.h in Linux. Move them around to match firmware so that the diff is less. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 32 1 file

[PATCH 09/18] powerpc/powernv: match enum OpalMessageType with firmware

2015-02-09 Thread Stewart Smith
Adds OPAL_MSG_DPO and docs for OPAL_MSG_SHUTDOWN Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 3786c6b..2deaadf 100644 --- a/arch

[PATCH 12/18] powerpc/powernv: add CAPI and EPOW parts to opal.h

2015-02-09 Thread Stewart Smith
this adds CAPI and EPOW parts to opal.h that previously were only in firmware opal.h Currently unused, but gets us really close to being able to share opal.h between firmware and linux. Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 52

[PATCH 11/18] powerpc/powernv: make whitespace in enum OpalSysparamPerm match firmware

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 4373010..240ee1c 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc

[PATCH 14/18] powerpc/powernv: sync comments and whitespace in opal.h with firmware

2015-02-09 Thread Stewart Smith
Signed-off-by: Stewart Smith --- arch/powerpc/include/asm/opal.h | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index c09cf66..2aaa861 100644 --- a/arch/powerpc/include/asm/opal.h

Re: [PATCH 00/18] sync opal.h with firmware

2015-02-09 Thread Stewart Smith
Michael Ellerman writes: > I'm going to be a total pain, and suggest that this is the wrong approach :) > > I was on board until patch 15, where you have to add an #ifdef SKIBOOT to > guard > an include, and you have to remove an include on the Linux side. (the Linux include was actually not use

Re: [PATCH V4] powerpc, powernv: Add OPAL platform event driver

2015-02-10 Thread Stewart Smith
Vipin K Parashar writes: > (1) Environmental and Power Warning (EPOW) > (2) Delayed Power Off (DPO) > The user interface for this driver is /dev/opal_event character > device file where the user space clients can poll and read for > new opal platform events. The expected sequence of ev

[PATCH 0/3] Silence "OPAL called with invalid token" errors

2015-02-11 Thread Stewart Smith
. Stewart Smith (3): powerpc/powernv: only register log if OPAL supports doing so powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it arch/powerpc/platforms/powernv/opal-dump.c |3 ++- arch/powerpc

[PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so

2015-02-11 Thread Stewart Smith
Correct use of REGISTER/UNREGISTER is to check if the token exists before calling. If we don't we get a "OPAL: Called with bad token 101 !" error, which is harmless but may be alarming to some. Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal.c |6 +-

[PATCH 3/3] powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it

2015-02-11 Thread Stewart Smith
Not all OPAL platforms support resending system dumps, so check that current firmware supports it first. Otherwise we get firmware complaining: "OPAL: Called with bad token 91 !" Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-dump.c |3 ++- 1 file changed, 2

[PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it

2015-02-11 Thread Stewart Smith
Otherwise firmware complains: "OPAL: Called with bad token 74 !" as not all OPAL systems have the ability to resend error logs. Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-elog.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ar

Re: [PATCH V4] powerpc, powernv: Add OPAL platform event driver

2015-02-11 Thread Stewart Smith
Vipin K Parashar writes: >> - What do UPSs do? It would seem that some common "this is what's about >>to happen to your power" would almost *have* to exist somewhat >>generically? > UPS class tells about UPS status with system. FSP sends mbox messages > with UPS status along with > UPS st

Re: [PATCH 1/3] powerpc/powernv: Move OPAL API definitions to opal-api.h

2015-02-17 Thread Stewart Smith
gt; Signed-off-by: Michael Ellerman Acked-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC PATCH 3/3] powerpc/powernv: Remove unused definitions in opal-api.h

2015-02-17 Thread Stewart Smith
header to document the API for some important > reason, 3) they are not used and needn't be part of the API. > > Signed-off-by: Michael Ellerman Agree. The diff is now a TODO list for patches. Reviewed-by: Stewart Smith ___ Linuxp

Re: [PATCH 2/3] powerpc/powernv: Move opal-api.h closer to the Skiboot version

2015-02-17 Thread Stewart Smith
l" to the OPAL token OPAL_PCI_SET_PHB_CAPI_MODE. > > Signed-off-by: Michael Ellerman Reviewed-by: Stewart Smith ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH RESEND v2 0/7] powerpc/powernv: Unified PCI slot reset and hotplug

2015-02-17 Thread Stewart Smith
Gavin Shan writes: > The patchset was built based on patchset "powerpc/powernv: Simplify EEH > implementation", which can be found from: > > https://patchwork.ozlabs.org/patch/439956/ > > The patchset corresponds to skiboot changes, which manages PCI slots > in a unified way: OPAL APIs used to do

[PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls

2015-02-17 Thread Stewart Smith
se of these three warnings, it was OPAL_CHECK_TOKEN. Stewart Smith (3): powerpc/powernv: only register log if OPAL supports doing so powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it arch/powerpc/platforms/po

[PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it

2015-02-17 Thread Stewart Smith
Otherwise firmware complains: "OPAL: Called with bad token 74 !" as not all OPAL systems have the ability to resend error logs. Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-elog.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ar

[PATCH 3/3] powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it

2015-02-17 Thread Stewart Smith
Not all OPAL platforms support resending system dumps, so check that current firmware supports it first. Otherwise we get firmware complaining: "OPAL: Called with bad token 91 !" Signed-off-by: Stewart Smith --- arch/powerpc/platforms/powernv/opal-dump.c |3 ++- 1 file changed, 2

  1   2   3   >