From patchwork Fri Feb 5 13:52:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Boyer X-Patchwork-Id: 44643 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id C6913B8287 for ; Sat, 6 Feb 2010 00:52:34 +1100 (EST) Received: from mail-yx0-f197.google.com (mail-yx0-f197.google.com [209.85.210.197]) by ozlabs.org (Postfix) with ESMTP id E156EB7D0C for ; Sat, 6 Feb 2010 00:52:26 +1100 (EST) Received: by yxe35 with SMTP id 35so3744438yxe.2 for ; Fri, 05 Feb 2010 05:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Cr1Njk4XtNHviWHKcVLIb1ha0rTzbeO3Q8Hhn5yPvQk=; b=oFaXGlqRtlch61c9rqD5jSoaqxj96ZyCOhrNhZvrc02TYaZ3gNaFW6HibmqyxdLxdv uvahFvLEVj5oi0HfkIFMJtjSBmheDzE/oAbSgD6U9Op0NvkBBVugd41a26kkYBl+2Pyh axvyossjfuYGNv8Of7823UaTbZzVcsjvS/8cU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=cDDDFS/Uv4Mtw6c2oU7ez2c31LG3g5j+PXv5TgWkT80/jvu2Df/se4IL+oJb8vuXsm FtBq9X9EgcjqIGNXRaww2h02jE7Q5lETUaXTkmaWApO1zboOOM9VPTpP32np1zjj6T0U XlkfaPpxp3wfU+Jv565fQTbUpLI+XrA4g2FA4= Received: by 10.151.125.4 with SMTP id c4mr4116792ybn.204.1265377944604; Fri, 05 Feb 2010 05:52:24 -0800 (PST) Received: from hansolo.jdub.homelinux.org (66-227-170-160.dhcp.aldl.mi.charter.com [66.227.170.160]) by mx.google.com with ESMTPS id 20sm1094510iwn.1.2010.02.05.05.52.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Feb 2010 05:52:23 -0800 (PST) Date: Fri, 5 Feb 2010 08:52:16 -0500 From: Josh Boyer To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/4] Fix G5 thermal shutdown Message-ID: <20100205135216.GH12001@hansolo.jdub.homelinux.org> References: <20100205133552.GF12001@hansolo.jdub.homelinux.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100205133552.GF12001@hansolo.jdub.homelinux.org> User-Agent: Mutt/1.5.19 (2009-01-05) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org This changes the thresholds for the liquid cooled G5 thermal shutdown mechanism to prevent an errant shutdown. This has been carried since about Fedora Core 5. I have no idea if it's really needed or not. Signed-off-by: David Woodhouse --- linux-2.6.15/drivers/macintosh/therm_pm72.c.orig 2006-04-02 21:34:48.000000000 +0100 +++ linux-2.6.15/drivers/macintosh/therm_pm72.c 2006-04-02 22:33:27.000000000 +0100 @@ -924,10 +925,16 @@ static void do_monitor_cpu_combined(void printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", temp_combi >> 16); state0->overtemp += CPU_MAX_OVERTEMP / 4; - } else if (temp_combi > (state0->mpu.tmax << 16)) + } else if (temp_combi > (state0->mpu.tmax << 16)) { state0->overtemp++; - else + printk(KERN_WARNING "Temperature %d above max %d. overtemp %d\n", + temp_combi >> 16, state0->mpu.tmax, state0->overtemp); + } else { + if (state0->overtemp) + printk(KERN_WARNING "Temperature back down to %d\n", + temp_combi >> 16); state0->overtemp = 0; + } if (state0->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state0->overtemp > 0) { @@ -999,10 +1015,16 @@ static void do_monitor_cpu_split(struct " (%d) !\n", state->index, temp >> 16); state->overtemp += CPU_MAX_OVERTEMP / 4; - } else if (temp > (state->mpu.tmax << 16)) + } else if (temp > (state->mpu.tmax << 16)) { state->overtemp++; - else + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", + state->index, temp >> 16, state->mpu.tmax, state->overtemp); + } else { + if (state->overtemp) + printk(KERN_WARNING "CPU %d temperature back down to %d\n", + state->index, temp >> 16); state->overtemp = 0; + } if (state->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state->overtemp > 0) { @@ -1061,10 +1097,16 @@ static void do_monitor_cpu_rack(struct c " (%d) !\n", state->index, temp >> 16); state->overtemp = CPU_MAX_OVERTEMP / 4; - } else if (temp > (state->mpu.tmax << 16)) + } else if (temp > (state->mpu.tmax << 16)) { state->overtemp++; - else + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", + state->index, temp >> 16, state->mpu.tmax, state->overtemp); + } else { + if (state->overtemp) + printk(KERN_WARNING "CPU %d temperature back down to %d\n", + state->index, temp >> 16); state->overtemp = 0; + } if (state->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state->overtemp > 0) { --- linux-2.6.15/drivers/macintosh/therm_pm72.h~ 2006-01-03 03:21:10.000000000 +0000 +++ linux-2.6.15/drivers/macintosh/therm_pm72.h 2006-04-02 22:25:58.000000000 +0100 @@ -243,7 +243,7 @@ struct dimm_pid_state #define CPU_TEMP_HISTORY_SIZE 2 #define CPU_POWER_HISTORY_SIZE 10 #define CPU_PID_INTERVAL 1 -#define CPU_MAX_OVERTEMP 30 +#define CPU_MAX_OVERTEMP 90 #define CPUA_PUMP_RPM_INDEX 7 #define CPUB_PUMP_RPM_INDEX 8