From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751596AbbIZOh0 (ORCPT ); Sat, 26 Sep 2015 10:37:26 -0400 Received: from mga11.intel.com ([192.55.52.93]:50570 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbbIZOhY (ORCPT ); Sat, 26 Sep 2015 10:37:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,592,1437462000"; d="scan'208";a="652772411" From: "Chen, Yu C" To: "Rafael J. Wysocki" CC: "Wysocki, Rafael J" , "jiang.liu@linux.intel.com" , "Zhang, Rui" , "Brown, Len" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" Subject: RE: [PATCH][RFC] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle Thread-Topic: [PATCH][RFC] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle Thread-Index: AQHQ0xFmaJpZnOghfE+M3UXyZPqqKJ5MNWgAgADQUsCAAAIRAIACHYcg Date: Sat, 26 Sep 2015 14:37:19 +0000 Message-ID: <36DF59CE26D8EE47B0655C516E9CE64026587434@SHSMSX101.ccr.corp.intel.com> References: <1439172686-16360-1-git-send-email-yu.c.chen@intel.com> <1921486.iFXFBYijSj@vostro.rjw.lan> <36DF59CE26D8EE47B0655C516E9CE64026586EF4@SHSMSX101.ccr.corp.intel.com> <1660650.dn5zct2eoN@vostro.rjw.lan> In-Reply-To: <1660650.dn5zct2eoN@vostro.rjw.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 t8QEbWog001607 Hi, Rafael, > -----Original Message----- > From: linux-pm-owner@vger.kernel.org [mailto:linux-pm- > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > Sent: Friday, September 25, 2015 9:57 PM > To: Chen, Yu C > Cc: Wysocki, Rafael J; jiang.liu@linux.intel.com; Zhang, Rui; Brown, Len; linux- > kernel@vger.kernel.org; linux-pm@vger.kernel.org > Subject: Re: [PATCH][RFC] ACPI / PM: Fix incorrect wakeup irq setting before > suspend-to-idle > > On Friday, September 25, 2015 06:42:41 AM Chen, Yu C wrote: > > Hi,Rafael, thanks a lot for your review, will resend v2 version. > > > > > -----Original Message----- > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > Sent: Friday, September 25, 2015 9:24 AM > > > To: Chen, Yu C > > > Cc: Wysocki, Rafael J; jiang.liu@linux.intel.com; Zhang, Rui; Brown, > > > Len; linux- kernel@vger.kernel.org; linux-pm@vger.kernel.org > > > Subject: Re: [PATCH][RFC] ACPI / PM: Fix incorrect wakeup irq > > > setting before suspend-to-idle > > > > > > On Monday, August 10, 2015 10:11:26 AM Chen Yu wrote: > > > > +#ifdef CONFIG_SUSPEND > > > > + set_wake_irq_freeze(irq); > > > > +#endif > > Alternatively, you can define an empty static inline stub of > set_wake_irq_freeze() for CONFIG_SUSPEND and avoid using IS_ENABLED() > even. > > But I'd rather define a global acpi_irq variable, store irq in it and access it > directly from acpi_freeze_prepare(). And it doesn't have to depend on > CONFIG_SUSPEND as it is just the IRQ number actually used by ACPI. > OK, I've convert it to a global variable acpi_inuse_irq. > BTW, I wonder if there are other places using acpi_gbl_FADT.sci_interrupt > directly which they shouldn't do? > I searched the code and found there are two other potential misuse of acpi_gbl_FADT.sci_interrupt, they are in acpi_os_remove_interrupt_handler and acpi_os_wait_events_complete, so I sent out a version 2 patch for them. > > Oh, do you mean the naming for this variable is un-suitable? OK, I'll > > change it to acpi_freeze_wake_irq > > No. What I mean is that in theory there may be multiple ACPI interrupts. > > But you need not care about this case because of the > > if (gsi != acpi_gbl_FADT.sci_interrupt) > return AE_BAD_PARAMETER; > check in acpi_os_install_interrupt_handler(). > OK, thanks! Best Regards, Yu ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