From patchwork Fri Oct 23 23:37:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 55662 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9NNdjmC005385 for ; Fri, 23 Oct 2009 23:39:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbZJWXhz (ORCPT ); Fri, 23 Oct 2009 19:37:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751728AbZJWXhy (ORCPT ); Fri, 23 Oct 2009 19:37:54 -0400 Received: from relay2.sgi.com ([192.48.179.30]:54743 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752804AbZJWXhv (ORCPT ); Fri, 23 Oct 2009 19:37:51 -0400 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id E39F23040D8; Fri, 23 Oct 2009 16:37:55 -0700 (PDT) Received: from alcatraz.americas.sgi.com (alcatraz.americas.sgi.com [128.162.236.70]) by estes.americas.sgi.com (Postfix) with ESMTP id C8166700016A; Fri, 23 Oct 2009 18:37:55 -0500 (CDT) Received: from alcatraz.americas.sgi.com (localhost.localdomain [127.0.0.1]) by alcatraz.americas.sgi.com (8.13.8/8.12.10/erikj-RedHat-7.2-Eagan) with ESMTP id n9NNbtKI010967; Fri, 23 Oct 2009 18:37:55 -0500 Received: (from travis@localhost) by alcatraz.americas.sgi.com (8.13.8/8.13.8/Submit) id n9NNbs2Q010966; Fri, 23 Oct 2009 18:37:54 -0500 Message-Id: <20091023233754.668088000@alcatraz.americas.sgi.com> References: <20091023233743.439628000@alcatraz.americas.sgi.com> User-Agent: quilt/0.46-1 Date: Fri, 23 Oct 2009 18:37:47 -0500 From: Mike Travis To: Ingo Molnar , Thomas Gleixner , Andrew Morton Cc: Jack Steiner , Zhang Rui , Len Brown , Thomas Renninger , Bjorn Helgaas , Alexey Dobriyan , Myron Stowe , Feng Tang , Suresh Siddha , Yinghai Lu , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] SGI x86_64 UV: Limit the number of ACPI messages Content-Disposition: inline; filename=limit_acpi Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org --- linux.orig/drivers/acpi/fan.c +++ linux/drivers/acpi/fan.c @@ -243,6 +243,7 @@ int result = 0; int state = 0; struct thermal_cooling_device *cdev; + static int msgcnt; if (!device) return -EINVAL; @@ -267,7 +268,11 @@ goto end; } - dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id); + if (msgcnt < 4 || !limit_console_output(false)) { + dev_info(&device->dev, + "registered as cooling_device%d\n", cdev->id); + msgcnt++; + } device->driver_data = cdev; result = sysfs_create_link(&device->dev.kobj, --- linux.orig/drivers/acpi/processor_core.c +++ linux/drivers/acpi/processor_core.c @@ -775,6 +775,7 @@ struct acpi_processor *pr = NULL; int result = 0; struct sys_device *sysdev; + static int msgcnt; pr = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL); if (!pr) @@ -845,8 +846,11 @@ goto err_power_exit; } - dev_info(&device->dev, "registered as cooling_device%d\n", - pr->cdev->id); + if (msgcnt < 4 || !limit_console_output(false)) { + dev_info(&device->dev, "registered as cooling_device%d\n", + pr->cdev->id); + msgcnt++; + } result = sysfs_create_link(&device->dev.kobj, &pr->cdev->device.kobj, --- linux.orig/drivers/acpi/tables.c +++ linux/drivers/acpi/tables.c @@ -170,11 +170,16 @@ case ACPI_MADT_TYPE_LOCAL_SAPIC: { struct acpi_madt_local_sapic *p = - (struct acpi_madt_local_sapic *)header; - printk(KERN_INFO PREFIX - "LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n", - p->processor_id, p->id, p->eid, - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + (struct acpi_madt_local_sapic *)header; + + if (p->eid < 8 || !limit_console_output(false)) + printk(KERN_INFO PREFIX + "LSAPIC (acpi_id[0x%02x] " + "lsapic_id[0x%02x] " + "lsapic_eid[0x%02x] %s)\n", + p->processor_id, p->id, p->eid, + (p->lapic_flags & ACPI_MADT_ENABLED) ? + "enabled" : "disabled"); } break;