Hello community,

here is the log from the commit of package skiboot for openSUSE:Factory checked 
in at 2016-01-05 21:54:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/skiboot (Old)
 and      /work/SRC/openSUSE:Factory/.skiboot.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "skiboot"

Changes:
--------
--- /work/SRC/openSUSE:Factory/skiboot/skiboot.changes  2015-11-11 
10:30:09.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.skiboot.new/skiboot.changes     2016-01-05 
21:55:00.000000000 +0100
@@ -1,0 +2,24 @@
+Sat Jan  2 10:08:58 UTC 2016 - [email protected]
+
+- Update to 5.1.12
+  * opal-prd:
+    + Display an explict and obvious message if running on a 
+      system that does not support opal-prd, such as an IBM FSP 
+      based POWER system, where the FSP takes on the role of 
+      opal-prd.
+  * pflash:
+    + Fix a missing (C) header
+    + cherry-picked from master.
+  * General:
+    + Don't link with libgcc
+    + On some toolchains, we don't have libgcc available.
+  * POWER8 PHB (PCIe) specific:
+    + hw/phb3: Flush cache line after updating P/Q bits
+    + When doing an MSI EOI, we update the P and Q bits in the 
+      IVE.
+  * IBM FSP based machines:
+    + FSP: Give up PSI link on shutdown This clears up some 
+      erroneous SRCs (error logs) in some situations.
+    + Correctly report back Real Time Clock errors to host.
+
+-------------------------------------------------------------------

Old:
----
  skiboot-5.1.8.tar.gz

New:
----
  skiboot-5.1.12.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ skiboot.spec ++++++
--- /var/tmp/diff_new_pack.nO7LD3/_old  2016-01-05 21:55:01.000000000 +0100
+++ /var/tmp/diff_new_pack.nO7LD3/_new  2016-01-05 21:55:01.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package skiboot
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           skiboot
-Version:        5.1.8
+Version:        5.1.12
 Release:        0
 Summary:        Tools for OpenPower platform
 License:        Apache-2.0
@@ -28,8 +28,8 @@
 Source2:        opal-prd.socket
 BuildRequires:  linux-glibc-devel
 BuildRequires:  systemd-rpm-macros
-%{?systemd_requires}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%{?systemd_requires}
 ExclusiveArch:  ppc64 ppc64le
 
 %description
@@ -63,11 +63,11 @@
 make %{?_smp_mflags} -C external/gard/ 
 
 %install
-make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/opal-prd/ 
prefix=/usr install
-make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/gard/ 
prefix=/usr install
+make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/opal-prd/ 
prefix=%{_prefix} install
+make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/gard/ 
prefix=%{_prefix} install
 
 mkdir -p %{buildroot}/%{_unitdir}
-%__install -D -m 444 %{S:1} %{S:2} %{buildroot}%{_unitdir}/
+install -D -m 444 %{SOURCE1} %{SOURCE2} %{buildroot}%{_unitdir}/
 
 %pre -n opal-prd
 %service_add_pre opal-prd.service opal-prd.socket
@@ -85,7 +85,7 @@
 %defattr(-,root,root)
 %doc README
 %{_sbindir}/opal-prd
-%{_datadir}/man/man8/opal-prd.8.gz
+%{_mandir}/man8/opal-prd.8.gz
 %{_unitdir}/opal-prd.service
 %{_unitdir}/opal-prd.socket
 
@@ -93,6 +93,6 @@
 %defattr(-,root,root)
 %doc README
 %{_sbindir}/opal-gard
-%{_datadir}/man/man1/opal-gard.1.gz
+%{_mandir}/man1/opal-gard.1.gz
 
 %changelog

++++++ skiboot-5.1.8.tar.gz -> skiboot-5.1.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/Makefile.main 
new/skiboot-skiboot-5.1.12/Makefile.main
--- old/skiboot-skiboot-5.1.8/Makefile.main     2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/Makefile.main    2015-12-04 05:45:07.000000000 
+0100
@@ -157,7 +157,6 @@
 endif
 OBJS += $(LIBC) $(CCAN) $(DEVSRC_OBJ)
 OBJS_NO_VER = $(OBJS)
-EXTRA_LIBS = -Wl,-lgcc
 ALL_OBJS = $(OBJS) version.o
 
 ALL_OBJS_1 = $(ALL_OBJS) asm/dummy_map.o
