[linux] 02/02: Add hppa/parisc bug fixesfrom Helge Deller

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Aug 25 17:30:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit 68c8135d739afc571cb03816942069d36b93ab62
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Aug 25 18:30:06 2016 +0100

    Add hppa/parisc bug fixesfrom Helge Deller
---
 debian/changelog                                   |  2 +
 ...x-automatic-selection-of-cr16-clocksource.patch | 64 ++++++++++++++++++++++
 ...c-fix-order-of-erefused-define-in-errno.h.patch | 38 +++++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 106 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f6b8819..7b71cc5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ linux (4.7.2-1) UNRELEASED; urgency=medium
     - usbip: Put all autotools-generated files in the build directory
     - linux-headers: Exclude all .cmd files
   * [arm*] Enable SECCOMP (Closes: #833183)
+  * [hppa] Fix automatic selection of cr16 clocksource
+  * [hppa] Fix order of EREFUSED define in errno.h
 
   [ Martin Michlmayr ]
   * [armhf] Enable MMC_SDHCI_IPROC and HW_RANDOM_BCM2835 for BCM2835.
diff --git a/debian/patches/bugfix/parisc/parisc-fix-automatic-selection-of-cr16-clocksource.patch b/debian/patches/bugfix/parisc/parisc-fix-automatic-selection-of-cr16-clocksource.patch
new file mode 100644
index 0000000..36b71c8
--- /dev/null
+++ b/debian/patches/bugfix/parisc/parisc-fix-automatic-selection-of-cr16-clocksource.patch
@@ -0,0 +1,64 @@
+From: Helge Deller <deller at gmx.de>
+Date: Fri, 19 Aug 2016 22:39:02 +0200
+Subject: [1/2] parisc: Fix automatic selection of cr16 clocksource
+Origin: https://git.kernel.org/linus/ae141830b118c3fb5b7eab6fa7c8ab7b7224b0a4
+
+Commit 54b66800907 (parisc: Add native high-resolution sched_clock()
+implementation) added support to use the CPU-internal cr16 counters as reliable
+clocksource with the help of HAVE_UNSTABLE_SCHED_CLOCK.
+
+Sadly the commit missed to remove the hack which prevented cr16 to become the
+default clocksource even on SMP systems.
+
+Signed-off-by: Helge Deller <deller at gmx.de>
+Cc: stable at vger.kernel.org # 4.7+
+---
+ arch/parisc/kernel/processor.c |  8 --------
+ arch/parisc/kernel/time.c      | 12 ------------
+ 2 files changed, 20 deletions(-)
+
+--- a/arch/parisc/kernel/processor.c
++++ b/arch/parisc/kernel/processor.c
+@@ -51,8 +51,6 @@ EXPORT_SYMBOL(_parisc_requires_coherency
+ 
+ DEFINE_PER_CPU(struct cpuinfo_parisc, cpu_data);
+ 
+-extern int update_cr16_clocksource(void);	/* from time.c */
+-
+ /*
+ **  	PARISC CPU driver - claim "device" and initialize CPU data structures.
+ **
+@@ -228,12 +226,6 @@ static int processor_probe(struct parisc
+ 	}
+ #endif
+ 
+-	/* If we've registered more than one cpu,
+-	 * we'll use the jiffies clocksource since cr16
+-	 * is not synchronized between CPUs.
+-	 */
+-	update_cr16_clocksource();
+-
+ 	return 0;
+ }
+ 
+--- a/arch/parisc/kernel/time.c
++++ b/arch/parisc/kernel/time.c
+@@ -220,18 +220,6 @@ static struct clocksource clocksource_cr
+ 	.flags			= CLOCK_SOURCE_IS_CONTINUOUS,
+ };
+ 
+-int update_cr16_clocksource(void)
+-{
+-	/* since the cr16 cycle counters are not synchronized across CPUs,
+-	   we'll check if we should switch to a safe clocksource: */
+-	if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) {
+-		clocksource_change_rating(&clocksource_cr16, 0);
+-		return 1;
+-	}
+-
+-	return 0;
+-}
+-
+ void __init start_cpu_itimer(void)
+ {
+ 	unsigned int cpu = smp_processor_id();
diff --git a/debian/patches/bugfix/parisc/parisc-fix-order-of-erefused-define-in-errno.h.patch b/debian/patches/bugfix/parisc/parisc-fix-order-of-erefused-define-in-errno.h.patch
new file mode 100644
index 0000000..162e4f8
--- /dev/null
+++ b/debian/patches/bugfix/parisc/parisc-fix-order-of-erefused-define-in-errno.h.patch
@@ -0,0 +1,38 @@
+From: Helge Deller <deller at gmx.de>
+Date: Sat, 20 Aug 2016 11:51:38 +0200
+Subject: [2/2] parisc: Fix order of EREFUSED define in errno.h
+Origin: https://git.kernel.org/linus/3eb53b20d7bd1374598cfb1feaa081fcac0e76cd
+
+When building gccgo in userspace, errno.h gets parsed and the go include file
+sysinfo.go is generated.
+
+Since EREFUSED is defined to the same value as ECONNREFUSED, and ECONNREFUSED
+is defined later on in errno.h, this leads to go complaining that EREFUSED
+isn't defined yet.
+
+Fix this trivial problem by moving the define of EREFUSED down after
+ECONNREFUSED in errno.h (and clean up the indenting while touching this line).
+
+Signed-off-by: Helge Deller <deller at gmx.de>
+Cc: stable at vger.kernel.org
+---
+ arch/parisc/include/uapi/asm/errno.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/parisc/include/uapi/asm/errno.h b/arch/parisc/include/uapi/asm/errno.h
+index c0ae62520d15..274d5bc6ecce 100644
+--- a/arch/parisc/include/uapi/asm/errno.h
++++ b/arch/parisc/include/uapi/asm/errno.h
+@@ -97,10 +97,10 @@
+ #define	ENOTCONN	235	/* Transport endpoint is not connected */
+ #define	ESHUTDOWN	236	/* Cannot send after transport endpoint shutdown */
+ #define	ETOOMANYREFS	237	/* Too many references: cannot splice */
+-#define EREFUSED	ECONNREFUSED	/* for HP's NFS apparently */
+ #define	ETIMEDOUT	238	/* Connection timed out */
+ #define	ECONNREFUSED	239	/* Connection refused */
+-#define EREMOTERELEASE	240	/* Remote peer released connection */
++#define	EREFUSED	ECONNREFUSED	/* for HP's NFS apparently */
++#define	EREMOTERELEASE	240	/* Remote peer released connection */
+ #define	EHOSTDOWN	241	/* Host is down */
+ #define	EHOSTUNREACH	242	/* No route to host */
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b254449..33c0b8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -45,6 +45,8 @@ bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
 debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
 
 # Arch bug fixes
+bugfix/parisc/parisc-fix-automatic-selection-of-cr16-clocksource.patch
+bugfix/parisc/parisc-fix-order-of-erefused-define-in-errno.h.patch
 
 # Arch features
 features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list