From patchwork Thu Jun 20 22:13:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 1119844 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mips.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=wavesemi.onmicrosoft.com header.i=@wavesemi.onmicrosoft.com header.b="ROirZebh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45VGLj6Xmqz9s9y for ; Fri, 21 Jun 2019 08:14:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbfFTWOC (ORCPT ); Thu, 20 Jun 2019 18:14:02 -0400 Received: from mail-eopbgr820119.outbound.protection.outlook.com ([40.107.82.119]:10528 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725906AbfFTWOB (ORCPT ); Thu, 20 Jun 2019 18:14:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavesemi.onmicrosoft.com; s=selector1-wavesemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GWzdlavCEd0P3JZYnoDm2oqib+erQfZHwIUxNVzNDoA=; b=ROirZebhxdy7w51Wqgtjo477v/2qENKxNVsiLph/GK2v+PyOMxKE4Z3fPeNxe+muIKDzYarD2diAydVl1DKNs9RYoZUw70zF1KuQWp0C1n7g+JG96LzobWd10gbdl0h/ktvP3X+MvCD3quiTHYtesW3ZQywaegkUoQSO3zw/VSE= Received: from MWHPR2201MB1277.namprd22.prod.outlook.com (10.172.60.12) by MWHPR2201MB1391.namprd22.prod.outlook.com (10.172.62.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.13; Thu, 20 Jun 2019 22:13:58 +0000 Received: from MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::6975:b632:c85b:9e40]) by MWHPR2201MB1277.namprd22.prod.outlook.com ([fe80::6975:b632:c85b:9e40%2]) with mapi id 15.20.2008.007; Thu, 20 Jun 2019 22:13:58 +0000 From: Paul Burton To: "Maciej W. Rozycki" , "David S. Miller" , "netdev@vger.kernel.org" CC: Paul Burton , Serge Semin , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h Thread-Topic: [PATCH] FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h Thread-Index: AQHVJ7V1UXxjnCnLE027KWvd1IREUQ== Date: Thu, 20 Jun 2019 22:13:58 +0000 Message-ID: <20190620221224.27352-1-paul.burton@mips.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR08CA0048.namprd08.prod.outlook.com (2603:10b6:a03:117::25) To MWHPR2201MB1277.namprd22.prod.outlook.com (2603:10b6:301:18::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pburton@wavecomp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.22.0 x-originating-ip: [73.93.153.114] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 58195c12-72c0-4e4b-18aa-08d6f5cc9778 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:MWHPR2201MB1391; x-ms-traffictypediagnostic: MWHPR2201MB1391: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0074BBE012 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(136003)(376002)(346002)(39840400004)(52314003)(199004)(189003)(14454004)(8676002)(2906002)(81166006)(73956011)(81156014)(68736007)(3846002)(6116002)(256004)(66446008)(14444005)(64756008)(66476007)(66946007)(66556008)(6436002)(2501003)(71190400001)(71200400001)(6486002)(4326008)(36756003)(478600001)(50226002)(8936002)(6512007)(53936002)(44832011)(42882007)(316002)(52116002)(5660300002)(186003)(66066001)(110136005)(1076003)(2616005)(476003)(99286004)(486006)(54906003)(102836004)(26005)(305945005)(6506007)(386003)(25786009)(7736002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR2201MB1391; H:MWHPR2201MB1277.namprd22.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: cOKlyUGsen76MduLyC3kuj/PZRAWvZqNIlAfTqTNUbd5fKM0xjMHw7teUfqRoHM0v+ZjH5as56/3uf9DHrfa6CyjOEppLdgyO6X3mGaT02Gh5SGEMHNQpv4gu5d4uSbaH8i3GSHY7xGPjBEdjrt332KKfZQAu7+Kv1CGuqf/aOzYCqDbl5v5A5F3JMzfLOdxc5AQPAcYI8hL+T3cVp4+O32BBbiacKKwPKylQNm/3Xri5u6FazhF7CPCfYpNpIwjHc8gtwDnaDWIZea8lChQaYG/vxXmGCbph9JBNbnIP5un9teyEI6gY4MGTPhZm2tk9sUVlIhG8Rjl80ZeJSVr62+DffpteGm/BxIecIn5R0zMWMv13/ALggXcQ2V7XEiwEMm7xgT+VRB9scbqkUfl3yeRLb0oktR54L5oDmepf7Q= MIME-Version: 1.0 X-OriginatorOrg: mips.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58195c12-72c0-4e4b-18aa-08d6f5cc9778 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2019 22:13:58.6310 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 463607d3-1db3-40a0-8a29-970c56230104 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pburton@wavecomp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR2201MB1391 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently arch/mips/include/asm/io.h provides 64b memory accessor functions such as readq & writeq even on MIPS32 platforms where those accessors cannot actually perform a 64b memory access. They instead BUG(). This is unfortunate for drivers which either #ifdef on the presence of these accessors, or can function with non-atomic implementations of them found in either linux/io-64-nonatomic-lo-hi.h or linux/io-64-nonatomic-hi-lo.h. As such we're preparing to remove the definitions of these 64b accessor functions for MIPS32 kernels. In preparation for this, include linux/io-64-nonatomic-lo-hi.h in defza.c in order to provide a non-atomic implementation of the readq_relaxed & writeq_relaxed functions that are used by this code. In practice this will have no runtime effect, since use of the 64b accessor functions is conditional upon sizeof(unsigned long) == 8, ie. upon CONFIG_64BIT=y. This means the calls to these non-atomic readq & writeq implementations will be optimized out anyway, but we need their definitions to keep the compiler happy. For 64bit kernels using this code this change should also have no effect because asm/io.h will continue to provide the definitions of readq_relaxed & writeq_relaxed, which linux/io-64-nonatomic-lo-hi.h checks for before defining itself. Signed-off-by: Paul Burton Cc: Serge Semin Cc: "Maciej W. Rozycki" Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Maciej W. Rozycki Acked-by: David S. Miller --- Maciej, David, if you'd be happy to provide an Ack so that I can take this through the mips-next branch that would be great; that'll let me apply it prior to the asm/io.h change. --- drivers/net/fddi/defza.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/fddi/defza.c b/drivers/net/fddi/defza.c index c5cae8e74dc4..060712c666bf 100644 --- a/drivers/net/fddi/defza.c +++ b/drivers/net/fddi/defza.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include