Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp293105pxv; Wed, 21 Jul 2021 23:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxU1twJLz/Uc+ai1n5AdX2MNsFQWcrqFzNtla5IyhbEswOLLi7QMhVTvHLSsqxZWm3QD4Z9 X-Received: by 2002:a92:c845:: with SMTP id b5mr19548371ilq.158.1626935458495; Wed, 21 Jul 2021 23:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626935458; cv=none; d=google.com; s=arc-20160816; b=WnPbLXvbhdKU8PNNSV40vcQBzUy8mu+ej/aJ7xS5Pfpm3m7Q8qKeiskRVVTSuEgC59 l+KjgcTxjiUpiONJNp4hd+umRK8WIyT+PxT0NNx+waFX/4mcPxOVQC/mjMer6xJz+zjP KKzhjgza0DYib5JGZ6roDF+qjIc0FmAgMT2RImmGdvs+VYqGOofpF0DbKzVDLCXCIXaU jWfErVCD33p2fwYsOe5r1y9JPwnXds7XxVbiGMxJ1K+ADpihhL7iryzhygNEVmZDgwui YChY0gwgJ94SCQUw5rkZjA0Y3HLiYSq/KON+9tz1AdbUb4vtyCHUS4vy8c3r8i3FabMH CKYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=omt89YrYl8SYlYFr5IxniwvXvCqTlIiuhpE846cjoPM=; b=n7A/hJUnb+XqldwpkaL2qX9ziztGb2kW4nnVxhB8Y+l7wQv6fSaSVEBccRvXEmicFY vEimiPTy3vh3vsXi9aJyCFKTIVKVqx15U4l1bbDUsXoYQ7X7yAyo1R2Tmg6uyIaFBGzG TE2iEQZTCBVf7LxPGxwM3/8aUskIaJP2GujY3LpC3Hd6ULqQ7JzTWK/3KkU60QCR1WgF Jmx3o4b4NhvNioC2v7Daq6q1BtoKIUezPU/7E2KsdX6ojE58IyTt/5llTramgCTMeLwO JCHbqE+oLXh2Uc8uWryD2hy+Oh27CMOhLQX9F2Ulwxd6UxqCXiclK8xR1FjsdH/QXRkm 7otw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="a+H1u/mF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si25577879ilq.87.2021.07.21.23.30.46; Wed, 21 Jul 2021 23:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="a+H1u/mF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231389AbhGVFsh (ORCPT + 99 others); Thu, 22 Jul 2021 01:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbhGVFsh (ORCPT ); Thu, 22 Jul 2021 01:48:37 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB322C061575; Wed, 21 Jul 2021 23:29:12 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id c204so3044333ybb.4; Wed, 21 Jul 2021 23:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=omt89YrYl8SYlYFr5IxniwvXvCqTlIiuhpE846cjoPM=; b=a+H1u/mFwtesHWVLhdIrJqCzj4UPaHxGL+9D16I9vQhIwK7VC1MAGCZpxCaLdNeOuE tFSNjz4VN3G6Fd/aOh0yPIQTd8BlojvLAyKlFKCZRVqzDpdfSO+iK00ktZhaizQcJYN6 Sk4QtJmxsGQtb3y6Xr/+fry4KcSzxGAA0EPRfFyd+0OY3mJqcghoT2d+Fjts4Lqfjua2 XN/1uRnU6GypAJi+VnqSFE08n0H726MICGGXHecr9XS4/pYbh18ClSGG5M8mCY0hPeaC 0yEbBoXn3LciZizvB85Xp9bw6S6Eh7gd0JSkPvwN2sXXxX9+UvHMDLdJtqu+2NQXqMyr UzpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=omt89YrYl8SYlYFr5IxniwvXvCqTlIiuhpE846cjoPM=; b=U3XOCj96c6td/CvDGB7S3hBnVHWTEjtSOzklJY1kx/Crqjelhi1zcq+kw0YY9Er/jm +EKJaDcp1yw9aOlv+eVeKwzGVjagNLPH5saJrk5vXI19cruiGvrYfiCvAOW1Pp21vNvi njga2sP28sw6r+DmhW57+DnWHicjnTmDu4QuLqgOueZSP57NqYA86YHwqdaXTG7vGj+o cLpxfbTUkChf7vshS2d5gaAHMPYOp94WrUosyJnoOq+KHWXygRoWc9trsBx9bnpuoOUx uZ8XyhNwLV8o5J4Iww6c57aEbCp2yxixjGWw+MxeJaaZrnZ0ShhMdkWf40ldvtbB3RY/ hWFw== X-Gm-Message-State: AOAM530smCrEbwQ10ZsKtAhhFvNICSxjVnGDs/yAfyDQ2OA2dztEk6B5 Ypg9TDStK2lKCuQTBgGX5zVVDzp0+3hwkuJBzbM= X-Received: by 2002:a25:dcd:: with SMTP id 196mr50939729ybn.306.1626935352097; Wed, 21 Jul 2021 23:29:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bin Meng Date: Thu, 22 Jul 2021 14:29:00 +0800 Message-ID: Subject: Re: [PATCH] riscv: Fix 32-bit RISC-V boot failure To: Palmer Dabbelt Cc: Greg KH , Kefeng Wang , Atish Patra , linux-kernel , linux-riscv , stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 22, 2021 at 1:53 PM Palmer Dabbelt w= rote: > > On Thu, 15 Jul 2021 19:14:20 PDT (-0700), bmeng.cn@gmail.com wrote: > > On Thu, Jul 8, 2021 at 9:29 PM Bin Meng wrote: > >> > >> Hi Palmer, > >> > >> On Thu, Jul 1, 2021 at 10:20 AM Bin Meng wrote: > >> > > >> > On Thu, Jul 1, 2021 at 10:08 AM Kefeng Wang wrote: > >> > > > >> > > > >> > > On 2021/6/30 19:58, Bin Meng wrote: > >> > > > On Mon, Jun 28, 2021 at 11:21 AM Bin Meng w= rote: > >> > > >> On Mon, Jun 28, 2021 at 10:28 AM Kefeng Wang wrote: > >> > > >>> > >> > > >>> On 2021/6/28 9:15, Bin Meng wrote: > >> > > >>>> On Mon, Jun 28, 2021 at 8:53 AM Kefeng Wang wrote: > >> > > >>>>> Hi=EF=BC=8C sorry for the mistake=EF=BC=8Cthe bug is fixed b= y > >> > > >>>>> > >> > > >>>>> https://lore.kernel.org/linux-riscv/20210602085517.127481-2-= wangkefeng.wang@huawei.com/ > >> > > >>>> What are we on the patch you mentioned? > >> > > >>>> > >> > > >>>> I don't see it applied in the linux/master. > >> > > >>>> > >> > > >>>> Also there should be a "Fixes" tag and stable@vger.kernel.org= cc'ed > >> > > >>>> because 32-bit is broken since v5.12. > >> > > >>> https://kernel.googlesource.com/pub/scm/linux/kernel/git/riscv= /linux/+/c9811e379b211c67ba29fb09d6f644dd44cfcff2 > >> > > >>> > >> > > >>> it's on Palmer' riscv-next. > >> > > >> Not sure riscv-next is for which release? This is a regression = and > >> > > >> should be on 5.13. > >> > > >> > >> > > >>> Hi Palmer, should I resend or could you help me to add the fix= es tag? > >> > > > Your patch mixed 2 things (fix plus one feature) together, so it= is > >> > > > not proper to back port your patch. > >> > > > >> > > "mem=3D" will change the range of memblock, so the fix part must b= e included. > >> > > > >> > > >> > Yes, so you can rebase the "mem=3D" changes on top of my patch. > >> > > >> > The practice is that we should not mix 2 things in one patch. I can > >> > imagine that you wanted to add "mem=3D" to RISC-V and suddenly found= the > >> > existing logic was broken, so you sent one patch to do both. > >> > > >> > > > >> > > > > >> > > > Here is my 2 cents: > >> > > > > >> > > > 1. Drop your patch from riscv-next > >> > > > 2. Apply my patch as it is a simple fix to previous commit. This > >> > > > allows stable kernel to cherry-pick the fix to v5.12 and v5.13. > >> > > > 3. Rebase your patch against mine, and resend v2 > >> > > > > >> > > > Let me know if this makes sense. > >> > > > >> > > It is not a big problem for me, but I have no right abourt riscv-n= ext, > >> > > > >> > > let's wait Palmer's advise. > >> > > > >> > > >> > Sure. Palmer, let me know your thoughts. > >> > >> Ping? > > > > Ping? > > Sorry, I missed this one. It looks like the patch that adds mem=3D and > fixes the bug has already been merged, so I'm not really quite sure what > the right thing to do is here: we don't really want the mem=3D code on > stable, but we do want the fix. I went ahead and did > > commit 444818b599189fd8b6c814da542ff8cfc9fe67d4 (HEAD -> fixes, palmer/fi= xes) > gpg: Signature made Wed 21 Jul 2021 10:21:05 PM PDT > gpg: using RSA key 2B3C3747446843B24A943A7A2E1319F35FBB188= 9 > gpg: issuer "palmer@dabbelt.com" > gpg: Good signature from "Palmer Dabbelt " [ultimate] > gpg: aka "Palmer Dabbelt " [ult= imate] > Merge: e73f0f0ee754 d0e4dae74470 > Author: Palmer Dabbelt > Date: Wed Jul 21 22:18:58 2021 -0700 > > Merge remote-tracking branch 'riscv/riscv-fix-32bit' into fixes > > This contains a single fix for 32-bit boot. It happens this was alre= ady > fixed by c9811e379b21 ("riscv: Add mem kernel parameter support"), bu= t > the bug existed before that feature addition so I've applied the patc= h > earlier and then merged it in (which results in a conflict, which is > fixed via not changing the resulting tree). > > * riscv/riscv-fix-32bit: > riscv: Fix 32-bit RISC-V boot failure > > as that"s the best I could come up with -- then the fix will land on > master, which should cause it to get pulled onto stable. > > Greg: is there a better way to make something like this get to stable? We can: 1. git revert c9811e379b21 ("riscv: Add mem kernel parameter support") 2. git am , cc stable 3. Kefeng resent a new patch that adds the mem kernel parameter support, on top of mine Regards, Bin