From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8212C433F5 for ; Thu, 26 May 2022 05:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345679AbiEZFtR (ORCPT ); Thu, 26 May 2022 01:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231845AbiEZFtQ (ORCPT ); Thu, 26 May 2022 01:49:16 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8BF08A325; Wed, 25 May 2022 22:49:14 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-2ef5380669cso4729297b3.9; Wed, 25 May 2022 22:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UoSj+yY+ppeYCV5P505hsxj98Wvu+XMJ/tJbseI22DQ=; b=IidrXtJJfDYrIL9gE3q5IzQT56V/uhGjcp907lwHAW3Pnt2gkRDMs/D77C7ZC2YQmy iT7TrNqZ/C2mTqqOendKqNM3Vj4/wvznAzSns1GjeIf80Fzkzx3v7nyPVfYE+Xq1fKxl 3DfFzmOyehwBhV+6IUP2eYJ8eLC3QXMyW/D5g3wRq5i2p18BMWBVIxb8KB/OjNqkfpv+ N+FV4YfgRRtJydXo0ukFCTC+QDZD7X7IEEsLpj1X0GeuHr5Bl2agzYRLWuoND9NkWFdx +n3hrHEQZx7G1lctiCKQQRce7MYdbBod5rJIbrj4UbWJHWimXAzHK3e1EivoXOZQJ5FK R+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UoSj+yY+ppeYCV5P505hsxj98Wvu+XMJ/tJbseI22DQ=; b=zkWdOswo4PcHfYF1dgwVa1gGS/2sz2CRB3JTRVFevmLQrprjoUt2jdiJspauaxAjtR SZBkYbrE5sv2Hpv/Sjgp17QugJ8s3SISQdVILa9uDUTzcZLsvyk5n9+GCA4bDlnNAk0Z btIes0iEG8/OUNjeTtqigbMgUjPXcHZMVtUw7noqxx4YSzw0o2hlUV8Ko8v6zi4j7pRI KAfNwuquHkmuk2Xt4DBMPFkyaK9KCpKsuzpSlPFu1GuD6drFN7IQ9p/XBXo5XpR7fZNV qbCxeXk1Sa8YY+end4tfSIgrtWHgOF/09m0SDtYwFMLiuMfaJ5X0OWxE44Xk3TVwJrJK G/pw== X-Gm-Message-State: AOAM533j3dXByHYloaj20eg8G166Bnh1S4xRCt5aObOL9tXGwNKrLGkm KOUHErQae62CB2Sb+p7MTxruDT1L9dBnE+Q7eHU= X-Google-Smtp-Source: ABdhPJwUx7/eiV7wQoB0RRAtjkrOB7Y/F7mIp3iuzy1MShtSwwvyYK+HF6ieZUWtrzTX10CvhK87e2ewJzl3Qksg7t0= X-Received: by 2002:a81:5593:0:b0:2ff:2663:ea7f with SMTP id j141-20020a815593000000b002ff2663ea7fmr37716682ywb.224.1653544153943; Wed, 25 May 2022 22:49:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yegor Yefremov Date: Thu, 26 May 2022 07:49:02 +0200 Message-ID: Subject: Re: am335x: 5.18.x: system stalling To: Tony Lindgren Cc: Arnd Bergmann , Ard Biesheuvel , Linux-OMAP , linux-clk , Stephen Boyd , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Hi Tony, On Tue, May 24, 2022 at 4:19 PM Tony Lindgren wrote: > > * Yegor Yefremov [220524 13:34]: > > Hi Arnd, > > > > On Sat, May 21, 2022 at 9:41 PM Arnd Bergmann wrote: > > > > > > On Thu, May 19, 2022 at 5:52 PM Yegor Yefremov > > > wrote: > > > > On Thu, May 12, 2022 at 12:20 PM Yegor Yefremov > > > > wrote: > > > > > On Thu, May 12, 2022 at 10:43 AM Arnd Bergmann wrote: > > > > > > > > > > > > On Thu, May 12, 2022 at 7:41 AM Tony Lindgren wrote: > > > > > > > * Yegor Yefremov [220511 14:16]: > > > > > > > > On Thu, May 5, 2022 at 7:08 AM Tony Lindgren wrote: > > > > > > > > > * Yegor Yefremov [220504 10:35]: > > > > > > > > > > Hi Tony, all, > > > > > > > > > > > > > > > > > > > > since kernel 5.18.x (5.17.x doesn't show this behavior), the system > > > > > > > > > > stalls as soon as I invoke the following commands (initializing > > > > > > > > > > USB-to-CAN converter): > > > > > > > > > > > > > > > > > > > > slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0 > > > > > > > > > > ip link set slcan0 up > > > > > > > > > > > > Oh, I missed this part at first and only looked at the backtrace. > > > > > > Which CAN driver > > > > > > are you using? It's likely a problem in the kernel driver. > > > > > > > > > > I am using the slcan driver [1]. > > > > > > Ok, so this is just a serial port based driver, which means the > > > follow-up question > > > is what you use for your uart. Is this one of the USB-serial ones or an on-chip > > > uart? Which driver? > > > > This is the following chain: am335x -> musb-> ftdi_sio (FT-X flavor). > > > > I have also tried another system with two FT4232 chips (RS232 devices) > > and performed transmission tests. This had no effect, the system > > didn't stall. > > Maybe also try with CONFIG_MUSB_PIO_ONLY=y to see if it makes things > better or worse :) PIO is always the last resort :-) And now it proves it again. With PIO_ONLY the system doesn't stall. Regards, Yegor > > > > > > CONFIG_DMA_API_DEBUG is still likely to pinpoint the bug, but I might also > > > > > > just see it by looking at the right source file. > > > > > > > > > > I'll try to get more debug info with CONFIG_DMA_API_DEBUG. > > > > > > > > DMA_API_DEBUG showed nothing new. But disabling the CPUfreq driver > > > > "solved" the problem. I have tried different governors and got these > > > > two groups: > > > > > > > > ondemand, schedutil - cause the problem > > > > conservative, powersave, performance and userspace - don't cause the problem > > > > > > > > So far, I have only seen the same debug output that I've initially > > > > sent and in most cases, the system stalls without the output. > > > > > > Ok, so that sounds like it happens when you change the frequency. > > > I assume this means you are using drivers/cpufreq/omap-cpufreq.c? > > > > Yes. > > > > > When using the usersapce governor, do you see problems when you > > > manually change the frequency from sysfs? > > > > No, I can switch between 300MHz and 600MHz and perform CAN tests. > > Everything goes well. > > OK so not cpufreq related. > > Regards, > > Tony From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF491C433EF for ; Thu, 26 May 2022 05:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=si6MB1q/2N/PFiHnL3uFLqY7cP7LUYGcKtm/UIsh9l8=; b=F8WSUYSpER5R63 JDho/jX4PejaTReeYYXhclKJBDIg9eXe+22wsGzFw2d0PLNCJNkv3bQMMzWcpc0wG+aZr57bFTM5e DiqCHsW92+QgMb1PnBHdBVNOVr96b/KQazkaVXPPDjNeAasQl4pC+A1abB5xhvdLHiY6W27Qhma9z OYbm3lcxuSmY3aOcbO+oe4PFXeAeN0E+3P5fPAukfzWpfsUE8Ck2qUANBL1rZhaO/HH4s4LzBAJjk d3vDDmkZDZDsBHR9isc4aUnULCtDfqpUkRd7d4c0EHKzGNvOorDDwBijy4HfRQQ/L51Ec/szFJl41 hyyAA2ZkLPEz5+Yaza5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nu6N6-00DYT2-2Z; Thu, 26 May 2022 05:49:20 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nu6N1-00DYSc-OI for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 05:49:17 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-300312ba5e2so5506257b3.0 for ; Wed, 25 May 2022 22:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UoSj+yY+ppeYCV5P505hsxj98Wvu+XMJ/tJbseI22DQ=; b=IidrXtJJfDYrIL9gE3q5IzQT56V/uhGjcp907lwHAW3Pnt2gkRDMs/D77C7ZC2YQmy iT7TrNqZ/C2mTqqOendKqNM3Vj4/wvznAzSns1GjeIf80Fzkzx3v7nyPVfYE+Xq1fKxl 3DfFzmOyehwBhV+6IUP2eYJ8eLC3QXMyW/D5g3wRq5i2p18BMWBVIxb8KB/OjNqkfpv+ N+FV4YfgRRtJydXo0ukFCTC+QDZD7X7IEEsLpj1X0GeuHr5Bl2agzYRLWuoND9NkWFdx +n3hrHEQZx7G1lctiCKQQRce7MYdbBod5rJIbrj4UbWJHWimXAzHK3e1EivoXOZQJ5FK R+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UoSj+yY+ppeYCV5P505hsxj98Wvu+XMJ/tJbseI22DQ=; b=7PiikJeAtbbE8zED0mksAsRbK3AiVCYD2tx19tCmVrYwMFU9Onfcw1ZU1GXbF7lDtK 40rDQcYkLaP5Lw7IJoJQKKkQXRdZsYnhSnV+cJOzvTjI4ANggm9hiYTt+ovb7qdZ3P1t sOkzpknSt/FuJpKb1b0NjQb6k9Ibmn8NJ528FC99IHoDuP/dQTPSObDK58rzvZkJ2J0f y7FL/3CAYobRh89i9Sr/x/75pt0Kwvml+kqMv+DUD4BqU12OTB+463u5AOsq0LWMpp0s sn6ZhzrNSQGaOP2i1v9ZKwOcfm6mVxGF4K/hVshh55hySianOvNO3su46+fHO2sl6ua1 TyqA== X-Gm-Message-State: AOAM5309lFCdg4tsmkGesZTrUM00BV903lEeHKlbUX3b7VgmJrHyHVc5 0Q75HEkSHr40kGwPyMQ58TYfzihLqfZMUWHdOnUUxTSa X-Google-Smtp-Source: ABdhPJwUx7/eiV7wQoB0RRAtjkrOB7Y/F7mIp3iuzy1MShtSwwvyYK+HF6ieZUWtrzTX10CvhK87e2ewJzl3Qksg7t0= X-Received: by 2002:a81:5593:0:b0:2ff:2663:ea7f with SMTP id j141-20020a815593000000b002ff2663ea7fmr37716682ywb.224.1653544153943; Wed, 25 May 2022 22:49:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yegor Yefremov Date: Thu, 26 May 2022 07:49:02 +0200 Message-ID: Subject: Re: am335x: 5.18.x: system stalling To: Tony Lindgren Cc: Arnd Bergmann , Ard Biesheuvel , Linux-OMAP , linux-clk , Stephen Boyd , Linux ARM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220525_224915_846740_9653F8AB X-CRM114-Status: GOOD ( 36.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Tony, On Tue, May 24, 2022 at 4:19 PM Tony Lindgren wrote: > > * Yegor Yefremov [220524 13:34]: > > Hi Arnd, > > > > On Sat, May 21, 2022 at 9:41 PM Arnd Bergmann wrote: > > > > > > On Thu, May 19, 2022 at 5:52 PM Yegor Yefremov > > > wrote: > > > > On Thu, May 12, 2022 at 12:20 PM Yegor Yefremov > > > > wrote: > > > > > On Thu, May 12, 2022 at 10:43 AM Arnd Bergmann wrote: > > > > > > > > > > > > On Thu, May 12, 2022 at 7:41 AM Tony Lindgren wrote: > > > > > > > * Yegor Yefremov [220511 14:16]: > > > > > > > > On Thu, May 5, 2022 at 7:08 AM Tony Lindgren wrote: > > > > > > > > > * Yegor Yefremov [220504 10:35]: > > > > > > > > > > Hi Tony, all, > > > > > > > > > > > > > > > > > > > > since kernel 5.18.x (5.17.x doesn't show this behavior), the system > > > > > > > > > > stalls as soon as I invoke the following commands (initializing > > > > > > > > > > USB-to-CAN converter): > > > > > > > > > > > > > > > > > > > > slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0 > > > > > > > > > > ip link set slcan0 up > > > > > > > > > > > > Oh, I missed this part at first and only looked at the backtrace. > > > > > > Which CAN driver > > > > > > are you using? It's likely a problem in the kernel driver. > > > > > > > > > > I am using the slcan driver [1]. > > > > > > Ok, so this is just a serial port based driver, which means the > > > follow-up question > > > is what you use for your uart. Is this one of the USB-serial ones or an on-chip > > > uart? Which driver? > > > > This is the following chain: am335x -> musb-> ftdi_sio (FT-X flavor). > > > > I have also tried another system with two FT4232 chips (RS232 devices) > > and performed transmission tests. This had no effect, the system > > didn't stall. > > Maybe also try with CONFIG_MUSB_PIO_ONLY=y to see if it makes things > better or worse :) PIO is always the last resort :-) And now it proves it again. With PIO_ONLY the system doesn't stall. Regards, Yegor > > > > > > CONFIG_DMA_API_DEBUG is still likely to pinpoint the bug, but I might also > > > > > > just see it by looking at the right source file. > > > > > > > > > > I'll try to get more debug info with CONFIG_DMA_API_DEBUG. > > > > > > > > DMA_API_DEBUG showed nothing new. But disabling the CPUfreq driver > > > > "solved" the problem. I have tried different governors and got these > > > > two groups: > > > > > > > > ondemand, schedutil - cause the problem > > > > conservative, powersave, performance and userspace - don't cause the problem > > > > > > > > So far, I have only seen the same debug output that I've initially > > > > sent and in most cases, the system stalls without the output. > > > > > > Ok, so that sounds like it happens when you change the frequency. > > > I assume this means you are using drivers/cpufreq/omap-cpufreq.c? > > > > Yes. > > > > > When using the usersapce governor, do you see problems when you > > > manually change the frequency from sysfs? > > > > No, I can switch between 300MHz and 600MHz and perform CAN tests. > > Everything goes well. > > OK so not cpufreq related. > > Regards, > > Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel