Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp382940lqb; Tue, 28 May 2024 20:22:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURHY3Ov1WuFr+kj/XRDKQ8Rg+9jb9BWlgyTOLFqR7alwzojoVAnB167Y8HPpadNsJeGEhofzzHjgFUkTs36+gtFiORmWUaPQ33+6GFMA== X-Google-Smtp-Source: AGHT+IEuL9CQbBMcSR7un2vaJ+xzbxbi8rE0TfxMTRz79knnK+ibXaQ4E+Ok/ojTefJ42cp67ot2 X-Received: by 2002:a19:5e0e:0:b0:522:80d:5dc6 with SMTP id 2adb3069b0e04-52964fac61amr7649236e87.41.1716952940925; Tue, 28 May 2024 20:22:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716952940; cv=pass; d=google.com; s=arc-20160816; b=oNnw1oqBt3cEtbfN6W37A7FNsqGnDbLwPgT9Hj9QxDi608b4hHiSsPWbhsAplRQ2bQ 2nWlNrDDysnVxcAID4312kGtM3CfEZ2I6fGizcPA0qx10PzklFegNHdvGkE5ACAK8tIW H4mMdj9ewLRGmUR3UQ6Ji7NYGricHj+Wzjwq13RKtes9p58uY1PBnPIoxoNlDwzegrFv TjrwnsRIBdoFrjwkeVchkaXeGGtzMljsXY/N4S4EH2KY6x7+YWdGyXiaFbvvQjHeYMLH 4EEts4CJoayxTK/lzC9xu/fDsYUx40y1a6abBpR52xf7uoPMlb3FrsjQEEpgBsK2uoGh 8Q0Q== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IrhujbtPk9e49X1l/DEpQBISHiUUgj3l+3hQb2zUhaE=; fh=57cuPhVVWZQ8DDaYgvAWtMW+BxZRZemKYWjju1djlE4=; b=EPg1lw82UlfuGRRa7dNGQCjh7CVe2aQqhfQ+ISntVkZMPlLI5WkvVEaI1uKYsFL+Uc AABZSG+jHa3Rm4WrHu1VSxcCS+cHDrW/rLCTKYwZxwJCOsSD7scsois50zRczWzfx/Nh yEZ6HUU8ZQ9BWls1stb22WFH82nvqDY0dU499uzg4t25k7j7doprMd/x2S2MwKWLWwan aFG6vmgfPIX3mvWLb66p2+z43v80ZuNQM9C29E6X7PGw91n7JB+GJ58fpuE6S/vysrKe 7gXMpfP0Hef+6Bw3LKFSnrhJOPYeJQh0O9ash2aCKNm4in2/kSdU0trTqf3dGvzYkVSv jZNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KccwjPFN; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-193401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a63f0a278a6si47673066b.190.2024.05.28.20.22.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 20:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=KccwjPFN; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-193401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 A19C31F24DB0 for ; Wed, 29 May 2024 03:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0184415B559; Wed, 29 May 2024 03:21:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KccwjPFN" Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (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 7916115B141 for ; Wed, 29 May 2024 03:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716952904; cv=none; b=Ib3dYgpJa/yXBr7/B9atKJnce9FBJaoP1a+C+7B42ALcrrjvq3fmZo75aE3Ab43dcvpvlAKS1NHSADO8wU6BFQiqbGqNWfXPVOut4TRuqrCOTImoueJ359opdos4CSfUpkakzeDNc2Yjh8XIi6ae8EcoSxcsMfzvXba8E+TNsmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716952904; c=relaxed/simple; bh=m8bKLa73OzMCzi3WLOjKLcqJCAf+OffQfYOTGQPxorg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MIeecIIE/IfY8sRTaGutmzBum5+D2vuSYQ5LUrgmLf+Rj2XvmHNIo2OLsiv77xIC3SRfI8O9Y9sMGTbaHmmFqXSjIg7WJAuL9eyoSNVDaTze2g39LM+6vP48J6NeLnNb88TNOW4ZgSKYHoIEhzAh9NmODZw45PyUkzvy1EfyuDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KccwjPFN; arc=none smtp.client-ip=91.218.175.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: tglx@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716952900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IrhujbtPk9e49X1l/DEpQBISHiUUgj3l+3hQb2zUhaE=; b=KccwjPFN2WngIea8B+MtJvUV19C2SfptOCP30aLegsV8bKaBpHA0vbzWnbFqZWeJJsItSY Im7kv0NMHRP0XSHHp4nNndWX4/91spMAOrO6AKexeqrITDnEPkNSe/eDA0b5VYb6RA81VR YPxaYJrVYdxXAe+ZT3jIhH+CmQTtfLw= X-Envelope-To: mingo@redhat.com X-Envelope-To: bp@alien8.de X-Envelope-To: dave.hansen@linux.intel.com X-Envelope-To: x86@kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: mjguzik@gmail.com X-Envelope-To: tangyouling@kylinos.cn X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Youling Tang To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Mateusz Guzik , Youling Tang Subject: [PATCH 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined Date: Wed, 29 May 2024 11:20:59 +0800 Message-Id: <20240529032059.899347-2-youling.tang@linux.dev> In-Reply-To: <20240529032059.899347-1-youling.tang@linux.dev> References: <20240529032059.899347-1-youling.tang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Youling Tang After commit ab483570a13b ("x86 & generic: change to __builtin_prefetch()"), the __builtin_prefetch implementation will be used by default, so add its definition to return to a state similar to before commit[1]. Currently prefetch_range() will be empty implemented under the x86_64 architecture, there was a concrete implementation before "x86 & generic: change to __builtin_prefetch()", so fix it. No similar changes have been made to ARCH_HAS_PREFETCHW at this time. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/include/linux/prefetch.h?id=8e4f2fd31bf737abb392e694898a1496157623b5 Fixes: ab483570a13b ("x86 & generic: change to __builtin_prefetch()") Signed-off-by: Youling Tang --- include/linux/prefetch.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index b068e2e60939..162b7105e37c 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h @@ -36,6 +36,7 @@ struct page; */ #ifndef ARCH_HAS_PREFETCH +#define ARCH_HAS_PREFETCH #define prefetch(x) __builtin_prefetch(x) #endif -- 2.34.1