Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3943842rwe; Mon, 17 Apr 2023 06:02:33 -0700 (PDT) X-Google-Smtp-Source: AKy350arTRaVdcI8/Amj8R/8vuAr/txhDULkWp0DAlNekAeQtxqvCBYCzvsTtT9gy4kh0S8IE2OK X-Received: by 2002:a05:6a00:1948:b0:63b:646d:9175 with SMTP id s8-20020a056a00194800b0063b646d9175mr16654780pfk.4.1681736553309; Mon, 17 Apr 2023 06:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681736553; cv=none; d=google.com; s=arc-20160816; b=M1ey/zBQsVjwonEYZTCUm4o4/qPZQgqT70fFGwkrYlAsxcgbrSR+PnDWtR5surE1+/ pcrZ6ePlkjEnIMbA3nPS0k2T0V5AUVu5YxkqjjH9EQ6GAXUVFER0dJ/dGWfTD5ic5LV0 alW2Be6a7xbTgSQLqD5oQvBK9eKAVMxnl9NIu9XyutkEZiWCD9ULGe7HmV3arrBDa7ru tsVI7WiSGlJYwK5KPYRJAntBfQaBRSDsp0kxewzCh6IldyQpzra/GlnEG+4Bimj8i/xI DGzFLVNfFW2NYfRS/jdqlSHgZ3Qe401tIhjVtRojY04ADifN3vCSmPoPtP4lwOODG/IA 0Eqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=DBWm/Eu0c07u8Xvk5dygRLn1Yr7Deg++IVzIGW64CBY=; b=aeYyXioIi3xlh52w/PT3BVvTGgJlizIPSKYFlPtfz7OccQyngY6zYHzXEz4zuVHg8O vCDN7Z0pND1GMHdhl0yZ9IMMdpB3Xhbx1/nUE1nANNTCln+4W97pvXuw/lOWdb5hjgfT kIrROepinVNS+jdPp+0DnHY37sKnqXll3yW17+vKy89jvY6fEkWUtSLikCCJzjLtitQR Wa/eMsO2K/lUWqUW/I+955UxVQsPQ4/MRuua0MLfEZCJdK9pADHrd+k4B/aPvyIzW4Xy W4khuSw+w29BMQ41UAePz+2RDjHXz2y7jTdov/9dAPQWgayXZvoiJMKjKWBXQXNQbFxU 5z+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QIDnQQM6; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="ZsavFsQ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g20-20020aa796b4000000b0063b8acdf2fbsi3880059pfk.99.2023.04.17.06.02.04; Mon, 17 Apr 2023 06:02:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=QIDnQQM6; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="ZsavFsQ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230203AbjDQM74 (ORCPT + 99 others); Mon, 17 Apr 2023 08:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231354AbjDQM5r (ORCPT ); Mon, 17 Apr 2023 08:57:47 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1343B7690; Mon, 17 Apr 2023 05:57:17 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A995021A91; Mon, 17 Apr 2023 12:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681736226; h=from:from:reply-to: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=DBWm/Eu0c07u8Xvk5dygRLn1Yr7Deg++IVzIGW64CBY=; b=QIDnQQM6FqpjVgjC60BIzr4jVLzaGkJrPhU59Raug1vVtqluGTEOViO9AGJkOal2qP0Dhw aZzVrXsrEkBYww32/dW3b+o+nzsoWpJ3KlWyp/2eDW7Po7BW/deXGqlaSDhQpfJvzU431t 7vS4Z5CGgWaKjF2W4IdAHL05KRzLHEY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681736226; h=from:from:reply-to: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=DBWm/Eu0c07u8Xvk5dygRLn1Yr7Deg++IVzIGW64CBY=; b=ZsavFsQ/L/cdP5k8oM+73/uhqDnYVY4bVtRCFGtxGI8UdCvsLyzOZjdO14bzgBtVSfTG1F /seSez5j0RSvfPDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 356921390E; Mon, 17 Apr 2023 12:57:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CEEjDCJCPWToWwAAMHmgww (envelope-from ); Mon, 17 Apr 2023 12:57:06 +0000 From: Thomas Zimmermann To: arnd@arndb.de, daniel.vetter@ffwll.ch, deller@gmx.de, javierm@redhat.com, gregkh@linuxfoundation.org Cc: linux-arch@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Thomas Zimmermann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v3 19/19] arch/x86: Implement with generic helpers Date: Mon, 17 Apr 2023 14:56:51 +0200 Message-Id: <20230417125651.25126-20-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230417125651.25126-1-tzimmermann@suse.de> References: <20230417125651.25126-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Include and set the required preprocessor tokens correctly. x86 now implements its own set of fb helpers, but still follows the overall pattern of the other files. v3: * clarified commit message Signed-off-by: Thomas Zimmermann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" --- arch/x86/include/asm/fb.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/fb.h b/arch/x86/include/asm/fb.h index ab4c960146e3..a3fb801f12f1 100644 --- a/arch/x86/include/asm/fb.h +++ b/arch/x86/include/asm/fb.h @@ -2,10 +2,11 @@ #ifndef _ASM_X86_FB_H #define _ASM_X86_FB_H -#include -#include #include +struct fb_info; +struct file; + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { @@ -16,7 +17,11 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, pgprot_val(vma->vm_page_prot) = prot | cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS); } +#define fb_pgprotect fb_pgprotect + +int fb_is_primary_device(struct fb_info *info); +#define fb_is_primary_device fb_is_primary_device -extern int fb_is_primary_device(struct fb_info *info); +#include #endif /* _ASM_X86_FB_H */ -- 2.40.0