Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp1060217lqs; Wed, 6 Mar 2024 05:22:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWw4Ptvb1245/5kz61WGMmYDDClkKXdPc+0jq0wQacsJ/kZemVmdpjrad7sy4so4GfsI2jfCJ/RRoBFeHwYScgz0PspkB0ya6ufEiLCZQ== X-Google-Smtp-Source: AGHT+IEO1/MDNe2H1GCz2pYoFZqcm2Kz8R3b4A1qU92ende7geedTdJtWdY3Qy1zF3zldmsdw8qu X-Received: by 2002:a17:906:1693:b0:a45:a70f:c660 with SMTP id s19-20020a170906169300b00a45a70fc660mr3528720ejd.24.1709731329470; Wed, 06 Mar 2024 05:22:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709731329; cv=pass; d=google.com; s=arc-20160816; b=An9+x+zTiudOeQ3GjlkOiki0ZxgGzZqRerqceorSKsC1SdAPnY27ebWrwROa9C6VP5 5OmawaRyo3siHut552EU4tJxoGZlLJ/FLqO5bkCez8aCBjQyFtMFPsBHi/KaLswh0VYH YFTulvi+siABWRSDhM5KYBMAkFxFUiNqdApx1RkUcftcz2VOJOUoMWrtbxLrMTE1jt+c VlwBJpKB8mfN0ojhT7e+wiMnNaLWoaa/ICbhou61/MtDM8v8kC4lWmB8z1YQ8vqi1eOg Ew8qOfFp1TFkxdAAcPOvr2CNVQP02wh1w0QRUUJdAL7sT/HOoQ4JD/y8x+pkr55hvCX/ KsAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=++9rUnS/QNU0OQ1YVp3BATe4VVsOXOH0uDDf+hBWcMY=; fh=9PTrdyZGceCOWFVD4ofsjYrTkS4qSjA9/9YUDEUVxrk=; b=zWZm5uZ9Ocw9oBRbr21Pva/v6U6xd4zvHnW7C7EVjmbptqg0+swfHNMrvLatPRwuHZ RtLyCzOm5j4csYAm6DFbTsaxE5Te0ATTOI2c0Gv9IHjcoLxPv4CyAJ+YbhR1oiI4eeOU t1/vsIhz6oVq3lJ/ClubkM1HKVjp9ODU2ThA/QjMxnJ6btN6bueuXdTz9Hd6V9CLx7Oo KFsCuPtFSYLNB1Q3j1Ny9rgi5El/iHuNifB5DMo15mqQCEM2KqvMTCASewjGM1Hm98Bb 8Uomw47bdRU1wTs8gKBhiRlClqR79arEdPr0MaqEQl796Y0cC3UTAPX181OgZ5+vSjg4 RpEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=B1Unxr3x; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-93968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l3-20020a1709066b8300b00a43df718a40si5946277ejr.524.2024.03.06.05.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 05:22:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93968-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=@microchip.com header.s=mchp header.b=B1Unxr3x; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-93968-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com 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 163C21F215B4 for ; Wed, 6 Mar 2024 13:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5688130AFE; Wed, 6 Mar 2024 13:21:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="B1Unxr3x" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3885D12D1FC for ; Wed, 6 Mar 2024 13:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709731298; cv=none; b=uPLPAjeorzVkfBvFXpxFgDnRsILXEAONwHDY+4F9G9JaqEWbId5feIlfMacR5sEVOL9LY1JRVkd0HJoBTHoGdOyMLP7uffZh+B78gGjLS1QHjajcv+A/uoZ/c+orP3U503v8Tbvh85F5TyHFS3pVSZu7Qz0FslpXwQLq0Iu4oiw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709731298; c=relaxed/simple; bh=x6saRHVg0VfK1dnvwUWzELfx+mRt+YMbrULENEEZOVE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X+x9hmqmza3MLpsdSBgzFur9pnDuPiuLeKUqHFNXIOnswQpckolZ+/EjDBkX/uFSiJkH0/w3SjWCyBNl3TXIqitzySagFxy+LMFcfs8FYM9nKg8TmqyXqwR47Ho2R4bNFk93kMr8dMZKauCL+3CRWWTBrQcw6vl2+dt3wViNE50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=B1Unxr3x; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1709731296; x=1741267296; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=x6saRHVg0VfK1dnvwUWzELfx+mRt+YMbrULENEEZOVE=; b=B1Unxr3xXjDV5DhfWfZnKy6D7Qju88Q/LT77u6dVZuaCNwgAivVA+4tg O682kneFWX9vXFzKLDDWkRshR26O4UNtLQ0yqZJZRGC46/nRfz/hHNCW9 YknOSXYSGTh8FBCyHGoDK0lRYEktqHzY19jKnEiJmh9gCVCIdyBjp3WHa zOXsXVFSTinqG5x1oJxBd33mYLU42qUuJeb5QYPN7QP0V+y5HEaCIrSZU ASJ5aXdcWmVIS3U1HRYSr6sKfXRoEFdVVaZqTFQ9WGG71uAZ6d93uB/jL PN9O8Es2s4XBWJ8lbhD9BHRIiaLwFftqQlM7qUyFpbMvQqdCTXENrfi8O A==; X-CSE-ConnectionGUID: MbkuSMWuTa2dMHhEfXhTsQ== X-CSE-MsgGUID: 7mh+FgpZTSy/sDRKCR9T0A== X-IronPort-AV: E=Sophos;i="6.06,208,1705388400"; d="asc'?scan'208";a="184556607" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 06 Mar 2024 06:21:34 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Mar 2024 06:20:24 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 6 Mar 2024 06:20:21 -0700 Date: Wed, 6 Mar 2024 13:19:37 +0000 From: Conor Dooley To: Charlie Jenkins CC: Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Eric Biggers , Elliot Berman , Charles Lohr , , Subject: Re: [PATCH v6 3/4] riscv: Decouple emulated unaligned accesses from access speed Message-ID: <20240306-tactless-decathlon-b0df16517b1b@wendy> References: <20240301-disable_misaligned_probe_config-v6-0-612ebd69f430@rivosinc.com> <20240301-disable_misaligned_probe_config-v6-3-612ebd69f430@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0+iLppiDSyfXGqPN" Content-Disposition: inline In-Reply-To: <20240301-disable_misaligned_probe_config-v6-3-612ebd69f430@rivosinc.com> --0+iLppiDSyfXGqPN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 01, 2024 at 05:45:34PM -0800, Charlie Jenkins wrote: > -void unaligned_emulation_finish(void) > +bool check_unaligned_access_emulated_all_cpus(void) > { > int cpu; > =20 > - /* > - * We can only support PR_UNALIGN controls if all CPUs have misaligned > - * accesses emulated since tasks requesting such control can run on any > - * CPU. > - */ Why was this comment removed? This patch doesn't change the situations in which PR_UNALIGN is allowed, right? > - for_each_online_cpu(cpu) { > - if (per_cpu(misaligned_access_speed, cpu) !=3D > - RISCV_HWPROBE_MISALIGNED_EMULATED) { > - return; > - } > - } > + for_each_online_cpu(cpu) > + if (check_unaligned_access_emulated(cpu)) > + return false; > + > unaligned_ctl =3D true; > + return true; > } --0+iLppiDSyfXGqPN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZehtaQAKCRB4tDGHoIJi 0nqQAP9qDs9BXRRIcemNZkKQPjQ7O1zObSc+rYvFSFXl5n2dCgD+LIqa+Incg/HH X0NiaSTSjXLgY8Y3hcOJ/2aMZ1V8dQA= =VVCG -----END PGP SIGNATURE----- --0+iLppiDSyfXGqPN--