Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840AbcD1Cad (ORCPT ); Wed, 27 Apr 2016 22:30:33 -0400 Received: from mga11.intel.com ([192.55.52.93]:45804 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502AbcD1Cab (ORCPT ); Wed, 27 Apr 2016 22:30:31 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,545,1455004800"; d="scan'208";a="968072523" From: "Zheng, Lv" To: "Rafael J. Wysocki" , "Chen, Yu C" CC: Lv Zheng , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "Wysocki, Rafael J" , "Brown, Len" Subject: RE: [PATCH v2 4/6] ACPI / osi: Fix default _OSI(Darwin) support Thread-Topic: [PATCH v2 4/6] ACPI / osi: Fix default _OSI(Darwin) support Thread-Index: AQHRoGJ+wF+cu9TY1U2YSLnqXSIF8p+dDCWAgADDbICAANs6IA== Date: Thu, 28 Apr 2016 02:30:26 +0000 Message-ID: <1AE640813FDE7649BE1B193DEA596E883BB82C18@SHSMSX101.ccr.corp.intel.com> References: <36DF59CE26D8EE47B0655C516E9CE64028748233@shsmsx102.ccr.corp.intel.com> <2223787.tzTyTqLAjo@vostro.rjw.lan> In-Reply-To: <2223787.tzTyTqLAjo@vostro.rjw.lan> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmFlZDgxNjAtNjFkZC00NzZkLTgwM2EtMGJhOTMwZjcyYjMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkZlWXdzZ0lcLzRLTnBKRFg3U05peUMzejR0b0I1eEl4aUx6c1h6a0gzajU0PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u3S2UdAi022905 Content-Length: 3301 Lines: 98 Hi, > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > Subject: Re: [PATCH v2 4/6] ACPI / osi: Fix default _OSI(Darwin) support > > On Wednesday, April 27, 2016 09:45:21 AM Chen, Yu C wrote: > > Hi Lv, > > > > > From: Zheng, Lv > > > Subject: [PATCH v2 4/6] ACPI / osi: Fix default _OSI(Darwin) support > > > > > > From: Chen Yu > > > > > > The following commit always reports positive value when Apple hardware > > > queries _OSI("Darwin"): > > > Commit: 7bc5a2bad0b8d9d1ac9f7b8b33150e4ddf197334 > > > Subject: ACPI: Support _OSI("Darwin") correctly However since this > > > implementation places the judgement in runtime, it breaks > acpi_osi=!Darwin > > > and cannot return unsupported for _OSI("WinXXX") invoked before invoking > > > _OSI("Darwin"). > > > > > > This patch fixes the issues by reverting the wrong support and implementing > > > the default behavior of _OSI("Darwin")/_OSI("WinXXX") on Apple hardware > via > > > DMI matching. > > > > > > Fixes: 7bc5a2bad0b8 ("ACPI: Support _OSI("Darwin") correctly") > > > Cc: # 3.18+ > > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111 > > > Reported-by: Lukas Wunner > > > Signed-off-by: Chen Yu > > > Signed-off-by: Lv Zheng > > > --- > > > drivers/acpi/blacklist.c | 23 ++++++++++++++++++ > > > drivers/acpi/osl.c | 58 > ++++++++++++++++++++++++++++++++++++++++--- > > > --- > > > include/linux/acpi.h | 1 + > > > 3 files changed, 75 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index > > > 96809cd..e947d3e 100644 > > > --- a/drivers/acpi/blacklist.c > > > +++ b/drivers/acpi/blacklist.c > > > @@ -133,6 +133,11 @@ int __init acpi_blacklisted(void) > > > return blacklisted; > > > } > > > #ifdef CONFIG_DMI > > > +static int __init dmi_enable_osi_darwin(const struct dmi_system_id *d) > > > +{ > > > + acpi_dmi_osi_darwin(1, d); /* enable */ > > > + return 0; > > > +} > > > static int __init dmi_enable_osi_linux(const struct dmi_system_id *d) { > > > acpi_dmi_osi_linux(1, d); /* enable */ > > > @@ -331,6 +336,24 @@ static struct dmi_system_id acpi_osi_dmi_table[] > > > __initdata = { > > > }, > > > }, > > > > > > + /* > > > + * Enable _OSI("Darwin") for all apple platforms. > > > + */ > > > + { > > > + .callback = dmi_enable_osi_darwin, > > > + .ident = "Apple hardware", > > > + .matches = { > > > + DMI_MATCH(DMI_SYS_VENDOR, "Apple INC."), > > > + }, > > > + }, > > > + { > > > + .callback = dmi_enable_osi_darwin, > > > + .ident = "Apple hardware", > > > + .matches = { > > > + DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, INC."), > > > + }, > > > + }, > > > + > > The vendor id should be 'Apple Inc.' and 'Apple Computer, Inc.' instead. > > If this is the only problem with this patch, I can fix it up. No need to resend. [Lv Zheng] This is the only problem. Thanks for the help. Best regards -Lv > > Thanks, > Rafael > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html