Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp619572rdb; Wed, 17 Jan 2024 11:58:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwJ0sMJ+g8eVJLOTtDXfs02+h7vz7ADlPK26z+EQrN3wRkCorDeR6BZvny+Ov31CrpUlFI X-Received: by 2002:a17:90a:8c84:b0:28e:7680:8365 with SMTP id b4-20020a17090a8c8400b0028e76808365mr2219868pjo.16.1705521481031; Wed, 17 Jan 2024 11:58:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705521481; cv=pass; d=google.com; s=arc-20160816; b=ULtdLiGmJxKCu8C45BKcLJDbOVx+MggQku/hqWB/1iZOnHlPCSbUTslvF4f34CsNND R9wDRvge7FLFULvvSsBLUBP+xU3UilFmc7+Q7j/mh1FSXkwWvVwbRrwLE8GJ0TWZxBVB xBI+Hs9I6VO/LW+oXb4JttEKI+Fez1AVi+JtOZH6DK/AMyxCfF3wamvTGV+MZ8aL9h61 aGuzrm+EGaad1jDWO5sXRCFZVJM34eK3AfYqnPq3feaGnTlzvcJxgF+eKKT7hh+ndIOr w9JcwLV4heC9L7ut48/mcovjnKX44oBAFe+u+VG6YJW/YgohS0fW2NS08uoXXXPKn5Tv f8gw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=4waHk4rPmL0zhRklQDdQP442m/73aDCDPB9DqO34yq0=; fh=hLjSwZDUQW/6yJFVFhZxFRVZ7jS3Ntga8wG3EbNwQwE=; b=vQsxqC07tpkeRzTdTxRDxeCF6nXw5rn+9fGSFhdPiQYOU1RMpYD9+70SVhrqxINjCN KjA3vPNqDabZrtJJMXmkk2aX1Lc6xpe34qKISequsOdu1AEXkU5S+9Vgv68Tt0Y0WqT7 XiBZysvu0Am8z9OFoC4V2/Ab1ms1AsppMAmvVr+owVjmamlcHtiK/yI50H9YoQPrTPFE 8h5jPGkLRyssxo06sYO8ZnNKryhCZtufxgiC9YM4qGNnLFbj5zRisMmGgNA6hImB1euH OxuJifnOdZkTX75i7Dg7MJBK7scqgp2Q5cq/INURLxy/F8xn8ehPWKjc1bDHN0k/8dzP dcYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=Ev3d8dSQ; 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-29381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29381-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w5-20020a17090aad4500b0028e73f23623si19814pjv.1.2024.01.17.11.58.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 11:58:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=Ev3d8dSQ; 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-29381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29381-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A63CD2875BC for ; Wed, 17 Jan 2024 19:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFB6024B28; Wed, 17 Jan 2024 19:57:55 +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="Ev3d8dSQ" Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 9BF0324B20 for ; Wed, 17 Jan 2024 19:57:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705521474; cv=none; b=NUdje8CYEOYbjyxI3oBNU0/y/U3AkQ6FBY/frSG4CWpljkRmIdwSFOD7X3J0/vOBU1/0ai7NQMj0C2VlJJ9tQMizud3oTXWnpcVXo1fcK69gaOm3ZIi9hsZuGTxBkzs2Cs1JylNU///hrT2ynKAA6MQh14dXqpRJA/wgZPVpsys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705521474; c=relaxed/simple; bh=smggzj2XY8xCbSB+BhVhq+M4oW8/2Hw7UcZ9tnl76rU=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; b=aV9jiDpyi3IkdCS/QggpPBYxZ085jO6M4L1OMxTrcF1JEgMPj3pLbchHIrxNhoFJX8nMfkyLeZckyRdVKdb25pZPf17SxI4CgSkEgvbQnaX7SxDyPaF3jQz0r9wVF7YUwdtkV6WRNswUCBxpj5Kq2ldtr3WsLIV9Bms64RWU8uc= 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=Ev3d8dSQ; arc=none smtp.client-ip=209.85.128.48 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-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40e76626170so38011235e9.2 for ; Wed, 17 Jan 2024 11:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705521471; x=1706126271; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4waHk4rPmL0zhRklQDdQP442m/73aDCDPB9DqO34yq0=; b=Ev3d8dSQRwP/Chco9XTjrgDh4KtmJzrH/cNeiPhRpF9+f5LU81FVkIivwFciRvnM4k b48cfzy6KlI0hLtiyM8/MxA6Xfr/w4y8QGR3bEwTgqdy1r9wFagM3aGorzIkbRIdv+Pz ZplB2+PPOg8xpjv6p5oY/2iRXpGGC4+BEHbt3GGt2lnU+egShXUrclApZpnlTI/AW/+i Vyfa0auyAQRaI9p+dnHj6TFaQ46TswpsPyDktYPgC5rgEW9rlg/gLp3Vpt/o0GrN6S5e PLzgM1CuAn05H1qGRtTBoAUP4t9Fh+jD+fv079iqcJKOR/co9WTn9i0Xsw5urd38lR/0 DAHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705521471; x=1706126271; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4waHk4rPmL0zhRklQDdQP442m/73aDCDPB9DqO34yq0=; b=wv6J1tfqSKOtLDPLSjCoXtwb0+KuNGNgbv1An3s72f2EoP61uum9xgl0Ps8/U35h/c 5TsZ3QhgS2PtadBCYAEC/EXVe5DN4+1HHdpdKippbUo3wOvjOnbQi6vm7EJtIZulwh3K lt4Z6rems1Kxi/y9T1KtAGdt968gJWIQBMESUY1kBE+aa+9QXRH0uNpfsfGJF6XsYPFr Ui2i9S1xGU+30lw8gFGqaiVaSSFDpjDLZ9jzvkJcbOsc2RZqNK1I5AX0EQWjcYpXXjw1 SCg19DBJ3I2yb0WLe9mGsfZdGKROLizaH2vIVinKlN09AWJPgle1ypXIl16Ar6XvobKt jagQ== X-Gm-Message-State: AOJu0Yx6bIZsObJTI02jg7y1p6+bYi3uyv90U2J+zP5/BnESmCgvfYwH gRbb7uzVNmLbIEUSceJbrRaHWf1uFOfGRA== X-Received: by 2002:a7b:ce16:0:b0:40e:4618:d9d0 with SMTP id m22-20020a7bce16000000b0040e4618d9d0mr5236201wmc.77.1705521470046; Wed, 17 Jan 2024 11:57:50 -0800 (PST) Received: from localhost.localdomain (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c190700b0040e52cac976sm27064749wmq.29.2024.01.17.11.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 11:57:49 -0800 (PST) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Qinglin Pan , Andrew Jones , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH -fixes 0/2] svnapot fixes Date: Wed, 17 Jan 2024 20:57:39 +0100 Message-Id: <20240117195741.1926459-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit While merging riscv napot and arm64 contpte support, I noticed we did not abide by the specification which states that we should clear a napot mapping before setting a new one, called "break before make" in arm64 (patch 1). And also that we did not add the new hugetlb page size added by napot in hugetlb_mask_last_page() (patch 2). Alexandre Ghiti (2): riscv: Fix set_huge_pte_at() for NAPOT mapping riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled arch/riscv/mm/hugetlbpage.c | 62 +++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) -- 2.39.2