Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1293BC35DE1 for ; Tue, 25 Feb 2020 13:58:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4DF8222C2 for ; Tue, 25 Feb 2020 13:58:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4DF8222C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 54AEF6EAD5; Tue, 25 Feb 2020 13:58:46 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D40746EAD5; Tue, 25 Feb 2020 13:58:44 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 05:58:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,484,1574150400"; d="scan'208";a="350153138" Received: from plaxmina-desktop.iind.intel.com ([10.145.162.62]) by fmsmga001.fm.intel.com with ESMTP; 25 Feb 2020 05:58:40 -0800 From: Pankaj Bharadiya To: jani.nikula@linux.intel.com, daniel@ffwll.ch, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Joonas Lahtinen , Rodrigo Vivi , David Airlie , Chris Wilson , Matthew Auld , Tvrtko Ursulin , Pankaj Bharadiya Subject: [Intel-gfx][PATCH 08/10] drm/i915/gem: Make MISSING_CASE backtrace i915 specific Date: Tue, 25 Feb 2020 19:17:07 +0530 Message-Id: <20200225134709.6153-9-pankaj.laxminarayan.bharadiya@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200225134709.6153-1-pankaj.laxminarayan.bharadiya@intel.com> References: <20200225134709.6153-1-pankaj.laxminarayan.bharadiya@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i915_MISSING_CASE macro includes the device information in the backtrace, so we know what device the warnings originate from. Covert MISSING_CASE calls with i915 specific i915_MISSING_CASE variant in functions where drm_i915_private struct pointer is readily available. The conversion was done automatically with below coccinelle semantic patch. @rule1@ identifier func, T; @@ func(...) { ... struct drm_i915_private *T = ...; <... -MISSING_CASE( +i915_MISSING_CASE(T, ...) ...> } @rule2@ identifier func, T; @@ func(struct drm_i915_private *T,...) { <... -MISSING_CASE( +i915_MISSING_CASE(T, ...) ...> } Signed-off-by: Pankaj Bharadiya --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index 491cfbaaa330..58757f529841 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -228,7 +228,8 @@ static void gen6_get_stolen_reserved(struct drm_i915_private *i915, break; default: *size = 1024 * 1024; - MISSING_CASE(reg_val & GEN6_STOLEN_RESERVED_SIZE_MASK); + i915_MISSING_CASE(i915, + reg_val & GEN6_STOLEN_RESERVED_SIZE_MASK); } } @@ -247,7 +248,8 @@ static void vlv_get_stolen_reserved(struct drm_i915_private *i915, switch (reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK) { default: - MISSING_CASE(reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK); + i915_MISSING_CASE(i915, + reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK); /* fall through */ case GEN7_STOLEN_RESERVED_1M: *size = 1024 * 1024; @@ -284,7 +286,8 @@ static void gen7_get_stolen_reserved(struct drm_i915_private *i915, break; default: *size = 1024 * 1024; - MISSING_CASE(reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK); + i915_MISSING_CASE(i915, + reg_val & GEN7_STOLEN_RESERVED_SIZE_MASK); } } @@ -317,7 +320,8 @@ static void chv_get_stolen_reserved(struct drm_i915_private *i915, break; default: *size = 8 * 1024 * 1024; - MISSING_CASE(reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK); + i915_MISSING_CASE(i915, + reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK); } } @@ -367,7 +371,8 @@ static void icl_get_stolen_reserved(struct drm_i915_private *i915, break; default: *size = 8 * 1024 * 1024; - MISSING_CASE(reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK); + i915_MISSING_CASE(i915, + reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK); } } @@ -443,7 +448,7 @@ static int i915_gem_init_stolen(struct drm_i915_private *i915) &reserved_base, &reserved_size); break; default: - MISSING_CASE(INTEL_GEN(i915)); + i915_MISSING_CASE(i915, INTEL_GEN(i915)); /* fall-through */ case 11: case 12: -- 2.23.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel