Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp140584rdb; Tue, 5 Dec 2023 00:40:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1CErDB4Avg5NOAbD+Xj/mYSdrfRgIiCpzO+0HhsbvWHYTN2a31ldsqShIKrwolJxY2OGA X-Received: by 2002:a17:903:186:b0:1d0:c6a6:10e8 with SMTP id z6-20020a170903018600b001d0c6a610e8mr291558plg.56.1701765627157; Tue, 05 Dec 2023 00:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701765627; cv=none; d=google.com; s=arc-20160816; b=GBvP8wVCrkhfgGsmHxKDZ3Hc3ScSYg3WKUemS4FFOjbxZwj7tTKtMu6jxEAh79Y30j KlkhW4azZyShCOBUaWj1W+txigwEWM98ePCQ1dnfvU2bRWhu4zdGSSLoz2hAi5mhOzp1 BpLg8Uxj0TCjOhi4mqm46vxb7unz3cBND+blBEbXBJr7RP1zzccIdVqUMy2IWpOIHG54 9LBp7Sfiay4lfn0cTMVNRxtZumH2H2W7/xeYrGdYd7Wj48aZvScwORbQt41VZpKz9xmf 1REIVq1Nrxnx4wDJ2KHVzKGhqZrDhV6FD/53UjOU7cRTf+mTIJQmz7r3XX+QhPwTlxAd M2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=NcOt9kZ7JwOzYfmxC1M3J+r83lE9sNFYqBWrLheYTEI=; fh=WqPMP/5JBJabmLM7fUg+4IFxckJ2sGWOfEXaawc/uWg=; b=sREMCznpXdnN2UyvEJSEPR6zvce5rA52oCFVkR3Hp/+f/p5j+aKAy7S/1xKDuJA4BC I6DFoZjZqlXmM5ahyVTvN6Zmf3lkC82EqiV8DRMMhlrxkxqZVtiZjecykXnba8SGtW8p 276Tv94IVKxiodJAhRB9eYE9kfnRDZjD8jdDUjg3IFVP6R6/Zw9J+NVxgUY9zQPq7Qn0 2UfMSDXns9OS2TeBD+aIFnXoLYrXJx3dlQwhln1gxOHxd+3x/h4EzgfeWUPR9huqaoBT zckk+Fjz67rQUnVQXsQLyhYiwj63hRLoFtewhaFp2AXZJQrqU6K9omIr0UIRqfTcf9W9 pg5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b="jwF+DbD/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o2-20020a170902d4c200b001d0c1a225b3si1356289plg.185.2023.12.05.00.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20230601 header.b="jwF+DbD/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1828180408C5; Tue, 5 Dec 2023 00:40:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344825AbjLEIkP (ORCPT + 99 others); Tue, 5 Dec 2023 03:40:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbjLEIkO (ORCPT ); Tue, 5 Dec 2023 03:40:14 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C99519C for ; Tue, 5 Dec 2023 00:40:20 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1d05199f34dso23335205ad.3 for ; Tue, 05 Dec 2023 00:40:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701765620; x=1702370420; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NcOt9kZ7JwOzYfmxC1M3J+r83lE9sNFYqBWrLheYTEI=; b=jwF+DbD/Ephd//3womWRnnglgslTXg9EV1kA/dzvVrofRK595jZhBGK6pNn0ygtRw8 JrNX5JiTIygh9k2WEElLWBs30cpyX/kQPibKqIz+TH4GL12s7A7XFfENW5w/ajac8ojA WF9m0DkV33c77Q5/EANrL7ohXnbrOKeYDu0+nk0IzMAK5kJNhf4kqroe1BnjNdfPhHoM B9dWRZxd+fKUCkmgq1iICtGI84VpihDGtKM9Ai2fq/9apYBMpr2iX9738rSmcvY8j/8U RzIB3i85yCuPvndWJ16D5CpyqTNml0G4Iqdk5qJD5zZLSQRcBt9cLHrsDbXkBUayj4GC N3Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701765620; x=1702370420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NcOt9kZ7JwOzYfmxC1M3J+r83lE9sNFYqBWrLheYTEI=; b=flD9c2PCFT6ra0tEA15ovRRcnfE0QnmLBd/0NCPPaTU7Rd+GLxFFtHb5vOMQ8Std5f MbrjmQBnH7oCulQ9Yddjoq+jiPCwSNXCVz76JjeqaK+kGxZtnfcf7gJOUjkTQttqvplX vw0wjpBTV5NGd4THKlk3tkMVC4+gLWv+bOcAFtr+aEEdY+r8QMdEz/nvhgM+8FhsoWwD gb4qIvOuLh9B2NhEj/XorOqhHxiHCyoggMh+wyB8bAuOAcOic2vNFtremb63wZJG4vlz yO1BLOemdhzscmuRzZ67As6FZqU5+uXcSb03QcPi7iKilQmJuxQjIM9s5wHOq1nyFtjM Yq0Q== X-Gm-Message-State: AOJu0YzvoRRXYdIzXHbzS2a9v2VL4ZtxPPBXXdKA0GEAlH8TW4HnjTUv NdqsmuP6BtgtR7aEJlOIjvk= X-Received: by 2002:a17:902:ec8f:b0:1d0:6ffd:6e55 with SMTP id x15-20020a170902ec8f00b001d06ffd6e55mr2466177plg.77.1701765620061; Tue, 05 Dec 2023 00:40:20 -0800 (PST) Received: from DESKTOP-4R0U3NR.siflower.com ([2a09:bac5:6249:183c::26a:82]) by smtp.gmail.com with ESMTPSA id h14-20020a170902f54e00b001cfd2cb1907sm2998238plf.206.2023.12.05.00.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:40:19 -0800 (PST) From: Qingfang DENG Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] riscv: introduce RISCV_EFFICIENT_UNALIGNED_ACCESS Date: Tue, 5 Dec 2023 16:39:24 +0800 Message-Id: <20231205083924.48933-1-dqfext@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231203135753.1575-2-jszhang@kernel.org> References: <20231203135753.1575-2-jszhang@kernel.org> <20231203135753.1575-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 00:40:26 -0800 (PST) Hi, You may as well remove the -mstrict-align CFLAGS in the Makefile, if this option is enabled: --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -108,7 +108,9 @@ KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax) # unaligned accesses. While unaligned accesses are explicitly allowed in the # RISC-V ISA, they're emulated by machine mode traps on all extant # architectures. It's faster to have GCC emit only aligned accesses. +ifneq ($(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS),y) KBUILD_CFLAGS += $(call cc-option,-mstrict-align) +endif ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) prepare: stack_protector_prepare -- - Qingfang