@@ -167,12 +166,12 @@
        $(call Q,OBJCOPY, $(OBJCOPY) -O binary -S $^ $@, $@)
 
 $(TARGET).tmp.elf: $(ALL_OBJS_1) $(TARGET).lds $(KERNEL)
-       $(call Q,LD, $(CC) $(LDFLAGS) -T $(TARGET).lds $(ALL_OBJS_1) 
$(EXTRA_LIBS) -o $@, $@)
+       $(call Q,LD, $(CC) $(LDFLAGS) -T $(TARGET).lds $(ALL_OBJS_1) -o $@, $@)
 
 asm/real_map.o : $(TARGET).tmp.map
 
 $(TARGET).elf: $(ALL_OBJS_2) $(TARGET).lds $(KERNEL)
-       $(call Q,LD, $(CC) $(LDFLAGS) -T $(TARGET).lds $(ALL_OBJS_2) 
$(EXTRA_LIBS) -o $@, $@)
+       $(call Q,LD, $(CC) $(LDFLAGS) -T $(TARGET).lds $(ALL_OBJS_2) -o $@, $@)
 
 $(SUBDIRS):
        $(call Q,MKDIR,mkdir $@, $@)
@@ -204,8 +203,8 @@
 extract-gcov: extract-gcov.c
        $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) \
        -DTARGET__GNUC__=`echo '__GNUC__'|$(CC) -E -|grep -v '^#'` \
-       -DTARGET__GNUC_MINOR__=`echo '__GNUC__'|$(CC) -E -|grep -v '^#'` \
-       -O0 -g -I$(SRC) -o $@ $<,$<)
+       -DTARGET__GNUC_MINOR__=`echo '__GNUC_MINOR__'|$(CC) -E -|grep -v '^#'` \
+       -Wpadded -O0 -g -I$(SRC) -o $@ $<,$<)
 
 coverage-report: skiboot.info
        genhtml --branch-coverage -q -o $@ $<
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/core/console.c 
new/skiboot-skiboot-5.1.12/core/console.c
--- old/skiboot-skiboot-5.1.8/core/console.c    2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/core/console.c   2015-12-04 05:45:07.000000000 
+0100
@@ -290,6 +290,12 @@
        return count;
 }
 
