Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp707791ybe; Fri, 13 Sep 2019 05:07:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqytYY0bYJQg8FM9tSEKQslrvUjct+eEQUQaSIRwkbRI8owiXIE7uWTcWJCLtKJO36p8u6Tj X-Received: by 2002:adf:a415:: with SMTP id d21mr42737724wra.94.1568376423459; Fri, 13 Sep 2019 05:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568376423; cv=none; d=google.com; s=arc-20160816; b=hh/WJhmlmXDs/Zt2W90xAHuUBxG0hiJdyWtpW3xJe3pGd7kum4x4JwpA/GhvkMkyX7 YYgmnDLbcqwsQwoxwB7xgqVqFDW0O26kICFqy/2tr4Jz1rQge2C6YFvrrIVQdQGNKxCK HQfyQUThTUVyQLhpcmvn5gfyHX+v5uwq1bUg2yEfXGGNLZq9+W4MD8XxDzd5DeeGMGAu PZfOJXJmduKOEALUF4PqJzUv2NhdpzJheRdmPKlnghSPNwSFYk9y17oHEBflbRXF8CqK uBe2dQwBHLd+DqiMRdWfaouhlowSzq8oSPgqh2nL9tp3tHNgR9+znnyed1L6+FY3aEZF v8nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :feedback-id:message-id:subject:reply-to:cc:from:to:dkim-signature :date; bh=W3A0sUxI2ZwZRVFK2SWzwum8eVXrjroeUR/zfFc53pk=; b=Dr0ogpeaPZXSBix9fh2Dnyhj89qUUdf0Zfxbk4qfdLOPWb1kzGTZMQ3frI+pr3OrRn 9Iog1RbHQ0V1G3xiE3cpCAR4XOc1Tmn2UOzmKi+VqffYDrDGemc0+UFNnHpC/4c8O4Qi TdEPw0HE42UwYjXc+m8K4ofr5mWku71rXRe6XLFEcI2PPQi7paNAq3zQBwY+otqPFP5S gtQUf5zLhKhxvUB1LfbISNwqWhvLY6ki1T14OGWzCXWV1j4wPLuHQsbzvmQ8iO02GTL9 eiSvKoWArEvK1v1OUhVt2zuYSSj6LTHA3870mMa4TpMAdDAFWGCcElkQa94D9wwkRGeq CT6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aurabindo.in header.s=protonmail header.b="jJ+eu/Af"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=aurabindo.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b44si3551501ede.451.2019.09.13.05.06.39; Fri, 13 Sep 2019 05:07:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@aurabindo.in header.s=protonmail header.b="jJ+eu/Af"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=aurabindo.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387443AbfIMMCZ (ORCPT + 99 others); Fri, 13 Sep 2019 08:02:25 -0400 Received: from mail4.protonmail.ch ([185.70.40.27]:23364 "EHLO mail4.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfIMMCZ (ORCPT ); Fri, 13 Sep 2019 08:02:25 -0400 Date: Fri, 13 Sep 2019 12:02:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aurabindo.in; s=protonmail; t=1568376141; bh=W3A0sUxI2ZwZRVFK2SWzwum8eVXrjroeUR/zfFc53pk=; h=Date:To:From:Cc:Reply-To:Subject:Feedback-ID:From; b=jJ+eu/Afitsuhg4plFh48zDEIUX36zxds2JKta2gru2EIATY8hCyoj4gM4IEfWVvP /91bm2RKcpB037gZOfWD47tqmDzIkz0YaTKyxbptgfXeSLqIORwuwOXZV36JojnKcT GQYSBlhTpr9w7GGsiDQNssnmzlLEhNJtFLDlMJPM= To: ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org, alexios.zavras@intel.com, gregkh@linuxfoundation.org, armijn@tjaldur.nl, allison@lohutok.net, tglx@linutronix.de From: Aurabindo Jayamohanan Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Aurabindo Jayamohanan Subject: [PATCH] mips: check for dsp presence only once before save/restore Message-ID: <20190913120206.9234-1-mail@aurabindo.in> Feedback-ID: D1Wwva8zb0UdpJtanaReRLGO3iCsewpGmDn8ZDKmpao-Gnxd2qXPmwwrSQ99r5Q15lmK-D8x6vKzqhUKCgzweA==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org {save,restore}_dsp() internally checks if the cpu has dsp support. Therefore, explicit check is not required before calling them in {save,restore}_processor_state() Signed-off-by: Aurabindo Jayamohanan --- arch/mips/power/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/mips/power/cpu.c b/arch/mips/power/cpu.c index 3340a5530de3..a15e29dfc7b3 100644 --- a/arch/mips/power/cpu.c +++ b/arch/mips/power/cpu.c @@ -19,8 +19,8 @@ void save_processor_state(void) =20 =09if (is_fpu_owner()) =09=09save_fp(current); -=09if (cpu_has_dsp) -=09=09save_dsp(current); + +=09save_dsp(current); } =20 void restore_processor_state(void) @@ -29,8 +29,8 @@ void restore_processor_state(void) =20 =09if (is_fpu_owner()) =09=09restore_fp(current); -=09if (cpu_has_dsp) -=09=09restore_dsp(current); + +=09restore_dsp(current); } =20 int pfn_is_nosave(unsigned long pfn) --=20 2.23.0