From patchwork Tue May 3 08:58:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12835341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 270B3C4332F for ; Tue, 3 May 2022 08:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232218AbiECJB7 (ORCPT ); Tue, 3 May 2022 05:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232655AbiECJB5 (ORCPT ); Tue, 3 May 2022 05:01:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26CAC36302 for ; Tue, 3 May 2022 01:58:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D1901B81AEC for ; Tue, 3 May 2022 08:58:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90F83C385B2; Tue, 3 May 2022 08:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651568303; bh=kH4OfT6BluApA/vIitrHwnr5GXk6JL5ZqnPVVgRO4zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HnpwsnjjZZlEEra44o/gZM1BWoIiD9cc+BRE35wp3tb7ELjjC/h2glyjcrpHSzMbR ExXj+mRf1qio0paVVOh7WgyqnW8q2f1X99zBofYJuDGs8D3T1h2aykwhTgKkHhWzXT Mt4Klf3ExArNEKdXk7CTkjmZZ9XSJqZYlvX7wd8CVIj0hyfPXH2A1k4kKhvbD/xApb jp2WH2/MSV3sIilfA5OrbCI6LuDQhIGm1XNFAiKLxlc/hBJPFGq/67ET2CoaS7SPvQ vNwph1UcYaZQxOBHdkv+lO0DS9yW0OUtMtzGi/PWoIg0DD8w4M/zrDI1omdz1dOTOp lUMaDY1sPJeuQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Akinobu Mita , Alexandru Lazar , Alexandru Tachici , Antoniu Miclaus , Charles-Antoine Couret , Cosmin Tanislav , Cristian Pop , David Lechner , Ivan Mikhaylov , Jacopo Mondi , Jean-Baptiste Maneyrol , Lars-Peter Clausen , Marcelo Schmitt , =?utf-8?q?M=C3=A5rten_Lindahl?= , Matt Ranostay , Michael Hennerich , Michael Welling , Mugilraj Dhavachelvan , Navin Sankar Velliangiri , =?utf-8?q?Nuno_S=C3=A1?= , Paul Cercueil , Phil Reid , Puranjay Mohan , Ricardo Ribalda , Robert Jones , Rui Miguel Silva , Sean Nyekjaer , Tomas Melin , Tomislav Denis , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron Subject: [PATCH 42/92] iio: common: ssp: Fix alignment for DMA safety Date: Tue, 3 May 2022 09:58:45 +0100 Message-Id: <20220503085935.1533814-43-jic23@kernel.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220503085935.1533814-1-jic23@kernel.org> References: <20220503085935.1533814-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_ALIGN definition. Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver") Signed-off-by: Jonathan Cameron --- drivers/iio/common/ssp_sensors/ssp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/common/ssp_sensors/ssp.h b/drivers/iio/common/ssp_sensors/ssp.h index abb832795619..33927e837022 100644 --- a/drivers/iio/common/ssp_sensors/ssp.h +++ b/drivers/iio/common/ssp_sensors/ssp.h @@ -221,8 +221,7 @@ struct ssp_data { struct iio_dev *sensor_devs[SSP_SENSOR_MAX]; atomic_t enable_refcount; - __le16 header_buffer[SSP_HEADER_BUFFER_SIZE / sizeof(__le16)] - ____cacheline_aligned; + __le16 header_buffer[SSP_HEADER_BUFFER_SIZE / sizeof(__le16)] __aligned(IIO_ALIGN); }; void ssp_clean_pending_list(struct ssp_data *data);