Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp989752rdh; Sun, 24 Sep 2023 22:43:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0zuxrTRdipIF87JyFnAcEt4HNDFF5jA7P2Lwwjup5MYDVBcu4iYohJCTIes9Ujh7QymP9 X-Received: by 2002:a05:6808:2095:b0:3a9:9f05:f726 with SMTP id s21-20020a056808209500b003a99f05f726mr7079074oiw.36.1695620614334; Sun, 24 Sep 2023 22:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695620614; cv=none; d=google.com; s=arc-20160816; b=STk8GVzpFjKNj5p2VtcHT+8/K6yGP4vWkXq4LyynGKv62RfgZ9HnbSw78VXfLH0dZ/ 3XVKXoHpnqVgazVGQMdhT9/yEd1yI2LG26xA2dINEe3aWWyDuN2X4JzWyFbgsGC0ID4F 5Z6tElO7HoadPFRHWY752fk9iiLvqg+aiucPO+FrZtQMg6DAmjtEMc7/F18mCHy9Lvw9 5ni/vFSzXlRvT9rVSl33M0fBhQY7T+WnhA4CYe4gbfjcdSfNAVmKy50TYG46b+C/xMaU KCwLQIv4riqrpkLk8UBMX0c0CKnUupKw+M6B2myvrZNp8v2rzGmzrQDMP0P+fpkPBeNe XmNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :references:cc:to:from:content-language:subject:user-agent :mime-version:date:message-id; bh=AM8xf06ortIoaNZfjeOnh5namlrNCFJtvnAj3OYNhdU=; fh=3wB0EqlDoN6hymZaZfvujzdxI6dgLj4SSgMDDu0FVFE=; b=GPbcO5PuZ0aDMFuJjRsQL+IP/FQduP192VvWTJwO9okt0Ch16YYTGb3dzaVDu543y9 dhZqxeQP3y0H67qaprYdETTMIjwQe4l8Oc3Yo9v0SRHWQSWUEFD2bn3z2d+tchG2IGlx N3aTS9vGUhqKJUzcBQfRoljsiroLY4blB0IUgxIUPsiR0DyBeVJD5FJfQ4m7dlnl8U3o JVnfyqK0Kvzdpj8qElxlm3WqWW7t43Rxil9d22Im1njY5gB0wFfTgnErs58L6t3N6ziB JbH9KMOJToRgtQ/EInbiYldBX/C1BfkLQqpAWFEG0wySrkXq7u46vBbF1ZwBzBGW9ZU2 7N8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id j2-20020a63e742000000b00577646e2b6bsi9056680pgk.206.2023.09.24.22.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 22:43:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A8B3D801C88C; Sun, 24 Sep 2023 22:42:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231844AbjIYFmo (ORCPT + 99 others); Mon, 25 Sep 2023 01:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjIYFmn (ORCPT ); Mon, 25 Sep 2023 01:42:43 -0400 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D16B9E3; Sun, 24 Sep 2023 22:42:36 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2c038a1e2e6so85117681fa.2; Sun, 24 Sep 2023 22:42:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695620555; x=1696225355; h=content-transfer-encoding:in-reply-to:autocrypt:references:cc:to :from:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AM8xf06ortIoaNZfjeOnh5namlrNCFJtvnAj3OYNhdU=; b=ZIewqxc/SvTISSr+nKIswgRcgX6CzCYdbY67EsMM91io2H8FlvkgnJQQ7iD1JyIrMZ HLTE4D+qfK801B23piwguDoYL+HDP1MNlO3BZzGffkG8HyWNi8jCkj0fZc5TS37JGL4Q 3E9r5+FfTBIE3Z62DDNuE6BqGWgoNQK2K3Uppw7+aRGfwZx5hhtd2b198WiLhIUcmAqc j0KdGdBShAZPEIm/sw6HUvPQOBEf25KroXG5r8jNbL+kfpcEr+XGXwpQ60w5zJWkUHm+ vfPFlJBuuEaIGs5wn5mv60e7M2b5aILmrzat5VTR1sEJiHKsnm+DP8VdxbMxyazoyzig GGlA== X-Gm-Message-State: AOJu0YyO7zpOSwQ3dFa4Rjb9aevbkUs+w2e+DWPleGLopkOXttp41Rht lZL7kF3SGzCzMzPFqGiDJ47NhIsoXfQ= X-Received: by 2002:a2e:3607:0:b0:2bc:dd96:147c with SMTP id d7-20020a2e3607000000b002bcdd96147cmr4918014lja.34.1695620554849; Sun, 24 Sep 2023 22:42:34 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id d12-20020a1709064c4c00b0099bd86f9248sm5829347ejw.63.2023.09.24.22.42.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Sep 2023 22:42:34 -0700 (PDT) Message-ID: <505264f5-cbbb-4ffe-a3e4-93d2397e80da@kernel.org> Date: Mon, 25 Sep 2023 07:42:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: WARNING at drivers/acpi/platform_profile.c:74 in platform_profile_show() Content-Language: en-US From: Jiri Slaby To: "Rafael J. Wysocki" , Len Brown , hmh@hmh.eng.br Cc: "linux-acpi@vger.kernel.org" , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, Linux kernel mailing list References: <047d3c51-0a9e-4c3e-beef-625a7aa4f3c3@kernel.org> Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBipu80s9anNeZhCANDhbC5E+NZmuwgzHBcan8WC7xsPXPaiZSIm7TKaVoOcL 9tE5aN3jQmIlrT7ZUX52Ff/hSdx/JKDP3YMNtt4B0cH6ejIjtqTd+Ge8sSttsnNM0CQUkXps w98jwz+Lxw/bKMr3NSnnFpUZaxwji3BC9vYyxKMAwNelBCHEgS/OAa3EJoTfuYOK6wT6nad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yJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <047d3c51-0a9e-4c3e-beef-625a7aa4f3c3@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 24 Sep 2023 22:42:45 -0700 (PDT) On 25. 09. 23, 7:35, Jiri Slaby wrote: > Hi, > > according to logs, since 6.3 (up to 6.5.4 now), I repeatedly see: > > WARNING: CPU: 14 PID: 962 at drivers/acpi/platform_profile.c:74 > platform_profile_show+0xb1/0x100 [platform_profile] > > Modules linked in: ccm michael_mic ... > > CPU: 14 PID: 962 Comm: power-profiles- Kdump: loaded Not tainted > 6.5.4-6-default #1 openSUSE Tumbleweed (unreleased) > dd37106c593be78644bb80e3c1534d801bf4cb36 > > Hardware name: LENOVO 21CRS0K83K/21CRS0K83K, BIOS R22ET60W (1.30 ) > 02/09/2023 > > RIP: 0010:platform_profile_show+0xb1/0x100 [platform_profile] > > Code: d0 a8 ... > > RSP: 0018:ffff9c1ac0b97db0 EFLAGS: 00010296 > > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000008fc35be0 > > RDX: 0000000000000000 RSI: ffff9c1ac0b97db4 RDI: ffffffffc0a8b0a0 > > RBP: ffff8955ca540000 R08: ffff895b9f1ed180 R09: ffff895559ea1bc0 > > R10: 00000000031a400e R11: 000000000003f680 R12: ffff895b9f1ed180 > > R13: ffff9c1ac0b97e50 R14: 0000000000000001 R15: ffff9c1ac0b97ee8 > > FS:  00007f71b0e71900(0000) GS:ffff895b9f100000(0000) > knlGS:0000000000000000 > > CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > CR2: 00007fe402ea3400 CR3: 000000012004c000 CR4: 0000000000750ee0 > > PKRU: 55555554 > > Call Trace: > >  > >  sysfs_kf_seq_show+0xab/0x100 > >  seq_read_iter+0x123/0x480 > >  vfs_read+0x1b8/0x300 > > It's: > WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names)))) > > So I put there one more print: > dev_warn(dev, "profile=%d profile_get=%ps\n", >          profile, cur_profile->profile_get); > > and I see: > : profile=-1883022368 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-1510173440 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-1510173440 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-966231712 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi] > : profile=-1578420592 profile_get=dytc_profile_get [thinkpad_acpi] > > where the profile values in hex are like: > ffffffff8fc35be0 > ffffffffa5fc9500 > ffffffffc6687960 > > Looking at simplicity of dytc_profile_get(), I wonder how that can happen. > > I also wonder about dev passed to dytc_profile_get() having empty name > (nothing before colon above)? Is that expected? I forgot to add: cat /sys/firmware/acpi/platform_profile correctly returns: low-power without any WARNING. It looks like the warn often (but not exclusively) happens around: PM: suspend exit > Any ideas? Ah, convert_dytc_to_profile()'s retval is not checked in dytc_profile_refresh(). That's likely it, let me add the check and retry. > thanks, -- js suse labs