[kernel] r5504 - dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches

Martin Michlmayr tbm at costa.debian.org
Wed Jan 18 01:03:08 UTC 2006


Author: tbm
Date: Wed Jan 18 01:03:07 2006
New Revision: 5504

Added:
   dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/64_ip22_fixes_hz_opt.dpatch
Log:
add patch from linux-mips git: Get rid of unnecessary prototypes. Fixes and
optimizations for HZ > 100


Added: dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/64_ip22_fixes_hz_opt.dpatch
==============================================================================
--- (empty file)
+++ dists/trunk/arch/mips/linux-patch-2.6.15-mips-2.6.15/debian/patches/64_ip22_fixes_hz_opt.dpatch	Wed Jan 18 01:03:07 2006
@@ -0,0 +1,151 @@
+#! /bin/sh -e
+## 64_ip22_fixes_hz_opt.dpatch by Ralf Baechle <ralf at linux-mips.org>
+##
+## DP: Get rid of unnecessary prototypes. Fixes and optimizations for HZ > 100
+## Upstream status: in linux-mips git
+
+# author	Ralf Baechle <ralf at linux-mips.org>
+# 	Sun, 15 Jan 2006 18:10:39 +0000 (18:10 +0000)
+# committer	Ralf Baechle <ralf at linux-mips.org>
+# 	Sun, 15 Jan 2006 18:10:39 +0000 (18:10 +0000)
+# commit	19dc0093ea4ce56fc98a6c815e0149dc47c6e9bd
+# tree	f793b4f365d0818850bcc0418abfb191b37844f2
+# parent	e4ce2d06d3c4b691557aeaf6bcf5e79d92855c3e
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+--- a/arch/mips/sgi-ip22/ip22-reset.c	2006-01-18 01:00:15.000000000 +0000
++++ b/arch/mips/sgi-ip22/ip22-reset.c	2006-01-18 01:00:15.000000000 +0000
+@@ -3,8 +3,9 @@
+  * License.  See the file "COPYING" in the main directory of this archive
+  * for more details.
+  *
+- * Copyright (C) 1997, 1998, 2001, 2003 by Ralf Baechle
++ * Copyright (C) 1997, 1998, 2001, 03, 05 by Ralf Baechle
+  */
++#include <linux/linkage.h>
+ #include <linux/init.h>
+ #include <linux/ds1286.h>
+ #include <linux/module.h>
+@@ -41,28 +42,10 @@ static struct timer_list power_timer, bl
+ 
+ #define MACHINE_PANICED		1
+ #define MACHINE_SHUTTING_DOWN	2
+-static int machine_state = 0;
+ 
+-static void sgi_machine_restart(char *command) __attribute__((noreturn));
+-static void sgi_machine_halt(void) __attribute__((noreturn));
+-static void sgi_machine_power_off(void) __attribute__((noreturn));
++static int machine_state;
+ 
+-static void sgi_machine_restart(char *command)
+-{
+-	if (machine_state & MACHINE_SHUTTING_DOWN)
+-		sgi_machine_power_off();
+-	sgimc->cpuctrl0 |= SGIMC_CCTRL0_SYSINIT;
+-	while (1);
+-}
+-
+-static void sgi_machine_halt(void)
+-{
+-	if (machine_state & MACHINE_SHUTTING_DOWN)
+-		sgi_machine_power_off();
+-	ArcEnterInteractiveMode();
+-}
+-
+-static void sgi_machine_power_off(void)
++static void ATTRIB_NORET sgi_machine_power_off(void)
+ {
+ 	unsigned int tmp;
+ 
+@@ -84,6 +67,21 @@ static void sgi_machine_power_off(void)
+ 	}
+ }
+ 
++static void ATTRIB_NORET sgi_machine_restart(char *command)
++{
++	if (machine_state & MACHINE_SHUTTING_DOWN)
++		sgi_machine_power_off();
++	sgimc->cpuctrl0 |= SGIMC_CCTRL0_SYSINIT;
++	while (1);
++}
++
++static void ATTRIB_NORET sgi_machine_halt(void)
++{
++	if (machine_state & MACHINE_SHUTTING_DOWN)
++		sgi_machine_power_off();
++	ArcEnterInteractiveMode();
++}
++
+ static void power_timeout(unsigned long data)
+ {
+ 	sgi_machine_power_off();
+@@ -95,7 +93,7 @@ static void blink_timeout(unsigned long 
+ 	sgi_ioc_reset ^= (SGIOC_RESET_LC0OFF|SGIOC_RESET_LC1OFF);
+ 	sgioc->reset = sgi_ioc_reset;
+ 
+-	mod_timer(&blink_timer, jiffies+data);
++	mod_timer(&blink_timer, jiffies + data);
+ }
+ 
+ static void debounce(unsigned long data)
+@@ -103,7 +101,7 @@ static void debounce(unsigned long data)
+ 	del_timer(&debounce_timer);
+ 	if (sgint->istat1 & SGINT_ISTAT1_PWR) {
+ 		/* Interrupt still being sent. */
+-		debounce_timer.expires = jiffies + 5; /* 0.05s  */
++		debounce_timer.expires = jiffies + (HZ / 20); /* 0.05s  */
+ 		add_timer(&debounce_timer);
+ 
+ 		sgioc->panel = SGIOC_PANEL_POWERON | SGIOC_PANEL_POWERINTR |
+@@ -151,7 +149,7 @@ static inline void volume_up_button(unsi
+ 		indy_volume_button(1);
+ 
+ 	if (sgint->istat1 & SGINT_ISTAT1_PWR) {
+-		volume_timer.expires = jiffies + 1;
++		volume_timer.expires = jiffies + (HZ / 100);
+ 		add_timer(&volume_timer);
+ 	}
+ }
+@@ -164,7 +162,7 @@ static inline void volume_down_button(un
+ 		indy_volume_button(-1);
+ 
+ 	if (sgint->istat1 & SGINT_ISTAT1_PWR) {
+-		volume_timer.expires = jiffies + 1;
++		volume_timer.expires = jiffies + (HZ / 100);
+ 		add_timer(&volume_timer);
+ 	}
+ }
+@@ -199,14 +197,14 @@ static irqreturn_t panel_int(int irq, vo
+ 	if (!(buttons & SGIOC_PANEL_VOLUPINTR)) {
+ 		init_timer(&volume_timer);
+ 		volume_timer.function = volume_up_button;
+-		volume_timer.expires = jiffies + 1;
++		volume_timer.expires = jiffies + (HZ / 100);
+ 		add_timer(&volume_timer);
+ 	}
+ 	/* Volume down button was pressed */
+ 	if (!(buttons & SGIOC_PANEL_VOLDNINTR)) {
+ 		init_timer(&volume_timer);
+ 		volume_timer.function = volume_down_button;
+-		volume_timer.expires = jiffies + 1;
++		volume_timer.expires = jiffies + (HZ / 100);
+ 		add_timer(&volume_timer);
+ 	}
+ 



More information about the Kernel-svn-changes mailing list