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: 11008307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 699E876 for ; Thu, 20 Jun 2019 22:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59E2F288FA for ; Thu, 20 Jun 2019 22:14:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DB1228900; Thu, 20 Jun 2019 22:14:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 617A3288FA for ; Thu, 20 Jun 2019 22:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726307AbfFTWOC (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: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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