Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1440651imm; Wed, 20 Jun 2018 18:48:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKvlG12F74rIgzzFUprpOq/Cn/Sbtge3H4MZhLJTq014ihI+pi8kH8hdhl0URSi6IN81TCo X-Received: by 2002:a17:902:82cc:: with SMTP id u12-v6mr26179183plz.83.1529545736016; Wed, 20 Jun 2018 18:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529545735; cv=none; d=google.com; s=arc-20160816; b=Dvg/Y5MT1KO/O0yOWv+BA1buK1ZeUg5vS7mWml1QB2ENYPhiVgpSoudkIhLLzVHVxD fqrpse9qwByN6Wjk7Zma8+4G6srgqlao3iU3kcGqbqt3ZOiIpljlfB/fdGjcK/e78VnY no1kCPjnKkP3gfdm1Yu/c8TzRCSuEp+WG61N0u2pgSTwmw2JKr8bcCfCSMubg/Y2bazQ 7tdWhHTFAzvMtxOTNe5HZjWFy4HA5uFfUwrjqHGYNIgvX7HjrwWEp18iTnrUk+quaxJk GbT0ifbrz6L5wJijcs0/finBVMrfOtyp2SFy1cnpId2MszTuRjsEmfJ378NnKvkowKTe tXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=tJmhpqvlFulxUoKgl1cVJ2FrLy/VBvMNlJavPYdmoL4=; b=Mc74jCLINMi5Ja+AwV19d2VV3JPLDnRoVeXpPlnJFpNFjKLY3D8pBYP+AXw+RWLNYy cwpurqwJzKAeKzT1rtsgZ+G6t0cXe6N0ktwRRNnhmxtp63SoSueNuGoqE6rnlu+WywI0 aD1BRSLkUttT6Of7lUNHwcqWu2MHyoMsJ2bmhnRKKrxrHcvsG8eudAVhBh2CUwwQwPy1 ILz2TVSwywcyMxA4+vmoDQsYtd7KTzMlq1D2Xaa9pg4x6lpOpT0WFYgO1p9Z0/MbK5SS d9ccx0KGobwHPuyaZQTDhuFegHU1XGiLRortPHNtAD9C8gnFJ2sKEc11aEVhkwQnJwTs bTOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si2832063pgc.302.2018.06.20.18.48.41; Wed, 20 Jun 2018 18:48:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754340AbeFUBry (ORCPT + 99 others); Wed, 20 Jun 2018 21:47:54 -0400 Received: from exmail.andestech.com ([59.124.169.137]:17899 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754279AbeFUBrw (ORCPT ); Wed, 20 Jun 2018 21:47:52 -0400 Received: from ATCSQR.andestech.com (localhost [127.0.0.2] (may be forged)) by ATCSQR.andestech.com with ESMTP id w5L1eAoj038232 for ; Thu, 21 Jun 2018 09:40:10 +0800 (GMT-8) (envelope-from zong@andestech.com) Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w5L1doBI038038; Thu, 21 Jun 2018 09:39:50 +0800 (GMT-8) (envelope-from zong@andestech.com) Received: from atcsqa06.andestech.com (10.0.1.85) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Thu, 21 Jun 2018 09:40:11 +0800 From: Zong Li To: , , , CC: Zong Li , Subject: [PATCH] RISC-V: Add the directive for alignment of stvec's value Date: Thu, 21 Jun 2018 09:40:07 +0800 Message-ID: <1529545207-26999-1-git-send-email-zong@andestech.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.1.85] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w5L1doBI038038 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The stvec's value must be 4 byte alignment by specification definition. This directive avoids to stvec be set the non-alignment value by the following code in head.S /* Point stvec to virtual address of intruction after satp write */ la a0, 1f add a0, a0, a1 csrw stvec, a0 Signed-off-by: Zong Li --- 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 396ec7b349ce..ae7b204f531c 100644 --- a/arch/riscv/kernel/head.S +++ b/arch/riscv/kernel/head.S @@ -94,6 +94,7 @@ relocate: or a0, a0, a1 sfence.vma csrw sptbr, a0 +.align 2 1: /* Set trap vector to spin forever to help debug */ la a0, .Lsecondary_park -- 2.16.1