From patchwork Thu Jan 18 21:01:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 125050 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp297963lja; Thu, 18 Jan 2018 13:08:19 -0800 (PST) X-Google-Smtp-Source: ACJfBovy/ANjWf+2K+/EHcJnYrjODbTaoMvLWBVcE54+6bF3FXqX49106JMjDX88Kr0VwODK60f1 X-Received: by 10.101.72.143 with SMTP id n15mr22755860pgs.181.1516309699417; Thu, 18 Jan 2018 13:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516309699; cv=none; d=google.com; s=arc-20160816; b=gfdaitrJydaIjAegjpY1L0/zOFm7g7BGKo/qg1vtTcwKvVyeiWkGOsoYALQiN2UVZA vd4d79iMUu3F/gxF5F23uvAC3KVzFpoYcvQTPRfXOGozlpbVT9R6H0XR4769CSmJgKOm vK7rJR9Ys0DFuK0h8kSyKEZIvw9A88Zq2juoEOXjZuG45+/y7/JmvCZG2dQgHC+0YR+5 H6VCuciawOPDxhxJ5HENVTbsGm0xhT+0FXk2+CdvXgBfxrO+V4CK2xZQNFlRCTq5UKBK HCNTmqiA9hCG0LMpj5NCQF3yZHIo8utTOqQWamlp1UkIQW6niGJPnaVIbfToXc76nViP ugDg== 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=ONMIJh7haBXQKHdAI1QadYGtML66P9RX5Va9vl3IgDY=; b=Zd6W9prKLq3MCCP6rKTNjV3ksfsGpr+YfAQEXJp4cJWKONAeTmjqhP3iB+luGIg7Y2 ymVZTUKLVgxCY8FT4e9P8/x/JBGIZxiGt2yzfR3skBf/AUvh6YbV+gjkqwxyFkJlHJNl WaCdIYnfXcA1rqu9Ov1s3tbDmhTpS9WJvJDRSyWerCZud90HkADKEhcUkQwCieb/SPIa EYCqA0iS3BBA9yvAGNW6XtRet90z8n15jRhBNhGWRojD4WlX4mlaYoc0qpdnPBBunqlZ D9+Rne0Dcu5vJX6orExjKJMRI+1aRZtin9Vx1Guyxspi+MGC4iYMT2tmvUs3d1MHmnsc aJeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=XmDYaGqE; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 i1si6559673pgq.829.2018.01.18.13.08.19; Thu, 18 Jan 2018 13:08:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=XmDYaGqE; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S932883AbeARVIQ (ORCPT + 10 others); Thu, 18 Jan 2018 16:08:16 -0500 Received: from mail-bn3nam01on0126.outbound.protection.outlook.com ([104.47.33.126]:34432 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755038AbeARVHW (ORCPT ); Thu, 18 Jan 2018 16:07:22 -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=ONMIJh7haBXQKHdAI1QadYGtML66P9RX5Va9vl3IgDY=; b=XmDYaGqE4jjdkBhn5CqJZrrIQLFEYgHpN1sVEJSGhhZzKc7qZvIGkHSeSfkh2Yrw4YYqn3Z39qz5tHZZsme1P2Q3eGJAVWZjxWfmonfeH83Y1vGy2rGpcGrUsGWSSs8bTefGoKuWG4aCYUF2TObYrvyIDG/Q/D0ljtx2rPQsaQQ= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0887.namprd21.prod.outlook.com (52.132.132.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.428.7; Thu, 18 Jan 2018 21:07:07 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0428.008; Thu, 18 Jan 2018 21:07:07 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] net: tulip: turn compile-time warning into dev_warn() Thread-Topic: [added to the 4.1 stable tree] net: tulip: turn compile-time warning into dev_warn() Thread-Index: AQHTkJ+U4FJ0nIo5mUOYiOwxMpCPtQ== Date: Thu, 18 Jan 2018 21:01:59 +0000 Message-ID: <20180118205908.3220-289-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [167.220.60.9] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0887; 7:z81hhZrXu8HK47aYS2GO9nf/7w64/FKMv7oKXnwPQK+o/YyCPNzv/JX4sNbov+jTkq7RSLlOTgYERBR0fvp9pDa7+zbwyFYvbUuhc8suBnD7s5yKdKjuLNUmfyfgh/Ahp4SeS1R272Vo5XdmZGQnAHsnerJUvK5RnfWz41DO9BfLvMkjcsyL8haEBnidjQeKS1yDtH3laJ8TSai6tgncwvo6LYDp0z7VO0jPafo3a6S5s4k8D2M88+5vE21r4/5/ x-ms-office365-filtering-correlation-id: 392aae93-7e6d-46da-e542-08d55eb76ec2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(48565401081)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020); SRVR:DM5PR2101MB0887; x-ms-traffictypediagnostic: DM5PR2101MB0887: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040495)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231046)(2400067)(944501161)(10201501046)(6055026)(61426038)(61427038)(6041282)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR2101MB0887; BCL:0; PCL:0; RULEID:(100000803126)(100110400120); SRVR:DM5PR2101MB0887; x-forefront-prvs: 05568D1FF7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(376002)(346002)(199004)(189003)(52314003)(22452003)(2501003)(6666003)(2950100002)(7736002)(81166006)(68736007)(99286004)(81156014)(86362001)(5250100002)(575784001)(110136005)(102836004)(8936002)(5660300001)(86612001)(97736004)(6506007)(316002)(76176011)(3280700002)(6486002)(26005)(10290500003)(6512007)(54906003)(25786009)(105586002)(66066001)(478600001)(6346003)(36756003)(3660700001)(6436002)(8676002)(10090500001)(59450400001)(6116002)(14454004)(53936002)(107886003)(2900100001)(3846002)(72206003)(106356001)(4326008)(2906002)(1076002)(305945005)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0887; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: s7gmWut0tNt7i2Gz1SxjtRZ9eALrD8xlnlxPwAuopXkLRtxayi8mJ6+Gf1QTMGo8IP6giWODUtkTNdr8OjIN4w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 392aae93-7e6d-46da-e542-08d55eb76ec2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2018 21:01:59.4923 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0887 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the stable tree. If you have any objections, please let us know. -- 2.11.0 =============== [ Upstream commit de92718883ddbcd11b738d36ffcf57617b97fa12 ] The tulip driver causes annoying build-time warnings for allmodconfig builds for all recent architectures: dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! This is the last remaining warning for arm64, and I'd like to get rid of it. We don't really know the cache line size, architecturally it would be at least 16 bytes, but all implementations I found have 64 or 128 bytes. Configuring tulip for 32-byte lines as we do on ARM32 seems to be the safe but slow default, and nobody who cares about performance these days would use a tulip chip anyway, so we can just use that. To save the next person the job of trying to find out what this is for and picking a default for their architecture just to kill off the warning, I'm now removing the preprocessor #warning and turning it into a pr_warn or dev_warn that prints the equivalent information when the driver gets loaded. Signed-off-by: Arnd Bergmann Acked-by: Grant Grundler Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/tulip_core.c | 9 +++++++-- drivers/net/ethernet/dec/tulip/winbond-840.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index ed41559bae77..b553409e04ad 100644 --- a/drivers/net/ethernet/dec/tulip/tulip_core.c +++ b/drivers/net/ethernet/dec/tulip/tulip_core.c @@ -98,8 +98,7 @@ static int csr0 = 0x01A00000 | 0x4800; #elif defined(__mips__) static int csr0 = 0x00200000 | 0x4000; #else -#warning Processor architecture undefined! -static int csr0 = 0x00A00000 | 0x4800; +static int csr0; #endif /* Operational parameters that usually are not changed. */ @@ -1982,6 +1981,12 @@ static int __init tulip_init (void) pr_info("%s", version); #endif + if (!csr0) { + pr_warn("tulip: unknown CPU architecture, using default csr0\n"); + /* default to 8 longword cache line alignment */ + csr0 = 0x00A00000 | 0x4800; + } + /* copy module parms into globals */ tulip_rx_copybreak = rx_copybreak; tulip_max_interrupt_work = max_interrupt_work; diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c index 9beb3d34d4ba..3c0e4d5c5fef 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-840.c +++ b/drivers/net/ethernet/dec/tulip/winbond-840.c @@ -907,7 +907,7 @@ static void init_registers(struct net_device *dev) #elif defined(CONFIG_SPARC) || defined (CONFIG_PARISC) || defined(CONFIG_ARM) i |= 0x4800; #else -#warning Processor architecture undefined + dev_warn(&dev->dev, "unknown CPU architecture, using default csr0 setting\n"); i |= 0x4800; #endif iowrite32(i, ioaddr + PCIBusCfg);