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 D3B9EC433EF for ; Wed, 16 Mar 2022 21:08:28 +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=CyM7vNyA0GLqZcFC2cuUx8N/OQ99zPGX15mOyZJSkAM=; b=XNNsXV+z2sSIJc 6WjHrQge78Q8t0ySd5jZiagqcXwt5ytdKNe701dADEfsyo0Km0JsfMQvSmPiSng2Ao04n4qdFoT3Q 9/N7n2CTwfN4T4BDTA+widcIS+IXzf7OC0+q6EScGzQMlfbDLzc5WRU/sIRtwUOnCJFAXaV3eC938 vpGhRADOdlDQ8hqWx+Sbtxwa+oX08IVGCIoYpxyu4Goe0MRw+rlt276RfZzKXEPwE/5gp85Sl2j/s Opgby9qxlv957JHp/thyGQSMUBa4R48Jwh/1ui0mJj/zTlkkmjeyaH9gXdeaSAKIzipKPQPqFcSr3 XQSbYv+tVL4fzn4irErg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUarU-00EJoK-QR; Wed, 16 Mar 2022 21:07:16 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUarR-00EJn1-1X for linux-arm-kernel@lists.infradead.org; Wed, 16 Mar 2022 21:07:14 +0000 Received: from mail-wm1-f50.google.com ([209.85.128.50]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MGQSj-1nKzvl23gL-00GpyR for ; Wed, 16 Mar 2022 22:07:08 +0100 Received: by mail-wm1-f50.google.com with SMTP id n31-20020a05600c3b9f00b003898fc06f1eso3911720wms.1 for ; Wed, 16 Mar 2022 14:07:08 -0700 (PDT) X-Gm-Message-State: AOAM533bGtv79viCan8L7V9/XPfIxz2agvz61c52p+z0eTL0p/yGtEEU yqO17MS6V7NhHzZXAq3a367iOZmUEpcuECZ9XhM= X-Google-Smtp-Source: ABdhPJxVI0R9mGwWDi/y/5CEDvx0ePz2YtMrogMw/xC4RWcFdljmaEtN6zrV4tE/LFMrAHBl9c+q8jvjGis2JVg7Zjo= X-Received: by 2002:a7b:cd13:0:b0:38b:f39c:1181 with SMTP id f19-20020a7bcd13000000b0038bf39c1181mr1276860wmj.20.1647464827976; Wed, 16 Mar 2022 14:07:07 -0700 (PDT) MIME-Version: 1.0 References: <20220216183704.42084-1-nick.hawkins@hpe.com> <9FE3F625-39FC-4ED7-A2CC-567EF0181886@hpe.com> <483082A1-A464-4D3D-B994-66B09E5D54B5@hpe.com> In-Reply-To: <483082A1-A464-4D3D-B994-66B09E5D54B5@hpe.com> From: Arnd Bergmann Date: Wed, 16 Mar 2022 22:06:51 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [v1] arch: arm: configs: gxp_defconfig To: "Verdun, Jean-Marie" Cc: Arnd Bergmann , "Hawkins, Nick" , Russell King , Joel Stanley , Andrew Jeffery , Olof Johansson , Linux ARM , Linux Kernel Mailing List X-Provags-ID: V03:K1:8Jzr2jAEQM6NV0r6NROiG63fBo9XG1EAqCakUYibagO216cFuRE kl/d0o/31dX7Is1gawZDHZPgx1ctmc8u4rv3bepSlePknLtvxiRt/xRjPkoO261ivbzK8Ln CpTceyQvOgLB9RMc+C72CPrsIq8nBZ0nW7UbdU4JsMEPHuBrIt+ynjm7dYe9umzGXrXWdKW UonGPNIXbxwj03qCCyNwQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ehsT4bh7kwM=:HpvQYJMliPkt0jPZSUhzYG KdWPcSYE9p1HtFJtSXs9QJbK3FOORF73L/gisdPMaqX9P6QjNaT4jqRFc3JTmx7wezIhSDqvt w12DmkEy4DSknbcH8gRcPlxL3aL2/3VsXlRy/1UB1Q5gh42sdSchg0DWW/6SvsdEiNkdQ7nsv PzgU4P55tY/F9HNFY9ey4M2zWOkZTn79gMIxFm6XzTw//Aq2grk99pCLHQoOZgIAxGW0383MX UkXkAj77B8CvN1yQd+yBJ6Hl+RzRGbyHzGLCVhqRnlpo4PVSfEg9VlZ9pct1wjv47mWud6VwQ kY6SkGgjhzaZinU+uvKR00xGmWjYnh/vpr3Js05EwT/vUF3sY3w4RNqQpb5AkteWEozmOcW+W m++lbx+Py/H+LqkR02qoL6BYKkUfwT9oDxGFbaWCE0jR/8adsWZGTMY6Ag8CDwxHKWQN+xuOb JhuUufWwyXaJsJyDyYUtInVXqdCTdv1OcFNpjnma2JS/mp39tBfR+QhTQdFkaG3CaG1QZqk9N DKyVpGpAGFjAhOjn57OLp94ovTvzJrkLCZ+VyJtittgclhFVEHhb5VbFT3ynY/RldPnLKxIox 6rHMciHrJ9a9XNkvmC6sOKec5/fB6tMkDP+M0JD4WyG++sZPtCdisCdWKeTvF82MO0qQP95j6 Qh26F8ywUx+Vpy9/UFs5yjQf9mFvNd0ks4R2WuH5fVk4Y3CVEFOIhnvQPEnZRxtZ4+No= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220316_140713_420961_D08A2F07 X-CRM114-Status: GOOD ( 25.61 ) 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 On Wed, Mar 16, 2022 at 7:54 PM Verdun, Jean-Marie wrote: > > If you get unknown instruction exceptions, that is clearly a bug that has to be > > fixed somewhere. Turning the options off should not be necessary, but we have > > to figure out why these crash, and make sure we have correct runtime detection > > in place that ensures that any driver code runs only on platforms that have the > > corresponding hardware. > > > Do you have any more information about how and why these crash? My first > > guess would be that there is something in your DT that describes hardware > > that is not actually there. With a correct DTB file, the two options should > > not cause any code to run that wouldn't otherwise. > > I think I found part of the issue regarding the PERF_EVENTS. In ./arch/arm/kernel/hw_breakpoint.c, the function core_has_os_save_restore is calling the mrc p14 instruction to determine ARM_OSLSR_OSLM0 value. Unfortunately per the ARM Cortex A9 documentation that call is not implemented on such core > ( https://developer.arm.com/documentation/ddi0388/i/debug/debug-register-summary ) > > which is leading to an unknown instruction on our ASIC. > > Need to figuring out how to workaround that. I will check what ARM_DEBUG_ARCH_V7_ECP14 is supposed to support. We might have either a bug into the way we report the ASIC id or something is weird into the kernel which is assuming that Cortex A9 support this PMU access. I'm not familiar with the hw_breakpoint.c code, but I can see that the get_debug_arch() and core_has_os_save_restore() functions are at least eight years old, and Cortex-A9 is one of the most common CPU cores, so it would be unlikely that this is a problem with the CPU core in general. My best guess would be that your boot loader code is missing a bit of initialization that is required to put this into the correct state. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel