From patchwork Mon Oct 28 12:10:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 177905 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3305362ill; Mon, 28 Oct 2019 05:13:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVp8ChFQNqWmOzfwOhS4MK7YuNtmy9s0BBDxvXWgGSFZvsQrVrp0xGU1qpwPcHLuPvV9y7 X-Received: by 2002:a17:906:4a15:: with SMTP id w21mr16340314eju.294.1572264803154; Mon, 28 Oct 2019 05:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572264803; cv=none; d=google.com; s=arc-20160816; b=eS/yOZ5vyAaSngA4YAgoAqLjVQk0R5Z9mzNkFcCD7nsKSUsYt6ah4rx25P5B2l4GYK hFQZ4DoEV40/91MGnWRvCoRSoea4KANEgWnBYkt5Hu0+bshbLXbjaSKO3B5FO4lvHHpj 6wNthT11ZrcLXmQWiF/gzbXLd6JVJsZB/2HwMlZ+Kv1adMM1SuWCrela2hu5utjpzSRr GI7jcB/OlgcdlNXHjtYfgKR2AaZI79L3kEUAeo1/QMtZKM5p9H8wTI6I/HZQ7pFqq0aQ Upa8IJGbBPqpzjxrlUoRYoZ/E3WBDs2q7JhIutpb9t1lFP4OVyQTnWZMzdX2kVGtS+iX l04w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=RIE+EgOtTrp9Aw3k4CsYN7GGPkAgexAC1RqFRA/UgKU=; b=Xvi4O7hYz3qc7b1SRQVZwECY4kOohMjg+6hopZdaBHLf+DWbB640u96Cjs2PwxRVPT rqn6TUmfec0Yq/5GL9I7lWRVhbJ3sxbMGJXCvHwssNChOHBk66/N3pfjW9EzSFKTyslq 9LTr/wPR+NMcxzokie8g+ZfKDL1hDa+f9Qx7JZtYn7c2gWYh48eyqkvAb4OeeJI456Me Jl38NYlYRGK+CRzawm7+JDnBhBMK0L1fKhy9Lf+zw1leoRapYnEHKNXMTVpMLN0sd6OQ mYGtcM7FRDqt5XPnBQ06+K0GpfisSvu04/alBxmRg+5wEHH977cNVs9NZEp3bOI16fBC lQFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b50si7315256ede.28.2019.10.28.05.13.22; Mon, 28 Oct 2019 05:13:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388974AbfJ1MNS (ORCPT + 26 others); Mon, 28 Oct 2019 08:13:18 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37054 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727763AbfJ1MNR (ORCPT ); Mon, 28 Oct 2019 08:13:17 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DECEAB3B245FFE113604; Mon, 28 Oct 2019 20:13:14 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 20:13:05 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v2 1/5] lib: logic_pio: Enforce LOGIC_PIO_INDIRECT region ops are set at registration Date: Mon, 28 Oct 2019 20:10:01 +0800 Message-ID: <1572264605-172363-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572264605-172363-1-git-send-email-john.garry@huawei.com> References: <1572264605-172363-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the only LOGIC_PIO_INDIRECT host (hisi-lpc) now sets the ops prior to registration, enforce this check for accessors ops at registration instead of in the IO port accessors to simplify and marginally optimise the code. A slight misalignment is also tidied. Also add myself as an author. Suggested-by: Bjorn Helgaas Signed-off-by: John Garry --- lib/logic_pio.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/lib/logic_pio.c b/lib/logic_pio.c index 905027574e5d..f511a99bb389 100644 --- a/lib/logic_pio.c +++ b/lib/logic_pio.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 HiSilicon Limited, All Rights Reserved. * Author: Gabriele Paoloni * Author: Zhichang Yuan + * Author: John Garry */ #define pr_fmt(fmt) "LOGIC PIO: " fmt @@ -39,7 +40,8 @@ int logic_pio_register_range(struct logic_pio_hwaddr *new_range) resource_size_t iio_sz = MMIO_UPPER_LIMIT; int ret = 0; - if (!new_range || !new_range->fwnode || !new_range->size) + if (!new_range || !new_range->fwnode || !new_range->size || + (new_range->flags == LOGIC_PIO_INDIRECT && !new_range->ops)) return -EINVAL; start = new_range->hw_start; @@ -237,7 +239,7 @@ type logic_in##bw(unsigned long addr) \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ struct logic_pio_hwaddr *entry = find_io_range(addr); \ \ - if (entry && entry->ops) \ + if (entry) \ ret = entry->ops->in(entry->hostdata, \ addr, sizeof(type)); \ else \ @@ -253,7 +255,7 @@ void logic_out##bw(type value, unsigned long addr) \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ struct logic_pio_hwaddr *entry = find_io_range(addr); \ \ - if (entry && entry->ops) \ + if (entry) \ entry->ops->out(entry->hostdata, \ addr, value, sizeof(type)); \ else \ @@ -261,7 +263,7 @@ void logic_out##bw(type value, unsigned long addr) \ } \ } \ \ -void logic_ins##bw(unsigned long addr, void *buffer, \ +void logic_ins##bw(unsigned long addr, void *buffer, \ unsigned int count) \ { \ if (addr < MMIO_UPPER_LIMIT) { \ @@ -269,7 +271,7 @@ void logic_ins##bw(unsigned long addr, void *buffer, \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ struct logic_pio_hwaddr *entry = find_io_range(addr); \ \ - if (entry && entry->ops) \ + if (entry) \ entry->ops->ins(entry->hostdata, \ addr, buffer, sizeof(type), count); \ else \ @@ -286,7 +288,7 @@ void logic_outs##bw(unsigned long addr, const void *buffer, \ } else if (addr >= MMIO_UPPER_LIMIT && addr < IO_SPACE_LIMIT) { \ struct logic_pio_hwaddr *entry = find_io_range(addr); \ \ - if (entry && entry->ops) \ + if (entry) \ entry->ops->outs(entry->hostdata, \ addr, buffer, sizeof(type), count); \ else \ From patchwork Mon Oct 28 12:10:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 177907 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3305493ill; Mon, 28 Oct 2019 05:13:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuF5uFzCBpxzr7DduVtHkOm1nX68QO0E0z7SmCXB4fJOk+mNdtm5RBX9VVXhlA0FUsxBQj X-Received: by 2002:a50:a227:: with SMTP id 36mr18855984edl.262.1572264809306; Mon, 28 Oct 2019 05:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572264809; cv=none; d=google.com; s=arc-20160816; b=P/SHc8zzN/vtWnnNMnVKodYNl30tomPkhy2RqOpjP9n/ZDKjAK+U/BGhDsjhbkQl3z RXc3jfTeD8s5Hnj+d8Meyav9M6o9irgpqu/Y1LdIKuWcZGJGrvQxutl/2o7xBRelynav 0ZzOjFgHLdzc72MJwPKlVnFaRK5BxIiZdbqyGphWKVBMaEPHd0fykuOjP6OGjsn+uKRw A6HJFVEWZ0DJZcjnHfArTakRHoxYLi2fqd8YEPhNVxENtfRiVicOJS47rlmEJrPUPiKZ IgxQxH09aMx26HX4pJQta3GvoYPbM8/zTe6Mk63WFix/quNxINc80NFY+lobc5D9eXT5 Ehmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=JdQFib1xvODx7RhbI3e4cwp5glGU2LMu5gkpRj2H6os=; b=EwBFZ2eCxeZpcvDpMces838qfL9+08JlFHwMwUIrG/zqKEY+vIHrc2PBCZl9RMcC0F JYS9w3nB1IiVeXBJzbIg3F/zHjYEeuQqyNuL+QuDb3evAg8bgAj9HotkCQQo9iTYsI/U j425NbPEgR9aeHTy2Ch9cmDh98vNfp0+cKlLZW0Ow1/ZGAYMS92w9CWjUYUIF82C98u3 xvkt2NNj/RNddxrGq5LK6/r9ilB8lwVMotFFVoB15n1sWUgd7qTrBCcmouyyGylbMXFY VZwDJuQBnGz6YqX7pWdvfbaVSpA0lpzVBu0vd+ZrVKSeQA2qcNk7tPla8zU8rVp4NlqT 6l4A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b50si7315256ede.28.2019.10.28.05.13.29; Mon, 28 Oct 2019 05:13:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389002AbfJ1MN2 (ORCPT + 26 others); Mon, 28 Oct 2019 08:13:28 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37118 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727763AbfJ1MNU (ORCPT ); Mon, 28 Oct 2019 08:13:20 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 1F608B5101211CB44221; Mon, 28 Oct 2019 20:13:15 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 20:13:05 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v2 2/5] logic_pio: Define PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO Date: Mon, 28 Oct 2019 20:10:02 +0800 Message-ID: <1572264605-172363-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572264605-172363-1-git-send-email-john.garry@huawei.com> References: <1572264605-172363-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the goal of expanding the test coverage of the HiSi LPC driver to !ARM64, define a dummy PIO_INDIRECT_SIZE for !CONFIG_INDIRECT_PIO, which is required by the named driver. Signed-off-by: John Garry --- include/linux/logic_pio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/include/linux/logic_pio.h b/include/linux/logic_pio.h index 88e1e6304a71..54945aa824b4 100644 --- a/include/linux/logic_pio.h +++ b/include/linux/logic_pio.h @@ -108,10 +108,10 @@ void logic_outsl(unsigned long addr, const void *buffer, unsigned int count); * area by redefining the macro below. */ #define PIO_INDIRECT_SIZE 0x4000 -#define MMIO_UPPER_LIMIT (IO_SPACE_LIMIT - PIO_INDIRECT_SIZE) #else -#define MMIO_UPPER_LIMIT IO_SPACE_LIMIT +#define PIO_INDIRECT_SIZE 0 #endif /* CONFIG_INDIRECT_PIO */ +#define MMIO_UPPER_LIMIT (IO_SPACE_LIMIT - PIO_INDIRECT_SIZE) struct logic_pio_hwaddr *find_io_range_by_fwnode(struct fwnode_handle *fwnode); unsigned long logic_pio_trans_hwaddr(struct fwnode_handle *fwnode, From patchwork Mon Oct 28 12:10:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 177908 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3305543ill; Mon, 28 Oct 2019 05:13:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyY8CLmXGVbvy8niwVvBBeft9EWqj1Em+GLFYa51VBx+sFy4oKxcgR6op/iji8arngZ8LY X-Received: by 2002:a17:906:22c8:: with SMTP id q8mr16128571eja.19.1572264811494; Mon, 28 Oct 2019 05:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572264811; cv=none; d=google.com; s=arc-20160816; b=ElN6gHRYwgoXVI3TOulSAL5rmg1AUE1toRRQ2sb9/9FdlHvOP9ED9EJjrZ6lI0ITTH 4YPoNF89M2o3GCmM4DIRM/urm8+wOBRBtptIGA9Hmu+SICpzi2YMjrbmIS8f8fRhje9Y ELDhAdTmrmsGy7FThddIzXEeg6D6gh3A4zf25ni/PC4t17tMp3Tjj4lT/D2XEDUmShj6 Dn477QqSCXpszMUIg65xVOKR3BmTFy112aPOVIUcD/BGJgf/M/aLRrFze61WCsilqK4m UKre4TfHZ9ht35G+PMFanEAskypB6TkT43HAX4ZImUAB6jFJMuRF1Zw3URuHETHwsemF Tnbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=1NOYylUOkHzzGL4Uue6Mxpnd2d3WCuxLQ7Rjp8YOuII=; b=yAPuoUMMcJMo+51l+QSJCHMmmpo8IyOK1SUFsFgRaKdduCp5Z1y3UxCNQWrWi5ExL2 yAfOBslarwTOdaRh6EVwAKVL26bP5nDsRhnDXtciVLK+JUOdYKN5RQS39Qt7FKKzktfX Slr/tjETvQR0ZdYogzXkvvMDc+ze/4z1D9DjxpVwTfeN+2X+TVrtvOfVQMd3bXF0f4up Pq28WKMpFOl9Xz9bqVwJSQ5GYyUKcitZolBRDAOUrdSoYLpYzTyeJ60CKEWmrOo9wNp9 +YvPm6vfcBZakMZ3eX7NLjLOYUj3+kOJ6BPwYq/ZqOy8DD5yo+7X0trTP/YbMTKHbNyS 9skQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b50si7315256ede.28.2019.10.28.05.13.31; Mon, 28 Oct 2019 05:13:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbfJ1MN0 (ORCPT + 26 others); Mon, 28 Oct 2019 08:13:26 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37048 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728536AbfJ1MNT (ORCPT ); Mon, 28 Oct 2019 08:13:19 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DA576D0D9DB9D6B6062C; Mon, 28 Oct 2019 20:13:14 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 20:13:06 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v2 3/5] bus: hisi_lpc: Clean some types Date: Mon, 28 Oct 2019 20:10:03 +0800 Message-ID: <1572264605-172363-4-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572264605-172363-1-git-send-email-john.garry@huawei.com> References: <1572264605-172363-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse complains of these: drivers/bus/hisi_lpc.c:82:38: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:82:38: expected void const volatile [noderef] *addr drivers/bus/hisi_lpc.c:82:38: got unsigned char * drivers/bus/hisi_lpc.c:131:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:131:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:131:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:186:35: warning: incorrect type in argument 1 (different address spaces) drivers/bus/hisi_lpc.c:186:35: expected unsigned char *mbase drivers/bus/hisi_lpc.c:186:35: got void [noderef] *membase drivers/bus/hisi_lpc.c:228:16: warning: cast to restricted __le32 drivers/bus/hisi_lpc.c:251:13: warning: incorrect type in assignment (different base types) drivers/bus/hisi_lpc.c:251:13: expected unsigned int [unsigned] [usertype] val drivers/bus/hisi_lpc.c:251:13: got restricted __le32 [usertype] Clean them up. Signed-off-by: John Garry --- drivers/bus/hisi_lpc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 20c957185af2..8101df901830 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -74,7 +74,7 @@ struct hisi_lpc_dev { /* About 10us. This is specific for single IO operations, such as inb */ #define LPC_PEROP_WAITCNT 100 -static int wait_lpc_idle(unsigned char *mbase, unsigned int waitcnt) +static int wait_lpc_idle(void __iomem *mbase, unsigned int waitcnt) { u32 status; @@ -209,7 +209,7 @@ static u32 hisi_lpc_comm_in(void *hostdata, unsigned long pio, size_t dwidth) struct hisi_lpc_dev *lpcdev = hostdata; struct lpc_cycle_para iopara; unsigned long addr; - u32 rd_data = 0; + __le32 rd_data = 0; int ret; if (!lpcdev || !dwidth || dwidth > LPC_MAX_DWIDTH) @@ -244,13 +244,12 @@ static void hisi_lpc_comm_out(void *hostdata, unsigned long pio, struct lpc_cycle_para iopara; const unsigned char *buf; unsigned long addr; + __le32 _val = cpu_to_le32(val); if (!lpcdev || !dwidth || dwidth > LPC_MAX_DWIDTH) return; - val = cpu_to_le32(val); - - buf = (const unsigned char *)&val; + buf = (const unsigned char *)&_val; addr = hisi_lpc_pio_to_addr(lpcdev, pio); iopara.opflags = FG_INCRADDR_LPC; From patchwork Mon Oct 28 12:10:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 177906 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3305383ill; Mon, 28 Oct 2019 05:13:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMPXGyo+oOtBwj2hspoXQnYhU/qqrXvvAfOXQ8FrYtCik15+TW3cR5htbeqaS9jByVb3kt X-Received: by 2002:aa7:d658:: with SMTP id v24mr19167647edr.301.1572264803755; Mon, 28 Oct 2019 05:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572264803; cv=none; d=google.com; s=arc-20160816; b=fa23ct9PGQJoKB0hurGB/yjj3pTN4+WnJtVvwfxPwRpqRYJ7nbzDdvehEHOdfq1aee eZLXMZhmVE0g6Rr9n0GEesnO80ssI6l5O7Q+O6pkKt/aoKmSUcDzgFMmOL1zplt9coKL AmqCJXX35sLbSY9LG/7G6Rx6aM28upSUY5noZKoBWxBRE3jEGuZqWsQnVt9gQwVnc4jo G6JeEKN4VDUgflD9OAz60nK3/IwI8W8eYaEkttj6yHOZ31ffXmb8hX9RN/Xpr5IC53qj rs3DTFVE4Lqj1d9ga1GcShRDxRJ2mktqoPpPrOSKIAIaZdjEd/7KY1hLn9NMWDtJQOQ2 h9gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=p0999uxYXtLmPWOkGpoEI+ni8yBRTqeTlosg1y2QpKk=; b=r2vCf0ns+B3MoyXFTT7e8BezAj2n7tPkLa/YSuLRSbtjw96B5OuhCMlCqqBX1dvKN1 wsOvdV2xTM+eKzfL0QbF+lepjwimuZpaTYtMOnzgYm9Tms3BGguetmGV/OGh/d/3Ya39 Gf/45GeFtWLxQfGRoZfI1/Zu2UjjzL4Utplu5SAz7MVVI3q3metnmpg2oIV22A5ECzKD 0dEWYVLdbhFPK3DCHR1yu2NkFHXlhQ+ZrFs7uy9WZuL5m5OfTI5MlCTmzytFh1+vq5cj zQk4uP/cZ0VSpdrq/jFyyhIMK2QlUMKSNvgKCyb3Hot9gqbYPNLGSg+pQqJmvB2TmLut sZ5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b50si7315256ede.28.2019.10.28.05.13.23; Mon, 28 Oct 2019 05:13:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388984AbfJ1MNV (ORCPT + 26 others); Mon, 28 Oct 2019 08:13:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37108 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727085AbfJ1MNS (ORCPT ); Mon, 28 Oct 2019 08:13:18 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 236A86C4144E00DC386E; Mon, 28 Oct 2019 20:13:15 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 20:13:06 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v2 4/5] bus: hisi_lpc: Expand build test coverage Date: Mon, 28 Oct 2019 20:10:04 +0800 Message-ID: <1572264605-172363-5-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572264605-172363-1-git-send-email-john.garry@huawei.com> References: <1572264605-172363-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the driver will only ever be built for ARM64 because it selects CONFIG_INDIRECT_PIO, which itself depends on ARM64. Expand build test coverage for the driver to other architectures by only selecting CONFIG_INDIRECT_PIO for ARM64, when we really want it. Signed-off-by: John Garry --- drivers/bus/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 6b331061d34b..44cb4b6bea18 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -41,8 +41,8 @@ config MOXTET config HISILICON_LPC bool "Support for ISA I/O space on HiSilicon Hip06/7" - depends on ARM64 && (ARCH_HISI || COMPILE_TEST) - select INDIRECT_PIO + depends on (ARM64 && ARCH_HISI) || COMPILE_TEST + select INDIRECT_PIO if ARM64 help Driver to enable I/O access to devices attached to the Low Pin Count bus on the HiSilicon Hip06/7 SoC. From patchwork Mon Oct 28 12:10:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 177904 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3305284ill; Mon, 28 Oct 2019 05:13:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCO4D+5yVJz2WQAcoWmIxuu58nI8RSIjRg6SfeqsY2VyyxvShCxEfjiWPC6xOFhlrH+pNg X-Received: by 2002:aa7:cb4a:: with SMTP id w10mr11215128edt.28.1572264799073; Mon, 28 Oct 2019 05:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572264799; cv=none; d=google.com; s=arc-20160816; b=bYaSHHyZIozUmZ3skMQRPX/C6vp+Qt+HsJtMOPcUFlUr5eGP7MkayJbWhO3scI8scO i0c5wDEKWCDbohJ5o6U7eHaahDzv21+aQIhND9s+9Kt1BdT4ybgpuM+Q1HbkS4nd2vcu Q/6f1UNEv4WYpawI1fW5FBZbqRbp/E/88hI2XkFztV/GYRu7EE7GbZHFMEsnQ1AjWdDD zzAcdWd9RVnKzg/p0HdD4lZLoRQCBXkP7H5YeZJB2SE5PZ+So3juH33U3MvsCTZ7DCZe pn9J5w9t0T/KVdObA7E7Fof6zR6HjctSD/X1aeOggqk3CONLI6WKYtNrwFn3aHQ9shnC FbRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=cLaA0X0P2YYwrOqreDb4rq8wBE7Dn/V3Ia42O7na1Ks=; b=mCLCmhLXj/G/d93rS3BDi7mYoRh4rY1C9QkCNdsQlD/2jsiitPtNZvbISZBvvAnNDj AGWoBNu1pKZoUGx5m63x5EpVqyi5fN6rUStj9PNiX5c6u2FUDvMCL4hTyXtx1hJLjFZU y3Fg/B+Sov4qUqaze2imvoxCbF1HDYl38MSrY2Ftn80VvwaEXRjLO5Vr5AzHj9+iPVZi 7PVRdt/SC1z731q6fhjPOEPnpc0Tn/BILXfnqmXrIYgQllO0jBVr+WxOOAOla6rrMEzY jEoLKSCwOyWDxSR/SddbegYaew2wRd83Csf1nfaV+8BFjeqbz78zx9YXoOjTl4lvVDJS 2ovg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k51si7542475edb.411.2019.10.28.05.13.18; Mon, 28 Oct 2019 05:13:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388963AbfJ1MNR (ORCPT + 26 others); Mon, 28 Oct 2019 08:13:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:37056 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727085AbfJ1MNQ (ORCPT ); Mon, 28 Oct 2019 08:13:16 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E2F0067FEF17D9FC4D9A; Mon, 28 Oct 2019 20:13:14 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 20:13:06 +0800 From: John Garry To: CC: , , , , , John Garry Subject: [PATCH v2 5/5] logic_pio: Build into a library Date: Mon, 28 Oct 2019 20:10:05 +0800 Message-ID: <1572264605-172363-6-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1572264605-172363-1-git-send-email-john.garry@huawei.com> References: <1572264605-172363-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Object file logic_pio.o is always built. Ideally the object file should only be built when required. This is tricky, as that would be for archs which define PCI_IOBASE, but no common config option exists for that. For now, continue to always build but at least ensure the symbols are not included in the vmlinux when not referenced. Suggested-by: Arnd Bergmann Signed-off-by: John Garry --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/lib/Makefile b/lib/Makefile index c5892807e06f..27645143d8bb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -108,7 +108,7 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o -obj-y += logic_pio.o +lib-y += logic_pio.o obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o