Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932321AbeALA2P (ORCPT + 1 other); Thu, 11 Jan 2018 19:28:15 -0500 Received: from mail-ot0-f170.google.com ([74.125.82.170]:46967 "EHLO mail-ot0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753877AbeALA2N (ORCPT ); Thu, 11 Jan 2018 19:28:13 -0500 X-Google-Smtp-Source: ACJfBotG+fk5cxylsUtJ2k2Ge6ZCbeSdsHXpgQ5Q0m62yGgX7L/cDww0o120YxCfhzLldpfYu7sK1nOVnhGjm8+3Das= MIME-Version: 1.0 In-Reply-To: <20180111190415.3jd4uffpp6weshzf@pd.tnic> References: <20180111150316.19951-1-Yazen.Ghannam@amd.com> <20180111190415.3jd4uffpp6weshzf@pd.tnic> From: "Rafael J. Wysocki" Date: Fri, 12 Jan 2018 01:28:12 +0100 X-Google-Sender-Auth: iziuXDizmZ3zGrfU_a6bOJUDaRs Message-ID: Subject: Re: [PATCH] PCI/ACPI: Disable AER when _OSC control bit is clear. To: Borislav Petkov Cc: "Rafael J. Wysocki" , "Ghannam, Yazen" , ACPI Devel Maling List , Linux Kernel Mailing List , Linux PCI , "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 8:04 PM, Borislav Petkov wrote: > On Thu, Jan 11, 2018 at 07:03:23PM +0100, Rafael J. Wysocki wrote: >> >> > + if (!(requested & control & OSC_PCI_EXPRESS_AER_CONTROL)) >> >> >> >> One of the operators above needs to be a && I suppose? >> >> >> > >> > It's a 3-way bitwise AND to check that OSC_PCI_EXPRESS_AER_CONTROL is >> > set in both "requested" and "control". >> > >> > IOW, we check if AER was requested by the OS and that the platform >> > granted the request. >> >> OK > > This definitely needs a comment - people will keep tripping over this. Fair enough.