Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6771108rwb; Tue, 22 Nov 2022 19:19:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf74kNmu5olAacNwB132KqctAth1VQk3uvL/EC7Pov4ovWdXv+c5/CDmW3o8Th9vAyPFb5E/ X-Received: by 2002:a17:906:a148:b0:7ad:b286:8ee2 with SMTP id bu8-20020a170906a14800b007adb2868ee2mr21820283ejb.511.1669173586650; Tue, 22 Nov 2022 19:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669173586; cv=none; d=google.com; s=arc-20160816; b=REF25rur86fviin9rNUMV8MBf+SeIn44+kwL0mxszNkbhkRVO3+XV1SctsL859Nj5M ifBgn9J/dyaEOq5NPMPdVUb8cIB5UR3sW9eKRamvicJbmThNIPqNkvxqzta2mTSqMrtA zRLG38dj/gMdXucXpjtzCwyPbD4/1gjnHiha5Pg9sZ+EG41AR6uetXPu5EhMRv21Rhe1 my05fele1pX7eZW5UPvxjF+5gv1/F2nhVeyPznCyhggGUJ8/aMZzwkKe5lQ7vi7OnsWA e5bye0B5/48FF6Bbs5WSIfjxz0oGMN6COQf6267tPIDs08HhZ/wx/RFRmg5T1BkG1vWk z4Lg== 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; bh=4esNUlxp4/XCtfoh6LzVcRv5HrWacewfClNKlFOWqaI=; b=c0o+rgAl7XGjA4x2ambd4yZ/NvHelqFuRLXuNf/0VyPcpOKKxjBX4TxuhkFKvdZS8Q Oo5D4bHIy2/V4hKTMmVZRcyZhE2/1PXHmtpGxwLTq5CfvbMU4g7bGXfBYo58dlPkoH3D BrZvHKk32BcxIwPWZehTHxToQm78cqMUKgbEDmy9SedyK8nGsqo0CHM95ZKkZciLadQV 1cxkuMJFMLEjcmQKvORxNU/elbBR0lcKeAV67ocZr1A7LPLR+oGKaPUJ4b3ogXlONUok xmjnw07ncnXnOt89p5iEW1x+rmL3ivvTdDALSljHU98TH+iqIzJBHeUYJy0xl3+YB5+c k9CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=diTafuuS; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d24-20020a170906041800b007ad4a555cb6si7975235eja.878.2022.11.22.19.19.22; Tue, 22 Nov 2022 19:19:46 -0800 (PST) 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=@collabora.com header.s=mail header.b=diTafuuS; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235417AbiKWDAn (ORCPT + 89 others); Tue, 22 Nov 2022 22:00:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235305AbiKWDAW (ORCPT ); Tue, 22 Nov 2022 22:00:22 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 979257A349 for ; Tue, 22 Nov 2022 19:00:21 -0800 (PST) Received: from dimapc.. (109-252-117-140.nat.spd-mgts.ru [109.252.117.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id B44986602AF2; Wed, 23 Nov 2022 03:00:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1669172420; bh=yM5EklsLIeVBROoe840u6b3fWDQRZvJbUhCX8eobLRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=diTafuuSfJ3e6j4bOXS82lvtpcTDl5JupHdWUjZZt4ZUqEtU+hxE39me0iWB3ha1p DbtwZIjN/x7xV/ZPQ/pbiNVNIzXdIMnV/U6B0DTU5hQmb1v7BloTpCY8+5fKSsQeny ZaisB5RKbcLusbfRgJCDR9j/J8HfZw+fC1LhNYfhS2k18KPLPwP0QLq5orugizN67W CXhTfUoFqrFl/VA5EHJa/WNZQtG4fx9gTzeKNJgDNdSVXhY8GD/k4BNRf2+GIB+ycI SRjzS9of/yZHrVE07S2sfapc0C6Q0eaIebAjxyBBM9FpZ/DVDSAk7X4gkU9Rr04RK7 iwkyw76FR84Zw== From: Dmitry Osipenko To: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Clark , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Qiang Yu , Steven Price , Alyssa Rosenzweig , Rob Herring , Sean Paul , Dmitry Baryshkov , Abhinav Kumar Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, virtualization@lists.linux-foundation.org Subject: [PATCH v9 04/11] drm/shmem: Put booleans in the end of struct drm_gem_shmem_object Date: Wed, 23 Nov 2022 05:57:16 +0300 Message-Id: <20221123025723.695075-5-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221123025723.695075-1-dmitry.osipenko@collabora.com> References: <20221123025723.695075-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Group all 1-bit boolean members of struct drm_gem_shmem_object in the end of the structure, allowing compiler to pack data better and making code to look more consistent. Suggested-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko --- include/drm/drm_gem_shmem_helper.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h index a2201b2488c5..5994fed5e327 100644 --- a/include/drm/drm_gem_shmem_helper.h +++ b/include/drm/drm_gem_shmem_helper.h @@ -60,20 +60,6 @@ struct drm_gem_shmem_object { */ struct list_head madv_list; - /** - * @pages_mark_dirty_on_put: - * - * Mark pages as dirty when they are put. - */ - unsigned int pages_mark_dirty_on_put : 1; - - /** - * @pages_mark_accessed_on_put: - * - * Mark pages as accessed when they are put. - */ - unsigned int pages_mark_accessed_on_put : 1; - /** * @sgt: Scatter/gather table for imported PRIME buffers */ @@ -97,10 +83,24 @@ struct drm_gem_shmem_object { */ unsigned int vmap_use_count; + /** + * @pages_mark_dirty_on_put: + * + * Mark pages as dirty when they are put. + */ + bool pages_mark_dirty_on_put : 1; + + /** + * @pages_mark_accessed_on_put: + * + * Mark pages as accessed when they are put. + */ + bool pages_mark_accessed_on_put : 1; + /** * @map_wc: map object write-combined (instead of using shmem defaults). */ - bool map_wc; + bool map_wc : 1; }; #define to_drm_gem_shmem_obj(obj) \ -- 2.38.1