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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C817C433EF for ; Sat, 15 Jan 2022 12:38:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA0E58351A; Sat, 15 Jan 2022 13:38:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Nf+xC79B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19F7F83458; Sat, 15 Jan 2022 13:37:58 +0100 (CET) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C270E83394 for ; Sat, 15 Jan 2022 13:37:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82f.google.com with SMTP id w6so5172125qtk.4 for ; Sat, 15 Jan 2022 04:37:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LGc3G3pDG7U80BIwgdAFeQ5HeVfAVnLDpowEJotUro0=; b=Nf+xC79BOxICyHJtV8bwVSKZCbeox2q7uwUqPtRekNVjsQB+m3xOIl1oDdQ6Rbr+sW tv5edFdG2/cp9qFHxfxvUOT4A2WeJ156i/7iOmstkHQPnyomdMW0PDikX9T0IYPapCAD bYfx19Ueeh/hwdlOKi6yZ/YHCCLl9dFq15Fl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LGc3G3pDG7U80BIwgdAFeQ5HeVfAVnLDpowEJotUro0=; b=mbnaeh0L6nDCqv6aK+igazRGciZijVLJy3tjvlpLXRZjV4cjBrHbrhiE2Iqo8Vnr1i RIIG2VkvMWW+e+m/3UQjiaQUJh4GKMU0N1w8Br3xAihomOh328dnPr+fYLVlB4tKxVGD vzjxlHBmV5O9/L577p4IU8VSUndq4cQDy+mQef5L66/eBV3auhM8cLC+6jr2luA2YqZ1 3JdBol608RGff4CgE+6eGMJx8lnH/RQgaIgEXbPDpgAohn6ataZ9/rQS4cbwjnnWTqNO NgsLj1xFJ5wNi3SnBI2a25PH3brplMmqDVZX8CImrA3f4eoLzM8IsfUlLHKEaL7WjK/P pkhA== X-Gm-Message-State: AOAM531bXvacU4nIGnRSqDeiZ0dXrsAIliy4jqQ13McrBCWAgKJwYPjE BTNYw1e7uysoVrlSX8c1PD7y8w== X-Google-Smtp-Source: ABdhPJx3FRCHVqZI5MDX71NOvSiPQTK5sG8sNNXdEDpPGXKHofRVv0nNCGaKE89aPHoTgqlQeXDehw== X-Received: by 2002:a05:622a:d1:: with SMTP id p17mr11072947qtw.207.1642250271872; Sat, 15 Jan 2022 04:37:51 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-9533-0c51-a891-732b.res6.spectrum.com. [2603:6081:7b01:cbda:9533:c51:a891:732b]) by smtp.gmail.com with ESMTPSA id u7sm5843908qta.32.2022.01.15.04.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jan 2022 04:37:51 -0800 (PST) Date: Sat, 15 Jan 2022 07:37:49 -0500 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Bin Meng , Marek =?iso-8859-1?Q?Beh=FAn?= , Patrick Wildt , u-boot@lists.denx.de Subject: Re: [PATCH] nvme: Do not allocate 8kB buffer on stack Message-ID: <20220115123749.GY9207@bill-the-cat> References: <20211209100639.21530-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="taVdnqCjSYZEhCUP" Content-Disposition: inline In-Reply-To: <20211209100639.21530-1-pali@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --taVdnqCjSYZEhCUP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 09, 2021 at 11:06:39AM +0100, Pali Roh=E1r wrote: > Calling 'nvme scan' followed by 'nvme detail' crashes U-Boot on Turris > Omnia with the following error: >=20 > undefined instruction > pc : [<0a000000>] lr : [<7ff80bfc>] > reloc pc : [<8a8c0000>] lr : [<00840bfc>] > sp : 7fb2b908 ip : 0000002a fp : 02000000 > r10: 04000000 r9 : 7fb2fed0 r8 : e1000000 > r7 : 0c000000 r6 : 03000000 r5 : 06000000 r4 : 01000000 > r3 : 7fb30928 r2 : 7fb30928 r1 : 00000000 r0 : 00000000 > Flags: nZCv IRQs off FIQs off Mode SVC_32 > Code: 0f0fb4f0 0f0fb4f0 0f0fb4f0 0f0fb4f0 (f0f04b0f) > Resetting CPU ... >=20 > This happens when nvme_print_info() tries to return to the caller. It > looks like this error is caused by trying to allocate 8 KiB of memory > on the stack by the two uses of ALLOC_CACHE_ALIGN_BUFFER(). >=20 > Use malloc_cache_aligned() to allocate this memory dynamically instead. >=20 > This fixes 'nvme detail' on Turris Omnia. >=20 > Note that similar change was applied to file drivers/nvme/nvme.c in past = by > commit 2f83481dff9c ("nvme: use page-aligned buffer for identify command"= ). >=20 > Signed-off-by: Pali Roh=E1r > Signed-off-by: Marek Beh=FAn Applied to u-boot/master, thanks! --=20 Tom --taVdnqCjSYZEhCUP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmHiwB0ACgkQFHw5/5Y0 tyzdDQv9GPerpu/GzucsRoeJ04gVZxL9AAbh7R8jGahG8Sz6Y7EHfLqa7vLXkGdK sZvT3QJj0aYYiFbnzfS8uGK0P4mgGw3PCviD9hk0gvCXoY55vFmHIBvgkdS8MdWI wz5+lQq8Sooa5x2vTNhmadT8J3t3cJRA+uMsFR81N9TsyfzdTzcZdRqcZaSlbW8N HF6ktiO+3ymvJddQb98k2RP4DKk5/XUu+fty7Dx9Q2rwRy8+An2Uz4x/8a5li2g3 /SzFpHIxx7OKfGFQuYUNSsuEVdSOANFfWVZQyGpI/Ygyg0HjW4YGBxTAGbvdhZ7A lIhP2E6DbCcrSjGtoJFUigMBN/danW/taF+zyvlLkBaG5GEsMQVgoPmxLMY3zucq pBn+hUC4U0A4HBNyntXRPTdwiiwXQ/xNCL6qYqTQ6RPMoSIcAseJyReKQZHE53ef Qm2HRMhGQ7IcwapfIgyPUGXttgWxh02xhadEy+yuDiV+NODGfHdEAfcQW+LdqJ3i QV2RMbEd =xxBu -----END PGP SIGNATURE----- --taVdnqCjSYZEhCUP--