+void flush_console_driver(void)
+{
+       if (con_driver && con_driver->flush != NULL)
+               con_driver->flush();
+}
+
 void set_console(struct con_ops *driver)
 {
        con_driver = driver;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/core/hmi.c 
new/skiboot-skiboot-5.1.12/core/hmi.c
--- old/skiboot-skiboot-5.1.8/core/hmi.c        2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/core/hmi.c       2015-12-04 05:45:07.000000000 
+0100
@@ -406,6 +406,17 @@
                        hmi_evt->u.xstop_error.xstop_reason
                                                |= nx_pbi_xstop_bits[i].reason;
 
+       /*
+        * Set NXDMAENGFIR[38] to signal PRD that service action is required.
+        * Without this inject, PRD will not be able to do NX unit checkstop
+        * error analysis. NXDMAENGFIR[38] is a spare bit and used to report
+        * a software initiated attention.
+        *
+        * The behavior of this bit and all FIR bits are documented in
+        * RAS spreadsheet.
+        */
+       xscom_write(flat_chip_id, NX_DMA_ENGINE_FIR, PPC_BIT(38));
+
        /* Send an HMI event. */
        queue_hmi_event(hmi_evt, 0);
        *event_generated = 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/core/platform.c 
new/skiboot-skiboot-5.1.12/core/platform.c
--- old/skiboot-skiboot-5.1.8/core/platform.c   2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/core/platform.c  2015-12-04 05:45:07.000000000 
+0100
@@ -37,6 +37,8 @@
 {
        printf("OPAL: Shutdown request type 0x%llx...\n", request);
 
+       flush_console_driver();
+
        if (platform.cec_power_down)
                return platform.cec_power_down(request);
 
@@ -48,6 +50,8 @@
 {
        printf("OPAL: Reboot request...\n");
 
+       flush_console_driver();
+
 #ifdef ENABLE_FAST_RESET
        /* Try a fast reset first */
        fast_reset();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/core/sensor.c 
new/skiboot-skiboot-5.1.12/core/sensor.c
--- old/skiboot-skiboot-5.1.8/core/sensor.c     2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/core/sensor.c    2015-12-04 05:45:07.000000000 
+0100
@@ -39,6 +39,7 @@
 {
        sensor_node = dt_new(opal_node, "sensors");
 
+       dt_add_property_string(sensor_node, "compatible", "ibm,opal-sensor");
        dts_sensor_create_nodes(sensor_node);
 
        /* Register OPAL interface */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.10.txt 
new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.10.txt
--- old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.10.txt      
1970-01-01 01:00:00.000000000 +0100
+++ new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.10.txt     
2015-12-04 05:45:07.000000000 +0100
@@ -0,0 +1,34 @@
+skiboot-5.1.10
+--------------
+
+skiboot-5.1.10 was released on Friday November 13th, 2015.
+
+skiboot-5.1.10 is the 11th stable release of 5.1, it follows skiboot-5.1.9
+(which was released October 30th, 2015).
+
+Skiboot 5.1.10 contains all fixes from skiboot-5.1.9 and is a minor bug
+fix release.
+
+Over skiboot-5.1.9, we have the following change:
+
+IBM FSP machines:
+- FSP: Handle Delayed Power Off initiated CEC shutdown with FSP in Reset/Reload
+
+  In a scenario where the DPO has been initiated, but the FSP then went into
+  reset before the CEC power down came in, OPAL may not give up the link since
+  it may never see the PSI interrupt. So, if we are in dpo_pending and an FSP
+  reset is detected via the DISR, give up the PSI link voluntarily.
+
+Generic:
+- sensor: add a compatible property
+  OPAL needs an extra compatible property "ibm,opal-sensor" to make
+  module autoload work smoothly in Linux for ibmpowernv driver.
+- console: Completely flush output buffer before power down and reboot
+  Completely flush the output buffer of the console driver before
+  power down and reboot.  Implements the flushing function for uart
+  consoles, which includes the astbmc and rhesus platforms.
+
+  This fixes an issue where some console output is sometimes lost before
+  power down or reboot in uart consoles. If this issue is also prevalent
+  in other console types then it can be fixed later by adding a .flush
+  to that driver's con_ops.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.11.txt 
new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.11.txt
--- old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.11.txt      
1970-01-01 01:00:00.000000000 +0100
+++ new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.11.txt     
2015-12-04 05:45:07.000000000 +0100
@@ -0,0 +1,16 @@
+skiboot-5.1.11
+--------------
+
+skiboot-5.1.11 was released on Friday November 13th, 2015.
+
+Since it was Friday 13th, we had to find a bug right after we tagged
+and released skiboot-5.1.10.
+
+skiboot-5.1.11 is the 12th stable release of 5.1, it follows skiboot-5.1.10
+(which was released November 13th, 2015).
+
+Skiboot 5.1.11 contains one additional bug fix over skiboot-5.1.10.
+
+It is:
+- On IBM FSP machines, if IPMI/Serial console is not connected during shutdown
+  or reboot, machine would enter termination state rather than shut down.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.12.txt 
new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.12.txt
--- old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.12.txt      
1970-01-01 01:00:00.000000000 +0100
+++ new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.12.txt     
2015-12-04 05:45:07.000000000 +0100
@@ -0,0 +1,44 @@
+skiboot-5.1.12
+--------------
+
+skiboot-5.1.12 was released on Friday December 4th, 2015.
+
+skiboot-5.1.12 is the 13th stable release of 5.1, it follows skiboot-5.1.11
+(which was released November 13th, 2015).
+
+Skiboot 5.1.12 contains bug fixes and a performance improvement.
+
+opal-prd:
+- Display an explict and obvious message if running on a system that does
+  not support opal-prd, such as an IBM FSP based POWER system, where the
+  FSP takes on the role of opal-prd.
+
+pflash:
+- Fix a missing (C) header
+  - cherry-picked from master.
+
+General:
+- Don't link with libgcc
+  - On some toolchains, we don't have libgcc available.
+
+POWER8 PHB (PCIe) specific:
+- hw/phb3: Flush cache line after updating P/Q bits
+    When doing an MSI EOI, we update the P and Q bits in the IVE. That causes
+    the corresponding cache line to be dirty in the L3 which will cause a
+    subsequent update by the PHB (upon recieving the next MSI) to get a few
+    retries until it gets flushed.
+
+    We improve the situation (and thus performance) by doing a dcbf
+    instruction to force a flush of the update we do in SW.
+
+    This improves interrupt performance, reducing latency per interrupt.
+    The improvement will vary by workload.
+
+IBM FSP based machines:
+- FSP: Give up PSI link on shutdown
+  This clears up some erroneous SRCs (error logs) in some situations.
+- Correctly report back Real Time Clock errors to host
+    Under certain rare error conditions, we could return an error code
+    to the host OS that would cause current Linux kernels to get stuck
+    in an infinite loop during boot.
+    This was introduced in skiboot-5.0-rc1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.9.txt 
new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.9.txt
--- old/skiboot-skiboot-5.1.8/doc/release-notes/skiboot-5.1.9.txt       
1970-01-01 01:00:00.000000000 +0100
+++ new/skiboot-skiboot-5.1.12/doc/release-notes/skiboot-5.1.9.txt      
2015-12-04 05:45:07.000000000 +0100
@@ -0,0 +1,16 @@
+skiboot-5.1.9
+-------------
+
+skiboot-5.1.9 was released on October 30th, 2015.
+
+skiboot-5.1.9 is the 10th stable release of 5.1, it follows skiboot-5.1.8
+(which was released October 19th, 2015).
+
+Skiboot 5.1.9 contains all fixes from skiboot-5.1.8 and is a minor bug
+fix release, with a single fix to help diagnosis after a rare error condition.
+
+Over skiboot-5.1.8, we have the following change:
+- opal/hmi: Signal PRD about NX unit checkstop.
+  We now signal Processor Recovery & Diagnostics (PRD) correctly following
+  an NX unit checkstop
+- minor fix to the boot_test.sh test script
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/external/boot-tests/bmc_support.sh 
new/skiboot-skiboot-5.1.12/external/boot-tests/bmc_support.sh
--- old/skiboot-skiboot-5.1.8/external/boot-tests/bmc_support.sh        
2015-10-19 04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/external/boot-tests/bmc_support.sh       
2015-12-04 05:45:07.000000000 +0100
@@ -37,6 +37,7 @@
 function flash {
        if [ ! -z "$PFLASH_TO_COPY" ]; then
                remotecp $PFLASH_TO_COPY $target /tmp/pflash
+               $SSHCMD chmod +x /tmp/pflash
                PFLASH_BINARY=/tmp/pflash
        fi
        if [ ! -z "$PNOR" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/external/opal-prd/opal-prd.c 
new/skiboot-skiboot-5.1.12/external/opal-prd/opal-prd.c
--- old/skiboot-skiboot-5.1.8/external/opal-prd/opal-prd.c      2015-10-19 
04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/external/opal-prd/opal-prd.c     2015-12-04 
05:45:07.000000000 +0100
@@ -1023,6 +1023,52 @@
        return rc;
 }
 
+bool find_string(const char *buffer, size_t len, const char *s)
+{
+       const char *c, *end;
+
+       if (!buffer)
+               return false;
+       c = buffer;
+       end = c + len;
+
+       while (c < end) {
+               if (!strcasecmp(s, c))
+                       return true;
+               c += strlen(c) + 1;
+       }
+       return false;
+}
+
+static int is_prd_supported(void)
+{
+       char *path;
+       int rc;
+       int len;
+       char *buf;
+
+       rc = asprintf(&path, "%s/ibm,opal/diagnostics/compatible",
+                     devicetree_base);
+       if (rc < 0) {
+               pr_log(LOG_ERR, "FW: error creating 'compatible' node path: 
%m");
+               return -1;
+       }
+
+       rc = open_and_read(path, (void *) &buf, &len);
+       if (rc)
+               goto out_free;
+
+       if (buf[len - 1] != '\0')
+               pr_log(LOG_INFO, "FW: node %s is not nul-terminated", path);
+
+       rc = find_string(buf, len, "ibm,opal-prd") ? 0 : -1;
+
+       free(buf);
+out_free:
+       free(path);
+       return rc;
+}
+
 static int prd_init(struct opal_prd_ctx *ctx)
 {
        int rc;
@@ -1945,6 +1991,12 @@
                action = ACTION_RUN_DAEMON;
        }
 
+       if (is_prd_supported() < 0) {
+               pr_log(LOG_ERR, "CTRL: PowerNV OPAL runtime diagnostic "
+                               "is not supported on this system");
+               return -1;
+       }
+
        switch (action) {
        case ACTION_RUN_DAEMON:
                rc = run_prd_daemon(ctx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/external/pflash/pflash.c 
new/skiboot-skiboot-5.1.12/external/pflash/pflash.c
--- old/skiboot-skiboot-5.1.8/external/pflash/pflash.c  2015-10-19 
04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/external/pflash/pflash.c 2015-12-04 
05:45:07.000000000 +0100
@@ -1,3 +1,19 @@
+/* Copyright 2013-2015 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/extract-gcov.c 
new/skiboot-skiboot-5.1.12/extract-gcov.c
--- old/skiboot-skiboot-5.1.8/extract-gcov.c    2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/extract-gcov.c   2015-12-04 05:45:07.000000000 
+0100
@@ -30,39 +30,48 @@
 #include <errno.h>
 #include <string.h>
 
-typedef unsigned int gcov_unsigned_int;
+typedef u32 gcov_unsigned_int;
 
 /* You will need to pass -DTARGET__GNUC__=blah when building */
+#if TARGET__GNUC__ >= 5 && TARGET__GNUC_MINOR__ >= 1
+#define GCOV_COUNTERS                   10
+#else
 #if TARGET__GNUC__ >= 4 && TARGET__GNUC_MINOR__ >= 9
 #define GCOV_COUNTERS                   9
 #else
 #define GCOV_COUNTERS                   8
-#endif
+#endif /* GCC 4.9 */
+#endif /* GCC 5.1 */
 typedef u64 gcov_type;
 
 struct gcov_info
 {
         gcov_unsigned_int version;
+       u32 _padding;
         struct gcov_info *next;
         gcov_unsigned_int stamp;
+       u32 _padding2;
         const char *filename;
-        void (*merge[GCOV_COUNTERS])(gcov_type *, unsigned int);
+        u64 merge[GCOV_COUNTERS];
         unsigned int n_functions;
+       u32 _padding3;
         struct gcov_fn_info **functions;
 };
 
 struct gcov_ctr_info {
         gcov_unsigned_int num;
+       u32 _padding;
         gcov_type *values;
-};
+}__attribute__((packed));
 
 struct gcov_fn_info {
         const struct gcov_info *key;
         unsigned int ident;
         unsigned int lineno_checksum;
         unsigned int cfg_checksum;
+       u32 _padding;
 //        struct gcov_ctr_info ctrs[0];
-};
+} __attribute__((packed));
 
 
 /* We have a list of all gcov info set up at startup */
@@ -137,7 +146,8 @@
        write_u32(fd, be32toh(gi->version));
        write_u32(fd, be32toh(gi->stamp));
 
-       //printf("nfunctions: %d \n", be32toh(gi->n_functions));
+       printf("version: %x\tstamp: %d\n", be32toh(gi->version), 
be32toh(gi->stamp));
+       printf("nfunctions: %d \n", be32toh(gi->n_functions));
 
        for(fn = 0; fn < be32toh(gi->n_functions); fn++) {
                functions = (struct gcov_fn_info**)
@@ -146,6 +156,8 @@
                fn_info = (struct gcov_fn_info*)
                        SKIBOOT_ADDR(addr, functions[fn]);
 
+               printf("function: %p\n", (void*)be64toh((u64)functions[fn]));
+
                write_u32(fd, GCOV_TAG_FUNCTION);
                write_u32(fd, GCOV_TAG_FUNCTION_LENGTH);
                write_u32(fd, be32toh(fn_info->ident));
@@ -161,9 +173,8 @@
 
                        write_u32(fd, (GCOV_TAG_FOR_COUNTER(ctr)));
                        write_u32(fd, be32toh(ctr_info->num)*2);
-                       /* printf(" ctr %d gcov_ctr_info->num %u\n",
-                        *    ctr, be32toh(ctr_info->num));
-                        */
+                       printf(" ctr %d gcov_ctr_info->num %u\n",
+                           ctr, be32toh(ctr_info->num));
 
                        for(cv = 0; cv < be32toh(ctr_info->num); cv++) {
                                gcov_type *ctrv = (gcov_type *)
@@ -192,6 +203,8 @@
               sizeof(struct gcov_ctr_info),
               sizeof(struct gcov_fn_info),
               sizeof(struct gcov_info));
+       printf("TARGET GNUC: %d.%d\n", TARGET__GNUC__, TARGET__GNUC_MINOR__);
+       printf("GCOV_COUNTERS: %d\n", GCOV_COUNTERS);
 
        if (argc < 3) {
                fprintf(stderr, "Usage:\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/hw/fsp/fsp-dpo.c 
new/skiboot-skiboot-5.1.12/hw/fsp/fsp-dpo.c
--- old/skiboot-skiboot-5.1.8/hw/fsp/fsp-dpo.c  2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/hw/fsp/fsp-dpo.c 2015-12-04 05:45:07.000000000 
+0100
@@ -30,7 +30,7 @@
 #define DPO_CMD_SGN_BYTE1      0x20 /* Byte[1] signature */
 #define DPO_TIMEOUT            2700 /* 45 minutes in seconds */
 
-static bool fsp_dpo_pending = false;
+bool fsp_dpo_pending = false;
 static unsigned long fsp_dpo_init_tb = 0;
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/hw/fsp/fsp-rtc.c 
new/skiboot-skiboot-5.1.12/hw/fsp/fsp-rtc.c
--- old/skiboot-skiboot-5.1.8/hw/fsp/fsp-rtc.c  2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/hw/fsp/fsp-rtc.c 2015-12-04 05:45:07.000000000 
+0100
@@ -173,19 +173,16 @@
                log_simple_error(&e_info(OPAL_RC_RTC_TOD),
                                "RTC TOD in invalid state\n");
                rtc_tod_state = RTC_TOD_INVALID;
-               rtc_read_request_state = RTC_READ_NO_REQUEST;
                break;
 
        case FSP_STATUS_TOD_PERMANENT_ERROR:
                log_simple_error(&e_info(OPAL_RC_RTC_TOD),
                        "RTC TOD in permanent error state\n");
                rtc_tod_state = RTC_TOD_PERMANENT_ERROR;
-               rtc_read_request_state = RTC_READ_NO_REQUEST;
                break;
 
        case FSP_STATUS_SUCCESS:
                /* Save the read RTC value in our cache */
-               rtc_read_request_state = RTC_READ_REQUEST_AVAILABLE;
                rtc_tod_state = RTC_TOD_VALID;
                datetime_to_tm(read_resp->data.words[0],
                               (u64) read_resp->data.words[1] << 32, &tm);
@@ -199,8 +196,8 @@
                log_simple_error(&e_info(OPAL_RC_RTC_TOD),
                                "RTC TOD read failed: %d\n", val);
                rtc_tod_state = RTC_TOD_INVALID;
-               rtc_read_request_state = RTC_READ_NO_REQUEST;
        }
+       rtc_read_request_state = RTC_READ_REQUEST_AVAILABLE;
 }
 
 static void opal_rtc_eval_events(bool read_write)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/hw/fsp/fsp.c 
new/skiboot-skiboot-5.1.12/hw/fsp/fsp.c
--- old/skiboot-skiboot-5.1.8/hw/fsp/fsp.c      2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/hw/fsp/fsp.c     2015-12-04 05:45:07.000000000 
+0100
@@ -569,6 +569,28 @@
         */
 }
 
+/*
+ * Called on normal/quick shutdown to give up the PSI link
+ */
+void fsp_reset_links(void)
+{
+       struct fsp *fsp = fsp_get_active();
+       struct fsp_iopath *iop;
+
+       if (!fsp)
+               return;
+
+       /* Already in one of the error states? */
+       if (fsp_in_hir(fsp) || fsp_in_reset(fsp))
+               return;
+
+       iop = &fsp->iopath[fsp->active_iopath];
+       prlog(PR_NOTICE, "FSP #%d: Host initiated shutdown."
+                       " Giving up the PSI link\n", fsp->index);
+       psi_disable_link(iop->psi);
+       return;
+}
+
 static void fsp_trace_event(struct fsp *fsp, u32 evt,
                            u32 data0, u32 data1, u32 data2, u32 data3)
 {
@@ -666,9 +688,23 @@
                if (fsp->state == fsp_mbx_rr)
                        return;
 
-               prlog(PR_NOTICE, "FSP #%d: FSP in Reset."
-                     " Waiting for PSI interrupt\n",
-                     fsp->index);
+               if (fsp_dpo_pending) {
+                       /*
+                        * If we are about to process a reset when DPO
+                        * is pending, its possible that the host has
+                        * gone down, and OPAL is on its way down and
+                        * hence will not see the subsequent PSI interrupt.
+                        * So, just give up the link here.
+                        */
+                       prlog(PR_NOTICE, "FSP #%d: FSP reset with DPO pending."
+                                       " Giving up PSI link\n",
+                                       fsp->index);
+                       psi_disable_link(psi);
+               } else {
+                       prlog(PR_NOTICE, "FSP #%d: FSP in Reset."
+                               " Waiting for PSI interrupt\n",
+                               fsp->index);
+               }
                fsp_start_rr(fsp);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/hw/lpc-uart.c 
new/skiboot-skiboot-5.1.12/hw/lpc-uart.c
--- old/skiboot-skiboot-5.1.8/hw/lpc-uart.c     2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/hw/lpc-uart.c    2015-12-04 05:45:07.000000000 
+0100
@@ -156,8 +156,11 @@
        return written;
 }
 
+static void uart_con_flush_all(void);
+
 static struct con_ops uart_con_driver = {
-       .write = uart_con_write
+       .write = uart_con_write,
+       .flush = uart_con_flush_all
 };
 
 /*
@@ -376,6 +379,15 @@
 }
 
 /*
+ * Flush the entire buffer all at once
+ */
+static void uart_con_flush_all(void)
+{
+       while(out_buf_prod != out_buf_cons)
+               uart_flush_out();
+}
+
+/*
  * Common setup/inits
  */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/hw/phb3.c 
new/skiboot-skiboot-5.1.12/hw/phb3.c
--- old/skiboot-skiboot-5.1.8/hw/phb3.c 2015-10-19 04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/hw/phb3.c        2015-12-04 05:45:07.000000000 
+0100
@@ -1035,7 +1035,7 @@
        return OPAL_SUCCESS;
 }
 
-static void phb3_pci_msi_check_q(struct phb3 *p, uint32_t ive_num)
+static bool phb3_pci_msi_check_q(struct phb3 *p, uint32_t ive_num)
 {
        uint64_t ive, ivc, ffi, state;
        uint8_t *q_byte;
@@ -1057,7 +1057,7 @@
 
                /* Q still not set, bail out */
                if (!(*q_byte & 0x1))
-                       return;
+                       return false;
        }
 
        /* Lock FFI and send interrupt */
@@ -1066,7 +1066,7 @@
                if (!state)
                        break;
                if (state == ~0ULL) /* PHB Fenced */
-                       return;
+                       return false;
        }
 
        /* Clear Q bit and update IVC */
@@ -1082,6 +1082,16 @@
         */
        ffi = SETFIELD(PHB_FFI_REQUEST_ISN, 0ul, ive_num) | PHB_FFI_LOCK_CLEAR;
        out_be64(p->regs + PHB_FFI_REQUEST, ffi);
+
+       return true;
+}
+
+static void phb3_pci_msi_flush_ive(struct phb3 *p, uint32_t ive_num)
+{
+       asm volatile("dcbf %0,%1"
+                    :
+                    : "b" (p->tbl_ivt), "r" (ive_num * IVT_TABLE_STRIDE * 8)
+                    : "memory");
 }
 
 static int64_t phb3_pci_msi_eoi(struct phb *phb,
@@ -1117,6 +1127,8 @@
        /* Handle Q bit */
        phb3_pci_msi_check_q(p, ive_num);
 
+       phb3_pci_msi_flush_ive(p, ive_num);
+
        return OPAL_SUCCESS;
 }
 
@@ -1627,8 +1639,10 @@
         * The OS should make sure the interrupt handler has
         * been installed already.
         */
-       if (prio != 0xff)
-               phb3_pci_msi_check_q(p, ive_num);
+       if (prio != 0xff) {
+               if (phb3_pci_msi_check_q(p, ive_num))
+                       phb3_pci_msi_flush_ive(p, ive_num);
+       }
 
        return OPAL_SUCCESS;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/include/console.h 
new/skiboot-skiboot-5.1.12/include/console.h
--- old/skiboot-skiboot-5.1.8/include/console.h 2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/include/console.h        2015-12-04 
05:45:07.000000000 +0100
@@ -51,6 +51,7 @@
        size_t (*write)(const char *buf, size_t len);
        size_t (*read)(char *buf, size_t len);
        bool (*poll_read)(void);
+       void (*flush)(void);
 };
 
 extern struct lock con_lock;
@@ -61,6 +62,8 @@
 extern bool __flush_console(bool flush_to_drivers);
 extern void set_console(struct con_ops *driver);
 
+extern void flush_console_driver(void);
+
 extern int mambo_read(void);
 extern void mambo_write(const char *buf, size_t count);
 extern void enable_mambo_console(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/include/fsp.h 
new/skiboot-skiboot-5.1.12/include/fsp.h
--- old/skiboot-skiboot-5.1.8/include/fsp.h     2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/include/fsp.h    2015-12-04 05:45:07.000000000 
+0100
@@ -802,6 +802,7 @@
 /* Reset/Reload */
 extern void fsp_reinit_fsp(void);
 extern void fsp_trigger_reset(void);
+extern void fsp_reset_links(void);
 
 /* FSP memory errors */
 extern void fsp_memory_err_init(void);
@@ -823,6 +824,7 @@
 
 /* DPO */
 extern void fsp_dpo_init(void);
+extern bool fsp_dpo_pending;
 
 /* Chiptod */
 extern void fsp_chiptod_init(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/libflash/ecc.c 
new/skiboot-skiboot-5.1.12/libflash/ecc.c
--- old/skiboot-skiboot-5.1.8/libflash/ecc.c    2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/libflash/ecc.c   2015-12-04 05:45:07.000000000 
+0100
@@ -108,6 +108,22 @@
         UE, UE, UE, UE,  4, UE, UE, UE, UE, UE, UE, UE, UE, UE, UE, UE,
 };
 
+static uint8_t parity(uint64_t data)
+{
+#ifdef __SKIBOOT__
+       uint8_t p;
+
+       asm volatile(
+               "popcntb %1,%0\n"
+               "prtyd   %1,%1\n"
+               : "=r"(p) : "r"(data));
+
+       return p;
+#else
+       return __builtin_parityl(data);
+#endif
+}
+
 /**
  * Create the ECC field corresponding to a 8-byte data field
  *
@@ -120,7 +136,7 @@
        uint8_t result = 0;
 
        for (i = 0; i < 8; i++)
-               result |= __builtin_parityl(eccmatrix[i] & data) << i;
+               result |= parity(eccmatrix[i] & data) << i;
 
        return result;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/libflash/file.c 
new/skiboot-skiboot-5.1.12/libflash/file.c
--- old/skiboot-skiboot-5.1.8/libflash/file.c   2015-10-19 04:21:40.000000000 
+0200
+++ new/skiboot-skiboot-5.1.12/libflash/file.c  2015-12-04 05:45:07.000000000 
+0100
@@ -277,6 +277,7 @@
 {
        struct file_data *file_data;
        if (bl) {
+               free(bl->ecc_prot.prot);
                file_data = container_of(bl, struct file_data, bl);
                free(file_data->name);
                free(file_data);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/skiboot-skiboot-5.1.8/platforms/ibm-fsp/common.c 
new/skiboot-skiboot-5.1.12/platforms/ibm-fsp/common.c
--- old/skiboot-skiboot-5.1.8/platforms/ibm-fsp/common.c        2015-10-19 
04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/platforms/ibm-fsp/common.c       2015-12-04 
05:45:07.000000000 +0100
@@ -222,6 +222,7 @@
        if (fsp_sync_msg(fsp_mkmsg(FSP_CMD_POWERDOWN_NORM, 1, request), true))
                return OPAL_INTERNAL_ERROR;
 
+       fsp_reset_links();
        return OPAL_SUCCESS;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/skiboot-skiboot-5.1.8/test/hello_world/Makefile.check 
new/skiboot-skiboot-5.1.12/test/hello_world/Makefile.check
--- old/skiboot-skiboot-5.1.8/test/hello_world/Makefile.check   2015-10-19 
04:21:40.000000000 +0200
+++ new/skiboot-skiboot-5.1.12/test/hello_world/Makefile.check  2015-12-04 
05:45:07.000000000 +0100
@@ -10,7 +10,7 @@
 test/hello_world/hello_kernel/hello_kernel.o: 
test/hello_world/hello_kernel/hello_kernel.S 
test/hello_world/hello_kernel/hello_kernel.ld
        $(call Q,CC, $(CC) -m64 -c -MMD -o $@ $< ,$@)
 
-hello_kernel_LDFLAGS=-m64 -Wl,--build-id=none -T 
test/hello_world/hello_kernel/hello_kernel.ld -ffreestanding -nostdlib 
-Ttext=0x0 -lgcc
+hello_kernel_LDFLAGS=-m64 -Wl,--build-id=none -T 
test/hello_world/hello_kernel/hello_kernel.ld -ffreestanding -nostdlib 
-Ttext=0x0
 
 -include $(wildcard test/hello_world/hello_kernel/*.d)
 


Reply via email to