From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A90F6C2D0E2 for ; Tue, 22 Sep 2020 07:50:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F13623A9F for ; Tue, 22 Sep 2020 07:50:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="noRktBht" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbgIVHuA (ORCPT ); Tue, 22 Sep 2020 03:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbgIVHuA (ORCPT ); Tue, 22 Sep 2020 03:50:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52C2AC061755 for ; Tue, 22 Sep 2020 00:50:00 -0700 (PDT) Received: from zn.tnic (p200300ec2f0bfb00524dde00a85e5113.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:fb00:524d:de00:a85e:5113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 993F01EC03E3; Tue, 22 Sep 2020 09:49:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600760998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=SEqCYKrftYdSK0ZzCa+CWrXz2tugdzvxCUEalPUUeos=; b=noRktBhtiHiBfYZ9iGPDT0dgt2i6l/sDg36B1TQE71qBCislOcudRwc4Gfz/l1mKT9sx+N A6cthNgA4rPV1Y2WOl6ngb+2mtNhio5P57zWUZgIC1qdiXC3wSSP0Z912d1NvSTS1TeRTn 0dyQVjvLiTRVrFMDbkcjjmC/gCq6hrw= From: Borislav Petkov To: X86 ML Cc: LKML , Ingo Molnar , Richard Weinberger , Balbir Singh Subject: [PATCH] arch/um: Add a dummy cacheflush.h header Date: Tue, 22 Sep 2020 09:49:51 +0200 Message-Id: <20200922074951.2192-1-bp@alien8.de> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov ... in order to fix the defconfig build: ./arch/x86/include/asm/cacheflush.h: In function ‘l1d_flush_hw’: ./arch/x86/include/asm/cacheflush.h:15:6: error: implicit declaration of \ function ‘static_cpu_has’; did you mean ‘static_key_false’? [-Werror=implicit-function-declaration] 15 | if (static_cpu_has(X86_FEATURE_FLUSH_L1D)) { | ^~~~~~~~~~~~~~ | static_key_false cc1: some warnings being treated as errors ./arch/x86/include/asm/cacheflush.h:16:3: error: implicit declaration of \ function ‘wrmsrl’ [-Werror=implicit-function-declaration] 16 | wrmsrl(MSR_IA32_FLUSH_CMD, L1D_FLUSH); | Fixes: a9210620ec36 ("x86/mm: Optionally flush L1D on context switch") Reported-by: Ingo Molnar Signed-off-by: Borislav Petkov Cc: Richard Weinberger Cc: Balbir Singh --- arch/um/include/asm/cacheflush.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 arch/um/include/asm/cacheflush.h diff --git a/arch/um/include/asm/cacheflush.h b/arch/um/include/asm/cacheflush.h new file mode 100644 index 000000000000..b9dee9760043 --- /dev/null +++ b/arch/um/include/asm/cacheflush.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_UML_CACHEFLUSH_H +#define _ASM_UML_CACHEFLUSH_H + +#undef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE +#include + +static inline int l1d_flush_hw(void) { return -EOPNOTSUPP; } +#endif /* _ASM_UML_CACHEFLUSH_H */ -- 2.21.0