Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2679549pxb; Sun, 17 Oct 2021 22:33:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylIjVSDmH/JP34v/bOQmLTLVNd8vt3RZdBvPsVU7d6EVZmCUaYbz2+7uvDzDcbbyZEG9Uk X-Received: by 2002:a17:902:c10c:b0:13f:68b4:4abe with SMTP id 12-20020a170902c10c00b0013f68b44abemr25149932pli.8.1634535232384; Sun, 17 Oct 2021 22:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634535232; cv=none; d=google.com; s=arc-20160816; b=wyYWO/IFMHEc5Oo3ILPsxEXnU7flrN9ShJUyF+DmNvsyLoFUUTDrnWtEFkzOm/0ia6 dYMWMECtmEWqstXvDqJS7h3E3VDo7zwIoXOqWi4ZEbsXBP0NEH2SqQr3EjSX0GzP8CST 3Vt+0I5iyU/Td5MVtkQrggHns3CoPyH85rqi9uQaFEqfuSXeJvGDcL73Bjl6Ruhg81XG nSMsupj5q6909SoaJ4FBDTfr7W6aduyDcDCDnRl4k/E/7fEPXpW+dO6gymBUQtQvFwTo bwjod+btmnoeb3ivxz/+IP9tJVIg32Pu4P5Rr1uLgo+W0zcjetV98I98Ww/IUxjNU/no jPww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Kalz1nB74nozhEOhe3SpsXwwy/AUBS/hhCESynMhNCg=; b=y+UDe2TV8/htksT2PkLHCOyCwWf48XbcbpXmE3Dg2cQUSoukbOpiOVqOmhGYMRmyi4 XKSokFF2EYquWgGCNme2aXxgWbf4YJioz0sCuBq1Vvn01dMFPZSRrEWQTgJk76q+v/ae nsY4iQ7OgZdIyuz51ent5mwZfJlRx7xiIDpHBVWN0HCK0nGfnJ0AGEOreFKJvB+7qvMG WJBfnPm2MN7T9ZEV3f7OtLNV0cF7CU2tcmk6kxUTeWSx1sB6ou14jjTzYydKYvwRuT/c Z+8TAAXonb1Nq5I5Bbwr5CUczBcPW8n6AYbu6EGRqVJuu5CMLfWA4He/UxmA3vBZYCMg E0ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=vcm8kDbj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gp5si7407908pjb.139.2021.10.17.22.33.37; Sun, 17 Oct 2021 22:33:52 -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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=vcm8kDbj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbhJRFdz (ORCPT + 99 others); Mon, 18 Oct 2021 01:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbhJRFdy (ORCPT ); Mon, 18 Oct 2021 01:33:54 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8152C06161C for ; Sun, 17 Oct 2021 22:31:41 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id y3so39199673wrl.1 for ; Sun, 17 Oct 2021 22:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Kalz1nB74nozhEOhe3SpsXwwy/AUBS/hhCESynMhNCg=; b=vcm8kDbjfXcP+AsgYBDSK0JwgDRDUKU8iV6wkORf60lcgB+4553Zw9mxIyEuTT+LRR N2alooVlhn4UFgX4r09/HpuGxakyiIevsH0F95QXCDEyVBWdaA3A8T0u1VDeGZt0IftK 5L0sjEgKhVHRD4XE9WDsYZyaSYQa/dw9nE5Kfi6W9XsBcEWiqkS4HTtOmFgcpqBxb9+S lPT7a08caCnGFa6qOtK6usXZuD//rIrWyfSpcYXU+W0Knj74pMiCKf3mgbyiO14ZXNrO fjQUtfZcAxOI+SEK9PrJ573FueEuFzlXw8XBjMPmTqBX+wLS8DKmBYEvbqeEMvmbkBDt SRqw== 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=Kalz1nB74nozhEOhe3SpsXwwy/AUBS/hhCESynMhNCg=; b=hVqc9hY2/9ZTSRf7aoDsyxObFVQzT5ocsFDxuOCQGh/retLOsT+tSm0FFzPnEySeSs a4BjA/ZufDEFasiyLERZ7842waPvS6k7wYF78JxAWVy81D2JHK4tqeLxPIn4gA6JhBMn mG6K3HRVG41TQxu5iqb9oKmGn4YqMMWSUBNJEcqjscDzeHluVd9X5m5EVpN12sf77UB8 kKK9GI4iNL5foUQYvWRJd9KtH9nr0A2fbAQWYxW+IHTBEmS65atn72N3QK7CXwOeT3Na By+JbJp+MaaKwuVdNKiTOEeF3UtCR7OLVDXL+e6Uuq2NRr2RC+zwsN/CC2sxmUpqDye5 m0mA== X-Gm-Message-State: AOAM530ykNouehE8gZiwlCoi6XnHa2bLoXmWwsIT+Th2MSNEZXS37HP4 izd1gm+CINBX7pkok0CaNlLpOMaF/gtwksXIKXbD6g== X-Received: by 2002:adf:e60a:: with SMTP id p10mr32309485wrm.306.1634535100133; Sun, 17 Oct 2021 22:31:40 -0700 (PDT) MIME-Version: 1.0 References: <20211018052238.522905-1-181250012@smail.nju.edu.cn> In-Reply-To: <20211018052238.522905-1-181250012@smail.nju.edu.cn> From: Anup Patel Date: Mon, 18 Oct 2021 11:01:28 +0530 Message-ID: Subject: Re: [PATCH] riscv: fix misalgned trap vector base address To: Chen Lu <181250012@smail.nju.edu.cn> Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Alexandre Ghiti , Vitaly Wool , Sean Anderson , Kefeng Wang , linux-riscv , "linux-kernel@vger.kernel.org List" , Zihao Yu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 18, 2021 at 10:52 AM Chen Lu <181250012@smail.nju.edu.cn> wrote: > > * The trap vector marked by label .Lsecondary_park should align on a > 4-byte boundary. If not, CSR_TVEC may be set to an incorrect address. > * This bug is introduced at commit e011995e826f8 ("RISC-V: Move relocate > and few other functions out of __init"). > * This bug is exposed with an educational emualtor. > Please add "Fixes:" line here. > Signed-off-by: Chen Lu <181250012@smail.nju.edu.cn> Otherwise it looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > arch/riscv/kernel/head.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > index fce5184b22c3..52c5ff9804c5 100644 > --- a/arch/riscv/kernel/head.S > +++ b/arch/riscv/kernel/head.S > @@ -193,6 +193,7 @@ setup_trap_vector: > csrw CSR_SCRATCH, zero > ret > > +.align 2 > .Lsecondary_park: > /* We lack SMP support or have too many harts, so park this hart */ > wfi > -- > 2.30.2 > > >