From patchwork Thu Apr 6 14:30:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1071623vqo; Thu, 6 Apr 2023 07:31:43 -0700 (PDT) X-Google-Smtp-Source: AKy350Yg/kXTKNqa3rb7XApJBKZyjIM5PYaoJrBjBt4JCCipkQpag+k7bPJgifgW2sQMTcorf9Rn X-Received: by 2002:aa7:c74e:0:b0:501:d6d4:ef33 with SMTP id c14-20020aa7c74e000000b00501d6d4ef33mr4715575eds.40.1680791502947; Thu, 06 Apr 2023 07:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791502; cv=none; d=google.com; s=arc-20160816; b=WbUl4gI9UbTUdac2KBV+Jg9/g+5GjEbBFh93h9ScrwD7qcUPbVmf1qv/ra8LmPH8WI nLHWhuDemrW+CKCu3O/gj38U94jWY4wezF7cb/XSfB6FRylkwwWKCNOdd3j386UHnYmv GN/I9NEPJkvRyknmn0mKIKfjOf0dt7m4qtdPvKgQWZc0IbJOWjDZN+miMeqv28FoKmyM g96vRP9hfeFZZi82nfhxtHc82g+eMlRJ9QJR5V74tiPekDZW/mkssa9W8VHcqX6bnNQs gIgNgGVoayvIhTznPeppLXT77nS0tTotF4C3YQsVASTGPsS5uhYoSbapDM253/nCXLEJ XPjw== 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=lm4tB/qBx4Xl9gLv3tvzFp8gznBLvt7Ce6BUC7qY1PU=; b=s6H3KiCszvbSM3H02uRbhV/HaIgy9Fc1lCaxi5s8I27ZsDKFSEWh6pTcGJ+l4+s7Kt gSLYx2ri3667Jcx4hXfIX47X+b0nqqjsMbO5OCbDHgRaxj++onNRXkzy9XN8mRFAwGH9 u1UjgcYNhwSIsTkHMs3mtOwf14v9RLePhIRFYKlMLptWcwf06BzyjZYnv2nCg3gC3DiZ YupVgiPYlanyqSmZCtDMUnLYpUctMwnuYTAtim81iHr2k8g9z2KTUsD9RfVL7VByJ6Zq w7IMyK6y8hp7xl+JRDlzAkchfqpeZww2/gMvl/GxLF163+o2pjT/WSIxaWA4UJ8OaA3T DYHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ELZbBCFG; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hBIBxlKr; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020aa7dad0000000b005021f0d0ce1si1163518eds.241.2023.04.06.07.31.17; Thu, 06 Apr 2023 07:31:42 -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=ELZbBCFG; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hBIBxlKr; 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 S229769AbjDFOa0 (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbjDFOaY (ORCPT ); Thu, 6 Apr 2023 10:30:24 -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 60DFB9017; Thu, 6 Apr 2023 07:30:23 -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 D3F9422591; Thu, 6 Apr 2023 14:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791421; 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=lm4tB/qBx4Xl9gLv3tvzFp8gznBLvt7Ce6BUC7qY1PU=; b=ELZbBCFGsxjsM5z83YlFc2d5Yul8exK2LYWxEFUAwwbTozT9CYMUIyIdNQ27RFNpYoEolu CkGR/6aqkpLC61JwIgiwn6YSNaQNooEVmQ2rh4XD59bfW57bnCtp8JV/8/fuLH4jRrVgzG mIqmtgFcDaouDL9ieXaxdWmvzF4/xUE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791421; 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=lm4tB/qBx4Xl9gLv3tvzFp8gznBLvt7Ce6BUC7qY1PU=; b=hBIBxlKrsXljHVJEgdBNSo/HiM/JPqzuP43nSlwibirDu7CMLMMyXyL6ElXVCuZKfxi5u6 b1qGLFxgU9kyF6CQ== 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 76D5913A1D; Thu, 6 Apr 2023 14:30:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iNocHH3XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:21 +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 Subject: [PATCH v2 01/19] fbdev: Prepare generic architecture helpers Date: Thu, 6 Apr 2023 16:30:01 +0200 Message-Id: <20230406143019.6709-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437631174190730?= X-GMAIL-MSGID: =?utf-8?q?1762437631174190730?= Generic implementations of fb_pgprotect() and fb_is_primary_device() have been in the source code for a long time. Prepare the header file to make use of them. Improve the code by using an inline function for fb_pgprotect() and by removing include statements. The default mode set by fb_pgprotect() is now writecombine, which is what most platforms want. Symbols are protected by preprocessor guards. Architectures that provide a symbol need to define a preprocessor token of the same name and value. Otherwise the header file will provide a generic implementation. This pattern has been taken from . v2: * use writecombine mappings by default (Arnd) Signed-off-by: Thomas Zimmermann Acked-by: Arnd Bergmann --- include/asm-generic/fb.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/fb.h b/include/asm-generic/fb.h index f9f18101ed36..631d97c507ca 100644 --- a/include/asm-generic/fb.h +++ b/include/asm-generic/fb.h @@ -1,13 +1,32 @@ /* SPDX-License-Identifier: GPL-2.0 */ + #ifndef __ASM_GENERIC_FB_H_ #define __ASM_GENERIC_FB_H_ -#include -#define fb_pgprotect(...) do {} while (0) +/* + * Only include this header file from your architecture's . + */ + +#include + +struct fb_info; +struct file; + +#ifndef fb_pgprotect +#define fb_pgprotect fb_pgprotect +static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, + unsigned long off) +{ + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +} +#endif +#ifndef fb_is_primary_device +#define fb_is_primary_device fb_is_primary_device static inline int fb_is_primary_device(struct fb_info *info) { return 0; } +#endif #endif /* __ASM_GENERIC_FB_H_ */ From patchwork Thu Apr 6 14:30:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1071712vqo; Thu, 6 Apr 2023 07:31:50 -0700 (PDT) X-Google-Smtp-Source: AKy350b7ykLqeylXDpk2G3YsYPGZoG6Nwabq2EOB1PnI/aze+GeXjZMV+1/EztywQxAqEy4T6lXw X-Received: by 2002:a17:907:1c9f:b0:8f2:62a9:6159 with SMTP id nb31-20020a1709071c9f00b008f262a96159mr7734425ejc.2.1680791509866; Thu, 06 Apr 2023 07:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791509; cv=none; d=google.com; s=arc-20160816; b=bAJx8D0L4q7OoiICTWiVO8dbAXV6R426cOQiTsZ6QV3MjQEPfohuxddZi01MGk2pkM lKttdxuzBfnjkO07LxfCeiEPMzEyfDRTFQ9bi6kcYgX+ICocEdBmpj9Pegrj+upI2v1H gm7URrBkzbczl8bCqZTxF9hLqxEa1xPwCn+NQFSTq/0+TmaUwqNd6NKKHLJCmu9el7sG yqb4iwzgrSmrlcc0Wz9hOtRxFFmhnDTvrPJye6pLuwBQh6oD7pc8bI63rnnGuDWmyNXX h5PQwPvwXXPOORbasz+8drN2gRO6dQa22BhKj1tKxoFMAPIN6vAHVR3qInZQwmZQDFh0 lq/w== 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=Copont4eN+mHeH6hlwq4k6Jyts7FEIa06AEN3mTCE4w=; b=FGWRWsAL7vE01nv8pDowRrhTu96KioAD4Ea1Z0W2LPKaPPhdkM38DFNeegbz50dCMc 1RdoBF97ZBssVFZxtNCtigPt+dO/bgl/bAgK4Qeryz1osuNtG0PlQkePrZf6Yiv94Iv9 tJ2fE5QzvCNOdkG2Q21OO9vKUfw98Zt/w9wykwfRv3pPq4H5sw1SyghFfpwY8AJ2W0pW Lz99CVArwyXkEjH3QdKWxfCqKHMxrTRXUF/Kkgtgvcc6FgiL9Kez30rDu7Cmn65rfsxd E3a19zI/R8QM26APbL+EdRCxolhXJ/WISKQPnWBc1TFHV8TD9OPUmbSVE0shcN1W2GHH IJ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BLKesQhq; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg24-20020a170906a05800b0093bf7925981si1133798ejb.982.2023.04.06.07.31.23; Thu, 06 Apr 2023 07:31:49 -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=BLKesQhq; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S239144AbjDFOab (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbjDFOaZ (ORCPT ); Thu, 6 Apr 2023 10:30:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D2E9019; Thu, 6 Apr 2023 07:30:23 -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-out2.suse.de (Postfix) with ESMTPS id 3DE981FE31; Thu, 6 Apr 2023 14:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791422; 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=Copont4eN+mHeH6hlwq4k6Jyts7FEIa06AEN3mTCE4w=; b=BLKesQhq7yxZkTHwRGV6kG0FO76NiGReR88ZHiEHgLhTIH+Jze1THPVkazt3HV8iv6yHt2 KRiXCDV/AsRsdGsbpiz06eZeih7aJSJ4HJa7S+6uTvq5XYjiLe0vqLnSVVLP3bVEue/KWM OoQgDipJyGLmWDyjLUQXvOb16YKLE34= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791422; 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=Copont4eN+mHeH6hlwq4k6Jyts7FEIa06AEN3mTCE4w=; b=exfQgq2LMfuXwMWClYVkTb3qSKZro4h47OA44Ufl2zNn0VJrreB6sjG800KW0oKPzqR5B5 4yIYyFc/miXBuWAQ== 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 D71921351F; Thu, 6 Apr 2023 14:30:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oASvM33XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:21 +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 , Vineet Gupta Subject: [PATCH v2 02/19] arch/arc: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:02 +0200 Message-Id: <20230406143019.6709-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437638386847998?= X-GMAIL-MSGID: =?utf-8?q?1762437638386847998?= Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Vineet Gupta --- arch/arc/include/asm/fb.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/fb.h b/arch/arc/include/asm/fb.h index dc2e303cdbbb..dff149eaecaf 100644 --- a/arch/arc/include/asm/fb.h +++ b/arch/arc/include/asm/fb.h @@ -1,20 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0 */ + #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include #include +struct file; + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); } +#define fb_pgprotect fb_pgprotect -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1071838vqo; Thu, 6 Apr 2023 07:32:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ZuXlv1bFUtgxP2Mf92/pAORvbnhc98S+JdXPYPrZI/+5zXSM4R5/PtzjWfXVDN7brVnqNF X-Received: by 2002:aa7:cb42:0:b0:4bf:c590:3c57 with SMTP id w2-20020aa7cb42000000b004bfc5903c57mr5389575edt.2.1680791521283; Thu, 06 Apr 2023 07:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791521; cv=none; d=google.com; s=arc-20160816; b=nDblmxsXGnkg2TL/8Xv1/HejP0mUpehMxUcZTXquA/as9WES+PmxnP9BYKdIsnKV/b GyJIhdBUT21LebODAobGONn6zcWpNKn7EM7leAEWAhBmC0leKzYXsNoS0M71SXc6asvT B0DUINCDEeXWhhpFcNvKViO/Z+rk2K0LYgW+jFuIAOtUyE9t7w6EuFj1P6i4i8ZM2gCf 8Y9lHzRIZXf6JM+o3eNKtqShJ3+5rnS+IB7ZuMkcsBCPn3bqh3r2JDpVoE0ytTkxOcjo ZIzCQUecNarSnSTxY9Ii6URiJMr/EXSlxSZREH1LRO3xkTq31jXP7JJ1ZwPaAhT96llW 9X4Q== 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=bCoxmdX4y9ul4c4sc0AlrMWrTF+cPW9BA1U+6LtQKlA=; b=A9pS1ZKI09O3cTtttvngTBQ9xqh51u3Zt8tILiVQqJ5zaFIjiNNZJo6nuytSxgU8pH ANlI930MmXOCnrhyooa7AqTkVnUkkhi5ZdVV6v5JAPGVcIzdbNV+iAMizI7bkQFbAdlI OWNNxcPYIDQ0/RxVUNvhoOCipTAhHFGi/2Cq1ps/jaPhIUDllGIn9q9YjvZRM13vUlh8 GsqA4qnmg3qeUGCt1nHMiMa+BIIadvmzLdFNK/ldBaDk9F9CJhBCtRKNs3End7IrwgKQ AsWuKs8sGlcn4z5w/wazNt5Q1UoDVNro/IB69LmAXvcH5wIdKq8bgiwUlX7hDCX+DXK1 pS5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=txezI0OP; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wcPRh1fk; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020aa7d74b000000b0050277bdc0f8si1113583eds.463.2023.04.06.07.31.34; Thu, 06 Apr 2023 07:32:01 -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=txezI0OP; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wcPRh1fk; 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 S239210AbjDFOak (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238526AbjDFOaZ (ORCPT ); Thu, 6 Apr 2023 10:30:25 -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 06E7A93CB; Thu, 6 Apr 2023 07:30:24 -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 A27F62270E; Thu, 6 Apr 2023 14:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791422; 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=bCoxmdX4y9ul4c4sc0AlrMWrTF+cPW9BA1U+6LtQKlA=; b=txezI0OP8/f4lClS5LB/4tIroaJiDP/QLAelQR95C/0xWhhdk1DX/M/zvsAyK5AvjdQ+lE OqZlvN8C2izFTk8YmUTI5GdgR9ZMQX4TToC9fodm9Ott/qiwnWrulx/4lV6ouJeq0ds60Z WhxaIQst9855wnH0Q41Fr5NLYKKcfkQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791422; 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=bCoxmdX4y9ul4c4sc0AlrMWrTF+cPW9BA1U+6LtQKlA=; b=wcPRh1fk0ZA7xVSDrF8uubgX3fCA7RsXAQ6yR2LwEx4MHaadMSEfp01AcEJ7Jq7sO5zSV2 Klp5L8DNjLYONuBQ== 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 43A4113A1D; Thu, 6 Apr 2023 14:30:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WLuvD37XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:22 +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 , Russell King Subject: [PATCH v2 03/19] arch/arm: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:03 +0200 Message-Id: <20230406143019.6709-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437649722683274?= X-GMAIL-MSGID: =?utf-8?q?1762437649722683274?= Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Russell King --- arch/arm/include/asm/fb.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm/include/asm/fb.h b/arch/arm/include/asm/fb.h index d92e99cd8c8a..ce20a43c3033 100644 --- a/arch/arm/include/asm/fb.h +++ b/arch/arm/include/asm/fb.h @@ -1,19 +1,6 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include -#include - -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); -} - -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1071933vqo; Thu, 6 Apr 2023 07:32:07 -0700 (PDT) X-Google-Smtp-Source: AKy350YG+lsYaWGKH+oRtY1Lzjy47QFuTZulxhMbX5Qx9lqhL1BITp2OyiD8FjVk6vwRTwhDWAAu X-Received: by 2002:a17:906:ae9a:b0:932:40f4:5c49 with SMTP id md26-20020a170906ae9a00b0093240f45c49mr6573062ejb.67.1680791527214; Thu, 06 Apr 2023 07:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791527; cv=none; d=google.com; s=arc-20160816; b=kpYnJ0Yu7FatEQ2hFtfnbV0i08HMb6EtVImqxmEJQkSKadpBI05RXzPqVVzmI7Eu/K uZ97voz4KFgHDNeWHg0ic+MwjbZLsVNBcu02zk3Shw+1KKkyw7X58G94or3llVyGXEYb 2N1f77W8t+5lWWezeDlnbG9plwU+pVdeXDvnTsDdVHLzVj6W4PYU25UeOyyefbnzaOXw YvURCPVnL8vAHakC7i20c2rLXyIlj3k7Z9tioPCBGeUJZxhJxvl/ikvrWm3x5lL7A3lU Ua43rG/4GXkWF2urqggJSVJ0HvGKDsV7YffBLcnvmbmXehFSpWPhTpoCDytpDa1BVPpo b7Zw== 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=At66nEDRzuoU1LRYd6qgBrLOlPke0TNb1Y9N/Qc/BME=; b=aCd+9TM1XirR7ffZcDTsRR2Hp2acOXs4zou54oKNCD+DlFNWznaXO0EiRo2PLgQ7Tp vsAM77d4h4Weg/fPT1kn3ZmU/xozRvhETZVfCf50tmQe3N4aoJ8Gd8Wrkwazv5zEuH6o wWD4WSkEi7JSx1T79pl3AwjNSwYtZlvEGZU8yKRVkmSr4WXysRsx8nEZzRmwrqlXRg3A BgtrACtNQCB4Ns2b4VtqYaHed08nXxkjCcbEyk+wQHBiYp2Im8gIztj8m3usr0LGgrg0 qCY8Lh5uBNGH4XPn7kpQDgwtifKLEeLsaOt39lw78NH5GWFo5bV9XMjFhGrnKQ37CFD5 vdJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=iNMCrSQI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a17090668c900b00947797f2840si1198130ejr.320.2023.04.06.07.31.41; Thu, 06 Apr 2023 07:32:07 -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=iNMCrSQI; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S239239AbjDFOan (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239042AbjDFOaZ (ORCPT ); Thu, 6 Apr 2023 10:30:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE0158A5B; Thu, 6 Apr 2023 07:30:24 -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-out2.suse.de (Postfix) with ESMTPS id 1744A1FE1E; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791423; 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=At66nEDRzuoU1LRYd6qgBrLOlPke0TNb1Y9N/Qc/BME=; b=iNMCrSQIwiJHVQf7PM0uFhC83gkzbhe2RqWahZG27kSCAxOjtJ+ld+DWv14eqOzmI5ifz3 8ZHzjdwdPNdxyUiWBddlfMDsnMYKK/Ha+JCwpdEZnB4nNLz8jFUTkOT7VNdZLw1VFWNySe f9HlbZiEjpTGeYpWivvOCaR9V61mQYI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791423; 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=At66nEDRzuoU1LRYd6qgBrLOlPke0TNb1Y9N/Qc/BME=; b=fUEUbVz2MjiMzgk3WPj9Sy8/Z428nLdFQ4S0K6WwUamkXan+lp02uDi+Ecz7n2N/KHST3h 6py6tNH3XqRd/7AQ== 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 A89241351F; Thu, 6 Apr 2023 14:30:22 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wJVUKH7XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:22 +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 , Catalin Marinas , Will Deacon Subject: [PATCH v2 04/19] arch/arm64: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:04 +0200 Message-Id: <20230406143019.6709-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437656436641256?= X-GMAIL-MSGID: =?utf-8?q?1762437656436641256?= Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/fb.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm64/include/asm/fb.h b/arch/arm64/include/asm/fb.h index bdc735ee1f67..1a495d8fb2ce 100644 --- a/arch/arm64/include/asm/fb.h +++ b/arch/arm64/include/asm/fb.h @@ -5,19 +5,6 @@ #ifndef __ASM_FB_H_ #define __ASM_FB_H_ -#include -#include -#include - -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); -} - -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* __ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1072520vqo; Thu, 6 Apr 2023 07:32:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bUn0+kSbbBNZc6yV4LiGe9mH1xnLugE/vfWR9b+SbwXnJshMONeR/Nd3Wvqf6LziC/hwnb X-Received: by 2002:aa7:cc0b:0:b0:4fa:d75c:16c6 with SMTP id q11-20020aa7cc0b000000b004fad75c16c6mr4553481edt.38.1680791576532; Thu, 06 Apr 2023 07:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791576; cv=none; d=google.com; s=arc-20160816; b=pDz+5UDMAtoldfJaW449ZitnMxdT0uoN09ujGhWOOgI3GPi1i0naJwdDApWWyOHrhZ 3c0ebMEBshmSH+Uk3OSE5RqpgWMCqf6kbC3mo7DtDXEAS/DnPSlkfh+MydEOHxD++/Uu ZK7mvkVW6MiU4Zj8H+f8W3UmxL+Lk5rYvsXFDZDVAV+mTDWc+jQ8ZcJKhmi+nCaDNfFX mpgdr+WTd0EH6Ncc1gpQFBEue01VYe+LMCrpVflHW45rhPZVjVh8nebIWtXIWseXfoe+ jCgQ95dKG2NKhkX9+5+bno0Q18IimsJFAab5W6DYK6gBhQJTMohDQdMleJ7K+2s3coJi Krtg== 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=WKajgty5iZWWt850AXIEHEMEuS8AJ1Bf4fZT90DwiGQ=; b=jcnjAVowIAahu9dDDVknOQuzujKUO7u7u80muMowC6QFUUjUiCmE2uD0aZxwjHSffi Rz9ucW1JTCmQN2NkcPzYTqFAeuTHS6BYomM9ia8bZmclItibpDA5FMq1wjkZPQZUMULo D7LjtPrVebqwTOdM6oeZwIKJWc4WKvjVuGOgGTS9rfYsrpnFkDhh6GQV65Lx0hnMT0Xm 2OiPEZpq4oxSGsZylK6496OyLmGF1DGouMzsmj5r2iSFqJT3UqOMW3cTMC6TQvV20VcF CiZUABt5VSS3vs3k0KyxviOG9kwFe4k4ILAlAKX7qz8YOZMbP4mCTYHWHBWLXhb3z27/ znpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=aG7x9PeD; dkim=neutral (no key) header.i=@suse.de; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y7-20020aa7ccc7000000b004fb5244aa5fsi894367edt.123.2023.04.06.07.32.18; Thu, 06 Apr 2023 07:32:56 -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=aG7x9PeD; dkim=neutral (no key) header.i=@suse.de; 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 S239264AbjDFOaq (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239096AbjDFOa0 (ORCPT ); Thu, 6 Apr 2023 10:30:26 -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 D4B1393F1; Thu, 6 Apr 2023 07:30:24 -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 7DCC922775; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791423; 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=WKajgty5iZWWt850AXIEHEMEuS8AJ1Bf4fZT90DwiGQ=; b=aG7x9PeD/0UpMN7BrLUs2T5hN+fu0nC8M0pNLqE4yThHucd2/nyXSQWPI/2PJbPdM3Fkg9 aX39G6ca8e8h/RiYr76egvCROgE420Ekl+km9ElKDZAyaTAD8D6qU/Ryud4UqO9qgHFc3F qcCfxiEv7Jc5+ab4pQAfulp3RQO+CDo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791423; 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=WKajgty5iZWWt850AXIEHEMEuS8AJ1Bf4fZT90DwiGQ=; b=e+y5HWSrzRYvE28gY3Img1rrxzlUcpZYqbsUmRoS4+54WiiAV9U4y4Po//XpAa/8f57sgx f5vm6E+9sH5mTXAA== 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 1C36813A1D; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CKr3BX/XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:23 +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 Subject: [PATCH v2 05/19] arch/ia64: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:05 +0200 Message-Id: <20230406143019.6709-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437708181756555?= X-GMAIL-MSGID: =?utf-8?q?1762437708181756555?= Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann --- arch/ia64/include/asm/fb.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/include/asm/fb.h b/arch/ia64/include/asm/fb.h index 5f95782bfa46..0208f64a0da0 100644 --- a/arch/ia64/include/asm/fb.h +++ b/arch/ia64/include/asm/fb.h @@ -2,11 +2,12 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include #include + #include +struct file; + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { @@ -15,10 +16,8 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, else vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); } +#define fb_pgprotect fb_pgprotect -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1072115vqo; Thu, 6 Apr 2023 07:32:21 -0700 (PDT) X-Google-Smtp-Source: AKy350b2YIP46pdcMuMnmO3AX2lrXgD5EHeq1O0+gNKyoOx0RWRmxeIZLpw1tzpd+6IM+IBBIaRi X-Received: by 2002:a17:906:22d3:b0:878:72f7:bd87 with SMTP id q19-20020a17090622d300b0087872f7bd87mr6339537eja.6.1680791541647; Thu, 06 Apr 2023 07:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791541; cv=none; d=google.com; s=arc-20160816; b=dOxVqYFDnCMf5Jkg33pzJaulF6+UDF7XZ5tvPrLk8uuIOOtqc8oSu2w9xL2D30mgKD e2d4bvAaChsL1gWfmCT7r27DZEOknF26GG1OZNI1wWbBRTq8e7hOGytOS5GwReNqIt/6 SUcanNmynjmLcVVDgVNLRh1XAiip+KWmX03dT9ulbJXcTJJowwBXAr4F7saoQy6PEkIZ eBAZLWOXh3ID8H8/ZnQg/AQy81cFN8BJ3rAuYE1elOajysBy873MvOENIRG9dUoR/Hmw BbTNV++XHcPM5D9/hzOp52iHfo8JbQt8f4rSJsO42WtI4DDtKMbQpTtxFSJilWgNaxs+ X9dA== 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=ELSn+3lCmjw0aHjRZTpHrmQfL+YWtd6ErDVWLzYoO2M=; b=WPlHkkrxzujBHzZpBB4P5d6UlVMuZ1xny0F8MpUYT8hdNgZRkDBqcK357b0V1vzErS MR0j39y7cpxXldcO7rCKyWobS3yDLwT+uTuHvm7JjQdHBDZGczhSkywit2m2emHWnjyE 7bAts/kjRQGBcBW3jFbKLPVeAHpgyIb+6ckcJv+dQ2mcFAIst04BVh+Fqg6ueuVP8Peq sp8bBOhHJhGvHPAi16aA2Gz5vCUb83xtO/dndbAQX/ouUxkZue982ZTSAKM28aQQtaxG N+F8WibItbsSU7y1B7sd4hIwHgcrpOS1EOx63GvIvNQSXvE1BRzhwVPANka6vasnTfva I+ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="f0aTvW/1"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170906814600b009476ce98aedsi1204006ejw.612.2023.04.06.07.31.52; Thu, 06 Apr 2023 07:32:21 -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="f0aTvW/1"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S239306AbjDFOav (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239108AbjDFOa0 (ORCPT ); Thu, 6 Apr 2023 10:30:26 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54EA09017; Thu, 6 Apr 2023 07:30:25 -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 DA51E22776; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791423; 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=ELSn+3lCmjw0aHjRZTpHrmQfL+YWtd6ErDVWLzYoO2M=; b=f0aTvW/1jWPJvIyfrgnixk6FL8cmZBBkBjmaYDi6jZQatC57ZbEjzVUGD3svxvAkZeJpQM wm5RpnlxrNqIjDls1XHgZ+p2r95/OfCZfEHmR0rraFb6nWYwqwa8A6i2zIn9lBLKiANSrt k+zu+2yUfvydvtCechf27IGJ3qC9KuY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791423; 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=ELSn+3lCmjw0aHjRZTpHrmQfL+YWtd6ErDVWLzYoO2M=; b=ylWo/BoG63qs0lLPS8aHLq7ZAVR9SRygajHMo/CXifo36H8s3ArNWLfsr3xVVLJZxP6Fqj 0GYarYpif8E6mlCg== 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 814651351F; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +L7UHn/XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:23 +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 , Huacai Chen , WANG Xuerui Subject: [PATCH v2 06/19] arch/loongarch: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:06 +0200 Message-Id: <20230406143019.6709-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437671510079540?= X-GMAIL-MSGID: =?utf-8?q?1762437671510079540?= Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Huacai Chen Cc: WANG Xuerui --- arch/loongarch/include/asm/fb.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/loongarch/include/asm/fb.h b/arch/loongarch/include/asm/fb.h index 3116bde8772d..ff82f20685c8 100644 --- a/arch/loongarch/include/asm/fb.h +++ b/arch/loongarch/include/asm/fb.h @@ -5,19 +5,6 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include -#include - -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ - vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); -} - -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1074572vqo; Thu, 6 Apr 2023 07:35:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZG4MMT7avQEn/cBjTi7s9XV+SG1v6PiowHSE1wRpl9bXCuhebXj3ay4e0FUUKc9/JpNkbs X-Received: by 2002:aa7:de19:0:b0:4fc:535c:3aa1 with SMTP id h25-20020aa7de19000000b004fc535c3aa1mr5132914edv.10.1680791756950; Thu, 06 Apr 2023 07:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791756; cv=none; d=google.com; s=arc-20160816; b=0V/f20k/1EYj9IMejFsZoYHeJZBDXo31AdYGJdjQsgs/gAAmk2nfG67u31BFtctBZ8 O6b+x5hYAfU57gTiZe/RhFIeaKQonU8U/K9OjA/JG6sNCK9VIntxmOYflPaQwhOByNvy g3Gx6AOP6O38xk+vUAWCFlsfsh/IRAOcIkrSvV4pYKVjwRayrU7QWQ2oDN4T8w2tlLbo cDhoSaaVHI5AjMInBdx0zUKWf33MLg1AjlvcAHTygM3Ug7HGF78rXv03XRK13s6kd1oP LR8wXPOzf1kch7mDcFuyHFLmEN/bLSayLT6idB+JPSiEFFgR0gV+JkKlJrOGV/C1htpT 0mFg== 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=l6S8AxTfPxDIr210BNa5a6dwVpaVjr9DqG4DZ8njqS5igA1me2NA64OLSLkf2BAAmQ 0RImFKRtTbFZl+worihapWh8Lej7+KzA8Af/ABPp33V4+1g180O2t0fHmyQURGwZzGTb wx6oXrnEuPoGg2UjDr4SfnHH/vV6bjDN/5dG5NImv3N7fzicdBsswGtBIY3ywzJbKuA3 bW5C+LvreaJma+wixBLex+VadYd6PM8J01L0l8/jb0DhFxeFt51hx3bhlEetNsdTsa15 D2iKd8+MxSvLcADx0ANF2xoVAbn22LHmMmrC1zZbBU8lMg2ZMGE2oRqzK7QQ3g8Zf2kS rWiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pyCgUmov; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a056402069500b004acccbad706si1264424edy.194.2023.04.06.07.35.32; Thu, 06 Apr 2023 07:35:56 -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=pyCgUmov; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S239283AbjDFOau (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239109AbjDFOa0 (ORCPT ); Thu, 6 Apr 2023 10:30:26 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0ECD9747; Thu, 6 Apr 2023 07:30:25 -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-out2.suse.de (Postfix) with ESMTPS id 452611FE30; Thu, 6 Apr 2023 14:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791424; 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=pyCgUmovT6q4il8l+8jwHCjU+r2dumG5cOIbYgn6QwKo5mjPKoyXEkL6mn/JOa7jmitEUE 1nNmmdoYhFfSAYM/vq7EO8I3Z7C6xxUA1gdTXL41iMqFe5RQfPbKRYzzG0BjlT9PQX6QHB bSlHzmOx8rDRrDsEWcchZmco18KKYjE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791424; 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=+46qFTFMNcdHLr7CFpxgNQZLup0NYTKzSP4VBItIjug=; b=Y9HAV9prH3F81NWxZhDDga/ToiVk5bNBuJD+zfFrt4Kjiw8AjQuqnNHtPPk4xIOreovs3r AQ4ONMQQQGGVsGCQ== 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 DCEF713A1D; Thu, 6 Apr 2023 14:30:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QEQeNX/XLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:23 +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 Subject: [PATCH v2 07/19] arch/m68k: Merge variants of fb_pgprotect() into single function Date: Thu, 6 Apr 2023 16:30:07 +0200 Message-Id: <20230406143019.6709-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437897589391823?= X-GMAIL-MSGID: =?utf-8?q?1762437897589391823?= Merge all variants of fb_pgprotect() into a single function body. There are two different cases for MMU systems. For non-MMU systems, the function body will be empty. No functional changes, but this will help with the switch to . Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h index b86c6e2e26dd..4f96989922af 100644 --- a/arch/m68k/include/asm/fb.h +++ b/arch/m68k/include/asm/fb.h @@ -7,17 +7,13 @@ #include #include -#ifdef CONFIG_MMU -#ifdef CONFIG_SUN3 static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { +#ifdef CONFIG_MMU +#ifdef CONFIG_SUN3 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; -} #else -static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, - unsigned long off) -{ if (CPU_IS_020_OR_030) pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; if (CPU_IS_040_OR_060) { @@ -25,11 +21,9 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, /* Use no-cache mode, serialized */ pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; } -} #endif /* CONFIG_SUN3 */ -#else -#define fb_pgprotect(...) do {} while (0) #endif /* CONFIG_MMU */ +} static inline int fb_is_primary_device(struct fb_info *info) { From patchwork Thu Apr 6 14:30:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1076957vqo; Thu, 6 Apr 2023 07:39:35 -0700 (PDT) X-Google-Smtp-Source: AKy350bqsCVz1PFyGGeJik2k3TnETl6zv8t+Ga96yj8M/phmx9oC/g+uD2bH0nv+KJ2T2LXhYuEz X-Received: by 2002:aa7:9553:0:b0:624:894d:c494 with SMTP id w19-20020aa79553000000b00624894dc494mr9915851pfq.19.1680791975352; Thu, 06 Apr 2023 07:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791975; cv=none; d=google.com; s=arc-20160816; b=H+rlckJSkBf9VLxqGeGm+cjESxqJ22B5HOpbYNUQUg9BhSC4eNF8vQ3vVv+ct6Ht26 g1gdbcs5NopaI6+S/6ilYFJ3kB3jLtXZs34w11UjWceC93SZln42qX873RvJ5QAk92be 9JbSThcs2XoQof/yxLPBdgfUe/68eXfh87rSQVUnaavMiPuAv2SQG++MoqoaYm3aDlhJ nL/74YNcInyRVSrfn88fTudJvWDVebKDn1hE5p0oeAFH70ylc0Skl3dWZ4yWnWy07hzR LXIpN6L/2idNbuLUVxvT2sIh+AuzU5AVKo5G7bEguXfUYavX8C4f6340SQ3sK/PZ2A/H vDww== 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=HaLz47UpOVUbIpV6GbGVRJNZ3VKW0NCi5Fn0QztY1Qo=; b=q8TwUIFOxTo7VowxztddVGnxx7xShQ9lko6uSvnDcW8vvJ84monhShWzxI+LFFa5d4 +1+9eoYjo4eZNjqtu1QQ5nTrxuT+rBXdZQcp4Ol7f2qYC7lvqkW0+HpYayN164H0Kx+9 21XbfubKyfiGouFZYE5BWxrdCt0DAR6Oe04/g/Ox87nmgX+dSZMpisew3CX5wy8UZq8z c+nsL4fZ8Rq/tmM3FcrFrcMhQEby3F81kt9zjZPUWzK6n8cFF/DjMQpw9IWx9IyDDEBR /gSrIzFHZVgDgeVIJWMjEglQ+InTIT+asd94CMw2j2zNuiZ/UxgSa5AuB4lejnIZeL/i bxPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=atX77z9i; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=QpwrgLMu; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020aa79622000000b006281178b344si1519558pfg.244.2023.04.06.07.39.23; Thu, 06 Apr 2023 07:39:35 -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=atX77z9i; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=QpwrgLMu; 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 S239318AbjDFOaz (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238649AbjDFOa1 (ORCPT ); Thu, 6 Apr 2023 10:30:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2358993C4; Thu, 6 Apr 2023 07:30:26 -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-out2.suse.de (Postfix) with ESMTPS id A3D4D1FE43; Thu, 6 Apr 2023 14:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791424; 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=HaLz47UpOVUbIpV6GbGVRJNZ3VKW0NCi5Fn0QztY1Qo=; b=atX77z9iTUXWc5fKEEG59SJM5r994gpVtgCclnB/qghw3U5KqEiR0anu1ZZQTkW/7LX99R xYWcdeo+9xf886gujp6JmqNn3NPfNkre8IEEswmwSh0WCiGNcOCPqey4R6SIL/vY3pPAHi gSQfI7Lpk1AWNTVhLNK58oIQgi19E+4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791424; 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=HaLz47UpOVUbIpV6GbGVRJNZ3VKW0NCi5Fn0QztY1Qo=; b=QpwrgLMuQUOCEB63lCzVy1xNrNdNaQiOODvXT7OWZBJN9N4iCHZywjdhdwc849B3D5lzLX OMg3LkBTpsvRiUBw== 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 4CB2D1351F; Thu, 6 Apr 2023 14:30:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +IfDEYDXLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:24 +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 , Geert Uytterhoeven Subject: [PATCH v2 08/19] arch/m68k: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:08 +0200 Message-Id: <20230406143019.6709-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762438126107012406?= X-GMAIL-MSGID: =?utf-8?q?1762438126107012406?= Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. v2: * provide empty fb_pgprotect() on non-MMU systems Signed-off-by: Thomas Zimmermann Cc: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/m68k/include/asm/fb.h b/arch/m68k/include/asm/fb.h index 4f96989922af..24273fc7ad91 100644 --- a/arch/m68k/include/asm/fb.h +++ b/arch/m68k/include/asm/fb.h @@ -2,11 +2,11 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include #include #include +struct file; + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { @@ -24,10 +24,8 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, #endif /* CONFIG_SUN3 */ #endif /* CONFIG_MMU */ } +#define fb_pgprotect fb_pgprotect -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1076046vqo; Thu, 6 Apr 2023 07:38:12 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3i1AApnreRGRBngvppDSUbjM3tP+U6+HNZh/zfAH7j5iZERM/WMk2ArjtjxiWyIBsERlB X-Received: by 2002:a05:6a00:cd:b0:627:8e40:68e0 with SMTP id e13-20020a056a0000cd00b006278e4068e0mr9860949pfj.15.1680791891768; Thu, 06 Apr 2023 07:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791891; cv=none; d=google.com; s=arc-20160816; b=TiEMnTqskmF7kEaHxKcMP75wDpIVf6hK6lOcXwpn3PX0bOL1CQQoEaEa4hZN3Zf6uE v+C3ICSRNGMevmuRng9ay1E4OZviWU3GljBIoRKuiwnbZgSQFvmF0DatzDT4kMhlFHW5 3V5t+LHC7de+XhhPC5wuua8dPmceh9Tp2c3oyQ0XXRb7GmRJRxaJYjWT1JvR1WHWNPct EfkhKVQoVY6K8HTNvxb7VuCBtt3iKPxgaSe616OUCyV68ThB73lf62mM4xTVTveYUi70 rVMxPHe0N0twzO5j4W+xu4X6OFQbPwOe9XIKPm6KJoAkasDJTwxtQTaOOy5upkPKTsI+ japw== 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=XbMo3vTzToV+AWbGx2Dtk5bvok2FxXyPAOociH6amPI=; b=u+HDXg7WmX1FqFQDVRFw+a1h1n+3qrEMevcX7yYCpzFXmZ2SSklxdzy8miuZxR1Ic9 Zu70klHdMOKEqBtGpAVzbQbZ6xGWsYaVuNQOpRUK8kUXmQcK6ZZcRYnkM6sdcNLcdnUz 5lt41oNSBpq9vB+KcvxZP/vmaB4ZKNaR/mf0IahqlG+JGbQ27bbeT8vPRLN2JmsZbCPW dQu+c5VaVWPzEH60RyTq4MwGpCVlvmsTUEwBhqADjmDbxdVpnWJclpHXn5TcFmJBGbKE +4b2xMQQhYf2xpiCr6FHCbzLJ5nKtnjdYrusbu2aZkygk3hV0voNQq+BVZeft4xb9Osp LBdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DxH8AJHl; dkim=neutral (no key) header.i=@suse.de; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l37-20020a635b65000000b0050bf6a432ecsi1364032pgm.681.2023.04.06.07.37.58; Thu, 06 Apr 2023 07:38:11 -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=DxH8AJHl; dkim=neutral (no key) header.i=@suse.de; 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 S239330AbjDFOa7 (ORCPT + 99 others); Thu, 6 Apr 2023 10:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239119AbjDFOa1 (ORCPT ); Thu, 6 Apr 2023 10:30:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8988A8A5B; Thu, 6 Apr 2023 07:30:26 -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-out2.suse.de (Postfix) with ESMTPS id 0B15A1FE46; Thu, 6 Apr 2023 14:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791425; 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=XbMo3vTzToV+AWbGx2Dtk5bvok2FxXyPAOociH6amPI=; b=DxH8AJHlSCuJBUCJvwJqrU9F1y8efaF+TgjAjifX+nUSPcKnRprY+cKHvQE11fvbPviB1p 2YrDHHkp9vcbxo1Ng1bseGZoQxepkwi47e8I7tCBCZ0qLqI0GbiUdyjopuv20FJNxuXw5a juT0f6yicrYRZqZwQiFxdvjm4pWIojc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791425; 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=XbMo3vTzToV+AWbGx2Dtk5bvok2FxXyPAOociH6amPI=; b=67wvZT6uuWuQdCdgNAZKWtUL2z8R21cvtn9T/XZ3WB2V0/uGjPbxaFDkPl62y5825UDVxv Y8s7D48pEErnm0Bg== 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 A6FD613A1D; Thu, 6 Apr 2023 14:30:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2BIBKIDXLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:24 +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 Bogendoerfer Subject: [PATCH v2 09/19] arch/mips: Implement with generic helpers Date: Thu, 6 Apr 2023 16:30:09 +0200 Message-Id: <20230406143019.6709-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762438038862850703?= X-GMAIL-MSGID: =?utf-8?q?1762438038862850703?= Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Bogendoerfer --- arch/mips/include/asm/fb.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/fb.h b/arch/mips/include/asm/fb.h index bd3f68c9ddfc..6bda0a81d8ca 100644 --- a/arch/mips/include/asm/fb.h +++ b/arch/mips/include/asm/fb.h @@ -1,19 +1,17 @@ #ifndef _ASM_FB_H_ #define _ASM_FB_H_ -#include -#include #include +struct file; + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); } +#define fb_pgprotect fb_pgprotect -static inline int fb_is_primary_device(struct fb_info *info) -{ - return 0; -} +#include #endif /* _ASM_FB_H_ */ From patchwork Thu Apr 6 14:30:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80274 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1072705vqo; Thu, 6 Apr 2023 07:33:13 -0700 (PDT) X-Google-Smtp-Source: AKy350b+BEPRr1CC+r1fgNmBwXVdk+YBFIDtl0OqLLVZi9zHKhNoOskH/M3rdfq1wFBrIXwcK0L7 X-Received: by 2002:a17:906:22d3:b0:878:72f7:bd87 with SMTP id q19-20020a17090622d300b0087872f7bd87mr6343147eja.6.1680791593525; Thu, 06 Apr 2023 07:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791593; cv=none; d=google.com; s=arc-20160816; b=DWbjRBuU3aHiVnF1AdpKzFSUS8pBR53cTqYsXaimBw6lQNQL1C5Q7u0iwe1Hia1+VX us/DE49k60m12xf1oFZINUtJWWdoZ4B3tmSRDzqPoj4Z40WZe8j+SjOB4ppX8sBUpTFO +3IH4ynbEwTVhGECxC9FiPhd6+zZcXjoU0Gv378Ion+wQGSnl3auYlpt2a+9G4LVAsmV gDxgqRXRR5mJ1AVihcdVoNZyaNfU5ZLZsOUrvOqfKkgTRWCH32CCHCwgMtR17j6eaY2U gMJbATUBRestdWnonQN6NkrpDsx6d3OWseKCgCg/DYdRmQQPqkrgIvlYwWklrwH/2Q+I /nlQ== 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=Eo/bLXguw7MdHhtP9FcQvxJmrLre1vl8fbgQMpoea24=; b=thpFb5P6W7Bmhg3H2iq+H3Niun2FJJceRV6upC8+4j0I0xMCSb4QFuzDew5zmsWHzb VwGZU56ASA7fLi5qERzQMbMyXKmDG1NVgJ+YkWWoAqxtMXxN1Inh1n/X9axm5F1QwuXn 9GxWfVPvwr8pbcK9hivFAkQUgtMojfLy/SL+gHFCQq8hMk1B+NQktOlb8R0Gd7q+Hpfe YncHdQ965LT/kiKaEgR2gjw9RHNRGWTkoA6EdCCC51cFmN2t8BkHsAj6AnjFaU1e6lCZ FXme7LTyjl/0ikfws1esPLUtXaVgKTNqK3TCdmofCkC075PhiZQxojE9JgjHHGr78wLX NPSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=y6UbgE+p; dkim=neutral (no key) header.i=@suse.de; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot13-20020a170906cccd00b00949aadb9479si1148347ejb.819.2023.04.06.07.32.47; Thu, 06 Apr 2023 07:33:13 -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=y6UbgE+p; dkim=neutral (no key) header.i=@suse.de; 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 S239238AbjDFOb1 (ORCPT + 99 others); Thu, 6 Apr 2023 10:31:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229652AbjDFOab (ORCPT ); Thu, 6 Apr 2023 10:30:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5AB893C5; Thu, 6 Apr 2023 07:30:26 -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-out2.suse.de (Postfix) with ESMTPS id 74FB81FE59; Thu, 6 Apr 2023 14:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791425; 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=Eo/bLXguw7MdHhtP9FcQvxJmrLre1vl8fbgQMpoea24=; b=y6UbgE+pcY2f7xbuIFRWFqUzWrJpOA+uYuv7oP0daH2jfrwta+dhYkzEIKdXqS4Wx3bO3Y 5OaPNzRbxk5/4ew/68u+MV/+AGJPZSkoUciC+u3o2swA9kGa2CUrQrpcOTCFj/mp7xcWeW vquMTyuABeDw48opTWtGPpwZaPI2Lig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791425; 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=Eo/bLXguw7MdHhtP9FcQvxJmrLre1vl8fbgQMpoea24=; b=qX6BnNf7BU7JJxdPt0qT3qYNE/EwrjABNsUrAGK2xQPtuTOVhuZWnhMwQKLiRF8XnvspOI /DCcyaclMcReQNBA== 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 0E12F1351F; Thu, 6 Apr 2023 14:30:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id EJ2HAoHXLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:25 +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 Subject: [PATCH v2 10/19] video: Remove trailing whitespaces Date: Thu, 6 Apr 2023 16:30:10 +0200 Message-Id: <20230406143019.6709-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762437725921649902?= X-GMAIL-MSGID: =?utf-8?q?1762437725921649902?= Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/console/sticon.c | 4 +- drivers/video/console/sticore.c | 102 ++++++++++----------- drivers/video/fbdev/sticore.h | 14 +-- drivers/video/fbdev/stifb.c | 156 ++++++++++++++++---------------- 4 files changed, 138 insertions(+), 138 deletions(-) diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 2cea69418a83..89ad7ade6cf9 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -282,7 +282,7 @@ static void sticon_init(struct vc_data *c, int init) vc_cols = sti_onscreen_x(sti) / sti->font->width; vc_rows = sti_onscreen_y(sti) / sti->font->height; c->vc_can_do_color = 1; - + if (init) { c->vc_cols = vc_cols; c->vc_rows = vc_rows; @@ -374,7 +374,7 @@ static const struct consw sti_con = { .con_font_set = sticon_font_set, .con_font_default = sticon_font_default, .con_build_attr = sticon_build_attr, - .con_invert_region = sticon_invert_region, + .con_invert_region = sticon_invert_region, }; diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index db568f67e4dc..6ea9596a3c4b 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -6,12 +6,12 @@ * Copyright (C) 2000 Philipp Rumpf * Copyright (C) 2001-2020 Helge Deller * Copyright (C) 2001-2002 Thomas Bogendoerfer - * + * * TODO: * - call STI in virtual mode rather than in real mode - * - screen blanking with state_mgmt() in text mode STI ? + * - screen blanking with state_mgmt() in text mode STI ? * - try to make it work on m68k hp workstations ;) - * + * */ #define pr_fmt(fmt) "%s: " fmt, KBUILD_MODNAME @@ -66,12 +66,12 @@ static const u8 col_trans[8] = { #define c_index(sti, c) ((c) & 0xff) static const struct sti_init_flags default_init_flags = { - .wait = STI_WAIT, + .wait = STI_WAIT, .reset = 1, - .text = 1, + .text = 1, .nontext = 1, - .no_chg_bet = 1, - .no_chg_bei = 1, + .no_chg_bet = 1, + .no_chg_bei = 1, .init_cmap_tx = 1, }; @@ -104,7 +104,7 @@ static int sti_init_graph(struct sti_struct *sti) pr_err("STI init_graph failed (ret %d, errno %d)\n", ret, err); return -1; } - + return 0; } @@ -120,7 +120,7 @@ static void sti_inq_conf(struct sti_struct *sti) s32 ret; outptr->ext_ptr = STI_PTR(&sti->sti_data->inq_outptr_ext); - + do { spin_lock_irqsave(&sti->lock, flags); memset(inptr, 0, sizeof(*inptr)); @@ -162,9 +162,9 @@ sti_putc(struct sti_struct *sti, int c, int y, int x, } static const struct sti_blkmv_flags clear_blkmv_flags = { - .wait = STI_WAIT, - .color = 1, - .clear = 1, + .wait = STI_WAIT, + .color = 1, + .clear = 1, }; void @@ -185,7 +185,7 @@ sti_set(struct sti_struct *sti, int src_y, int src_x, struct sti_blkmv_outptr *outptr = &sti->sti_data->blkmv_outptr; s32 ret; unsigned long flags; - + do { spin_lock_irqsave(&sti->lock, flags); *inptr = inptr_default; @@ -224,7 +224,7 @@ sti_clear(struct sti_struct *sti, int src_y, int src_x, } static const struct sti_blkmv_flags default_blkmv_flags = { - .wait = STI_WAIT, + .wait = STI_WAIT, }; void @@ -291,14 +291,14 @@ static int __init sti_setup(char *str) { if (str) strscpy(default_sti_path, str, sizeof(default_sti_path)); - + return 1; } /* Assuming the machine has multiple STI consoles (=graphic cards) which * all get detected by sticon, the user may define with the linux kernel * parameter sti= which of them will be the initial boot-console. - * is a number between 0 and MAX_STI_ROMS, with 0 as the default + * is a number between 0 and MAX_STI_ROMS, with 0 as the default * STI screen. */ __setup("sti=", sti_setup); @@ -341,13 +341,13 @@ static int sti_font_setup(char *str) * should be used by the sticon driver to draw characters to the screen. * Possible values are: * - sti_font=: - * is the name of one of the linux-kernel built-in - * framebuffer font names (e.g. VGA8x16, SUN22x18). - * This is only available if the fonts have been statically compiled + * is the name of one of the linux-kernel built-in + * framebuffer font names (e.g. VGA8x16, SUN22x18). + * This is only available if the fonts have been statically compiled * in with e.g. the CONFIG_FONT_8x16 or CONFIG_FONT_SUN12x22 options. * - sti_font= ( = 1,2,3,...) * most STI ROMs have built-in HP specific fonts, which can be selected - * by giving the desired number to the sticon driver. + * by giving the desired number to the sticon driver. * NOTE: This number is machine and STI ROM dependend. * - sti_font=x (e.g. sti_font=16x8) * and gives hints to the height and width of the @@ -359,12 +359,12 @@ __setup("sti_font=", sti_font_setup); #endif - + static void sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) { struct sti_glob_cfg_ext *cfg; - + pr_debug("%d text planes\n" "%4d x %4d screen resolution\n" "%4d x %4d offscreen\n" @@ -384,7 +384,7 @@ static void sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, glob_cfg->reent_lvl, glob_cfg->save_addr); - /* dump extended cfg */ + /* dump extended cfg */ cfg = PTR_STI((unsigned long)glob_cfg->ext_ptr); pr_debug("monitor %d\n" "in friendly mode: %d\n" @@ -437,10 +437,10 @@ static int sti_init_glob_cfg(struct sti_struct *sti, unsigned long rom_address, glob_cfg->save_addr = STI_PTR(save_addr); for (i=0; i<8; i++) { unsigned long newhpa, len; - + if (sti->pd) { unsigned char offs = sti->rm_entry[i]; - + if (offs == 0) continue; if (offs != PCI_ROM_ADDRESS && @@ -456,18 +456,18 @@ static int sti_init_glob_cfg(struct sti_struct *sti, unsigned long rom_address, sti->regions_phys[i] = REGION_OFFSET_TO_PHYS(sti->regions[i], newhpa); - + len = sti->regions[i].region_desc.length * 4096; if (len) glob_cfg->region_ptrs[i] = sti->regions_phys[i]; - + pr_debug("region #%d: phys %08lx, region_ptr %08x, len=%lukB, " "btlb=%d, sysonly=%d, cache=%d, last=%d\n", i, sti->regions_phys[i], glob_cfg->region_ptrs[i], len/1024, sti->regions[i].region_desc.btlb, sti->regions[i].region_desc.sys_only, - sti->regions[i].region_desc.cache, + sti->regions[i].region_desc.cache, sti->regions[i].region_desc.last); /* last entry reached ? */ @@ -482,7 +482,7 @@ static int sti_init_glob_cfg(struct sti_struct *sti, unsigned long rom_address, glob_cfg_ext->sti_mem_addr = STI_PTR(sti_mem_addr); sti->glob_cfg = glob_cfg; - + return 0; } @@ -495,7 +495,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) void *dest; struct sti_rom_font *nf; struct sti_cooked_font *cooked_font; - + if (fbfont_name && strlen(fbfont_name)) fbfont = find_font(fbfont_name); if (!fbfont) @@ -505,8 +505,8 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) pr_info(" using %ux%u framebuffer font %s\n", fbfont->width, fbfont->height, fbfont->name); - - bpc = ((fbfont->width+7)/8) * fbfont->height; + + bpc = ((fbfont->width+7)/8) * fbfont->height; size = bpc * fbfont->charcount; size += sizeof(struct sti_rom_font); @@ -533,7 +533,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) kfree(nf); return NULL; } - + cooked_font->raw = nf; cooked_font->raw_ptr = nf; cooked_font->next_font = NULL; @@ -617,9 +617,9 @@ static void sti_dump_rom(struct sti_struct *sti) int nr; pr_info(" id %04x-%04x, conforms to spec rev. %d.%02x\n", - rom->graphics_id[0], + rom->graphics_id[0], rom->graphics_id[1], - rom->revno[0] >> 4, + rom->revno[0] >> 4, rom->revno[0] & 0x0f); pr_debug(" supports %d monitors\n", rom->num_mons); pr_debug(" font start %08x\n", rom->font_start); @@ -647,7 +647,7 @@ static int sti_cook_fonts(struct sti_cooked_rom *cooked_rom, { struct sti_rom_font *raw_font, *font_start; struct sti_cooked_font *cooked_font; - + cooked_font = kzalloc(sizeof(*cooked_font), GFP_KERNEL); if (!cooked_font) return 0; @@ -745,7 +745,7 @@ static struct sti_rom *sti_get_bmode_rom (unsigned long address) raw_font = ((void *)raw) + raw->font_start; font_start = raw_font; - + while (raw_font->next_font) { BMODE_RELOCATE (raw_font->next_font); raw_font = ((void *)font_start) + raw_font->next_font; @@ -759,7 +759,7 @@ static struct sti_rom *sti_get_wmode_rom(unsigned long address) struct sti_rom *raw; unsigned long size; - /* read the ROM size directly from the struct in ROM */ + /* read the ROM size directly from the struct in ROM */ size = gsc_readl(address + offsetof(struct sti_rom,last_addr)); raw = kmalloc(size, STI_LOWMEM); @@ -869,7 +869,7 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, pr_warn("maximum number of STI ROMS reached !\n"); return NULL; } - + sti = kzalloc(sizeof(*sti), GFP_KERNEL); if (!sti) return NULL; @@ -890,19 +890,19 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, u32 *rm; i = gsc_readl(address+0x04); if (i != 1) { - /* The ROM could have multiple architecture + /* The ROM could have multiple architecture * dependent images (e.g. i386, parisc,...) */ pr_warn("PCI ROM is not a STI ROM type image (0x%8x)\n", i); goto out_err; } - + sti->pd = pd; i = gsc_readl(address+0x0c); pr_debug("PCI ROM size (from header) = %d kB\n", le16_to_cpu(i>>16)*512/1024); rm_offset = le16_to_cpu(i & 0xffff); - if (rm_offset) { + if (rm_offset) { /* read 16 bytes from the pci region mapper array */ rm = (u32*) &sti->rm_entry; *rm++ = gsc_readl(address+rm_offset+0x00); @@ -915,9 +915,9 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, pr_debug("sig %04x, PCI STI ROM at %08lx\n", sig, address); goto test_rom; } - + ok = 0; - + if ((sig & 0xff) == 0x01) { pr_debug(" byte mode ROM at %08lx, hpa at %08lx\n", address, hpa); @@ -941,7 +941,7 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, */ if (sti->pd) { unsigned long rom_base; - rom_base = pci_resource_start(sti->pd, PCI_ROM_RESOURCE); + rom_base = pci_resource_start(sti->pd, PCI_ROM_RESOURCE); pci_write_config_dword(sti->pd, PCI_ROM_ADDRESS, rom_base & ~PCI_ROM_ADDRESS_ENABLE); pr_debug("STI PCI ROM disabled\n"); } @@ -952,13 +952,13 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, sti_inq_conf(sti); sti_dump_globcfg(sti->glob_cfg, sti->sti_mem_request); sti_dump_outptr(sti); - + pr_info(" graphics card name: %s\n", sti->sti_data->inq_outptr.dev_name); sti_roms[num_sti_roms] = sti; num_sti_roms++; - + return sti; out_err: @@ -974,9 +974,9 @@ static void sticore_check_for_default_sti(struct sti_struct *sti, char *path) } /* - * on newer systems PDC gives the address of the ROM + * on newer systems PDC gives the address of the ROM * in the additional address field addr[1] while on - * older Systems the PDC stores it in page0->proc_sti + * older Systems the PDC stores it in page0->proc_sti */ static int __init sticore_pa_init(struct parisc_device *dev) { @@ -1005,7 +1005,7 @@ static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent) unsigned int fb_len, rom_len; int err; struct sti_struct *sti; - + err = pci_enable_device(pd); if (err < 0) { dev_err(&pd->dev, "Cannot enable PCI device\n"); @@ -1032,7 +1032,7 @@ static int sticore_pci_init(struct pci_dev *pd, const struct pci_device_id *ent) print_pci_hwpath(pd, sti->pa_path); sticore_check_for_default_sti(sti, sti->pa_path); } - + if (!sti) { pr_warn("Unable to handle STI device '%s'\n", pci_name(pd)); return -ENODEV; diff --git a/drivers/video/fbdev/sticore.h b/drivers/video/fbdev/sticore.h index 0ebdd28a0b81..c0879352cde4 100644 --- a/drivers/video/fbdev/sticore.h +++ b/drivers/video/fbdev/sticore.h @@ -27,11 +27,11 @@ * * Probably the best solution to all this is have the generic code manage * the screen buffer and a kernel thread to call STI occasionally. - * + * * Luckily, the frame buffer guys have the same problem so we can just wait * for them to fix it and steal their solution. prumpf */ - + #include #define STI_WAIT 1 @@ -56,7 +56,7 @@ /* STI function configuration structs */ typedef union region { - struct { + struct { u32 offset : 14; /* offset in 4kbyte page */ u32 sys_only : 1; /* don't map to user space */ u32 cache : 1; /* map to data cache */ @@ -154,7 +154,7 @@ struct sti_conf_inptr { }; struct sti_conf_outptr_ext { - u32 crt_config[3]; /* hardware specific X11/OGL information */ + u32 crt_config[3]; /* hardware specific X11/OGL information */ u32 crt_hdw[3]; u32 future_ptr; }; @@ -211,7 +211,7 @@ struct sti_rom { u32 set_cm_entry; u32 dma_ctrl; u8 res040[7 * 4]; - + u32 init_graph_addr; u32 state_mgmt_addr; u32 font_unp_addr; @@ -271,7 +271,7 @@ struct sti_font_flags { u32 pad : 30; /* pad to word boundary */ u32 future_ptr; /* pointer to future data */ }; - + struct sti_font_outptr { s32 errno; /* error number on failure */ u32 future_ptr; /* pointer to future data */ @@ -338,7 +338,7 @@ struct sti_all_data { struct sti_struct { spinlock_t lock; - + /* char **mon_strings; */ int sti_mem_request; u32 graphics_id[2]; diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c index ef8a4c5fc687..99996bc7e6d9 100644 --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1,11 +1,11 @@ /* - * linux/drivers/video/stifb.c - - * Low level Frame buffer driver for HP workstations with + * linux/drivers/video/stifb.c - + * Low level Frame buffer driver for HP workstations with * STI (standard text interface) video firmware. * * Copyright (C) 2001-2006 Helge Deller * Portions Copyright (C) 2001 Thomas Bogendoerfer - * + * * Based on: * - linux/drivers/video/artistfb.c -- Artist frame buffer driver * Copyright (C) 2000 Philipp Rumpf @@ -14,7 +14,7 @@ * - HP Xhp cfb-based X11 window driver for XFree86 * (c)Copyright 1992 Hewlett-Packard Co. * - * + * * The following graphics display devices (NGLE family) are supported by this driver: * * HPA4070A known as "HCRX", a 1280x1024 color device with 8 planes @@ -30,7 +30,7 @@ * supports 1280x1024 color displays with 8 planes. * HP710G same as HP710C, 1280x1024 grayscale only * HP710L same as HP710C, 1024x768 color only - * HP712 internal graphics support on HP9000s712 SPU, supports 640x480, + * HP712 internal graphics support on HP9000s712 SPU, supports 640x480, * 1024x768 or 1280x1024 color displays on 8 planes (Artist) * * This file is subject to the terms and conditions of the GNU General Public @@ -92,7 +92,7 @@ typedef struct { __s32 misc_video_end; } video_setup_t; -typedef struct { +typedef struct { __s16 sizeof_ngle_data; __s16 x_size_visible; /* visible screen dim in pixels */ __s16 y_size_visible; @@ -177,10 +177,10 @@ static int __initdata stifb_bpp_pref[MAX_STI_ROMS]; #endif /* DEBUG_STIFB_REGS */ -#define ENABLE 1 /* for enabling/disabling screen */ +#define ENABLE 1 /* for enabling/disabling screen */ #define DISABLE 0 -#define NGLE_LOCK(fb_info) do { } while (0) +#define NGLE_LOCK(fb_info) do { } while (0) #define NGLE_UNLOCK(fb_info) do { } while (0) static void @@ -198,9 +198,9 @@ SETUP_HW(struct stifb_info *fb) static void SETUP_FB(struct stifb_info *fb) -{ +{ unsigned int reg10_value = 0; - + SETUP_HW(fb); switch (fb->id) { @@ -210,15 +210,15 @@ SETUP_FB(struct stifb_info *fb) reg10_value = 0x13601000; break; case S9000_ID_A1439A: - if (fb->info.var.bits_per_pixel == 32) + if (fb->info.var.bits_per_pixel == 32) reg10_value = 0xBBA0A000; - else + else reg10_value = 0x13601000; break; case S9000_ID_HCRX: if (fb->info.var.bits_per_pixel == 32) reg10_value = 0xBBA0A000; - else + else reg10_value = 0x13602000; break; case S9000_ID_TIMBER: @@ -243,7 +243,7 @@ START_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) } static void -WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color) +WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color) { SETUP_HW(fb); WRITE_WORD(((0x100+index)<<2), fb, REG_3); @@ -251,30 +251,30 @@ WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color) } static void -FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) -{ +FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) +{ WRITE_WORD(0x400, fb, REG_2); if (fb->info.var.bits_per_pixel == 32) { WRITE_WORD(0x83000100, fb, REG_1); } else { if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG) WRITE_WORD(0x80000100, fb, REG_26); - else + else WRITE_WORD(0x80000100, fb, REG_1); } SETUP_FB(fb); } static void -SETUP_RAMDAC(struct stifb_info *fb) +SETUP_RAMDAC(struct stifb_info *fb) { SETUP_HW(fb); WRITE_WORD(0x04000000, fb, 0x1020); WRITE_WORD(0xff000000, fb, 0x1028); } -static void -CRX24_SETUP_RAMDAC(struct stifb_info *fb) +static void +CRX24_SETUP_RAMDAC(struct stifb_info *fb) { SETUP_HW(fb); WRITE_WORD(0x04000000, fb, 0x1000); @@ -286,14 +286,14 @@ CRX24_SETUP_RAMDAC(struct stifb_info *fb) } #if 0 -static void +static void HCRX_SETUP_RAMDAC(struct stifb_info *fb) { WRITE_WORD(0xffffffff, fb, REG_32); } #endif -static void +static void CRX24_SET_OVLY_MASK(struct stifb_info *fb) { SETUP_HW(fb); @@ -314,7 +314,7 @@ ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) WRITE_WORD(value, fb, 0x1038); } -static void +static void CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) { unsigned int value = enable ? 0x10000000 : 0x30000000; @@ -325,11 +325,11 @@ CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) } static void -ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) +ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) { u32 DregsMiscVideo = REG_21; u32 DregsMiscCtl = REG_27; - + SETUP_HW(fb); if (enable) { WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo); @@ -344,7 +344,7 @@ ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) (READ_BYTE(fb, REG_16b3) - 1) #define HYPER_CONFIG_PLANES_24 0x00000100 - + #define IS_24_DEVICE(fb) \ (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24) @@ -470,15 +470,15 @@ SETUP_ATTR_ACCESS(struct stifb_info *fb, unsigned BufferNumber) } static void -SET_ATTR_SIZE(struct stifb_info *fb, int width, int height) +SET_ATTR_SIZE(struct stifb_info *fb, int width, int height) { - /* REG_6 seems to have special values when run on a + /* REG_6 seems to have special values when run on a RDI precisionbook parisc laptop (INTERNAL_EG_DX1024 or INTERNAL_EG_X1024). The values are: 0x2f0: internal (LCD) & external display enabled 0x2a0: external display only 0x000: zero on standard artist graphic cards - */ + */ WRITE_WORD(0x00000000, fb, REG_6); WRITE_WORD((width<<16) | height, fb, REG_9); WRITE_WORD(0x05000000, fb, REG_6); @@ -486,7 +486,7 @@ SET_ATTR_SIZE(struct stifb_info *fb, int width, int height) } static void -FINISH_ATTR_ACCESS(struct stifb_info *fb) +FINISH_ATTR_ACCESS(struct stifb_info *fb) { SETUP_HW(fb); WRITE_WORD(0x00000000, fb, REG_12); @@ -499,7 +499,7 @@ elkSetupPlanes(struct stifb_info *fb) SETUP_FB(fb); } -static void +static void ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber) { SETUP_ATTR_ACCESS(fb, BufferNumber); @@ -519,7 +519,7 @@ rattlerSetupPlanes(struct stifb_info *fb) * read mask register for overlay planes, not image planes). */ CRX24_SETUP_RAMDAC(fb); - + /* change fb->id temporarily to fool SETUP_FB() */ saved_id = fb->id; fb->id = CRX24_OVERLAY_PLANES; @@ -565,7 +565,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) lutBltCtl.all = 0x80000000; lutBltCtl.fields.length = length; - switch (fb->id) + switch (fb->id) { case S9000_ID_A1439A: /* CRX24 */ if (fb->var.bits_per_pixel == 8) { @@ -576,12 +576,12 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) lutBltCtl.fields.lutOffset = 0 * 256; } break; - + case S9000_ID_ARTIST: lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; lutBltCtl.fields.lutOffset = 0 * 256; break; - + default: lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE; lutBltCtl.fields.lutOffset = 0; @@ -596,7 +596,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) #endif static NgleLutBltCtl -setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) +setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) { NgleLutBltCtl lutBltCtl; @@ -633,7 +633,7 @@ static void hyperUndoITE(struct stifb_info *fb) /* Hardware setup for full-depth write to "magic" location */ GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); - NGLE_QUICK_SET_DST_BM_ACCESS(fb, + NGLE_QUICK_SET_DST_BM_ACCESS(fb, BA(IndexedDcd, Otc04, Ots08, AddrLong, BAJustPoint(0), BINovly, BAIndexBase(0))); NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, @@ -653,13 +653,13 @@ static void hyperUndoITE(struct stifb_info *fb) NGLE_UNLOCK(fb); } -static void +static void ngleDepth8_ClearImagePlanes(struct stifb_info *fb) { /* FIXME! */ } -static void +static void ngleDepth24_ClearImagePlanes(struct stifb_info *fb) { /* FIXME! */ @@ -675,7 +675,7 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg) NGLE_LOCK(fb); GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4); - NGLE_QUICK_SET_DST_BM_ACCESS(fb, + NGLE_QUICK_SET_DST_BM_ACCESS(fb, BA(IndexedDcd, Otc32, OtsIndirect, AddrLong, BAJustPoint(0), BINattr, BAIndexBase(0))); @@ -713,22 +713,22 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg) /**** Finally, set the Control Plane Register back to zero: ****/ GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1); NGLE_QUICK_SET_CTL_PLN_REG(fb, 0); - + NGLE_UNLOCK(fb); } - + static void ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data) { int nFreeFifoSlots = 0; u32 packed_dst; u32 packed_len; - + NGLE_LOCK(fb); /* Hardware setup */ GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8); - NGLE_QUICK_SET_DST_BM_ACCESS(fb, + NGLE_QUICK_SET_DST_BM_ACCESS(fb, BA(IndexedDcd, Otc04, Ots08, AddrLong, BAJustPoint(0), BINovly, BAIndexBase(0))); @@ -736,23 +736,23 @@ ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data) NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data); NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask); - + packed_dst = 0; packed_len = (fb->info.var.xres << 16) | fb->info.var.yres; NGLE_SET_DSTXY(fb, packed_dst); - - /* Write zeroes to overlay planes */ + + /* Write zeroes to overlay planes */ NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, IBOvals(RopSrc, MaskAddrOffset(0), BitmapExtent08, StaticReg(0), DataDynamic, MaskOtc, BGx(0), FGx(0))); - + SET_LENXY_START_RECFILL(fb, packed_len); NGLE_UNLOCK(fb); } -static void +static void hyperResetPlanes(struct stifb_info *fb, int enable) { unsigned int controlPlaneReg; @@ -783,7 +783,7 @@ hyperResetPlanes(struct stifb_info *fb, int enable) ngleClearOverlayPlanes(fb, 0xff, 255); /************************************************** - ** Also need to counteract ITE settings + ** Also need to counteract ITE settings **************************************************/ hyperUndoITE(fb); break; @@ -803,13 +803,13 @@ hyperResetPlanes(struct stifb_info *fb, int enable) ngleResetAttrPlanes(fb, controlPlaneReg); break; } - + NGLE_UNLOCK(fb); } /* Return pointer to in-memory structure holding ELK device-dependent ROM values. */ -static void +static void ngleGetDeviceRomData(struct stifb_info *fb) { #if 0 @@ -821,7 +821,7 @@ XXX: FIXME: !!! char *pCard8; int i; char *mapOrigin = NULL; - + int romTableIdx; pPackedDevRomData = fb->ngle_rom; @@ -888,7 +888,7 @@ SETUP_HCRX(struct stifb_info *fb) /* Initialize Hyperbowl registers */ GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); - + if (IS_24_DEVICE(fb)) { hyperbowl = (fb->info.var.bits_per_pixel == 32) ? HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE : @@ -897,9 +897,9 @@ SETUP_HCRX(struct stifb_info *fb) /* First write to Hyperbowl must happen twice (bug) */ WRITE_WORD(hyperbowl, fb, REG_40); WRITE_WORD(hyperbowl, fb, REG_40); - + WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39); - + WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */ WRITE_WORD(0x404c4048, fb, REG_43); WRITE_WORD(0x034c0348, fb, REG_44); @@ -990,7 +990,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green, 0, /* Offset w/i LUT */ 256); /* Load entire LUT */ NGLE_BINC_SET_SRCADDR(fb, - NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); + NGLE_LONG_FB_ADDRESS(0, 0x100, 0)); /* 0x100 is same as used in WRITE_IMAGE_COLOR() */ START_COLORMAPLOAD(fb, lutBltCtl.all); SETUP_FB(fb); @@ -1028,7 +1028,7 @@ stifb_blank(int blank_mode, struct fb_info *info) ENABLE_DISABLE_DISPLAY(fb, enable); break; } - + SETUP_FB(fb); return 0; } @@ -1114,15 +1114,15 @@ stifb_init_display(struct stifb_info *fb) /* HCRX specific initialization */ SETUP_HCRX(fb); - + /* if (id == S9000_ID_HCRX) hyperInitSprite(fb); else ngleInitSprite(fb); */ - - /* Initialize the image planes. */ + + /* Initialize the image planes. */ switch (id) { case S9000_ID_HCRX: hyperResetPlanes(fb, ENABLE); @@ -1194,7 +1194,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fb = kzalloc(sizeof(*fb), GFP_ATOMIC); if (!fb) return -ENOMEM; - + info = &fb->info; /* set struct to a known state */ @@ -1235,7 +1235,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) dev_name, fb->id); goto out_err0; } - + /* default to 8 bpp on most graphic chips */ bpp = 8; xres = sti_onscreen_x(fb->sti); @@ -1256,7 +1256,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fb->id = S9000_ID_A1659A; break; case S9000_ID_TIMBER: /* HP9000/710 Any (may be a grayscale device) */ - if (strstr(dev_name, "GRAYSCALE") || + if (strstr(dev_name, "GRAYSCALE") || strstr(dev_name, "Grayscale") || strstr(dev_name, "grayscale")) var->grayscale = 1; @@ -1295,16 +1295,16 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) case CRT_ID_VISUALIZE_EG: case S9000_ID_ARTIST: /* Artist */ break; - default: + default: #ifdef FALLBACK_TO_1BPP - printk(KERN_WARNING + printk(KERN_WARNING "stifb: Unsupported graphics card (id=0x%08x) " "- now trying 1bpp mode instead\n", fb->id); bpp = 1; /* default to 1 bpp */ break; #else - printk(KERN_WARNING + printk(KERN_WARNING "stifb: Unsupported graphics card (id=0x%08x) " "- skipping.\n", fb->id); @@ -1320,11 +1320,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8; if (!fix->line_length) fix->line_length = 2048; /* default */ - + /* limit fbsize to max visible screen size */ if (fix->smem_len > yres*fix->line_length) fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024); - + fix->accel = FB_ACCEL_NONE; switch (bpp) { @@ -1350,7 +1350,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) default: break; } - + var->xres = var->xres_virtual = xres; var->yres = var->yres_virtual = yres; var->bits_per_pixel = bpp; @@ -1379,7 +1379,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fix->smem_start, fix->smem_start+fix->smem_len); goto out_err2; } - + if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) { printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n", fix->mmio_start, fix->mmio_start+fix->mmio_len); @@ -1393,11 +1393,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref) fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", fix->id, - var->xres, + var->xres, var->yres, var->bits_per_pixel, dev_name, - fb->id, + fb->id, fix->mmio_start); return 0; @@ -1426,7 +1426,7 @@ static int __init stifb_init(void) struct sti_struct *sti; struct sti_struct *def_sti; int i; - + #ifndef MODULE char *option = NULL; @@ -1438,7 +1438,7 @@ static int __init stifb_init(void) printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n"); return -ENXIO; } - + def_sti = sti_get_rom(0); if (def_sti) { for (i = 1; i <= MAX_STI_ROMS; i++) { @@ -1472,7 +1472,7 @@ stifb_cleanup(void) { struct sti_struct *sti; int i; - + for (i = 1; i <= MAX_STI_ROMS; i++) { sti = sti_get_rom(i); if (!sti) @@ -1495,10 +1495,10 @@ int __init stifb_setup(char *options) { int i; - + if (!options || !*options) return 1; - + if (strncmp(options, "off", 3) == 0) { stifb_disabled = 1; options += 3; From patchwork Thu Apr 6 14:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 80280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1076836vqo; Thu, 6 Apr 2023 07:39:23 -0700 (PDT) X-Google-Smtp-Source: AKy350YhEdDfK5SEaIOAYxo5Zf7EJ1epTsE89s1PHFJNyRlTABGWjK+L6ksYVCEWb6uh/IDA/+2e X-Received: by 2002:a05:6a20:bf22:b0:d5:635c:eaa2 with SMTP id gc34-20020a056a20bf2200b000d5635ceaa2mr2804104pzb.14.1680791963140; Thu, 06 Apr 2023 07:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680791963; cv=none; d=google.com; s=arc-20160816; b=BMOu6uAEQ+eL3FP4hK98mmMzAl+92wbHvo7YCT8TP6sSGnmdJXHVbRUF7YPQJF4QSr rj+kUadYWJPkdjCt6yXP5Ask3Bg+ZIElQeJLEFtK7OhmR9296vfLx4j6LqxB57vN2FrF 9CeAbsKw3uelPZVmvLNKOSUx+0Q3xQEDkiN4Y0SD+XoXsEg+MRPl1JJesV5nKoESr1xq 5OZdx32WrCU2pssGGhmpPmPfhT+jop6vw0xmxp+TkZkYK+Qzg/w8Zb5erPp/UL6sW6jg ReBZejrad4oZkLAC7EWUmp18aVpBHZJThMNeiM10bre8Gs76iK59nbDoXp4zNN0q7Ern M8tw== 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=YNg0lz+7KBHL0Jy2/T4bI8sg52Xj/iVvmLTbUyEhSFc=; b=IRKVYo1EAChVyQyFkVo1iebzyAlrltoby4PVRE3yMiEsyIxr6wI0j4ovqqQsgvrIQn vE+UGlGtBQrDSzz3tv/Tqq6bFHo23188des+Yi0OaIMPK8UmRrEUebK2L/zj64IPawm9 4I37RX3IFPD2otnpt8yK67q0xJzUQClVJeehHK9TaqTBv240yGOlApgTfyX3Yc4V7xmb S6TRRTsMOdUq3yL1oCVoDx06vJr4Rki0UyM3m+5KICZodsBknItZ59YYbzPrirQcujou KymE8WOHNfSbD7mZrHANGL21Ad5V0vi3/GrS7SJhmVyR7bCSGCVHhF4FOyXhxOS25EGS gW2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wEfv7+1J; dkim=neutral (no key) header.i=@suse.de; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020aa79aec000000b006254213ed4csi1576837pfp.91.2023.04.06.07.39.10; Thu, 06 Apr 2023 07:39:23 -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=wEfv7+1J; dkim=neutral (no key) header.i=@suse.de; 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 S239418AbjDFObu (ORCPT + 99 others); Thu, 6 Apr 2023 10:31:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239130AbjDFOa3 (ORCPT ); Thu, 6 Apr 2023 10:30:29 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5313F93D3; Thu, 6 Apr 2023 07:30:27 -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-out2.suse.de (Postfix) with ESMTPS id CCC921FE5D; Thu, 6 Apr 2023 14:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680791425; 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=YNg0lz+7KBHL0Jy2/T4bI8sg52Xj/iVvmLTbUyEhSFc=; b=wEfv7+1J4otnnvmRowr+pIln77ZzKGlBi4G5b99ro7yE1gWM/bkgFTgw3pjXDIWkUNwptv WR+4YQAFQDK4ar5r2ID+UPl0HDOffFm60cxKOQR5HCkQ5a3lFtDN4GtbTuiqQwsLaOHQmJ eRycN/ZncNM0UWKQ7+5Raz4y7MxkR2g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680791425; 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=YNg0lz+7KBHL0Jy2/T4bI8sg52Xj/iVvmLTbUyEhSFc=; b=aFAjkf9lsH0s8dpfHjahQXAnrCLBp+AjlMGYhJLwZgQ5a2x6sPnXRu3DfBaTgdkGtXUvZR DOloP3kVgDdZq5Bg== 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 7899613A1D; Thu, 6 Apr 2023 14:30:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iG+WHIHXLmS4LgAAMHmgww (envelope-from ); Thu, 06 Apr 2023 14:30:25 +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 Subject: [PATCH v2 11/19] video: Move HP PARISC STI core code to shared location Date: Thu, 6 Apr 2023 16:30:11 +0200 Message-Id: <20230406143019.6709-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406143019.6709-1-tzimmermann@suse.de> References: <20230406143019.6709-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762438113103827097?= X-GMAIL-MSGID: =?utf-8?q?1762438113103827097?= STI core files have been located in console and fbdev code. Move the source code and header to the directories for video helpers. Also update the config and build rules such that the code depends on the config symbol CONFIG_STI_CORE, which STI console and STI framebuffer select automatically. Cleans up the console makefile and prepares PARISC to implement fb_is_primary_device() within the arch/ directory. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/Kconfig | 7 +++++++ drivers/video/Makefile | 1 + drivers/video/console/Kconfig | 1 + drivers/video/console/Makefile | 4 +--- drivers/video/console/sticon.c | 2 +- drivers/video/fbdev/Kconfig | 3 +-- drivers/video/fbdev/stifb.c | 2 +- drivers/video/{console => }/sticore.c | 2 +- {drivers/video/fbdev => include/video}/sticore.h | 0 9 files changed, 14 insertions(+), 8 deletions(-) rename drivers/video/{console => }/sticore.c (99%) rename {drivers/video/fbdev => include/video}/sticore.h (100%) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index bf05363d8906..8b2b9ac37c3d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -11,6 +11,13 @@ config APERTURE_HELPERS Support tracking and hand-over of aperture ownership. Required by graphics drivers for firmware-provided framebuffers. +config STI_CORE + bool + depends on PARISC + help + STI refers to the HP "Standard Text Interface" which is a set of + BIOS routines contained in a ROM chip in HP PA-RISC based machines. + config VIDEO_CMDLINE bool diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 831c9fa57a6c..6bbc03950899 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_APERTURE_HELPERS) += aperture.o +obj-$(CONFIG_STI_CORE) += sticore.o obj-$(CONFIG_VGASTATE) += vgastate.o obj-$(CONFIG_VIDEO_CMDLINE) += cmdline.o obj-$(CONFIG_VIDEO_NOMODESET) += nomodeset.o diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 22cea5082ac4..a2a88d42edf0 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -141,6 +141,7 @@ config STI_CONSOLE depends on PARISC && HAS_IOMEM select FONT_SUPPORT select CRC32 + select STI_CORE default y help The STI console is the builtin display/keyboard on HP-PARISC diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile index db07b784bd2c..fd79016a0d95 100644 --- a/drivers/video/console/Makefile +++ b/drivers/video/console/Makefile @@ -5,8 +5,6 @@ obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o -obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o +obj-$(CONFIG_STI_CONSOLE) += sticon.o obj-$(CONFIG_VGA_CONSOLE) += vgacon.o obj-$(CONFIG_MDA_CONSOLE) += mdacon.o - -obj-$(CONFIG_FB_STI) += sticore.o diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 89ad7ade6cf9..d11cfd2d68b5 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -50,7 +50,7 @@ #include -#include "../fbdev/sticore.h" +#include