Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8885856rwr; Thu, 11 May 2023 07:24:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5zrvGl8T+w045jNXJC1ylyGVAD93XXo/rDJOS8Jd4GMCrkCKj3I376JWme9dHbTLlURTyg X-Received: by 2002:a05:6a21:3285:b0:100:8785:a0ab with SMTP id yt5-20020a056a21328500b001008785a0abmr16731347pzb.26.1683815086519; Thu, 11 May 2023 07:24:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1683815086; cv=pass; d=google.com; s=arc-20160816; b=pOPMOlDQcVuKx2eeqQjuAyioG4qKd3gR3G33DMMGUB/fJEJS+S3ieFjgUj7JiuXzlY t6/1WJjL3wrB2JZJavqETy+NLRUsSIm5yBwh4SKD77CTCqLmmMOVu5H9igOPKOPLshJr z2JBmEWPPsACM52sndGbVXJ2/F8SFVl77r1X1a90mF8mKOycAnsk14fvs9hDyxzCAi+t N+cLFImIpJB9lcGXWEEojMgRdZGdXQHPnnr/blRCEeOPYJp5f03weJET5Vwv94vP6vqS goxqLL09gmprVjk3tCgRl/7qeGltfYBaglx2k4gemfF4oXy15yxad7Vfm3M3ZEmYpYVm aXoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=XHEswNYGD4isK3XikShGJsjsdVHpmKUFb/aFmyj7e4Y=; b=h9Snl5Yr0W9mgIMH2dGsNrhzwrvt6WJPV71O31ilsGYIDCTAXbNziWWK8sQX0oFbh5 zND8teFkfutHryJXW5R6B51ExzIkDy26SLA74fKv1H5yZxHMg4YMyiXMTYKTqaR6TFkR UFDFzRydznMslirF22J4KZbR6vH9jk3jSBzbpaOCsltm61ikD5u1EAiwKHN/Fn9/dboL IAT/axLu8K9lch0aXNH37uKPx/IsL+TRIv3NpFSUFlPDdyMHHr0sQUmSYuAOseLqoT3V mHfPB/y1pjV07kxaAqTjAWQxgLKeY3Ebc2TX8uPuZaiM4OiLX4eLhDeCgZ0sq7Qht9dc ZvPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=GsIf+SSP; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020aa79889000000b0062e024b49b8si7679203pfl.150.2023.05.11.07.24.31; Thu, 11 May 2023 07:24:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=GsIf+SSP; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238424AbjEKOWY (ORCPT + 99 others); Thu, 11 May 2023 10:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238414AbjEKOWV (ORCPT ); Thu, 11 May 2023 10:22:21 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2083.outbound.protection.outlook.com [40.107.8.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1BC5D2D3; Thu, 11 May 2023 07:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lqQAX5Ybpz3djPLRrOHXsRfzB0TWBIclFNtwxkvW6FAplwQei+1M4pIG1i3gP9DIgdRx+zgKanhpUesD0C9LZ2cq9QAsJitVG/oBCcwEyVSC20GEA2R7jzj5ePHtLjJGm+yrrDeNboc2owl5TGFeEcrN5CnaQooVsrhyn+XAhAGlTjRdjGo70ncXhn2vZh8zjLLuDpOar4UMJQhy7teioJsALqdKNbCxwkKeGs6OGMFp1OoaXgiLjfXxXmepvlDFeWNbLJAYyNQcYIDo8ENKNjDaFGtALZT/nN40Vk49f+KtghsnjD2ytSk9SG/Ilr1Bs2jLebJvcIazRHMJYjZZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XHEswNYGD4isK3XikShGJsjsdVHpmKUFb/aFmyj7e4Y=; b=dXQsdl2YdiGYYM8yRYqomTixF8PCcrNJ7lj/cBke3RR4QOwBrjXJWPOPninNco9hyd5+zRvsTjLoqMyPTtC1NOW6PbYnWwRbWSnj1MFBD2nA8bUpJGYH0Z28hxEVj9yokEsKb+DRFTfebU/AsW1rnBAXhByjExtF6S3hAVF5FGhFOFmbGp/tjnlOZTVPnCHcbCvJEVI2LOF7VU9t+0K6da1sYj6yS4iXVYoLkiwUK5beSAAAmgIupqtlNXE8RNZiz1nrWKWZ0f/NqFn6GLyR1wKuH5X9Wjrf2Ca93mZNKp5EcBh1mt4bgA1oVkJwRBSmnc4WU+iijDKS7D6dsUz+tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XHEswNYGD4isK3XikShGJsjsdVHpmKUFb/aFmyj7e4Y=; b=GsIf+SSP89uwiSg76zucjH3vJ74mC7O0rTsv6e1vu4Bj/6pKb2JYHVIesAbm3VPsjKSBDPqAhq/5qc9j0w7yGgFNGHe8NYmNdw1pRAm71lH6h/wg4O9ghUMI4zIZlE34JGYa+qeCT25bDfVCmo9zJaUek+Ub8GKBSNi+IscW0KQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kunbus.com; Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by DB8P193MB0695.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:147::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.6; Thu, 11 May 2023 14:22:04 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::6727:e3fb:8fec:72a6]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::6727:e3fb:8fec:72a6%6]) with mapi id 15.20.6387.019; Thu, 11 May 2023 14:22:03 +0000 Message-ID: <1a8ecf90-80a4-9aac-95e1-9ce0c4e09ba5@kunbus.com> Date: Thu, 11 May 2023 16:22:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [linus:master] [tpm, tpm_tis] e644b2f498: RIP:acpi_safe_halt Content-Language: en-US To: Lukas Wunner Cc: Jarkko Sakkinen , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, =?UTF-8?Q?Michael_Niew=c3=b6hner?= , linux-integrity@vger.kernel.org, Philipp Rosenberger , jsnitsel@redhat.com, peterz@infradead.org References: <202305041325.ae8b0c43-yujie.liu@intel.com> <42ea93a1-3186-b8ff-c317-d51f3e13856e@kunbus.com> <20230511141607.GA32208@wunner.de> From: Lino Sanfilippo In-Reply-To: <20230511141607.GA32208@wunner.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0016.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:15::21) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|DB8P193MB0695:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b8228b5-72c2-4a44-ef7d-08db522b1798 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oHkQanu5B6MeIMRBCRbFXIo3g5iU6AaW1LEb7g/3OdHqCTsVCBpQ2eyLg6dBZQefx3sXGqjJKptWtVjpKvtCJFoLt3hDRKgeU+cZLPyrQy/Nq6h5/3q8m2K3e7q2V3pNoUFgx3ef0nk1kzXU+AX7hiPNOPBtzHuZ+GZEP10rMjI+TlYr2+2oQqsHBPvs9F2WE2mfDCrO26egSk0+AcA6/LQJXcYc1WUqU7datn/+dL4rMgVtCTGMEIThT3vMHNhPbgRTIr73QvMUfdFbFpsl0/r1IopcuvbXJaP6fFUQg2kyNb1LnxD4kgVSK4B6asOPFVMykO8aC9lMt44y5rwTrwB1GykHz6CZKtG5h5nGCRbk3Ae+Oxan0FIeOIiAZVG9wBmx+H6sJsLx6ZH0J8X8jkqGdjF7Qid2fRgK663wksmU6kqgu5D2u9Ld4KoCNYJytNpUyruvAOWi37MVanOpc8Lgf88Qwcan7gcRJAP0CJAKKm7Z+FPcA08KVx6N7diNQbh0Dc5OmHGJXqimSOhQEgH7PmbOlqsS/RV7NyOQ8gRc9fqB0gVQyUBYb+hL3tqEWfemP95NSEtmo7ZwXu7KO76cEkaOjzklQslCuuX7phwZdJ+CbMmQPr3q3WHPXIDKfZlIkEEFd7w/YgbTySrYmw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(376002)(366004)(39840400004)(346002)(451199021)(36756003)(38100700002)(86362001)(31696002)(31686004)(8676002)(52116002)(5660300002)(478600001)(6506007)(6512007)(6486002)(8936002)(186003)(53546011)(2616005)(83380400001)(2906002)(66946007)(66556008)(54906003)(316002)(41300700001)(66476007)(6916009)(4326008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VE9pNGVsTWFuTnorNG9XU3VTeUlEbUJiR25nUk16MkdpTU55ck9lSStkTG0v?= =?utf-8?B?RFRiQW42WXB1RXA0UVNiZyswa0xvaGdNdU9DY0M2T3dDV2UzVUpZRDk2V3g0?= =?utf-8?B?bTJMbDhYdjhibHU0YjFETUc4VHpOWndxSytWaGMrVnAzWVJUNmx1Ymx5Z2dJ?= =?utf-8?B?T3kyQlJpQ0g4QnhEdG02b2lmTytUTGFVcURkS1paRWJHMWh4S3dBd1FPSVEr?= =?utf-8?B?TzlYZExLNHoxNWpCU2tGNWlHMUMxMVJ6NWpXVTFlOE9WOUFNZkY1K1g1THRZ?= =?utf-8?B?RlJqMmNndVoxbFRkbEp4NHhoTXlqaEFBblBEVUluVXVkdU9HU1RLOVQ0Y3VG?= =?utf-8?B?ZzEwVGdmOVplK0hSaTZ1SlN5aVJ2RWwybEdJakRKU24zeEhhVGlDZkZDVFRy?= =?utf-8?B?cWx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qTk8wQTdWT1BZREROTWFtQkY0?= =?utf-8?B?eVRObDVQdUNDQTZTallOUXRLVklnPT0=?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b8228b5-72c2-4a44-ef7d-08db522b1798 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 14:22:03.7548 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a0Cwl47axlk1/eRzaOHWWR/U/jO2OLp+rj2HwhWN0738V6/vaf+UMq6aG9e8jbe+Lsysn4m0sd5ZpxbwTUoGsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P193MB0695 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukas, On 11.05.23 16:16, Lukas Wunner wrote: > ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover. > > > On Thu, May 11, 2023 at 01:22:19PM +0200, Lino Sanfilippo wrote: >> Since beside the one reported by Peter Zijlstra >> (https://lore.kernel.org/linux-integrity/CSJ0AD1CFYQP.T6T68M6ZVK49@suppilovahvero/T/#t) >> we have another interrupt storm here, it is probably the best to handle those in general >> and to disable interrupts in this case to fall back to polling (this is also what Jerry >> suggested in the thread above). >> >> I will try to provide a patch for this. > > In tpm_tis_probe_irq_single(), after you've requested the irq, > you could convert it to a struct irq_desc (via irq_to_desc() > from ) and cache that pointer in priv. > > Then in tis_int_handler(), you could access the irqs_unhandled > member of struct irq_desc (from ) and check > if it exceeds, say, 5000. This is the solution I am currently working on, but thanks for confirming that I am on the right track with this :) > > If it does, schedule a work_struct which calls disable_interrupts(). > You can't call that from the IRQ handler because devm_free_irq() > waits for the IRQ handler to finish, so you'd deadlock. You *can* > of course clear the TPM_GLOBAL_INT_ENABLE bit from the IRQ handler, > though it's unclear to me if that's sufficient to quiesce the > interrupt line. > Will try this, thx. > By reusing the genirq subsystem's irqs_unhandled infrastructure, > you avoid having to reimplement all of that. > Agreed. Regards, Lino > Thanks, > > Lukas