From patchwork Tue Apr 23 03:20:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162629 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305283jan; Mon, 22 Apr 2019 20:22:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqCfxlntfo0g1ENXQYKSvNCv2T1ccIqrEIwGtfPIZpTCAVrtixMm3seGKAKvuHBb+q3T9q X-Received: by 2002:a17:902:758e:: with SMTP id j14mr24148113pll.286.1555989775129; Mon, 22 Apr 2019 20:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989775; cv=none; d=google.com; s=arc-20160816; b=uirBemF0DhyRI0h172LOj9ae3FPs2nXWt8Rn2ih0ozeYov/KZjpzfSulakXO1crXOx TWC3qwXu/VanZp/J+xB03oVyQSSGK/VatXQD5u5lTFWoVW9qUVjlCnPt7Wv59kBA5x5K jNS/NYKSlYTcnemQCeyHOTYqPw/qBNaR78k8Em1vnTtGEN8ebcWoRhbCgEAhQuMjPf2u rgYSWg3DUwzDPA24NsjGct7nGEHWCHv9HWDE8qPcjMuchJevnsWpPDG4npTk2mYWUjWE TaIgKF6czrxZfhTEztSNa4UUl/ddKNvx9akl4yY8+TnvOk7OavHxokZPhNDgPUhskA+6 nlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=WxeGjpwIMtUh4NapkUcSoliRiI5DD/Rdf3zwHkix9l0=; b=NYUVesZBE2A6tK7b6EwbzfGPgpt8mXcP8hKEVQG3dJlGAFZOEVajj31QVD+s6gnon+ 6MifL5m7JarreRyai6zqOezoMfNLHn8XncEj9SeB0V/0QxsNUE1ZaU1a0Lu7J5no9gVo JHElLYfTLjeweKh/LIwHJwjyWohTJNS7sbS0iADfmJVFLTksbiW5c30gsUSBgdDN9IQ/ h2Rw51jylpYEezPZ6jkOei18i0Lzgr4Oh2X3P3pwJoetEbxa6GpJevmNJ+mcVuhRG1Zt 4Bpw756JQY4oWgrkrVbcpA/b7Lo74Bvr1EUnpRF7QLZOcorsoVi4h3a9nZ79m+oNyHWv zeEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=I0CioBDT; 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 e7si4165279pgi.288.2019.04.22.20.22.54; Mon, 22 Apr 2019 20:22:55 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=I0CioBDT; 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 S1731427AbfDWDWx (ORCPT + 30 others); Mon, 22 Apr 2019 23:22:53 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57830 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731386AbfDWDWu (ORCPT ); Mon, 22 Apr 2019 23:22:50 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LE031384; Tue, 23 Apr 2019 12:21:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LE031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989672; bh=WxeGjpwIMtUh4NapkUcSoliRiI5DD/Rdf3zwHkix9l0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I0CioBDTkc1GHuaVSUtq8jVEnHXnq1hGY5fDTmiT2yZDSu6CTfVaaVXOU2ocZq0yd yau4zui0pA9Gklyfdi8o/AJZ0Ym0WBMT+wi/ZHIchu3uqVfAfpQFmT6dC6tCX/Ecrl cvxzp/A3CvHBT2XR5HyFgtORaimjq81j8GYVV04h9nnnWkEIg7LZQoh4wdOFskjT2d 5eeCSxlqfwdPytf+3xnWAoqknX7CikjegNqgQuyxt3anZOWoLqsxIgU6AOl4i9IKb9 pVYIeb0NCpH/BeB18yE5PgIoZGN8m8fwFMGMGGUgfjYtgwRleo8ZKHDsJzkNe/clDM UU4f0eSYQFKRQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 03/10] s390/cpacf: mark scpacf_query() as __always_inline Date: Tue, 23 Apr 2019 12:20:59 +0900 Message-Id: <20190423032106.11960-4-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for s390, the following error is reported: In file included from arch/s390/crypto/des_s390.c:19: ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query': ./arch/s390/include/asm/cpacf.h:170:2: warning: asm operand 3 probably doesn't match constraints asm volatile( ^~~ ./arch/s390/include/asm/cpacf.h:170:2: error: impossible constraint in 'asm' Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - split into a separate patch arch/s390/include/asm/cpacf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h index 3cc52e37b4b2..f316de40e51b 100644 --- a/arch/s390/include/asm/cpacf.h +++ b/arch/s390/include/asm/cpacf.h @@ -202,7 +202,7 @@ static inline int __cpacf_check_opcode(unsigned int opcode) } } -static inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask) +static __always_inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask) { if (__cpacf_check_opcode(opcode)) { __cpacf_query(opcode, mask); From patchwork Tue Apr 23 03:21:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162631 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305375jan; Mon, 22 Apr 2019 20:23:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxJABNr8kGsMUSgMOOlXJwKN9LQNHSoTJ9q1nQcEZfafP+m4Tlt2w7DsQ1KCEeD5Uz32Gl X-Received: by 2002:a62:1701:: with SMTP id 1mr24082723pfx.120.1555989780501; Mon, 22 Apr 2019 20:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989780; cv=none; d=google.com; s=arc-20160816; b=lP0IZ59Rzurt8bjnFhIiWLMKX/L5M33EY46S4Gl359c5fw+9HL9zAfE9tAraqjyT1J yVLOGCAnAkciL+gKdtp1nH4hEwr92ltxpee14+hDVSbZ6odK7fIaFXzbyn7wLeRcxKLk l64x+WaDMeHgzG0smElvJE1KEbqig8qkDxi1Wal49SXcFwuVqfPThRvqCVeELlp0yUiy rFHZXcdt4EqU94vAkM2Ez3d/cpOB95rrJUhRybImW4FFfO6OiJRsY0yeR7DSIrC+bMbf QppQ3uhtznv9TWFcJRcbQO+5L7q/dZ86JR5dec9U3MsFsVBqB27KsrKgaxCVdjC0fcGE WeoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=ck3m1Bnhk+gBZ69Ip9jiWsEf5IWvpXJTs7wxMIQoCXU=; b=Gk4Jc1PtJGYdwUfAuOkhJQQPfFCigknh2TtjKhwBPXdB39sebj6FxRc1CmGQuKaK8d l4FQGy/nBhKvOTcnMh4Hgsi6VnxgGHqPEh3xHlVhSuTQFJ9t48vUbYWF6Mx/Hkm3Q23Z EeOOPua26GX4rqMKTvhXo1m0hpNs34sZWOuaV+Vd96TYqGO3S4ZkWWuJ9LB08v/hhXJv tSSzOdzkC0Elt9ZsdNj9Tqa+RJsmmHweWitOipEXyGBE5nb2L72NIZ7pSYsPjD6q41hm xUweeM2fi0n8HS/g7xuknVG37KT+eg2fopgIrp35MJvmsPtC8IQXpIlZccFkJ0ORL3fC JoLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=gV33Qf2t; 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 y15si14681271plp.357.2019.04.22.20.23.00; Mon, 22 Apr 2019 20:23:00 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=gV33Qf2t; 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 S1731483AbfDWDW7 (ORCPT + 30 others); Mon, 22 Apr 2019 23:22:59 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57960 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731417AbfDWDWy (ORCPT ); Mon, 22 Apr 2019 23:22:54 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LF031384; Tue, 23 Apr 2019 12:21:13 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LF031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989673; bh=ck3m1Bnhk+gBZ69Ip9jiWsEf5IWvpXJTs7wxMIQoCXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gV33Qf2twLt0S6KodHjawBrkc1EsU13fh2qP1ShaK+o/SW6rZPyaYhhtUGjSAMOAL R6pXzzLQz8ZPC8irBjiP9xHCy62EbVDEQXUwURuCleI0FJA77siCTw7Cz4XKgG1UfL HVZpVKmESAPZc46mK1RRH+1phNlLhepGkqPxUGjE20kRpWeZm0GYs2r7kDaFXdO6qR cCIMvz79juH6wsQD+t5Jx+BzNhp4jE7MKMO0MND1/4edyYQRn+I+KQBoZTCFmf4xjF qjQonQHFppXfOIXGtZ0OqQBPESG1vJw9Dz8ZTGLbmLDpEupQ6kYWoETwrSNw/80XCk Xjd7IfyPdLgtA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 04/10] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized Date: Tue, 23 Apr 2019 12:21:00 +0900 Message-Id: <20190423032106.11960-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. Kbuild test robot has never reported -Wmaybe-uninitialized warning for this probably because vf610_nfc_run() is inlined by the x86 compiler's inlining heuristic. If CONFIG_OPTIMIZE_INLINING is enabled for a different architecture and vf610_nfc_run() is not inlined, the following warning is reported: drivers/mtd/nand/raw/vf610_nfc.c: In function ‘vf610_nfc_cmd’: drivers/mtd/nand/raw/vf610_nfc.c:455:3: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized] vf610_nfc_rd_from_sram(instr->ctx.data.buf.in + offset, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nfc->regs + NFC_MAIN_AREA(0) + offset, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trfr_sz, !nfc->data_access); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - split into a separate patch drivers/mtd/nand/raw/vf610_nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index a662ca1970e5..19792d725ec2 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -364,7 +364,7 @@ static int vf610_nfc_cmd(struct nand_chip *chip, { const struct nand_op_instr *instr; struct vf610_nfc *nfc = chip_to_nfc(chip); - int op_id = -1, trfr_sz = 0, offset; + int op_id = -1, trfr_sz = 0, offset = 0; u32 col = 0, row = 0, cmd1 = 0, cmd2 = 0, code = 0; bool force8bit = false; From patchwork Tue Apr 23 03:21:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162630 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305349jan; Mon, 22 Apr 2019 20:22:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEpTT7rrqmRe/iUXNhI1n0RjanZLdvSLIySl36jFEoH28RdFXsBt2sM/ithaFA81eH3KfY X-Received: by 2002:a17:902:8f88:: with SMTP id z8mr16518091plo.54.1555989779250; Mon, 22 Apr 2019 20:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989779; cv=none; d=google.com; s=arc-20160816; b=y7aG5PrOFhsjxeDu/JqQ4ArcaIWER1wQwe+zRttkabsB9bwdiyVQBJDGLObNtAYbCZ KUi98BxzBTSXl1lj+kI4TkYpWpuPmqGp+128s/6q6Byn+dZ2EpV86vb3v/3qd6FnWvjY ipo7jzUExS+k4prwcb9SHYOh01n8UUrxJx53DifQIIdAyTS6pWa2a6KsuXFyYUxa05Ny cBptBMFaeRsivZbUGKPVVszz3MuUehc5fWFDVjhouHqc0cyAR0I0BCEk1W3+3+Cj57ID 4LkSx8wttiBxNZXYSMqSyI9/4V37Q1hfAZgmBXVRoCDw+y67k1NcO37u1rdz/6269GDu QItw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=h+EwU9qqdYxQmwoBR4Te9yGMUTWayFtr2mQvRUGDY+4=; b=L2v3ZiDHxWDueJYonU1epEQ1H3X3lf5FVqlA4greHbIBUATO7ZBv+efGHb6ZPYghtd Z+aZ2MlV8hkvDX26AN5Gl1ldRF1iCeEuqMsnkyVdroCI2SBy3x4ZW/5Fi11vCo9hCWR+ QYHhMvTY5wySWt15NveG+fzfCAtwJxXMgQe0Vps3OWH0Uw8lkDgIofdePYmsKNQeMEvb wTb3p1Msoa06wPIUctFEnGOMFQblL/kdnFLDNpa27Fyt66JYy0slwcNe8BEjKqW+XF/g E77NYDN2pgixqrR4+FZmvVVRwblR5oAmWGm57JHtGas3/vQ1IZfcWctiEBcVzSCi2Jdk 4CGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fMKCLsF3; 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 d9si14742841pls.12.2019.04.22.20.22.58; Mon, 22 Apr 2019 20:22:59 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fMKCLsF3; 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 S1731463AbfDWDW5 (ORCPT + 30 others); Mon, 22 Apr 2019 23:22:57 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57976 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731424AbfDWDWz (ORCPT ); Mon, 22 Apr 2019 23:22:55 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LG031384; Tue, 23 Apr 2019 12:21:14 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LG031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989674; bh=h+EwU9qqdYxQmwoBR4Te9yGMUTWayFtr2mQvRUGDY+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fMKCLsF3vkn9rbVZhxunvSAMM1Ddyvfw4vhVutiax7d6r5MGg5J+w/v+g9LBr5+MI ieWoiaS1OLlFVtp+QKr0m9JEjPoY+8pPmRdg5b44U9460ffFvLQwmFSJFE4jOGbWxx PDkpXqS8Z/ZQOHY0KUZ6uRXCdkke35qzo4RTbqWEWQp3vat0X3qNniNDLni4YzgSJU 4QMbOozCm1B4Y8AaI55Utaqe1HTzhYbq57WwpNrAxlZD1CHDTqpd+8GKFaCBkdbiuM gT43p76B4VW4DY3pieAT65tbDDC1nN6ToA5XhujC/nwH8MPSUYMhuIay6PnMr+TD3/ k2XbmcHB78PYg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 05/10] MIPS: mark __fls() and __ffs() as __always_inline Date: Tue, 23 Apr 2019 12:21:01 +0900 Message-Id: <20190423032106.11960-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following errors are reported: arch/mips/mm/sc-mips.o: In function `mips_sc_prefetch_enable.part.2': sc-mips.c:(.text+0x98): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0x9c): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xbc): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xc8): undefined reference to `mips_gcr_base' sc-mips.c:(.text+0xdc): undefined reference to `mips_gcr_base' arch/mips/mm/sc-mips.o:sc-mips.c:(.text.unlikely+0x44): more undefined references to `mips_gcr_base' Signed-off-by: Masahiro Yamada --- Changes in v3: - forcibly inline __ffs() too Changes in v2: - new patch arch/mips/include/asm/bitops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index 830c93a010c3..9a466dde9b96 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -482,7 +482,7 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long * * Return the bit position (0..63) of the most significant 1 bit in a word * Returns -1 if no 1 bit exists */ -static inline unsigned long __fls(unsigned long word) +static __always_inline unsigned long __fls(unsigned long word) { int num; @@ -548,7 +548,7 @@ static inline unsigned long __fls(unsigned long word) * Returns 0..SZLONG-1 * Undefined if no bit exists, so code should check against 0 first. */ -static inline unsigned long __ffs(unsigned long word) +static __always_inline unsigned long __ffs(unsigned long word) { return __fls(word & -word); } From patchwork Tue Apr 23 03:21:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162633 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305461jan; Mon, 22 Apr 2019 20:23:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMDJouGvS0B8GztaK/EvHV0aZMamlPtYUtuJ4Lvs89+tdP0JveFbXGL2B25F++YKkUUB2T X-Received: by 2002:a63:4714:: with SMTP id u20mr13366777pga.316.1555989790439; Mon, 22 Apr 2019 20:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989790; cv=none; d=google.com; s=arc-20160816; b=eJC8GCyVv6Yd/VYl92WO1+RJtJgxNEWyS345/R+4VUFZw3bc7qN1bNHKv5XiEOv1zZ uiXSOKOUlS9gtl519CJgmimY8cGfHaC1VVktTpQ4MSvcbcqO118BTgjTLKfAiu1uB0/L Nryon3KU/aKl4nFtEN6TpZOI7UHxg+EmBoQj9rwAFRjgeo6vRBwsq1Yr194p/xyDf0ox Rb5GgVv5yAZxkbhZRcG9kjayfBrRav7bpm70B1AsIuAy8bmH+XtPLCG9yai9kzw48PnA AiFux/h6+ZrAu5Nu0w56M7WRd6I54dmcihjvVQcUifxy6RDUN1C9Lb+/0h+ss9Vyolfo 7Bdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=6a2lxZ60QvbOnt17TfgaQyw8mxjsKyu0piFkGUEaJaM=; b=y7K7/ZrgargrVlnICxtG8mK/Z71ElUomJCxOPc6xcc8rie1UfJH4CJZHkY5ljkvgI5 a8wzf34I5hjiAG5EivyOEV2ydd2bPLJqkdASezKx693VSGLTzoygvOKMjQ7KmEEflHTf wH+8RKF7kbl+ZVp8o3vDxFXoTmzNHhn8KhI9Jg2imtEzIcxt7q9Q8GN2agTf4zf6hvYo ox/I40xuzD+5Mm2Xem+Fi0wGjGJpPQY+GO/Lm5NokMAQQXrfLg8aPEWCFvD2bdL9oeSY 31KxJDuH0+C/R0zhIxWLhYrZS6CALxe7n8BUFHLcVq0WEd19vL4Za1egEMdvlt2Lp+mC CABA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CHPtc9jS; 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 i8si5401588pgi.346.2019.04.22.20.23.10; Mon, 22 Apr 2019 20:23:10 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CHPtc9jS; 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 S1731541AbfDWDXJ (ORCPT + 30 others); Mon, 22 Apr 2019 23:23:09 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:58056 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731430AbfDWDW6 (ORCPT ); Mon, 22 Apr 2019 23:22:58 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LH031384; Tue, 23 Apr 2019 12:21:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LH031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989676; bh=6a2lxZ60QvbOnt17TfgaQyw8mxjsKyu0piFkGUEaJaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CHPtc9jSL+9ebuZO/skz7KvegyF3HYZD/nb6/DUdMdujdL8RxU/elng/gx9lj7zmN 3LS//0ivw+/Lk89IGnZjJkOdZyR47Hr8cuKKAf9OB2cw7QwCfosqxN7q9/NSvjLQcu gswk62JqD1xBPGrZr5R5e7bwFyb8X9fRto9UW4pYcvEXoyrV1Qj9H5ghciINvvuaOZ LOES2rW0cy4ghzpgTXNZgj2B7dO7gvFk1/HK8GGyehvEr5qGYAXvqhC4ffi6lQOJ43 Q6j9nhdCfBQNAj49iioj3TEtmPutjuAz9A6aQXI2YIiNFK8b5AQoiP+KVg1lECf/fc HUrKflwhtfxWQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 06/10] ARM: mark setup_machine_tags() stub as __init __noreturn Date: Tue, 23 Apr 2019 12:21:02 +0900 Message-Id: <20190423032106.11960-7-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm, Clang build results in the following modpost warning: WARNING: vmlinux.o(.text+0x1124): Section mismatch in reference from the function setup_machine_tags() to the function .init.text:early_print() The function setup_machine_tags() references the function __init early_print(). This is often because setup_machine_tags lacks a __init annotation or the annotation of early_print is wrong. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - new patch arch/arm/kernel/atags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm/kernel/atags.h b/arch/arm/kernel/atags.h index 201100226301..067e12edc341 100644 --- a/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h @@ -5,7 +5,7 @@ void convert_to_tag_list(struct tag *tags); const struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr); #else -static inline const struct machine_desc * +static inline const struct machine_desc * __init __noreturn setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) { early_print("no ATAGS support: can't continue\n"); From patchwork Tue Apr 23 03:21:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162635 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305620jan; Mon, 22 Apr 2019 20:23:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrxtDxvRU7smW7pEz7tv5KsFu6qbp3dfIG2Boeo+qVjaHKZN0B9KMqmV/fIzK+/UXSkFwB X-Received: by 2002:a17:902:848d:: with SMTP id c13mr22675858plo.279.1555989804162; Mon, 22 Apr 2019 20:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989804; cv=none; d=google.com; s=arc-20160816; b=q1h4k8ZI96QijsUtZWJZEw38b85ozU5M5c+pwQ8bNGqxep+hvwV+rqBkCee6nd9UZm u2klLKL6TXJIWjemQFg32EGvqBhryG/7L1/RFU5ACz+5SaX2ZIrhHgLYghvbYYnob08I a0IM6SCLTRI/N52tGe2IUwjGOpbf9xnxeKzKGxBFdgjeGhAvHDX0IITeyTNpd1mq5U0O RcptxwmylRatoXiaXvTW916R0jOS9Py1c0BezmsLkbRXW3tYVCABCI2LfB6EhHy1TTS3 mqjZ2rwvKu5W5hg17FT+WcCGgrIs0eguPEa08MDaJZLomYFQPesyfgdJvaFh8UfHoibp 2YiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=7qo1vbhArO2n/LZF4sYuHYL1/6J0V//9VqfNxacUkeY=; b=CQp66bPFZoF/8esMX+Yp/aggfgM8lTC/YnaVl8S+nVqTxGW2fR7nR/bEsM4G1z6xtB t5yq3+CH0P2qRjPZ3mVEl8r/DIPfm67EKsrFZGj3d05eNe9THFBqP4QRxcu50/SDNdf4 rfCZXx30RA1iwi21gPSWjpm2uuiu2ssq+DYd3rG2jjd/jcGP7Y9fvNmypJaFvR5ZuuP6 PmdtUSPpJFUhMqhKs9g3NjLHexUfp4OIeQho1i4h4QY/k40P6CCRYYrUvrf+ldWfukqI pS82inziwDAnK9FdaxYDoNzNQ+WPagUQqXALSn6ttFjH1k4RLb+SRsbNqLiS+uF1fDcn MLLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ByF3Wmdm; 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 q190si16119121pfc.215.2019.04.22.20.23.23; Mon, 22 Apr 2019 20:23:24 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ByF3Wmdm; 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 S1731558AbfDWDXW (ORCPT + 30 others); Mon, 22 Apr 2019 23:23:22 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57997 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731386AbfDWDW5 (ORCPT ); Mon, 22 Apr 2019 23:22:57 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LI031384; Tue, 23 Apr 2019 12:21:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LI031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989677; bh=7qo1vbhArO2n/LZF4sYuHYL1/6J0V//9VqfNxacUkeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ByF3Wmdmakc6HLxf+7sO4AecDTjocpMpuNC8cuKlErGY2yh/dUHLMuh9zSFWEGTqW q+KiAI+xFh2t24Ab9m1yrPP17Cyl+UhoxHAxcgFKNrCZCdOQN3cso9Mb/EXfi2daGR hlvySMMI/+wVS1osaiozGonKjB5tKKgqQoKy+9b/ap9neqJLqr1tga0RknQmdLF5JK mrAbzkbvLcAzZ1NxGJ9dZS3STvmHdygjzqiMUFvx18/R69eytCCnyKXuaz6EFMKoqG qZ0UXSQUDTS36O4kuT/WHJOuuDNS3UAjjBtSEpPsRvPp7tR/lkpLgjI9bHexOD5AsD z+jiwwsUH5rGA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 07/10] powerpc/prom_init: mark prom_getprop() and prom_getproplen() as __init Date: Tue, 23 Apr 2019 12:21:03 +0900 Message-Id: <20190423032106.11960-8-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following modpost warnings are reported: WARNING: vmlinux.o(.text.unlikely+0x20): Section mismatch in reference from the function .prom_getprop() to the function .init.text:.call_prom() The function .prom_getprop() references the function __init .call_prom(). This is often because .prom_getprop lacks a __init annotation or the annotation of .call_prom is wrong. WARNING: vmlinux.o(.text.unlikely+0x3c): Section mismatch in reference from the function .prom_getproplen() to the function .init.text:.call_prom() The function .prom_getproplen() references the function __init .call_prom(). This is often because .prom_getproplen lacks a __init annotation or the annotation of .call_prom is wrong. Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - split into a separate patch arch/powerpc/kernel/prom_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index f33ff4163a51..241fe6b7a8cc 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -501,14 +501,14 @@ static int __init prom_next_node(phandle *nodep) } } -static inline int prom_getprop(phandle node, const char *pname, - void *value, size_t valuelen) +static inline int __init prom_getprop(phandle node, const char *pname, + void *value, size_t valuelen) { return call_prom("getprop", 4, 1, node, ADDR(pname), (u32)(unsigned long) value, (u32) valuelen); } -static inline int prom_getproplen(phandle node, const char *pname) +static inline int __init prom_getproplen(phandle node, const char *pname) { return call_prom("getproplen", 2, 1, node, ADDR(pname)); } From patchwork Tue Apr 23 03:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162632 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305404jan; Mon, 22 Apr 2019 20:23:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+XkmBYE/Y5uWnSGb1wWzpCy/VTrds+ZKScHC/5QgNZ83aGOyto+NxFw6X3KUIEtRCV3Vi X-Received: by 2002:aa7:9095:: with SMTP id i21mr25213511pfa.134.1555989782797; Mon, 22 Apr 2019 20:23:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989782; cv=none; d=google.com; s=arc-20160816; b=YTzcuegWNSKKFejRQ5E+UQYt2gEkSYfwBY20NpDh0zuMJD5y0eraGm5ajNylrX8Gz+ t/XyWxC9VKJ7Rmw1rKF0v5bGYJd/46SAIUKwYvacTbX5dXBvUfb/ySqmHkDPc4WJjwIV rQOMkBM42YNEyNx3lVP1e2b7d9ErsXfUZWZF93xvT1oW2zgBLySFb3RK1vj+zAih60YP VN3NnsWYhTGtI3IuRI5gcQaBDBmx3PydIU7/F6Gfw+iSYzLIpSyfXvRYda+NWbM73qTU wXu/TCC9Mw0agfkGfX27xNYRmywgF0qDgS3uG08EyyCAyF5hxZzPs4GZCQHZRPp37xN7 9uCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=O+ymeBuOvG0uQG78yokX58qG5GQYyDm6Ks5zKkCXYg8=; b=HVuQYnt3oX54/ApA5b44oq+I8QGcF4W3aFIOHSYSwy4PzmasArTwIzS2G3+PmB963/ zhoY7hykSt47KsuZlWLLwcJGA8U8lQfVhzYaHwAIu7zRBmUTB0/AeDjGQDdrEHpRp1QH 1o8U5J0+d+d31HLnrQIgi2IPl3MzLAR1PGokIvIn70jp5sTLk+zJf+FUKKTY6+DdeEJl NRWi2Lo8bVTtkuJes6OUM/aIe/sVwXOSmuh3T6WI2tOti5SzEExZxNrvE+1bQ6FAVodX bxqHnHnC1sAZWSWZmQ8Al3e5JdhIbF7zv+NWmUoYUDRXzTJGXkgy2BNwQp+P9gjjTmvD jorw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dvn9x6ox; 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 y15si14681271plp.357.2019.04.22.20.23.02; Mon, 22 Apr 2019 20:23:02 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=dvn9x6ox; 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 S1731498AbfDWDXB (ORCPT + 30 others); Mon, 22 Apr 2019 23:23:01 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57970 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731419AbfDWDWz (ORCPT ); Mon, 22 Apr 2019 23:22:55 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LK031384; Tue, 23 Apr 2019 12:21:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LK031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989679; bh=O+ymeBuOvG0uQG78yokX58qG5GQYyDm6Ks5zKkCXYg8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dvn9x6ox5fKI53z4C6POxz1XdusTJbpCXwpiePE9LkrLtyiVEIl8HbNcb4g1F9TNB aLbM74ElzoqAyKnhrfnhn9JGJaQm1caHcFa4qctMPGnbOLqDTSgwRJD+DMSdkE3oiq aR2pnUT6YCEfjxTc6TYECEcOwIzEka03xMTxtqwFA3hlWUWiPuWqFoF8n+/OFUbHrE mzanNOf1EV4wOrj/BXXqBW3Z3HA7y/GIxH/mT9mVx5M0ECaljXrIelcr+WwVJWjZKF l8G7HidXSJAw+7R306/qLGO/OZ8WJEVwXAlkIW6xpK57x+Swra3rVWvL5WVo56xmgn TxHQ+4IdfDqVQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 09/10] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline Date: Tue, 23 Apr 2019 12:21:05 +0900 Message-Id: <20190423032106.11960-10-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following errors are reported: arch/powerpc/mm/tlb-radix.c: In function '__tlbie_lpid': arch/powerpc/mm/tlb-radix.c:148:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) ^~~ arch/powerpc/mm/tlb-radix.c:148:2: error: impossible constraint in 'asm' arch/powerpc/mm/tlb-radix.c: In function '__tlbie_pid': arch/powerpc/mm/tlb-radix.c:118:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1) ^~~ arch/powerpc/mm/tlb-radix.c: In function '__tlbiel_pid': arch/powerpc/mm/tlb-radix.c:104:2: warning: asm operand 3 probably doesn't match constraints asm volatile(PPC_TLBIEL(%0, %4, %3, %2, %1) ^~~ Signed-off-by: Masahiro Yamada --- Changes in v3: None Changes in v2: - new patch arch/powerpc/mm/tlb-radix.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c index a2b2848f0ae3..14ff414d1545 100644 --- a/arch/powerpc/mm/tlb-radix.c +++ b/arch/powerpc/mm/tlb-radix.c @@ -90,8 +90,8 @@ void radix__tlbiel_all(unsigned int action) asm volatile(PPC_INVALIDATE_ERAT "; isync" : : :"memory"); } -static inline void __tlbiel_pid(unsigned long pid, int set, - unsigned long ric) +static __always_inline void __tlbiel_pid(unsigned long pid, int set, + unsigned long ric) { unsigned long rb,rs,prs,r; @@ -106,7 +106,7 @@ static inline void __tlbiel_pid(unsigned long pid, int set, trace_tlbie(0, 1, rb, rs, ric, prs, r); } -static inline void __tlbie_pid(unsigned long pid, unsigned long ric) +static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) { unsigned long rb,rs,prs,r; @@ -136,7 +136,7 @@ static inline void __tlbiel_lpid(unsigned long lpid, int set, trace_tlbie(lpid, 1, rb, rs, ric, prs, r); } -static inline void __tlbie_lpid(unsigned long lpid, unsigned long ric) +static __always_inline void __tlbie_lpid(unsigned long lpid, unsigned long ric) { unsigned long rb,rs,prs,r; @@ -239,7 +239,7 @@ static inline void fixup_tlbie_lpid(unsigned long lpid) /* * We use 128 set in radix mode and 256 set in hpt mode. */ -static inline void _tlbiel_pid(unsigned long pid, unsigned long ric) +static __always_inline void _tlbiel_pid(unsigned long pid, unsigned long ric) { int set; From patchwork Tue Apr 23 03:21:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 162634 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3305539jan; Mon, 22 Apr 2019 20:23:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxngXCvsEo35OAT3qGQCLMVq4ImIYfsvvsbqDXMDtVDK4Vy4uYSGVUae2GNJLp9DHk4h4ZL X-Received: by 2002:a63:550d:: with SMTP id j13mr22611747pgb.18.1555989795470; Mon, 22 Apr 2019 20:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555989795; cv=none; d=google.com; s=arc-20160816; b=OPfk3Q8X4jlitjgAQ5BDZ1C9aXUKXRxLqk6srLGIZuLnoWmNB8KCiDTf1lsPtJOOZM crGMTtIBDcLVvWg44gli7reakGNCRC6HJstRCYVNF1LddXq44F7bogsDzEO5kifRl0WG gtdoqPpX63KOsddhfRAgWDmb9WrhhLVPlLEWKxPXdHofkg8pYbGsGw/t/JYqJpTheqn5 ROIaLDzEODPAPm79BVlHQrITBwyN2KOQQcb2s4IDSCvcHtJ6iJgsf69v8rYIn34ybydT Mj7j8I6PRWWok1gyovHUD3qVlbn2lcjKCCa3hQcZ1H9X5iZGXXAwLdHYfVnWL6E8t30T wNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=YGW0gg01jtKnXbnK1Ap0mVZ9GqJOY8DcvskWgXT4tQY=; b=KYdjAuw8wDB+ctA5/qt+7O8vB6xiBg/XGrN98N9e/SCy/Rf/bSBwXOT6TpuL5+QzSA BSQlofbQI8aBuwbk2AuRtjdfAmKbMr4jsRELVIh9vz2zQF52dHBMGtlakAB1BmfuXUeE P5weE/qRTnNCwVWEr+R8Z2bCgKkpWBQGt4t2ZM+AxKqy11VnbIPR1wuDSrQwaTxIDcAd zo8agdDLS7ZSyBLPKexrxZgCbLmpsnyyUitGi7qzJcDSmqkNJL3KeEIzOFfZ9RO/lHML si2Cn/5wfhkSNAsHbzQ1tIbTTC1NTTXaB1bKZ61h3KEF2SWNAv+a3rC5WkCu1LIKXQUU znkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="mCn02M/+"; 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 i8si5401588pgi.346.2019.04.22.20.23.15; Mon, 22 Apr 2019 20:23:15 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="mCn02M/+"; 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 S1731525AbfDWDXI (ORCPT + 30 others); Mon, 22 Apr 2019 23:23:08 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:58021 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731429AbfDWDW6 (ORCPT ); Mon, 22 Apr 2019 23:22:58 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x3N3L8LL031384; Tue, 23 Apr 2019 12:21:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x3N3L8LL031384 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555989680; bh=YGW0gg01jtKnXbnK1Ap0mVZ9GqJOY8DcvskWgXT4tQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mCn02M/+Zs1tTrnfj5kcK/rIXu8Qjzpou6KA7O8+YMQxaTRIOmJiYSdn1yiI2naKt MOHV0re8MJvGrURubZ52FRJWYB8BKJDCHdtm0+gi/mtbUq5QKLWZPGOju5xSwUZcWl v62g+gXthE8J+NAD4NPy45+MxSmZ7tonTDzlWDzHGQzYMmZaYvOa54z3WQuT8Zuufn RRLTWAFT4J9sYGariQ0SfM01A/+8PRgOu0jsL4gPe489CoMR6D8YJvBgVXCuHjnXp7 ss+JT31y4kchSzLW7k/zDncSQUjZSSKhKjjg3CKu47It7stLcp72/4twqXDWyaFFPZ vwoBCpY9sZvjQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Mathieu Malaterre , Masahiro Yamada Subject: [PATCH v3 10/10] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING Date: Tue, 23 Apr 2019 12:21:06 +0900 Message-Id: <20190423032106.11960-11-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190423032106.11960-1-yamada.masahiro@socionext.com> References: <20190423032106.11960-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 60a3cdd06394 ("x86: add optimized inlining") introduced CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. The idea is obviously arch-agnostic. This commit moves the config entry from arch/x86/Kconfig.debug to lib/Kconfig.debug so that all architectures can benefit from it. This can make a huge difference in kernel image size especially when CONFIG_OPTIMIZE_FOR_SIZE is enabled. For example, I got 3.5% smaller arm64 kernel for v5.1-rc1. dec file 18983424 arch/arm64/boot/Image.before 18321920 arch/arm64/boot/Image.after This also slightly improves the "Kernel hacking" Kconfig menu as e61aca5158a8 ("Merge branch 'kconfig-diet' from Dave Hansen') suggested; this config option would be a good fit in the "compiler option" menu. Signed-off-by: Masahiro Yamada Acked-by: Borislav Petkov --- Changes in v3: None Changes in v2: - split into a separate patch arch/x86/Kconfig | 3 --- arch/x86/Kconfig.debug | 14 -------------- include/linux/compiler_types.h | 3 +-- lib/Kconfig.debug | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 19 deletions(-) -- 2.17.1 diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 62fc3fda1a05..f214bb5d60d8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -310,9 +310,6 @@ config ZONE_DMA32 config AUDIT_ARCH def_bool y if X86_64 -config ARCH_SUPPORTS_OPTIMIZED_INLINING - def_bool y - config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 15d0fbe27872..f730680dc818 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -266,20 +266,6 @@ config CPA_DEBUG ---help--- Do change_page_attr() self-tests every 30 seconds. -config OPTIMIZE_INLINING - bool "Allow gcc to uninline functions marked 'inline'" - ---help--- - This option determines if the kernel forces gcc to inline the functions - developers have marked 'inline'. Doing so takes away freedom from gcc to - do what it thinks is best, which is desirable for the gcc 3.x series of - compilers. The gcc 4.x series have a rewritten inlining algorithm and - enabling this option will generate a smaller kernel there. Hopefully - this algorithm is so good that allowing gcc 4.x and above to make the - decision will become the default in the future. Until then this option - is there to test gcc for this. - - If unsure, say N. - config DEBUG_ENTRY bool "Debug low-level entry code" depends on DEBUG_KERNEL diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index ba814f18cb4c..19e58b9138a0 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -140,8 +140,7 @@ struct ftrace_likely_data { * Do not use __always_inline here, since currently it expands to inline again * (which would break users of __always_inline). */ -#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ - !defined(CONFIG_OPTIMIZE_INLINING) +#if !defined(CONFIG_OPTIMIZE_INLINING) #define inline inline __attribute__((__always_inline__)) __gnu_inline \ __maybe_unused notrace #else diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 00dbcdbc9a0d..37402f210115 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -310,6 +310,20 @@ config HEADERS_CHECK exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in your build tree), to make sure they're suitable. +config OPTIMIZE_INLINING + bool "Allow compiler to uninline functions marked 'inline'" + help + This option determines if the kernel forces gcc to inline the functions + developers have marked 'inline'. Doing so takes away freedom from gcc to + do what it thinks is best, which is desirable for the gcc 3.x series of + compilers. The gcc 4.x series have a rewritten inlining algorithm and + enabling this option will generate a smaller kernel there. Hopefully + this algorithm is so good that allowing gcc 4.x and above to make the + decision will become the default in the future. Until then this option + is there to test gcc for this. + + If unsure, say N. + config DEBUG_SECTION_MISMATCH bool "Enable full Section mismatch analysis" help