Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp87899rdb; Wed, 21 Feb 2024 18:37:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+VQ1+dBszXDfQookrOjpfwWFPoqmV3kk0Ojskh198KSIqYD9cXKAlpmxVllAwFg411U2FVrT3JV6np1u5GiC7tW9PBibtEm+f+KcCeg== X-Google-Smtp-Source: AGHT+IGgdSIrfw+iSRw6qApd1+Np0r4wTRPYC8wtuGSeEyO0PbmUT9jL98ZwUi5XAOfdJV9qD69e X-Received: by 2002:a05:6402:1b0c:b0:564:7921:37c6 with SMTP id by12-20020a0564021b0c00b00564792137c6mr6835613edb.19.1708569468778; Wed, 21 Feb 2024 18:37:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708569468; cv=pass; d=google.com; s=arc-20160816; b=y5CKDDs1MZnL5C55nLIvDPRbkiOXGRxzvWE5fHo3eSuIA1FCgCkBfr3LWUjASPSCdZ T2otL72Xvjuamo38pqpv6HlJUWOiai+fawIlcl51VZTTsZs006hb3sIwOSHQ/YYZVi9I SuIsGQB3HS4K0oylJO1gK2CjySNBOMFaGImZoRpeFRmKtAKMfM7D6QxkH36/S1kvs5Fc GwsenTY/DsN7+pm/ubIALtRGQ7vqi1x6Rgfo1UzQ4jESGLbAsc8oG8pWJPipaQfNMQg1 oaObl/UuEr1/WX2sJR7MpKRV8riOGLqlomywug5S0hAMQBkpGI3MHaHteU0rGkptKNg5 XwMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=VbWwM7zPic1o2n8E79ikwcyfydTfqLLzWcN1NjJT53s=; fh=2WrMZ6V8CnDiIcmxnAjA+Xgmu9L4ffFUW59X4xVeixA=; b=WifJ8NUc16r3VMqOyvVz41E6h5Tzhtulmfxc1GXseEJv3qYdLCeMYuF3MxJgMEkgbV JK/V9UpMdSQWDrphNtUjwZGxHxNcbNUpcFQYk6Pc5xWqNVUNHpx+BGLNMwwevqHunGjb gLzpygFjnGF1/7dpPtgoIvKr+N74V4Dqz5/xQVseckeL9jP2T857y1a0B2EsbtDNzkX+ DTAn954EIoEkKNnArUA5mdSdom7AcIJKylsP+YBSF+dbF6XVe9rppP0DELyPXoJ8Yv45 Hc1Nc8HtzbdFXHf56zHMHHfMReCk9XmybDBIaviGetHr4jh7F145fWa/IwK98BW5MxI0 JO8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=n2S1A4KI; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75801-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cw4-20020a056402228400b00563f58848e3si4804374edb.125.2024.02.21.18.37.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 18:37:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=n2S1A4KI; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75801-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5F87C1F226CE for ; Thu, 22 Feb 2024 02:37:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C03917560; Thu, 22 Feb 2024 02:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="n2S1A4KI" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C95BB14284 for ; Thu, 22 Feb 2024 02:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569456; cv=none; b=Eld0KvWZqJ3XxB8eDSAlrfOvFUgTdayFY6JCregAayS+LydumGql0wV0PUs1wkoUHd9dVvZDXU320S0Qsv8BvnSVfGOPMKbfEM3BvxG0idIcJenFVyFu/8sFmiG0pn2yt8wPs0VY3W/EV3rGGpqthsy7D1ND/DgCGq0W2166QIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708569456; c=relaxed/simple; bh=sNekCmUtLWlwQH/XsGvAEvEx2UjQ+qNezBis71mVY4E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VpwnqayG9PygNRItdtJTP0WpiObKZ25IidB/3T2XY8+T8X6xHJIFVZpRQcx+Ehjo4s2cQEQ4leTu+WPClFDWNOSArCbXPzRrpVH+4YGYDzZg6Jn0+o94zrdAjnhrTP60mp9r34oQPU2Zvc+03QvncruCXXbUUFHsppCHVaalftg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=n2S1A4KI; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6e32a92e0fdso1930193b3a.0 for ; Wed, 21 Feb 2024 18:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1708569453; x=1709174253; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VbWwM7zPic1o2n8E79ikwcyfydTfqLLzWcN1NjJT53s=; b=n2S1A4KI4xKCMwYeYxrEQa4nzp2ZiNEv2cCqdoud4K9FNa5ZsAkcltDavzafgVQLYK DLmvmFCaJPyxeJAEy2fsUV06b0Pbyi2QDgI7bkp31JIMIQnH1Z/AjkDhUaXgPeig203V gIpadKz8m5LIz8JVXyvIIX9a2Q/rsI8TnfZTDh343Unb7wWAEoaUCVGKYJ8ApvXG5bLC sodA37sAzLXTDbwj51LrZesjKmsun+EssLEKV1JwwgV5+Vy2qs6lw/6AnCUPJccEV+CB shO70xyy/kS3OBWWdCkmEGxeZBUBKgZgn9ijewsibTKFJwBoJXxO5T+N8BuqhpxQCeQd 6C4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708569453; x=1709174253; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VbWwM7zPic1o2n8E79ikwcyfydTfqLLzWcN1NjJT53s=; b=ZRnERKCa3T8i84v4qKcc+JaiRd0qm7pp/+OmJ5+22EJIgeAAXGNv17OUS3C+Zjq6XU FJpplUY/Y4XJXVbzwwemKEUxzQ+OJj3YS3QXKJb11MO/FydIH+WzgVL6LuMl6/baxwkY /TG5ojl3phx4WyccCv325A4tfEDTNSiftSBQGJT5hBOE/jAxCfruDm9zDJXKhoVT9SLT 5ySAcJrKbki0lfRbpYOPBp5FSd8cS0g1G5IfwpBiRZ2oE3Y/SolLYKceHJd5VjB7pDJI FwNeZbET3fcKGD8kk7yrTKP+918+ZkHg+aavUbvazEzHRBwGMZwyGklhP673OjCPEkme cIfg== X-Forwarded-Encrypted: i=1; AJvYcCX5L0lDwIwjzRVkdUZcKh3y3XegkqtVxpBg2JK+FY2tsfUUfjuOpti0mdRwehT8RxygYqocWdE/ijE+4GDOyBiS6BXk7EzduIFWv2jr X-Gm-Message-State: AOJu0YwTWeXmoxCblTqczemNb16COToPbJDTfh2tP6Am34vBvhiJ/Ii2 5EnFHK0cC9BLDVwziP2CbNnGuF7xW13kIVbEQwc9UhUAF/lEPMwHUc/d/0XVTkATM+clwfpWenl U X-Received: by 2002:a05:6a00:da:b0:6e4:c5a1:e41d with SMTP id e26-20020a056a0000da00b006e4c5a1e41dmr1396178pfj.29.1708569453628; Wed, 21 Feb 2024 18:37:33 -0800 (PST) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id kt21-20020a056a004bb500b006e465e1573esm6469705pfb.74.2024.02.21.18.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 18:37:33 -0800 (PST) From: Charlie Jenkins Date: Wed, 21 Feb 2024 18:37:11 -0800 Subject: [PATCH 1/4] asm-generic headers: Allow csum_partial arch override Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240221-parisc_use_generic_checksum-v1-1-ad34d895fd1b@rivosinc.com> References: <20240221-parisc_use_generic_checksum-v1-0-ad34d895fd1b@rivosinc.com> In-Reply-To: <20240221-parisc_use_generic_checksum-v1-0-ad34d895fd1b@rivosinc.com> To: "James E.J. Bottomley" , Helge Deller , Arnd Bergmann , Andrew Morton , Guenter Roeck Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708569451; l=1437; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=sNekCmUtLWlwQH/XsGvAEvEx2UjQ+qNezBis71mVY4E=; b=g+fjMFlNSWfcCrlu2uFDLLNXHSUDovxevoYfasXSOOsYTDbSYie7Kx4HZ/ltvBWgwxDLH99EH QhtbgMGsTK1C6kG7qoIseYXNTILqnnfDUH9Um6xbzAAZtYxm8RUNSa+ X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= Arches can have more a efficient implementation of csum_partial. Signed-off-by: Charlie Jenkins --- include/asm-generic/checksum.h | 2 ++ lib/checksum.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h index ad928cce268b..3309830ba2cb 100644 --- a/include/asm-generic/checksum.h +++ b/include/asm-generic/checksum.h @@ -4,6 +4,7 @@ #include +#ifndef csum_partial /* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) @@ -17,6 +18,7 @@ * it's best to have buff aligned on a 32-bit boundary */ extern __wsum csum_partial(const void *buff, int len, __wsum sum); +#endif #ifndef ip_fast_csum /* diff --git a/lib/checksum.c b/lib/checksum.c index 6860d6b05a17..c115a9ac71d9 100644 --- a/lib/checksum.c +++ b/lib/checksum.c @@ -110,6 +110,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) EXPORT_SYMBOL(ip_fast_csum); #endif +#ifndef csum_partial /* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) @@ -134,6 +135,7 @@ __wsum csum_partial(const void *buff, int len, __wsum wsum) return (__force __wsum)result; } EXPORT_SYMBOL(csum_partial); +#endif /* * this routine is used for miscellaneous IP-like checksums, mainly -- 2.34.1