From patchwork Mon Sep 30 13:23:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Vetter X-Patchwork-Id: 13816548 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61F59CE8349 for ; Mon, 30 Sep 2024 14:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=L0s90wsjMK/jbDfhdNxssM2YpIV2OeFiWfX+p7tsFW4=; b=t8Iw2goY5KWMpRst+X7Qa66KyH BNWOqZ4Gncnbs3H2EXnU16U2/mdoak2GvZTQuEPzw39hG0FFub7DzNh9SYoCbcTzk67GBf3Mu7SJL 2kRYP9hhzI1IyehSMgLyhLq/JcB1HjJPv5DwT/aVzSUczzvAFI4ad3KVsNHRJ1rpJwcaY//JkTvNJ ncL7i9Izdcxabjn9jmfw1oEZA7mSSMtTMBUt/G3mmYaI4LwCjvi4910OT9bWCGXxplO54qUP4/yTh MXVzN47NuXYnYCfIwMTvtIDOyAhyWbNVbX8gh/uCC1zjKkCzXUBMxfoR93RC/WJpXcq0dfdCcPfRS 0jafDLYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svH3B-0000000HRwC-2qj3; Mon, 30 Sep 2024 14:06:57 +0000 Received: from smtpout143.security-mail.net ([85.31.212.143]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svGPS-0000000HHxp-0zU0 for linux-arm-kernel@lists.infradead.org; Mon, 30 Sep 2024 13:25:57 +0000 Received: from localhost (localhost [127.0.0.1]) by fx403.security-mail.net (Postfix) with ESMTP id 639D882E6ED for ; Mon, 30 Sep 2024 15:25:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalrayinc.com; s=sec-sig-email; t=1727702752; bh=LQk3toesTkM1HsGmEp6QZMyU3eu7E9giaCoxA2NhHvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Z+IOYWgQ9dqXrdUggPVhB+aKYljTP+4Bs5sgZYXQCEUQfqlymkkW4D+o5Yd4q52lN ewkbC60ir6DFiNO277XbHIkmz1bLQtHcGZc9jm1LoKi7qRNk3w8C1g9MwU0Yp3JrI1 PyeR8kw4JEBV7zR1o4yT43fGs4v5K4/SZmAYMoUc= Received: from fx403 (localhost [127.0.0.1]) by fx403.security-mail.net (Postfix) with ESMTP id E22BA82E549; Mon, 30 Sep 2024 15:25:51 +0200 (CEST) Received: from PR0P264CU014.outbound.protection.outlook.com (mail-francecentralazlp17012051.outbound.protection.outlook.com [40.93.76.51]) by fx403.security-mail.net (Postfix) with ESMTPS id B3A1F82EC87; Mon, 30 Sep 2024 15:25:50 +0200 (CEST) Received: from PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:118::6) by MR1P264MB2707.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:38::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 13:25:49 +0000 Received: from PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM ([fe80::6fc2:2c8c:edc1:f626]) by PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM ([fe80::6fc2:2c8c:edc1:f626%4]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 13:25:49 +0000 X-Secumail-id: <11e87.66faa6de.79cde.0> ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UeyeDGZCoK7p1Ea9VICXd8VQ9Gnj95jaLUvjmSfcB2R4yisPur1wumc/KMsXb/WQE3Zs/i65rlPeH9+9KwX7YvMxyJwnA5YC+GiwQ8VJTWa3fcyGNGUPD9E/jjbV1zkMg7y89QTGhXKxsr/ypIe2vlxaxlVFbfDhPv+eTc9ALKa8iIvGBbXDwjSBM54xMjYq+9FYx53ePY1b0bGUm1R5aRkVkVJ79WSSkno9+ScD1nYMK0gO3460dJ/dsYjjJR5mIorvVNsQ1sIWwInnETca0cYGpYZaaGK8Ym0JDQU7DI45Mc6s6yiLBELFxqZ3Cr1JzbkIXTtLhFLShkAsF2DZsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L0s90wsjMK/jbDfhdNxssM2YpIV2OeFiWfX+p7tsFW4=; b=NuEyr/5Lj2XLqseKRW6QUYcYBd/G8Zy0xtiz8ryLvJ4cy9EF4opvBlsXMc1akAcvVhUafu0VbntjdUQqAvXGQw0wL0sywep3utV7HaGZBu1oECkiBT911/XPB5BnG5/ckF+L7xl+yF+J0mYN2ysLg+8JeFCfvA/nnRZlgbGkt7Txiy9mnHcsZJGmgHWQJVOmtil8ppiyRcVXiD9GW4w9RgK4m2V8Jt+T9NuN1tSYgpASeuuuwaY0QQcdCY76Pt7F6aGkzhLU0RI/48l1urGW+f7wDb3PNfpxx7Jde4NcrIkCoaCYnwnc1lKVEO7voIZ8kMD6ztMik6h+1UerHF2v4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kalrayinc.com; dmarc=pass action=none header.from=kalrayinc.com; dkim=pass header.d=kalrayinc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalrayinc.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L0s90wsjMK/jbDfhdNxssM2YpIV2OeFiWfX+p7tsFW4=; b=TPfwuSz6AG3tl1p16j4F7y4mS+QHb2dKYa0C/tV/hRgHDZ76Xq+oiCIK4glnYRjdTLHUEbNkEkH/aV2+j7pJH9Qd5VBl3EQFSE8UHzz7Y3KbWBL0lhbfbsFC6uMtdcajDQzcdP9Qm38TnYlKjWGLA2/LuX5IzIFa/rj8qBSsBejAFHUMXtbzCRMc8eSYn51a7E/wqx0nppuPlwxNh3UrmwDw5oE2LupyguPbp08KKWwCEt5v1jGuY9s3tCiY2yGVrHlsPPka0bJ0zY8Mw3PyHgBrl0XWLYM1eL5iQm7G4f/hlNziAEsr4dpTpoO5rthqvRBIXrdRdiipsSQUgm6Krg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kalrayinc.com; From: Julian Vetter To: Arnd Bergmann , Russell King , Catalin Marinas , Will Deacon , Guo Ren , Huacai Chen , WANG Xuerui , Andrew Morton , Geert Uytterhoeven , Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-alpha@vger.kernel.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, linux-um@lists.infradead.org, linux-arch@vger.kernel.org, Yann Sionneau , Julian Vetter Subject: [PATCH v7 07/10] parisc: Align prototypes of IO memcpy/memset Date: Mon, 30 Sep 2024 15:23:18 +0200 Message-ID: <20240930132321.2785718-8-jvetter@kalrayinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930132321.2785718-1-jvetter@kalrayinc.com> References: <20240930132321.2785718-1-jvetter@kalrayinc.com> X-ClientProxiedBy: AS4P192CA0048.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::23) To PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:118::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAYP264MB3766:EE_|MR1P264MB2707:EE_ X-MS-Office365-Filtering-Correlation-Id: d1ca20f0-dad7-44d5-440a-08dce1536603 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: 8mJUSTw3lI6CyovAfXKFhWQlKR89cSCqpD9cAPVZ4OhTQvm3an7C5TDx9wjQbnwN0MIBsIyCJUOUBY0efljUeORU3fnUGJYuo5gH0LLjDm0MlUdekWngqPsB0sGpsoBJy4aWeq2cBe3ANr2nq7P3m2bW8Hwj9EY3KMhZDouIEf9Tjr17oXxYFUIuJbn+U3HhazEMXfa5djKj+vgMwrUvnSDi7RIVeeMKn5NV2d/2URDcJQPMbzpKcrZ/90+FTInSjrx5f83fM+jSxy4rhb2N+LhOOhFLL/hIOj6FWHuBd9EwIAF8oqjt26CzVGtn2Ofy4S8S2als1gvC4nZSMf7jWDIfLTB/QfHvPGOZ4fRvL2LvBzRK60KlSkvXfQYoIK+1aQJjsPoP+PsPeFv4lIxbV5YyZfUnT8Q/56/1Is4u+hocUbgGAxxNxUGtOB8qWJgb4ZB1BOr+R5hxzESHdjIrGCl/LBYhSC2GDqzeW5W8hmIn1bgAH6RDoj59AIPi8t15N3OczaIpmdcIFwE+7ndNF9K1PaaRG8aXbgxYmMmFtarEH8WM6r+MWxZB0yvAb1JCAGikETAJv67rN3EM+6AL4i4UxTvhmzKgMvlARTAUrU09ary4QQcZb6TO0/jIu4LE7anZlQdA21PzuGKytTCV+HpwhSs2VzriCu/tnS/B0Odh21MKANXIzl2mIpHMFV6DVQ4OWxTDbc1LRAi8sbW4qE30KsMLaIAkoQC9sJ1nf7BExXUqnydwsZ1iyYmQLBH2f0JM1gdHQ2jWpqj8fb39Ag5CzjuFxZVRocsQnkIrx6z129o+YsxgsNZ3fqQgIxoNEW9kJ+f61H5fMKYTM0ktuqz7e3RVmdaFAu1Mv7+gV29Lhz3xoSgOFStWz+VXToY1i/BRX0Ey9u4koh//GooeJQHDHKQI7v5blauJal7iq22FKP5qGtiiqQaSVdbITzacxH1 2znqE0ca//kq5zi1vVgVmhuNYyoODNAdcMtyP1acvJ/A6QvSCV4ZTuAV5Qk4SUr3o/tpLAxVvgZkezCvmroQTZbLdynMkf+G8Gg6W0GynHbFPMdHVivG60o+U6TgWwmsCg+TviWHg//ZyWS2G0QMsVoPat5T4vb6kp/i8+lbaJhJk9ujrUif5u0pZCLjEoPD+06CZrMbiaBbYR/KUx+NDANLAvnPpVEfN3ORyF04YJvkWdlcFUSXTNsm4DncT43jr7AdJP2blLbpfRdqOJIi0od4vtfayrslxQb1zq9jgoe3YRmdIB6e0u3R+exO1BsAIC3uuIW8P4H3xmW9i8jk7sGpRLhoC3mJgFNBtKqEqzMtu9fcypnbtUHpDBpCTjhkUQIbpxaoPl7GD5rTML/zxs2CRAwGNCOSVxizFsdtag8Qj62wG09n2/bFEHqrLCsaO9XNXRov6l6Jf6IbHvg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Ex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eZz/RKp3BEq6dywjJlaPZZFdycxBpnmdUEtUpmdgg3g9XwstjDKIDQKSk4QILwayeZMg9DVsaplBLSvjPfAHXKHKLSD5tfWXpuDVJTq9wE3VStUxJy83EVoiXOx9vjsfE9iuweeRN6Tg7EX9tQEbcpwKSgPa3ViAxDMjQQaaIwljPjL4v9lacZKUred6EQ82rZLW+qrQd9BEFN01OtlF55w834iGJbqcm/EHuwxP7VPk5VwKsPMXX1TURU9Zif21oCjF8cJ7j48hNwhWePbgKImoMDAWWfOPfkdTJvxf4gT5p2QubyifeHZP7BaHk7ihOPzcJREHZ1uA2eO6pyq3Zge7GJhX+3fOIhWywEXbyFcACI0TmegW1XaRvKNla5SQ29xOSOVXHs9mVEZ9tdO2cAOEwAhgBvbXfuVM7tMa0rg5vJcs6SFtPsHajN4vxmVd0D5Z8EvBQU4uqk9kb7XDDVoOqoQCyyowYYv+lQXngmI1/pDdH8cJ08s6IwyvBpuIf3Uhyxl4yTWgr14ui13shLkx8bkZd99WhFs9vDfFj/0s0S8fcU3I/bfqUL/8P6nip+XRWkgoHRnYMFfXecBhVx2Ah3zgg== X-OriginatorOrg: kalrayinc.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1ca20f0-dad7-44d5-440a-08dce1536603 X-MS-Exchange-CrossTenant-AuthSource: PAYP264MB3766.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 13:25:49.0785 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8931925d-7620-4a64-b7fe-20afd86363d3 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /zNNeU/kvP6RhSuDsxHeQfR3UB+7aIcO+pjZsw4Z19RmU37ZqIHNaGZpQhes1HOE3EnPuf751sDp7txHdXOc0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MR1P264MB2707 X-ALTERMIMEV2_out: done X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_062554_627187_A443CC9B X-CRM114-Status: GOOD ( 15.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Align the prototypes of the memcpy_{from,to}io and memset_io functions with the new ones from iomap_copy.c and remove function declarations, because they are now declared in asm-generic/io.h. Reviewed-by: Yann Sionneau Signed-off-by: Julian Vetter --- Changes for v7: - New patch --- arch/parisc/include/asm/io.h | 3 --- arch/parisc/lib/io.c | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/parisc/include/asm/io.h b/arch/parisc/include/asm/io.h index a63190af2f05..5cfaa76bb899 100644 --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -135,9 +135,6 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr) #define pci_iounmap pci_iounmap -void memset_io(volatile void __iomem *addr, unsigned char val, int count); -void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); -void memcpy_toio(volatile void __iomem *dst, const void *src, int count); #define memset_io memset_io #define memcpy_fromio memcpy_fromio #define memcpy_toio memcpy_toio diff --git a/arch/parisc/lib/io.c b/arch/parisc/lib/io.c index 7c00496b47d4..1e63112ba9c9 100644 --- a/arch/parisc/lib/io.c +++ b/arch/parisc/lib/io.c @@ -16,7 +16,7 @@ * Assumes the device can cope with 32-bit transfers. If it can't, * don't use this function. */ -void memcpy_toio(volatile void __iomem *dst, const void *src, int count) +void memcpy_toio(volatile void __iomem *dst, const void *src, size_t count) { if (((unsigned long)dst & 3) != ((unsigned long)src & 3)) goto bytecopy; @@ -51,7 +51,7 @@ void memcpy_toio(volatile void __iomem *dst, const void *src, int count) ** Minimize total number of transfers at cost of CPU cycles. ** TODO: only look at src alignment and adjust the stores to dest. */ -void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) +void memcpy_fromio(void *dst, const volatile void __iomem *src, size_t count) { /* first compare alignment of src/dst */ if ( (((unsigned long)dst ^ (unsigned long)src) & 1) || (count < 2) ) @@ -103,7 +103,7 @@ void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) * Assumes the device can cope with 32-bit transfers. If it can't, * don't use this function. */ -void memset_io(volatile void __iomem *addr, unsigned char val, int count) +void memset_io(volatile void __iomem *addr, int val, size_t count) { u32 val32 = (val << 24) | (val << 16) | (val << 8) | val; while ((unsigned long)addr & 3) {