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 50A7CC433EF for ; Fri, 27 May 2022 04:44:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbiE0Eo3 (ORCPT ); Fri, 27 May 2022 00:44:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbiE0Eo0 (ORCPT ); Fri, 27 May 2022 00:44:26 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1232FEC3C6; Thu, 26 May 2022 21:44:25 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id x137so6079730ybg.5; Thu, 26 May 2022 21:44:25 -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=nvAGkKD1gOM6e41tJjvccNZKnPhzZ8zGOh90qnbWj28=; b=Xfubo1SX6CsyXh159Dvu9x+zqeihX1+XYpvymNRJ/O84uGnstgCwc1r/Z9sq6DWQcu l6BIKDPNkDtZbvrfUGJ/kTFk/3IhReZktX1f2kYhwJmRzbz3Jz+C73vG/ewUg0IncrY0 IgtxOG6bhO7sNixcbRlnscQ6jp0XQHZXEKu6HivYnxE6Vdz2kSqGrcgRe9cUUYLtK1v/ a2JDrnbCDkURwl3pYLa5K48uQhqTaTBh0lvHjJLj0fDiIT/WQJUs2Hi/OrXfPzZtxq6j sYRhFd0k+yTyafcLJ/6qOYSXfajfarPHt9OZAUJNt7qFEXiKwPQStrohcSpUvcOBk6jX Z4KQ== 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=nvAGkKD1gOM6e41tJjvccNZKnPhzZ8zGOh90qnbWj28=; b=tdZ2WAApGEDkDvBA16rTkKxIxvwMj23xbTLZGcjXcdRjTMJKID6ddT20zrln0dQBJg 5XGlOUWFaN0+vNHzaBG1AhfoIJS+9jYNCVeyemLu5NzzZNMvu70S5ObX8I5g9Sl+MrUB YPkJpoIUj6a3jOP7gTRlWPk7CR7+LXOHHYrQSRyIphzkbQb4VyG7ErZQxNdFEneChOxM S0vqxWuMy1EQ+PVbHa3q8ElFHR/3NLslU9LSoPHn8KY2fcaFzimVML5Z3mB0NhEG3hK8 mAPu1K1RjMsaKzPSNSr6LAuFv0xAynEEBMY9Nk1JSBr3EVTKz4GzGwv5U/jcG5NNZUb1 fhDA== X-Gm-Message-State: AOAM531wm/76VmDnm4QHqrFQczd2yIm0VfElfQzBWPyKoicYBbPUuxdI oUTbOqiiEGeEgxp4QQd3xBridqECAU+8cKPSnBDV5hvP9LE= X-Google-Smtp-Source: ABdhPJw6RRXsOiSCviMJO6S3smay8v8XHLNC3p5pkm286H3uCNygKa2oS2r1EMFh3CgzjavkY9MwMksmAKAQBaBLAPE= X-Received: by 2002:a25:2c81:0:b0:64d:f21d:1fab with SMTP id s123-20020a252c81000000b0064df21d1fabmr38633400ybs.355.1653626664092; Thu, 26 May 2022 21:44:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yegor Yefremov Date: Fri, 27 May 2022 06:44:13 +0200 Message-ID: Subject: Re: am335x: 5.18.x: system stalling To: Arnd Bergmann Cc: Ard Biesheuvel , Tony Lindgren , 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 Arnd, On Thu, May 26, 2022 at 4:16 PM Arnd Bergmann wrote: > > On Thu, May 26, 2022 at 2:37 PM Yegor Yefremov > wrote: > > On Thu, May 26, 2022 at 10:19 AM Ard Biesheuvel wrote: > > > > > > On Thu, 26 May 2022 at 08:20, Tony Lindgren wrote: > > > > > > > > * Yegor Yefremov [220526 05:45]: > > > > > On Tue, May 24, 2022 at 4:19 PM Tony Lindgren wrote: > > > > > > 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. > > > > > > > > OK great :) So it has something to do with drivers/dma/ti/cppi41.c, or > > > > with drivers/usb/musb/cppi_dma.c or whatever the dma for am335x here > > > > is. Or maybe there's something using stack for buffers being passed to > > > > dma again that breaks with vmap stack. > > > > > > > > > > In order to confirm this theory, could you please try rebuilding your > > > kernel with CONFIG_VMAP_STACK disabled, and leave everything else as > > > before? > > > > I have disabled the CONFIG_VMAP_STACK option: > > > > # zcat /proc/config.gz | grep VMAP_STACK > > CONFIG_HAVE_ARCH_VMAP_STACK=y > > # CONFIG_VMAP_STACK is not set > > > > The system stalls. > > Ok, I guess that means we can stop looking for invalid DMA buffers > on stacks. Out of the original commits you listed as possible causes, > we can also rule out 23d9a9280efe ("ARM: 9177/1: disable vmap'ed > stacks on suspend-capable SMP configs") and cafc0eab1689 > ("ARM: v7m: enable support for IRQ stacks"). It could still be > 9c46929e7989 ("ARM: implement THREAD_INFO_IN_TASK for > uniprocessor systems") and 5fe41793bc78 ("ARM: 9176/1: avoid > literal references in inline assembly") or possibly the merge. > > Can you post the whole .config file somewhere for reference? > In particular, do you have CONFIG_SMP, CONFIG_LD_IS_LLD > or CURRENT_POINTER_IN_TPIDRURO set? This is my config [1] and this is the system in question [2]. [1] https://github.com/visionsystemsgmbh/onrisc_br_bsp/blob/master/board/vscom/baltos/linux-experimental-config [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am335x-baltos-ir5221.dts?h=v5.18 Regards, Yegor 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 C10D9C433EF for ; Fri, 27 May 2022 04:45:51 +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=Wdf5iOEAhoPRKeqpd3d1VvAVbR8avt6AXXDyRoKiKwk=; b=EdmNZFUsih8LaN pJ+h0LOJK2hXDKXoOx+c/ElpseR55iM2xHXtGWkbVAmFHR3XVFk1yLT6ZTTvgCs4BJDM5GTT0kbR2 rB5KsPu0dEcZTBigA/G/1xZfzcOqUOOQg16B8hhHUvsQhChaPWDxkPrZkhUUB0jG85vwwalBj3Q18 l3cQxTLk2aUpbo1vXAGzpUWgFKettQax89O2fboiPT/inlTPt7FHMI3lXznXLwTMl3l+l9oVXHLgS in6OzzVCedSrhejxgleNwv7zCs5s4puTXRluY0n+uvfDXFKaMicjdnXzHrq+ywOG0U+nSC0+rdG/d K8pnkcEPxzFsWna2jZNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuRps-00GbZJ-OL; Fri, 27 May 2022 04:44:28 +0000 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuRpp-00GbYk-JI for linux-arm-kernel@lists.infradead.org; Fri, 27 May 2022 04:44:27 +0000 Received: by mail-yb1-xb2c.google.com with SMTP id q184so6033467ybg.11 for ; Thu, 26 May 2022 21:44:24 -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=nvAGkKD1gOM6e41tJjvccNZKnPhzZ8zGOh90qnbWj28=; b=Xfubo1SX6CsyXh159Dvu9x+zqeihX1+XYpvymNRJ/O84uGnstgCwc1r/Z9sq6DWQcu l6BIKDPNkDtZbvrfUGJ/kTFk/3IhReZktX1f2kYhwJmRzbz3Jz+C73vG/ewUg0IncrY0 IgtxOG6bhO7sNixcbRlnscQ6jp0XQHZXEKu6HivYnxE6Vdz2kSqGrcgRe9cUUYLtK1v/ a2JDrnbCDkURwl3pYLa5K48uQhqTaTBh0lvHjJLj0fDiIT/WQJUs2Hi/OrXfPzZtxq6j sYRhFd0k+yTyafcLJ/6qOYSXfajfarPHt9OZAUJNt7qFEXiKwPQStrohcSpUvcOBk6jX Z4KQ== 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=nvAGkKD1gOM6e41tJjvccNZKnPhzZ8zGOh90qnbWj28=; b=wTm3HvRheNdu8f5WEb11WbcuDfjHTSwM4aZHazZEuwqIw4ajuGMw9vKfst/BCyy/3x TmVmAhTK6/3NA55m7KstK0d5w9a001n+ToY04XdOVB0QJPCnVnR9wn+C8BUirX01K2p7 CGzVIZs4ZQAu6BfgW/j55dbAgBir5WKabkCzZGluxIOaEUAw1Z8icKSt4tetuBl0olGT 1OJStyRLZAXJLjapRy3miPDKrFknvbvwdiGf2OBKfnxJp0TeFc+7ZYfUSHCQ+jb9eL// rQxnkUGEq5Fuy5AtKVzDMIE39FnSTg75yuarviEgowc2w0A0SdU42mItPq2feXTaW4aE 4SBQ== X-Gm-Message-State: AOAM530qMBeR9XcNZ9SnsI3h8msgT+NPoRJs5StlesvfsVQNISggFw/i RCgmlv5+owQ147RRIQgRQ7qtGT3CMLjlgJktxP4= X-Google-Smtp-Source: ABdhPJw6RRXsOiSCviMJO6S3smay8v8XHLNC3p5pkm286H3uCNygKa2oS2r1EMFh3CgzjavkY9MwMksmAKAQBaBLAPE= X-Received: by 2002:a25:2c81:0:b0:64d:f21d:1fab with SMTP id s123-20020a252c81000000b0064df21d1fabmr38633400ybs.355.1653626664092; Thu, 26 May 2022 21:44:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Yegor Yefremov Date: Fri, 27 May 2022 06:44:13 +0200 Message-ID: Subject: Re: am335x: 5.18.x: system stalling To: Arnd Bergmann Cc: Ard Biesheuvel , Tony Lindgren , Linux-OMAP , linux-clk , Stephen Boyd , Linux ARM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_214425_696341_3472D66B X-CRM114-Status: GOOD ( 24.59 ) 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 Arnd, On Thu, May 26, 2022 at 4:16 PM Arnd Bergmann wrote: > > On Thu, May 26, 2022 at 2:37 PM Yegor Yefremov > wrote: > > On Thu, May 26, 2022 at 10:19 AM Ard Biesheuvel wrote: > > > > > > On Thu, 26 May 2022 at 08:20, Tony Lindgren wrote: > > > > > > > > * Yegor Yefremov [220526 05:45]: > > > > > On Tue, May 24, 2022 at 4:19 PM Tony Lindgren wrote: > > > > > > 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. > > > > > > > > OK great :) So it has something to do with drivers/dma/ti/cppi41.c, or > > > > with drivers/usb/musb/cppi_dma.c or whatever the dma for am335x here > > > > is. Or maybe there's something using stack for buffers being passed to > > > > dma again that breaks with vmap stack. > > > > > > > > > > In order to confirm this theory, could you please try rebuilding your > > > kernel with CONFIG_VMAP_STACK disabled, and leave everything else as > > > before? > > > > I have disabled the CONFIG_VMAP_STACK option: > > > > # zcat /proc/config.gz | grep VMAP_STACK > > CONFIG_HAVE_ARCH_VMAP_STACK=y > > # CONFIG_VMAP_STACK is not set > > > > The system stalls. > > Ok, I guess that means we can stop looking for invalid DMA buffers > on stacks. Out of the original commits you listed as possible causes, > we can also rule out 23d9a9280efe ("ARM: 9177/1: disable vmap'ed > stacks on suspend-capable SMP configs") and cafc0eab1689 > ("ARM: v7m: enable support for IRQ stacks"). It could still be > 9c46929e7989 ("ARM: implement THREAD_INFO_IN_TASK for > uniprocessor systems") and 5fe41793bc78 ("ARM: 9176/1: avoid > literal references in inline assembly") or possibly the merge. > > Can you post the whole .config file somewhere for reference? > In particular, do you have CONFIG_SMP, CONFIG_LD_IS_LLD > or CURRENT_POINTER_IN_TPIDRURO set? This is my config [1] and this is the system in question [2]. [1] https://github.com/visionsystemsgmbh/onrisc_br_bsp/blob/master/board/vscom/baltos/linux-experimental-config [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am335x-baltos-ir5221.dts?h=v5.18 Regards, Yegor _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel