Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp527122rdb; Thu, 15 Feb 2024 07:25:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVOZ35ccqSdbyekUAUbE72tYqfPOfGln/ukt9opSjCmqWa8MGZINwhfCIMBE9reozl1z8WOYv7wHooNeRAFF8231SjKSsQh5MEl21NaiA== X-Google-Smtp-Source: AGHT+IGf+FIRhAPFISzHdL3twXZt3cpW9NzgN9T06N0MsIQPNyQlwGqdEYgrXs8qMWK66Upt10ob X-Received: by 2002:a54:4008:0:b0:3c0:2c0b:7bbd with SMTP id x8-20020a544008000000b003c02c0b7bbdmr2103823oie.17.1708010735597; Thu, 15 Feb 2024 07:25:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708010735; cv=pass; d=google.com; s=arc-20160816; b=bzL8etECNabww3RypK0MON7vzAOxuFP7Ki0d9+OsFM1jh9CVE7Bw2hEveazbQTUWQh Sdz3q36al9qeSz43frUh+OgJnOnG/fAJ2PKRoQTxywrmAer+iltBZxK+3y2zNCIRMsTq Pmepo2JIlIqmJ5v0tBboNbA19L7iYe8k7xaJ6nFlN/1QW/Q+Vmn1LuhKMlPGw8ATz5lS oLEecfukuXFr8OcMYbHSoh6d9JfND0FqlFwjPC+JTFXv5GlSYJ5MGZiiMmXg7/Gmj8Ax 7lnsvh78V2P2z61RuP/pguHDlrjxA985EHBIegyFhdsoyNMR3ed8oS0XEwmCXMibig/d EnSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=qR5+223B8I5woM6vXdcbIsCj+0lHy5Sg5xQ3RycCYnE=; fh=aJJqsM+mlRZjiYAg2gIi4UxJMOsc6UC1FZJkpBjF3RY=; b=EZmGznfTU3LitZMeFwiT6Wp1+XZbU4CqSdcCO5h+NUqlsbOYFcpmkBuBSMTQcXELFZ yTkgaYJDS+Gw/QNCnqKJgn/jFQgVK2dP3NzaMgQBqsGGtTTgf04/A4UuI4LGyluJDzKs WDS27pdFz2mMV8XitmU1BysTCS0V4ZRJwg5VaCdZ6KYVwkoETZZSV/+SXA319z1M/LYg a/uu5t8fLd45ON5Ye6n8dcv5lsZorY6gcBr0XcpLelq+EsgYHoanofXvoBJUndYT0vfE +lGEACPPShvnTAF6IAi4+igFzMAW94ri0g/3kBDC1xzLgK3bauLGvIpWL40s2vd70sxt P1rA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FR+iKq56; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-67169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67169-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id jp13-20020ad45f8d000000b0068efb72bf51si1634350qvb.329.2024.02.15.07.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FR+iKq56; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-67169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67169-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D96281C23424 for ; Thu, 15 Feb 2024 15:25:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08DC0133433; Thu, 15 Feb 2024 15:22:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FR+iKq56" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 586D0132C1E; Thu, 15 Feb 2024 15:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010558; cv=none; b=YoiibK0jnAn0kMUJ2soxAJTVuFB43fLc2LBFOpYE6KxkWVEq2Prtd06YFPmMzfG7SkPccisbVjqpbxPuP87I+srkj76VP6hoZQF4iUBFO8mj5mnGmNgYPrIMvPSzKUqf3nfbjzSfXwp64ywJ8WK4SMJBjQPMbbgR/UJWUKM6nvQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708010558; c=relaxed/simple; bh=y7CFc9eEUehFVdyf3acBpzK7iAdivjkovahWMqqvocs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uAVBI4J04rnWL8Yut30LnEj78wZi818at4C0N/iIo43NeLBUfTEKXaNpD+nfiYq8yfo5e8G764wRAHEsm9aQVX8t4ir11UhVV35cTf6ZRuHaPsPMVno3c5viWwN1/Jp1lh5ftfO73CXkf3iuvDvC95jLdaYeNz0asHstSEqP+FY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FR+iKq56; arc=none smtp.client-ip=209.85.210.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6e0cd3bed29so759393b3a.1; Thu, 15 Feb 2024 07:22:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708010555; x=1708615355; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=qR5+223B8I5woM6vXdcbIsCj+0lHy5Sg5xQ3RycCYnE=; b=FR+iKq569qv94K2LIbYwKkQJ4U+mGg0swil+JFAWgApc9Sx0pj+dp279ahkRZoCf1j Mh02BKieGxoY1SHak5WELdxgmHI79qkGH/w0gCuxPWphf8HvqP4/ZtdZ6sZvc8gdciYV q/n4nUU36eIMhldRQko5ZSyeBATvOWf45DobuEr1NV+enIXfTpgd73TkktZAb7W0t8bh N4hRqjI00SKnr69Ng0KSqVys7AuKLAhtj1psyRtVqHWr+7jNSBjwo15+e3YavgErrsol 74QJCU/zi1CeT1CukGFI7sTjnewKkXLNdEg0573Kxqjo4Mk3MsMZiHsxMQJPO4NXBMle xP5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708010555; x=1708615355; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qR5+223B8I5woM6vXdcbIsCj+0lHy5Sg5xQ3RycCYnE=; b=cS/MdRy9PoV2NRz3z2Qic+ttRUB/iEbL4WYRk6dd7kclXF9eTjS0XolDaM2kFkz1bR G46t7fEMjLse1IOES71JfFmkGiNO8KaHUyFAsavpsJyZmFnsnJo+EdytIumL7atpfzH1 2+uywY4deMfjBOSpwmqb1xdhtH9o+L+5JHzeTHfBEnWb2zSgc4vVvKXvGenZvbNnEH92 wmdFxL2Sw5W9e6ae6u7RmgjFjc6k6/jHcz7jWKEHJ8ivYSXbUz5XankFGqecic/jSCO3 asLDMkHv9rHzjtqIqj/hd0bYC88BRks+XAKi01/VZX4T4osWUMoRx2vpiVUGHZFYP9J8 6rwQ== X-Forwarded-Encrypted: i=1; AJvYcCUP17bquOytm5xKGAsEjTlXB2t9oF9YGrRFQ2TY31HT/v7l9id/f3X2ZyFNqwi0WlSH/Kl3WxgzZ/UuSbu26UAVDDjbI6cgbLUOCHRGFNNBWrBYVCFfglib/bISux9+fewLEJHlkjZxeDHB X-Gm-Message-State: AOJu0YwHiQrMjS//gecgv3Ou2GcxVX9ymhgaE2GGmtR9/FlK1tGUAv72 Pr7EIcMSdBU4rvf3Rz4TAoRKaAHGb7mEwOeZ1AxcEQ/JxLCv6AAy X-Received: by 2002:a05:6a20:e605:b0:1a0:686b:afec with SMTP id my5-20020a056a20e60500b001a0686bafecmr2130303pzb.10.1708010555498; Thu, 15 Feb 2024 07:22:35 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v186-20020a6389c3000000b005c2420fb198sm1525536pgd.37.2024.02.15.07.22.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Feb 2024 07:22:34 -0800 (PST) Sender: Guenter Roeck Message-ID: <0e4b65c8-4b22-4011-a4ff-c679f9ec05f9@roeck-us.net> Date: Thu, 15 Feb 2024 07:22:32 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Content-Language: en-US To: John David Anglin , Charlie Jenkins Cc: David Laight , Palmer Dabbelt , Andrew Morton , Helge Deller , "James E.J. Bottomley" , Parisc List , Al Viro , linux-kernel@vger.kernel.org References: <20240214-fix_sparse_errors_checksum_tests-v8-0-36b60e673593@rivosinc.com> <20240214-fix_sparse_errors_checksum_tests-v8-2-36b60e673593@rivosinc.com> <2ec91b11-23c7-4beb-8cef-c68367c8f029@roeck-us.net> <1d5e059e-5b31-415d-ae41-593415812e94@bell.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9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GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <1d5e059e-5b31-415d-ae41-593415812e94@bell.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/14/24 19:00, John David Anglin wrote: > On 2024-02-14 8:58 p.m., Guenter Roeck wrote: >> Specifically: Yes, the carry/borrow bits should be restored. Question is >> if the Linux kernel's interrupt handler doesn't restore the carry bits >> or if the problem is on the qemu side. > The carry/borrow bits in the PSW should be saved and restored by the save_specials > and rest_specials macros.  They are defined in arch/parisc/include/asm/assembly.h. > > However, it appears the tophys macro might clobber the carry bits before they > are saved in intr_save. > Actually, I did some logging and found that the correct carry bits do find their way into the IPSW register in the Linux kernel. Only when userspace is back after handling the unaligned LDD, the carry flag is always set to 1, no matter how it was set prior to the unaligned access. Guenter