From patchwork Tue Feb 9 14:35:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 61537 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2080322lbl; Tue, 9 Feb 2016 06:36:41 -0800 (PST) X-Received: by 10.98.8.80 with SMTP id c77mr28916356pfd.42.1455028601608; Tue, 09 Feb 2016 06:36:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b27si54429246pfd.82.2016.02.09.06.36.41; Tue, 09 Feb 2016 06:36:41 -0800 (PST) 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 S1756319AbcBIOgj (ORCPT + 30 others); Tue, 9 Feb 2016 09:36:39 -0500 Received: from foss.arm.com ([217.140.101.70]:40667 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075AbcBIOgh (ORCPT ); Tue, 9 Feb 2016 09:36:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2DE733A1; Tue, 9 Feb 2016 06:35:50 -0800 (PST) Received: from leverpostej (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E0DF3F25E; Tue, 9 Feb 2016 06:36:34 -0800 (PST) Date: Tue, 9 Feb 2016 14:35:54 +0000 From: Mark Rutland To: Geert Uytterhoeven , Arnd Bergmann , Catalin Marinas Cc: Sudip Mukherjee , Stephen Rothwell , Linux-Next , "linux-kernel@vger.kernel.org" , Ard Biesheuvel , Jeremy Linton , Linux-Arch , Laura Abbott Subject: Re: linux-next: Tree for Feb 9 Message-ID: <20160209143554.GA9332@leverpostej> References: <20160209164104.4ecaa0ce@canb.auug.org.au> <20160209073428.GA24863@sudip-pc> <20160209120032.GB19840@leverpostej> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2016 at 02:48:26PM +0100, Geert Uytterhoeven wrote: > On Tue, Feb 9, 2016 at 1:00 PM, Mark Rutland wrote: > > On Tue, Feb 09, 2016 at 01:04:28PM +0530, Sudip Mukherjee wrote: > >> On Tue, Feb 09, 2016 at 04:41:04PM +1100, Stephen Rothwell wrote: > >> > Changes since 20160208: > >> > >> tilepro, tilegx, mips defconfig build fails with the error: > >> ../include/asm-generic/fixmap.h: In function '__set_fixmap_offset': > >> ../include/asm-generic/fixmap.h:77:2: error: implicit declaration of > >> function '__set_fixmap' [-Werror=implicit-function-declaration] > >> > >> caused by: > >> commit ac4c0ac73485 ("asm-generic: make __set_fixmap_offset a static inline") > >> > >> Reverting the commit fixes the issue. > > > > Sorry about this. > > > > Is seems any arch without its own __set_fixmap may be adversely > > affected. > > > > I can't easily stub __set_fixmap as it's not implemented as a macro. > > But you can add a forward declaration? Good point. That seems to work (tested on arm64, mips, tilegx). Arnd, Catalin, happy with the bloew fixup to the original patch? Mark. ---->8---- >From e53a0fa34689cca13846475fb5a7cb4c7da87384 Mon Sep 17 00:00:00 2001 From: Mark Rutland Date: Tue, 9 Feb 2016 14:27:36 +0000 Subject: [PATCH] asm-generic: Fix build when __set_fixmap is absent Commit ac4c0ac73485 ("asm-generic: make __set_fixmap_offset a static inline") relied on the architecture code to define a __set_fixmap function, even if unused. This broke the build for architectures which do not implement __set_fixmap: ../include/asm-generic/fixmap.h:Infunction'__set_fixmap_offset': ../include/asm-generic/fixmap.h:77:2:error:implicitdeclarationof function'__set_fixmap'[-Werror=implicit-function-declaration] As we only require the prototype to be present, add this to asm-generic/fixmap.h, preventing build failures on these architectures. Signed-off-by: Mark Rutland Reported-by: Sudip Mukherjee Suggested-by: Geert Uytterhoeven Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Jeremy Linton Cc: Laura Abbott --- include/asm-generic/fixmap.h | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 Acked-by: Arnd Bergmann Signed-off-by: Mark Rutland diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h index f9c27b6..e5255ff 100644 --- a/include/asm-generic/fixmap.h +++ b/include/asm-generic/fixmap.h @@ -69,6 +69,8 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) __set_fixmap(idx, 0, FIXMAP_PAGE_CLEAR) #endif +void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot); + /* Return a pointer with offset calculated */ static inline unsigned long __set_fixmap_offset(enum fixed_addresses idx, phys_addr_t phys,