From patchwork Mon Jan 29 20:22:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yazen Ghannam X-Patchwork-Id: 10190589 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5119360375 for ; Mon, 29 Jan 2018 20:23:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 384D92889E for ; Mon, 29 Jan 2018 20:23:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D14E288A0; Mon, 29 Jan 2018 20:23:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C23312889E for ; Mon, 29 Jan 2018 20:23:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754247AbeA2UXK (ORCPT ); Mon, 29 Jan 2018 15:23:10 -0500 Received: from mail-co1nam03on0053.outbound.protection.outlook.com ([104.47.40.53]:29779 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753287AbeA2UXH (ORCPT ); Mon, 29 Jan 2018 15:23:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SAnt9Uv1m+Pi/mzJvYRmoSlKQzLDPRSY8t3rzQuuMXQ=; b=AtYQtectMF4Vwtkz5YsJ/O2bcLXJ8WMgg0A4qRWCNgmRHAspqDQBmJxqxAleCDdr4FBpPvBjl+JexuKmhXnenLwFGpeZ0IYVGxEsD9sPDii8BiSlGATpnRKG+8aKgLtuaR8wdH+LGqvf4heUVISpT4r7iF/iaPXdri5/BJN7q6U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yazen.Ghannam@amd.com; Received: from yaz-diesel.amd.com (165.204.78.1) by CY4PR12MB1911.namprd12.prod.outlook.com (10.175.82.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 20:23:06 +0000 From: Yazen Ghannam To: linux-acpi@vger.kernel.org Cc: Yazen Ghannam , linux-kernel@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org Subject: [PATCH] ACPI / processor_idle: Set default C1 state description Date: Mon, 29 Jan 2018 14:22:49 -0600 Message-Id: <20180129202249.12522-1-Yazen.Ghannam@amd.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR21CA0044.namprd21.prod.outlook.com (10.172.92.158) To CY4PR12MB1911.namprd12.prod.outlook.com (10.175.82.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7d7f37eb-0f12-4cb0-98c5-08d567561b30 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR12MB1911; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1911; 3:JGuIbIl3WdE6SpT4Eqbwo4hXwj97vHxs8HF1Az1825hAfzAQ8I0+F4OtiRaPeC48gRU8eEdJCGbV2sTQL5Aur4H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8VPIVhDQzarGnW4SxmDyJkurET/REkR59Tz22hiaTM+2dPpiAEBwpgokcZmm2umFx2xD3byoWzyilAt8+CKo6TmW+sAUVqiN5RQVfc4EbqZwevqNJXvTmRoWzoFvfBhXoJYWYQXJrQce60ls8nJoC3PlJ7hniOywUsJRGW8zKQ+oBx1fN5NCIcCeWv8BUk5R3u1/UaSTRrw2/tqAekBUEb9BD12XGwplcn4VWRRS80Oo6E2rgw/bK6sxmzinsC9GsZFUoT3UwnVpOZ6l7T6vr64; 4:XdSGkJ34ia+4HImUXI20ZaNwJSveh9hqFG8tnsbSaiO3NZjuwU1XAQfQMqaSj/djgalxNZSREBVxXHYyel+zmSEng4ubaq0Sw/KvKH8WXmoBPz2O95GHia+3O8xiXCHCP6qTvsPJUoxY3HNe3OC3XHvMkLD9MA9wlRlSj+Pl1F5GWCM0R/ByCCRPe7kmbFvODU1eLBIr3SDMv5OIgCoGc2XtjHp74Iq90jcJ7ToXw4euVD4ILpa/j0xYk0r3717c63bYLzaThz0vr/rSz2xJBXDjoyf2lJOT7YgTuRRWcZMOOETAEIsXpfKI5zawz2Kopyj36Ed6VjWno8vtA4onJQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR12MB1911; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1911; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(39380400002)(366004)(396003)(199004)(189003)(68736007)(25786009)(316002)(7736002)(7696005)(52116002)(6486002)(305945005)(4326008)(97736004)(478600001)(51416003)(72206003)(26005)(50466002)(386003)(105586002)(16586007)(48376002)(36756003)(2361001)(5660300001)(2906002)(53416004)(6666003)(86362001)(8936002)(2351001)(8676002)(81166006)(81156014)(106356001)(16526019)(6916009)(1076002)(47776003)(186003)(53936002)(50226002)(66066001)(3846002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1911; H:yaz-diesel.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1911; 23:ViH2yn2275S8hqxeQ+K7oN33UjK/g+o/ayyD+5vp8?= =?us-ascii?Q?VFLU2EwMF7Enl+C3yWcYQw+UZLrXN6/57zJBXJNaV0EC/KNlnfBoLALHSChZ?= =?us-ascii?Q?ZvD/KPzdhKnCM+CC6Zn5JoLqv1LBZRrjJ8wmibkPyIARwnHYBKXNGzgRcEMD?= =?us-ascii?Q?4VBSpiCrd1Ipp43qI8RwwA2O3RxsyvXCbo9aFYSyu2DPUC0lwEpEINYpjUFd?= =?us-ascii?Q?m7tCYMhhiidVzmXvTyWEvZ7dwB7gPDFPG737DhhvAimfZzJCjdTJ757NDtSi?= =?us-ascii?Q?unr5VasfjCHobZUPY/4gB0Wjg4gqn3Gpylphy975dzi2n6OAZWduWSDlnKv0?= =?us-ascii?Q?SL20wgTS3+akFjbN5GVdXJ++XqKMm3ODqeuGE9glwJIShWAhax8OcqBMZ3vJ?= =?us-ascii?Q?dgjze3O6dpzmbWJtblewG9xQNyi8dhBuxhVfOp1XdmSvJ0HirZfrEb7p91x+?= =?us-ascii?Q?heqAk+GEbbYk8ZSUB9MgprCUuzvCKCys12RbAAd6XeC49djMlNkrRKAERhj/?= =?us-ascii?Q?ZNBW6K7OvtAjvV2mHtfOx8PXi9VYs9YvT4yHuc0ZjAaNDvrijztLBal6Hvg5?= =?us-ascii?Q?36Dh3rIaZZduTU/NwZuPMrPHyMxjlpkyK902RkUVjDW/IhpC2dlF2fsJxzkC?= =?us-ascii?Q?lQGnsw9XRvQAQ4MrRU8wtEPezANcXX1+CNxtFhfDKegdSjSmGVYwo7mo4iQx?= =?us-ascii?Q?Qmot/vqr0fNXIQmr0p906/snQKv7qJCXB3AZ9o8FziQ1qi2MRTOkNL3N57tZ?= =?us-ascii?Q?huEO/aOE9096fACXLlu3wUUwrFc1SyjdcJw2ObKxiaqCTGdoaVepTF+JT+MX?= =?us-ascii?Q?KhftnLot9mTBtx1tlrisApAMeT8mWFtDwT3t3SyAaLutVx5/F6Dytzsp7ztu?= =?us-ascii?Q?QG77OtAaOEKk/iWscbtSQAUAN+itiKR66DxAuY8aDgRKPnj51b3MTzaZoQcx?= =?us-ascii?Q?Un6unyCUu6epbi6pn53IhIqbGkLxLOK9rNk7Soi0vbE9y3CrfMbqN1paWnu8?= =?us-ascii?Q?4RM7WlL2I2WSCve02DpnoZZJaTm5kl54UILw61RSARy3kf0bxplr2xknKbV+?= =?us-ascii?Q?w5QSBQOy84bSDW9ZtIZALPk3paayonZkgCGulp+TumjxS3CbNCFyfmY8NJvL?= =?us-ascii?Q?O8+rdQEqOGm+0GdVPEd6V5jyeTKxl4u?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1911; 6:YGTvnDvpd09PQnk58mXjtkdJrSi8F3Z0hAML7ExbSh96DkzHc9W+xcrALGacFkc9OdedMqFQn1pmzkewAhYEz1Ctr3M+WC2mNxy7QnHSpCX9QDRuEOuVPySoGgBITwHMSi0enJ1LwhE48SWDj/UwyjikV2gfnij0s8FgVWgsB7nOt2JAlg0BoHqeD0aYxW2OUvnaoc7yzO14M8Smx/yVNItI2iVnS2LLCGS5zfQastjXXTW4lsr5+JB5fQjU3DEjeK17HY1f8WIb6F5lyi1qCIyv2SXEvZFOrPwNCImgunpOPU7xebo8ooUrnPVrbVR6V8a2eWJO7GlAdnlnv9mGTpn1WedKjW+776GRkZ4Yx8s=; 5:UfifP4tMedPseeAfCI2B4QNVmFylBZOp+vD3TO1X8rOr4j2Z135yB7Q5vQABYx3Lc1Vu+FkYzsWkO0MxcWMtqllGl+WwITb6l0v+NcXgF/uIaW9CZrH8PrYK7yiyObPgbdHM/8Tyou0KSU2MSQ5pJWo/m7fy+pjImkZAuMvsWdg=; 24:bF3tSlguBesDoE1QtjeP0XV5WohOLJJphOliauZSiV+r03xgqud6AggbShydfH9xXiwn7X4LHCLiaoKZ0e9jh3zmLSXyeehe1ihhgUmJ9cw=; 7:Sa8SVF6qUnzGbsQCVb0xlpF6muAYZv2P6GilmXCEGxlFMdlCGaVvRgHyCXhCjh9dXbJbFIkkf285uPIthxPgY1lGBrUqKFWsZDADlyFc+n5PqDjwjpRESObwQii53dGRzgHbNxt+rG8BXU8SuLVJ8y7wHNytSRpNx1m4+hj2tkFJfpqXkAQI5FCwAz3/LcJdOW7yuRoSsYpLq8H1ilSHQv/n1KrYr3QZn0qqBBnwDyY6VhHoZqKu7LDuMrwFACo2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1911; 20:RmbNkZrV+kA+weNImqSZo2F802QGESHMvJSgABe0uT0aneOCWKN9jztd0U32hAHXXmgqDr/Xv8NXoBSRLRPLMUx1kBlXHW7TuiSofZAsJ6RXn/rAUJxfrOzgpmBnL3yXH6//53/UPLWnrfwOL1jr6eQCO4EwYyYqGF3Mb+m2aCqokkEbzB0Qd7WUPGOABE7FcAsdyHoZ9DRx3wUs6wpncDtQ8O1dSFIdx3i2D8AMm52RaV3kWp6SZSm1gmr7OWUe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 20:23:06.0530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d7f37eb-0f12-4cb0-98c5-08d567561b30 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1911 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yazen Ghannam The acpi_idle driver will default to ACPI_CSTATE_HALT for C1 if a _CST object for C1 is not defined. However, the description will not be set, so users will see "" when reading the description from sysfs. Set the C1 state description when defaulting to ACPI_CSTATE_HALT. Signed-off-by: Yazen Ghannam Cc: stable@vger.kernel.org --- drivers/acpi/processor_idle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 5f0071c7e2e1..abb559cd28d7 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -292,6 +292,9 @@ static int acpi_processor_get_power_info_default(struct acpi_processor *pr) pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; pr->power.states[ACPI_STATE_C1].valid = 1; pr->power.states[ACPI_STATE_C1].entry_method = ACPI_CSTATE_HALT; + + snprintf(pr->power.states[ACPI_STATE_C1].desc, + ACPI_CX_DESC_LEN, "ACPI HLT"); } /* the C0 state only exists as a filler in our array */ pr->power.states[ACPI_STATE_C0].valid = 1;