Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp505703pxj; Fri, 14 May 2021 08:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMUrZCvAufRl9Kqxt+sjWPMii4BXR7dle+/kgUHi1rQiJs/L/zPcFjIHvIyhyD38wpZnzT X-Received: by 2002:a05:6402:1153:: with SMTP id g19mr12598185edw.179.1621006885736; Fri, 14 May 2021 08:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621006885; cv=none; d=google.com; s=arc-20160816; b=nTcVDPq+On+KhLP6zbVj/JCHpPmSWdnmYPDS4A4Pkr/pDs/3vXBavxhhorX9sHht1o pwf+Fr+RBIkyOfzPmebQwHtburmVBiR7XdZds1gOS6mpC50VdYam0hGHFMxSvmKJAlNm n7kdzCmkjITB+DV75ndykomLQSz4GaFtbG0JorlLGayr6E1NQosVSfFgjDR1Wmw89TG4 UNhqxSjVCX6Yql0Ry9NQ7jnFv87QjPYpBLNj2WSb0Kdr8e3NEesdc6d5G6gzqCA2Bvuw jcJsp3qNzj1lXRgTmBIbQutTFYYHsOsihRGxjmPws/6cdibCtkH6BFqOEXBrgJ3R7ggk LGCg== 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:date:subject:cc:to:from :dkim-signature; bh=9Tdeh7T6ZKiKpLxq76x6qcTNo1nSvah9bQL0prk67WA=; b=F0BuFDYXm86okq8Hnzvb8FkuVRcGV8NWYORUK9+ZX1sxkC3MWiN/SgrKdYjVNq0Ono wOsT2tCiXR5JgIzxEc8QIpDD8UolLSLtPIjDEHY84Ne8aCWG2iV7r1yk2crGzDls5e0q ZdXJjL+5zQM/ITHUTNQyCaDE1XSjU9xDBDBNcCtVNNhBaSAwXjDLUv/7R6puJ7K8gCO9 lzQp7DNvpB031mxMt9sX9Xj2cw1vGg3Ess//AmCqv1Am7RKDwOyjLA4QSbXGw1IKObO3 0JV6dr9+dIqSK3k+EBJF+pq+tRpZ/WqwL7cbKJ6RYYgCoSOdDQLASLXJ1AZ8kYSlflT3 J+Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BuUEmv6z; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si6134207edf.254.2021.05.14.08.41.02; Fri, 14 May 2021 08:41:25 -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=@kernel.org header.s=k20201202 header.b=BuUEmv6z; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232527AbhENKEr (ORCPT + 99 others); Fri, 14 May 2021 06:04:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:59264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232897AbhENKEo (ORCPT ); Fri, 14 May 2021 06:04:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 97846613BC; Fri, 14 May 2021 10:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620986613; bh=/5Z2nTypaGPm1iUklcmpyCaywzQFUCDFz30ObBTQeAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BuUEmv6zCsBFzinGG7k0oPndGjym5M6khrmucGBOZKerUkqGE/otWxORJW8gJzNPG F0UEFdyArRYsZxc0t6RxSk6QtsACfiRnlkmzlnctJZPV2VJMe/JWTMIK50H08gqGuS mHYpPfX6EkR/32ZcHHrKyVTg5pJHv45TDcNdgByX3DwXVnh0USAYj8SNY14C7l1Gct 1RCyWf1e+HhXXSYMNKuvK4G8EjXESYqU+3u7H6xEUO6DtW/Cu4FnA2QzJcL8jqIwS5 re5/z9SHw06Yf8Pamnpw21UDgJjiKpTKr1SN7KJkZ+iIxIC6ow67kT9Yx1Zgm3hgIY CSsXiDtxLwFrA== From: Arnd Bergmann To: linux-arch@vger.kernel.org Cc: Linus Torvalds , Vineet Gupta , Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/13] powerpc: use linux/unaligned/le_struct.h on LE power7 Date: Fri, 14 May 2021 12:00:53 +0200 Message-Id: <20210514100106.3404011-6-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210514100106.3404011-1-arnd@kernel.org> References: <20210514100106.3404011-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Little-endian POWER7 kernels disable CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS because that is not supported on the hardware, but the kernel still uses direct load/store for explicti get_unaligned()/put_unaligned(). I assume this is a mistake that leads to power7 having to trap and fix up all these unaligned accesses at a noticeable performance cost. The fix is completely trivial, just remove the file and use the generic version that gets it right. Signed-off-by: Arnd Bergmann --- arch/powerpc/include/asm/unaligned.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 arch/powerpc/include/asm/unaligned.h diff --git a/arch/powerpc/include/asm/unaligned.h b/arch/powerpc/include/asm/unaligned.h deleted file mode 100644 index ce69c5eff95e..000000000000 --- a/arch/powerpc/include/asm/unaligned.h +++ /dev/null @@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_POWERPC_UNALIGNED_H -#define _ASM_POWERPC_UNALIGNED_H - -#ifdef __KERNEL__ - -/* - * The PowerPC can do unaligned accesses itself based on its endian mode. - */ -#include -#include - -#ifdef __LITTLE_ENDIAN__ -#define get_unaligned __get_unaligned_le -#define put_unaligned __put_unaligned_le -#else -#define get_unaligned __get_unaligned_be -#define put_unaligned __put_unaligned_be -#endif - -#endif /* __KERNEL__ */ -#endif /* _ASM_POWERPC_UNALIGNED_H */ -- 2.29.2