Received: by 10.223.185.116 with SMTP id b49csp5965697wrg; Wed, 7 Mar 2018 22:49:34 -0800 (PST) X-Google-Smtp-Source: AG47ELuZFhluQXhxH2zNz6p3NjUy59NabiQGGW4LR4p/VHoW88Y9xOjQxl27fHPy6Pe6A/X0ynDI X-Received: by 2002:a17:902:6a8a:: with SMTP id n10-v6mr9757250plk.430.1520491774091; Wed, 07 Mar 2018 22:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491774; cv=none; d=google.com; s=arc-20160816; b=s06oX/lkCA+axKcxwstZcCP6iwgmhA2KEEfmN6mDuMRLU4UUF2EPSJo2SR8yZRXslB YmLDqk6toSOAKcERyoLblovL5eqik72gDOlJfOQdGfwsH33MgYQ29O5YljaSlnUik8dz XBcIXQOsQ9blq2Xu0Wb9SKB0pg4Ua24xoD6g5YQhhtSIW16hOzlUVD+4ty2vVjXu5GPI Frfk8JljcNvDlsI56zwVcRpIapWlLpj3zURRfy7G/HBku5veLkxltAy9I1rDG8VPRO3N jqt6xyT/LlHr2YjAd93petzFQd5yDDbNy51NN9h9ep+3AgR5WvUpO7UUb5yGx7bSKhPg yrrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=DgNuyapp6pM0+pCvUX7Fn+3mo36vhmSgS2TIlMDdnRg=; b=tiwcPskv4qsVBkg/90DO4xuCDs9zd1PkImh37KScm2Kp3hQuF39jadGa867llbmE8J 6fkEIKRdtQiWyPBpixR1vaKIo2veELIbGeb6RLaClYRKqKxv329sXfyE+BCRJ9nxqI+4 OlMdRUU5fwDwz2W16bDhCYcaSFcDqOFCAJ7zW+hk3W8n6Gh+U+Q80h9jSbYLISRvE+55 Mf2S6cEbBgf5/MkBjR53AkxoLiWc415uZHAq9uYr/aCvjJpvAt16oXTtqOtnCndLfMDE /PPuUblO7EefrvID4+y4h927QULWOBD9F4o4MAfcj2/eOBe+DvnmQqx4c4RuRK17evIg KN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=eFTKRgzP; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si15343415pfg.246.2018.03.07.22.49.19; Wed, 07 Mar 2018 22:49:34 -0800 (PST) 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=@microsoft.com header.s=selector1 header.b=eFTKRgzP; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935302AbeCHGsN (ORCPT + 99 others); Thu, 8 Mar 2018 01:48:13 -0500 Received: from mail-by2nam03on0121.outbound.protection.outlook.com ([104.47.42.121]:43475 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935239AbeCHE6T (ORCPT ); Wed, 7 Mar 2018 23:58:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DgNuyapp6pM0+pCvUX7Fn+3mo36vhmSgS2TIlMDdnRg=; b=eFTKRgzPqCuI9hlchEP7saYGbVhx7vwr17iPt5oWkgAVqKbj8KgmtHka3/CKwGUXElqjNqzsQBFHUhpf4ZOGHMFPx9GpLZQCNmuw+SXXdFviYQJH07lR8wXon3pyf5G14D/XTkp3z6ol5hy+i++GdbrkD71jxBoqCnXvshTPVd0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:17 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:16 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Logan Gunthorpe , Jyri Sarha , Arnd Bergmann , Tomi Valkeinen , David Airlie , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 27/67] drm/tilcdc: ensure nonatomic iowrite64 is not used Thread-Topic: [PATCH AUTOSEL for 4.14 27/67] drm/tilcdc: ensure nonatomic iowrite64 is not used Thread-Index: AQHTtpn+UCLtapP+uEmPbmxYWqAArA== Date: Thu, 8 Mar 2018 04:57:43 +0000 Message-ID: <20180308045641.7814-27-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0885;7:ma6owKl8TVh9trzjzD7r8oE+Zm7GQm2ptHMCgwpSVDBRTERPmNqHivYtS+n/oWm4uQZ+rFDeneukXi8wKeZqWQs/ZmyLBdhBEyVJZLGrfZBL36xAHCmjzL4P5Ila32mjYEZ11MfPcZkw06MH3VrMv+NOokXUWzoaniV8sEBN6r0/R3iqajiT+xuIYYkmNpFK55Hw3uStiZyg9AUM2bY+EIQo4tei2KPweQ0nn+2GjXYEwBiwqJwSs3iXKIISuRNv;20:uV/nVnSxFewFejrG4OLTqgzl+IVGiN1JNkFpitmsTGKxvee4EWWX4ffO0tTfZJVAglLGU7sr0f3qG8pEjgTsvahS7vvNHZSTlPF61IEw2XYvnLIp9m21E1MwjKpfDDkPTYPYjMDQym4XPUbmd5KhsTRfbWOrdOaRyGbzkGz/ihA= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 076e5132-095e-4df7-c0b6-08d584b1349f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171)(85827821059158)(42068640409301); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0885;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0885; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(366004)(376002)(346002)(39860400002)(39380400002)(189003)(199004)(305945005)(10290500003)(14454004)(2906002)(6116002)(6512007)(3280700002)(1076002)(7736002)(86612001)(2501003)(99286004)(5250100002)(186003)(3846002)(6436002)(59450400001)(22452003)(6486002)(26005)(53936002)(102836004)(76176011)(72206003)(478600001)(36756003)(81156014)(54906003)(25786009)(97736004)(105586002)(10090500001)(316002)(107886003)(110136005)(4326008)(575784001)(6666003)(6506007)(81166006)(8936002)(8676002)(68736007)(3660700001)(86362001)(5660300001)(106356001)(2900100001)(66066001)(2950100002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0885;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 13ZNJgwzTt5qSRYh4yC8qJNHgMVECaS5WlO71VySqI+VvckSSz6xDCHGxWwddgKtd3yuiU42xMh7U34frGsl4GQK0tC9mz+/kUy8f5G0zXrmQDck9bxfEMifqzE95e+FT/LuKAYXkb84ExiG7HHgnkAk5CdGpSBTzBkauH95dz1dreBz5+4/0Fr4i4reXRWQbTwASZmYvHY4Kh/5XrpiIRhFCh066UJT7RULhifCL+ZoKGPAFLDVX78/Qddfhrp2o24gIVKLNAwFQekEXxJ66HotG6xQgZI34r0u1/bbiK+atuzvK0CBt4oNUe00ncMBLimeZygMHvotrA7/SS2x4Q== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 076e5132-095e-4df7-c0b6-08d584b1349f X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:43.4401 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Logan Gunthorpe [ Upstream commit 4e5ca2d930aa8714400aedf4bf1dc959cb04280f ] Add a check to ensure iowrite64 is only used if it is atomic. It was decided in [1] that the tilcdc driver should not be using an atomic operation (so it was left out of this patchset). However, it turns out that through the drm code, a nonatomic header is actually included: include/linux/io-64-nonatomic-lo-hi.h is included from include/drm/drm_os_linux.h:9:0, from include/drm/drmP.h:74, from include/drm/drm_modeset_helper.h:26, from include/drm/drm_atomic_helper.h:33, from drivers/gpu/drm/tilcdc/tilcdc_crtc.c:19: And thus, without this change, this patchset would inadvertantly change the behaviour of the tilcdc driver. [1] lkml.kernel.org/r/CAK8P3a2HhO_zCnsTzq7hmWSz5La5Thu19FWZpun16iMnyyNreQ@m= ail.gmail.com Signed-off-by: Logan Gunthorpe Reviewed-by: Andy Shevchenko Cc: Jyri Sarha Cc: Arnd Bergmann Cc: Tomi Valkeinen Cc: David Airlie Signed-off-by: Jyri Sarha Signed-off-by: Sasha Levin --- drivers/gpu/drm/tilcdc/tilcdc_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_regs.h b/drivers/gpu/drm/tilcdc/= tilcdc_regs.h index 9d528c0a67a4..5048ebb86835 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_regs.h +++ b/drivers/gpu/drm/tilcdc/tilcdc_regs.h @@ -133,7 +133,7 @@ static inline void tilcdc_write64(struct drm_device *de= v, u32 reg, u64 data) struct tilcdc_drm_private *priv =3D dev->dev_private; volatile void __iomem *addr =3D priv->mmio + reg; =20 -#ifdef iowrite64 +#if defined(iowrite64) && !defined(iowrite64_is_nonatomic) iowrite64(data, addr); #else __iowmb(); --=20 2.14.1