Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp662375lqo; Fri, 10 May 2024 10:40:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5OpDfvR1Ef1p5bx/tsWyBy58N8ufcCtlXpiZ3EI8C+HYVrjiBRD3GhKUHDbDtbUZ/+RGTUkCxkL9fs7JXB4iySzyO7x3KRJ/3ddSQsw== X-Google-Smtp-Source: AGHT+IEbYxT6wul/TOJc/r2ZhAlxRYSNWg6Ap8L47HASWfNIkd6bqjHkvIBLvTM81R3Pa+lUWd2W X-Received: by 2002:ac2:5b1e:0:b0:519:1047:7eac with SMTP id 2adb3069b0e04-5220fb746edmr2213542e87.23.1715362848591; Fri, 10 May 2024 10:40:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715362848; cv=pass; d=google.com; s=arc-20160816; b=Rynmj0oCquah5kdejCEr91QcgvrZy/vzSa4fU96Dwpkoo/tKVAHELhlWOCG9QekFOK IlIl5buBa8ICZZeyvvhu61EFhMOiOdUpPXM0J/SmU7iceZ9plqkE3t3QwFd4npgztO/4 w/U/gt6pCftKrBn0rydmX9+m+/fDX9teTsV/XPXGWcah6vEDU25cbeEk+trXae8i3Qo7 iJquVkfrCXlAvwNRsNMZZkAY3pWlzlDjC+9YJRPe9kAHdWVkeTNKm/thEsS4TQjGb1sl PQPUAbArBOUmWbNaxnHFB3R5JLQti69iSef+EcEE78RrAheKfNV6dMIYHxtn22J6BpW8 Bcxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=jOXX5byxEe18bz0YwJf9w+QbmDWtpuKFFdmwLvWm9yo=; fh=4/R9qJV5IUDPrYHQjJNxUYuhfn/JOSreriMLnc8jpoo=; b=Tohv1wwWeHQT1Rv23zkG2lnv4Kccj2z6I5F0yFdJGaxWHGwXgBRlZSsIrrxJyIQ6/W jijH+3W4E5GrgzPHiazrD22J6MjZDRiVUz6Zd4b5+oR21wg0MP6j+iK4QS2YV7DvFsyn VJoExBpEKIkUO1M243d/3/rHcjgowKFRgFVRJeWKYMV4xXUFu10bnfCpwC9YsG52pxpj 0INHvnLKdKWKgBPlc8yNmIcmPB4WlbeRceRrpK5HJtr2eFDpIxgeC6yb1JfTX0T/NtfT TIEPQOlkuKboEQym6tprC+7tjDHz6q03U8+mMARzrecIfodTurH76Q6j/6odb1NRS0kF r4bQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cpSn01bR; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-176059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733bec1876si2121905a12.173.2024.05.10.10.40.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 10:40:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=cpSn01bR; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-176059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D3B01F236A5 for ; Fri, 10 May 2024 17:40:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFBF71BDE6; Fri, 10 May 2024 17:40:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="cpSn01bR" Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FD131C68D; Fri, 10 May 2024 17:40:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715362840; cv=none; b=Wm6CrPPwPhdr8HLuTl5xSXjsxumRE03d+p798UwuanlQ0SRx2c4wvuoldmo/SYK4TsdDU/eCyoq3t86XNUZtnkN2G/xF+eU4tW0C/fKI598GXsTTmG/+ieBpI6091vUZN8/1CvZgLiOItfajRxdbk9jg5f5TExjMJbFQoxeNyJo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715362840; c=relaxed/simple; bh=ObWbmJdfzk15/jDOtllfPtSvyWp8b01uXGk4zbMPq2k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rQwfwY0LtSPPnMSf5Kya9rl5jPDRX/8ataBMtQGKdM4m3XfQAPnAd2mMWCFDGLCBm9XJ79AVNHyJT70E+RXTWJmNhjA1YbCBsKY4ja0BW96VqUbMbLEyAl4d4tnr4hKkUC92fMvEZBrhWEjvvIJKW1OVjng8iYvIN/Pzdwdw/I8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=cpSn01bR; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715362828; x=1715967628; i=w_armin@gmx.de; bh=jOXX5byxEe18bz0YwJf9w+QbmDWtpuKFFdmwLvWm9yo=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=cpSn01bRXinT3RpPDzBj+/bIFnyqGFQa9nDmFSIUrpm89gcPPBaF3AuuSRCgk+j1 ok+CUbrC6Faj2Wka6fw+AhGC/7W/o+i8MLj3yynTpkbAz0guyv0QZwwAynPv7hJri h9LYXQnI0wjwl2uz0LNRaGZpOtx+tbB1dGvmqEWySpr6eyMKQyeWZ52YP7vxBjnem IUand5gefM0WkGTjjIwFLVGVp46tiSAy6AqKVoUmWOvhbLimh2OKDeMj7lN42A5z9 Y+pa6u4VZ8NPedqrqdU6RqgXHZ43WZOZN9DC/7zDL+BbxIDW2yfkaE4jwWvdszsI7 zEAoHfgPZvwK0NCJ6g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [141.30.226.129] ([141.30.226.129]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mg6Zq-1sWXqs0a4M-00ebZj; Fri, 10 May 2024 19:40:28 +0200 Message-ID: Date: Fri, 10 May 2024 19:40:27 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/2] platform/x86: wmi: Remove custom EC address space handler To: "Rafael J. Wysocki" , Linux ACPI Cc: LKML , Andy Shevchenko , Hans de Goede , Mario Limonciello , Heikki Krogerus References: <5787281.DvuYhMxLoT@kreacher> <2332870.ElGaqSPkdT@kreacher> Content-Language: en-US From: Armin Wolf In-Reply-To: <2332870.ElGaqSPkdT@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:QDd3E+DAJSyHABXbMK64G5eOa6kKTlpFdhvrdSzXk93WckfBivN KeypSRreKchFAe3LTNWDDic843VxT75AWzeRbtRkJCwVyfie5M4V4+C7OGkIJLkc7KM50xN DRyeb5txhAf0R/uwKVPVS3gCT5DT3EkgFe1bgVO7Z7xPj0kTb+h/VXz/mlfgZvQvoohBCF5 3oMX6Sz4KnVpaZXTt7BcQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:u81cezJJvhY=;qWfFEO3cN8PrxOrzwdMWcUWEKc8 fk0tJrFWx/wbLy4IzJqk0dbXOjXNYEIFZxtvQ8eoaRvbzT+EWcamKlQLPchpoCa8kwzsheXiG Ya1+jjiWxtOlvRB/7WeuswOB86tqgseDV/nCXnIevnMRgdf2lq+GM/ebAWWmKZh0oYdPi2TB8 45JytlKAQRcbmXUErWcoAJH3q0CpwwFIECcr3SArvE2Kbe2vFq9irNfvWB+wJi5Aa/toUzk9Q EDENv5b78tq0mUn4XCcXE2wokU0mJZjIqseZPEIv5/R3J1NGUcgzh9KvbXvU7/FhkQVBeFtBG kxy7SqZ6RShkgf60s5R4KDYa1+X2caWMNqTc6TjrpsZZtRnwB1MZEMeeLsKKnv0RggpxnkVha aT5Z2R9dbJ3qVVGjz9b0++UbbMvEgc4v9+J9RusX8VJTH30q6QvYKYSjaGCYIgGCNpwMyKYxR DhtUjeNLBfoA0CY++KlB0tBEhXJHTRBO9CHiYiYMczKcboxmleUSRdhLZBfX38qJN4gJNztVl IeTKIvaHuRSg6z3I12Ec3jG0EthjzRjQejh8vr2El62uHtUhlAOY6TILJ9pJ41JH+m0wffyv9 7rFJK+6oN3ABINuRl9/rUgIAwJucuvzpOy+BO2fyPvbZGKXsFZxA41XfmpeoF8xVqzEZWnROH gnyCf0mj/QflXwFQfcTLGLUTv/OtgCIbYzAXjeW14P/B5+4RXnxPZaBGAm27tZFCM+vkLewB7 MaAXQKBnvi4WBOTflTRxv/kSjYxggwLKF1a3xMS9tAhvJrBPJBde5PlvHa9BbYUqgOHdI2lIi LbOXDB69YasmkUukaQGZyh8i1RqOXTnfz1hNXrvw6l1Bw= Am 10.05.24 um 16:04 schrieb Rafael J. Wysocki: > From: Rafael J. Wysocki > > The custom EC address space handler in the WMI driver was only needed > because the EC driver did not install its address space handler for > EC operation regions beyond the EC device scope in the ACPI namespace. > > That has just changed, so the custom EC address handler is not needed > any more and it can be removed. The patch seems ok to me, but it might conflict with pdx86/for-next. Other than that: Reviewed-by: Armin Wolf > Signed-off-by: Rafael J. Wysocki > --- > drivers/platform/x86/wmi.c | 62 ------------------------------------= --------- > 1 file changed, 62 deletions(-) > > Index: linux-pm/drivers/platform/x86/wmi.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- linux-pm.orig/drivers/platform/x86/wmi.c > +++ linux-pm/drivers/platform/x86/wmi.c > @@ -1153,47 +1153,6 @@ static int parse_wdg(struct device *wmi_ > return 0; > } > > -/* > - * WMI can have EmbeddedControl access regions. In which case, we just = want to > - * hand these off to the EC driver. > - */ > -static acpi_status > -acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address, > - u32 bits, u64 *value, > - void *handler_context, void *region_context) > -{ > - int result =3D 0; > - u8 temp =3D 0; > - > - if ((address > 0xFF) || !value) > - return AE_BAD_PARAMETER; > - > - if (function !=3D ACPI_READ && function !=3D ACPI_WRITE) > - return AE_BAD_PARAMETER; > - > - if (bits !=3D 8) > - return AE_BAD_PARAMETER; > - > - if (function =3D=3D ACPI_READ) { > - result =3D ec_read(address, &temp); > - *value =3D temp; > - } else { > - temp =3D 0xff & *value; > - result =3D ec_write(address, temp); > - } > - > - switch (result) { > - case -EINVAL: > - return AE_BAD_PARAMETER; > - case -ENODEV: > - return AE_NOT_FOUND; > - case -ETIME: > - return AE_TIME; > - default: > - return AE_OK; > - } > -} > - > static int wmi_get_notify_data(struct wmi_block *wblock, union acpi_ob= ject **obj) > { > struct acpi_buffer data =3D { ACPI_ALLOCATE_BUFFER, NULL }; > @@ -1308,14 +1267,6 @@ static void acpi_wmi_remove_notify_handl > acpi_remove_notify_handler(acpi_device->handle, ACPI_ALL_NOTIFY, acpi= _wmi_notify_handler); > } > > -static void acpi_wmi_remove_address_space_handler(void *data) > -{ > - struct acpi_device *acpi_device =3D data; > - > - acpi_remove_address_space_handler(acpi_device->handle, ACPI_ADR_SPACE_= EC, > - &acpi_wmi_ec_space_handler); > -} > - > static void acpi_wmi_remove_bus_device(void *data) > { > struct device *wmi_bus_dev =3D data; > @@ -1347,19 +1298,6 @@ static int acpi_wmi_probe(struct platfor > > dev_set_drvdata(&device->dev, wmi_bus_dev); > > - status =3D acpi_install_address_space_handler(acpi_device->handle, > - ACPI_ADR_SPACE_EC, > - &acpi_wmi_ec_space_handler, > - NULL, NULL); > - if (ACPI_FAILURE(status)) { > - dev_err(&device->dev, "Error installing EC region handler\n"); > - return -ENODEV; > - } > - error =3D devm_add_action_or_reset(&device->dev, acpi_wmi_remove_addre= ss_space_handler, > - acpi_device); > - if (error < 0) > - return error; > - > status =3D acpi_install_notify_handler(acpi_device->handle, ACPI_ALL_= NOTIFY, > acpi_wmi_notify_handler, wmi_bus_dev); > if (ACPI_FAILURE(status)) { > > >