Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2370536pxb; Fri, 17 Sep 2021 08:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd4mSDT1tSdzFu65DKvuCzoysp3ILXNIO4LnhNHhVvEa80Bz3W+BgSqLa5XK3fbOVMzjXV X-Received: by 2002:a17:906:1c07:: with SMTP id k7mr5962809ejg.145.1631891953662; Fri, 17 Sep 2021 08:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631891953; cv=none; d=google.com; s=arc-20160816; b=zD1WT+8/Pbh5SPSWXZh7WiRRcPipDLQJkaAGXDk1xlTtweJDhXVVcQtGbC01xG0eC2 2qcuoeKfJEh0IsBIFkOBkeGmj33U0iTEKHtAZFxLYF7qYA4DPGkUot5Goyq8HiYQFzi0 9syCliEl1NYjyp1R2Sv/Kka0L4gtd2eQtoAju3Sx6VjxT9gSZUXXVhaLGHPeqE3rcrPt 9JpatNf00GbRgGXAU452FuEsbV02yCzfwWjSZR6E1IA3x75ZvI2TQBSHs13i+i7FQ1T/ sOXz2/W3gee3QS5YbEUkphmc1JnX9H7/1H+3VrrPWDVcIGZyOla2zga37HMwgXlcYStV eLGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=eNWjUOhlNPYKaMAtioES/rG0dxTk7gZ+ai70R1grEPw=; b=rovJ3mpbCDRbyr8EoxPcOjcyhFb0zgabQL90y4krhc8d4KpChSieXuUOjxhKISoBNn 2BjHD0nKIragtJpQ5OwlEsUBm44xYV1rwlM7UaO76QqxQgOyjg3jrHXk2D74L60PISwS FI3GsHClynYhZdaiKopxDeyXtOsD0rkTjgVa/Mw0aRRkP/zlZ51kcLCZg2caG3zr5bWy u8HTNRXltG22MH5QPxGe7/LkaIcEUoI5ixfG2TDPSlhSVpr8h4ptdCxCGlfJDJHMJzpl pRQTsrbJoNarndunPCbyUxYPWtCXBZ3oJ4CRynPhLJYqOZfxYf47mHD68nePFsfIrgpQ pEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mail.ustc.edu.cn header.s=dkim header.b=fLx9paXp; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si7321490edw.111.2021.09.17.08.18.44; Fri, 17 Sep 2021 08:19:13 -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=@mail.ustc.edu.cn header.s=dkim header.b=fLx9paXp; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mail.ustc.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231386AbhIQOWl (ORCPT + 99 others); Fri, 17 Sep 2021 10:22:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbhIQOWj (ORCPT ); Fri, 17 Sep 2021 10:22:39 -0400 Received: from ustc.edu.cn (email6.ustc.edu.cn [IPv6:2001:da8:d800::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 158F1C061574 for ; Fri, 17 Sep 2021 07:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ustc.edu.cn; s=dkim; h=Received:Date:From:To:Cc:Subject: Message-ID:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=eNWjUOhlNPYKaMAtioES/rG0dxTk7gZ+ai 70R1grEPw=; b=fLx9paXp1EWnCFjjfADFUp/Af7IqNSE21ZEidBrrWrsDe8Tmw7 DOvqEG/jWmU7AGjCRsosyasr6Gvgm6j2LYYU+sNw9Pn+CV4ATyj6ky9JAewUH0LL oWxrA1Xn1kXdDYTBG5yhHKgOrURckiHFwT6nESH0KMoywASc6ZFgz2iUE= Received: from xhacker (unknown [101.86.20.138]) by newmailweb.ustc.edu.cn (Coremail) with SMTP id LkAmygBXW4dSpERh3mcRAA--.2969S2; Fri, 17 Sep 2021 22:21:06 +0800 (CST) Date: Fri, 17 Sep 2021 22:14:29 +0800 From: Jisheng Zhang To: Chen Huang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Kefeng Wang , Darius Rad , , Subject: Re: [PATCH v2 0/2] riscv: improve unaligned memory accesses Message-ID: <20210917221429.4d3a15ca@xhacker> In-Reply-To: <20210916130855.4054926-1-chenhuang5@huawei.com> References: <20210916130855.4054926-1-chenhuang5@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CM-TRANSID: LkAmygBXW4dSpERh3mcRAA--.2969S2 X-Coremail-Antispam: 1UD129KBjvJXoWrKr1xAw1fWw4kKr47Jw13Arb_yoW8JrW8pa 1UCFnxurWFgrn7KF93Jwn3uF15Z3yfGF47JrW2ya4Uur1YvFy7WrWjq3WDG3srXrn7C34D GrsavFnrua43Z3JanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUy2b7Iv0xC_Cr1lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwV C2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC 0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr 1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxAIw28IcxkI7VAKI48JMxC20s02 6xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_Jr I_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v2 6r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj4 0_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j 6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j189NUUUUU= X-CM-SenderInfo: xmv2xttqjtqzxdloh3xvwfhvlgxou0/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Sep 2021 13:08:53 +0000 Chen Huang wrote: > The patchset improves RISCV unaligned memory accesses, selects > HAVE_EFFICIENT_UNALIGNED_ACCESS if CPU_HAS_NO_UNALIGNED not > enabled and supports DCACHE_WORD_ACCESS to improve the efficiency > of unaligned memory accesses. > > If CPU don't support unaligned memory accesses for now, please > select CONFIG_CPU_HAS_NO_UNALIGNED. For I don't know which CPU > don't support unaligned memory accesses, I don't choose the > CONFIG for them. This will break unified kernel Image for riscv. Obviously, we will have two images for efficient unaligned access platforms and non-efficient unaligned access platforms. IMHO, we may need alternative mechanism or something else to dynamically enable related code path. Regards > > Changes since v1: > - As Darius Rad and Jisheng Zhang mentioned, some CPUs don't support > unaligned memory accesses, add an option for CPUs to choose it or not. > > Chen Huang (2): > riscv: support HAVE_EFFICIENT_UNALIGNED_ACCESS > riscv: Support DCACHE_WORD_ACCESS > > arch/riscv/Kconfig | 5 ++++ > arch/riscv/include/asm/word-at-a-time.h | 37 +++++++++++++++++++++++++ > 2 files changed, 42 insertions(+) >