Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp446833lqp; Thu, 4 Apr 2024 20:10:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0RKHppMi2f5Fb2RZnFyGTXhX8NPeYnj9K55vVzGHP74bAeYSVM0o+LRVjocQM+vjmFgiu7NLnBx8Aq/8ALcpVyEbiWCnNH89lSBFJ2w== X-Google-Smtp-Source: AGHT+IE0TurBkNLrlSTKB1hWjOZ2mrASYizCxt3IVymA5P/2rU8Fs5DOo+dHnW7y+V9hi2jHzciJ X-Received: by 2002:ac8:5d89:0:b0:434:5045:40 with SMTP id d9-20020ac85d89000000b0043450450040mr203028qtx.34.1712286623860; Thu, 04 Apr 2024 20:10:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712286623; cv=pass; d=google.com; s=arc-20160816; b=M1oPMJi0MwIx7/QZLiF3qB0yreFldFS2q1mGRBf4jyN20qqnoiAcAqb4d/fSYsMkfo zw7H+6tWANBypIYYzEHdTXgGxwWyq0cPr6VkzIUid/KSRLg0BamwGeZbfDRIkP9qqH1G FKwpHTINpx083O35UlERYfesgnTW2zG25aap7SJ+WdsB/3WD7L/FfBzfoUTCvQPtyTEh xGIv6GmMWej39RA/HL0LA2xYG7Cy1Xm+i7iIG5TcoQ3DnrnGNXDgfOP6hZKkZLaoD4if zfwVIUsPxiqDkvB+XDa+JIOnzKLv5dR88hKKqaUulr2ozGXUAZ79icKb4YzuslUYsy6i cVaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=5YM7mvGWbMlZmbIx5ybNEkNpgBfZXycaMReGwErZsdc=; fh=i/vyyhq/2f5bnyVSCUwU4krE0CCggkM2doNybT802K8=; b=ve34fRkI4+j+7j+n1P7dH7Xc5TLp4x1eZo3R0s8VOcpEzVDTFpFvGeszwba+5KmFAE TBO1Ve+hxWWV7+apBuTA0qfxDi/ImhhQxAX85f18M/6+U7Q1gIIsd6cbxlguKHUh/2M8 SRF0AYyHqQzkLo44IisOF2W8CoAQyz+h+WwGcWrwUouS2/bl+M8Tai/5nnhBhxP9PiWf g1Mea9bLeyUljgrgQTQuBWuc1HTrb+uUN85VjMASeVZvTPycgM/KlolGBtbt465JqS7f bClX9Xzi0mOlnaQVOJ0qEKd8SdDPQpNogt7wNaYN4zc2Fycww55elgHzNqbyOSdhGb/S ffbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Q3QIzxzR; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-132365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132365-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j8-20020a05622a038800b00432d843cc7asi820473qtx.41.2024.04.04.20.10.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 20:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=Q3QIzxzR; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-132365-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132365-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 93B2A1C20F17 for ; Fri, 5 Apr 2024 03:10:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0556B18E2A; Fri, 5 Apr 2024 03:10:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="Q3QIzxzR" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 94C9B17545; Fri, 5 Apr 2024 03:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712286616; cv=none; b=JzEagG13axjOlLtktNrkgO75ZgwKyc4JZZqCZLHscinI/HASs1m5+2wbsucm0dlAkqKtcYyYfFQRI5z+QAjjqc6U29Jlse9TvObxUt7k1h9wE7pHu4//IWFZJCzPt52PKzHN5hhpH/Bp2jsMnMTElnkYHQEVZGD/VYRReU/YOnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712286616; c=relaxed/simple; bh=5YM7mvGWbMlZmbIx5ybNEkNpgBfZXycaMReGwErZsdc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=kilnnEC0G8/9TUei6fzWHql2SQ7kR/drYoYcpEgSBbLH5i3v6aDNIcI4ZPybicYqok7H06R8Xc45LxdOowQ70VcxZA3SPbqGMegnXrGWdwDisKOUkGBWPktPPdeM6MHRNMtzqwSuajOOfuA8YGxY6Wr89y0uaf/O3gfKfKYSVok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=Q3QIzxzR; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1712286613; bh=5YM7mvGWbMlZmbIx5ybNEkNpgBfZXycaMReGwErZsdc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Q3QIzxzRbXpx2e47F9wae2WgRCUdoJb3BHqgFNQVHo4XOAcj6V4A6KAwpGReH2mLc f4tWtIJ+360ZAKdin4JhCHTv8ghAVgTzDcPVTwAJNRCc/XIai15DUZ9CcoTd+cXGl3 CD64SNl4kNizJb6K2tWtg4KZzFiVTo67Mm7LyQ/ef6Ff7cb7pSMjsnUThoWI+4srek 3NrOXgKPwAv5ld8VkOq9Zsx07cH9xbaJYm5WvPsNggkC+eeNBC6WhkTXLl9IbgkFrt kUeb7ERnoYAz1FDsjnvakUEh/M29R0AZI9Ci6zUJqmudcmTafdmRUuAxe33KrBmI4x w8K64JUPj8pfw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4V9k4j0HHRz4wyh; Fri, 5 Apr 2024 14:10:13 +1100 (AEDT) From: Michael Ellerman To: Finn Thain , Greg Kroah-Hartman , Jiri Slaby Cc: Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , "Naveen N. Rao" , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-m68k@lists.linux-m68k.org, Benjamin Herrenschmidt , Andy Shevchenko Subject: Re: [PATCH v2] serial/pmac_zilog: Remove flawed mitigation for rx irq flood In-Reply-To: <0df45bedded1249f6c6ec2c2fb0d9879da1841b7.1712273040.git.fthain@linux-m68k.org> References: <0df45bedded1249f6c6ec2c2fb0d9879da1841b7.1712273040.git.fthain@linux-m68k.org> Date: Fri, 05 Apr 2024 14:10:12 +1100 Message-ID: <87v84w7be3.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Finn Thain writes: > The mitigation was intended to stop the irq completely. That may be > better than a hard lock-up but it turns out that you get a crash anyway > if you're using pmac_zilog as a serial console: > > ttyPZ0: pmz: rx irq flood ! > BUG: spinlock recursion on CPU#0, swapper/0 > > That's because the pr_err() call in pmz_receive_chars() results in > pmz_console_write() attempting to lock a spinlock already locked in > pmz_interrupt(). With CONFIG_DEBUG_SPINLOCK=y, this produces a fatal > BUG splat. The spinlock in question is the one in struct uart_port. > > Even when it's not fatal, the serial port rx function ceases to work. > Also, the iteration limit doesn't play nicely with QEMU, as can be > seen in the bug report linked below. > > A web search for other reports of the error message "pmz: rx irq flood" > didn't produce anything. So I don't think this code is needed any more. > Remove it. Yeah I think you're probably right. I assume you have tested this on an actual pmac, as well as qemu? cheers