From patchwork Fri Dec 2 15:05:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Murzin X-Patchwork-Id: 9458667 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6E4CD60515 for ; Fri, 2 Dec 2016 15:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 617862847C for ; Fri, 2 Dec 2016 15:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 568762855C; Fri, 2 Dec 2016 15:08:38 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E0C152847C for ; Fri, 2 Dec 2016 15:08:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCpQM-00058z-Lp; Fri, 02 Dec 2016 15:06:54 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCpPl-0004es-UA for linux-arm-kernel@lists.infradead.org; Fri, 02 Dec 2016 15:06:21 +0000 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 270901597; Fri, 2 Dec 2016 07:06:00 -0800 (PST) Received: from bc-a7-1-1.euhpc.arm.com. (bc-a7-1-1.euhpc.arm.com [10.6.3.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 888043F24D; Fri, 2 Dec 2016 07:05:59 -0800 (PST) From: Vladimir Murzin To: linux-arm-kernel@lists.infradead.org Subject: [RFC v3 PATCH 03/25] ARM: debug: allow debug_ll_addr for NOMMU Date: Fri, 2 Dec 2016 15:05:21 +0000 Message-Id: <1480691143-19845-4-git-send-email-vladimir.murzin@arm.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1480691143-19845-1-git-send-email-vladimir.murzin@arm.com> References: <1480691143-19845-1-git-send-email-vladimir.murzin@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161202_070618_187112_798A22D9 X-CRM114-Status: UNSURE ( 8.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , arnd@arndb.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP While building for NOMMU the following warning shows up: arch/arm/plat-samsung/pm-debug.c: In function 's3c_pm_uart_base': arch/arm/plat-samsung/pm-debug.c:61:2: error: implicit declaration of function 'debug_ll_addr' [-Werror=implicit-function-declaration] debug_ll_addr(&paddr, &vaddr); ^ cc1: some warnings being treated as errors make[1]: *** [arch/arm/plat-samsung/pm-debug.o] Error 1 It seems that commit a73b59c51ab2 ("ARM: compile fix for DEBUG_LL=y && MMU=n") unnecessary disallows debug_ll_addr from being used for !MMU configurations. Commit message there has a error description: arch/arm/kernel/debug.S: Assembler messages: arch/arm/kernel/debug.S:104: Error: too many positional arguments In fact, the root reason for that problem is likely that machine dependent addruart macro took less parameters than debug_ll_addr was passing. For instance, commit 0e17226f7cd2 ("ARM: SAMSUNG: Fixup commit 4e6d488af37980d224cbf298224db6173673f362") addresses the similar issue with the same signs. So, debug_ll_addr has no anti-dependency on NOMMU, but still needs to be adjusted for NOMMU case. addruart populates first two arguments with PA and VA of UART. In case of NOMMU the second parameter doesn't make sense - modify debug_ll_addr that PA is used where VA is expected. Cc: Russell King Signed-off-by: Vladimir Murzin --- arch/arm/include/asm/mach/map.h | 1 + arch/arm/kernel/debug.S | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 6b86b9c..8832dbf 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h @@ -63,6 +63,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, #define iotable_init(map,num) do { } while (0) #define vm_reserve_area_early(a,s,c) do { } while (0) #define debug_ll_io_init() do { } while (0) +extern void debug_ll_addr(unsigned long *paddr, unsigned long *vaddr); #endif diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index ea9646c..681b046 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S @@ -100,14 +100,16 @@ ENTRY(printch) b 1b ENDPROC(printch) -#ifdef CONFIG_MMU ENTRY(debug_ll_addr) addruart r2, r3, ip str r2, [r0] +#ifdef CONFIG_MMU str r3, [r1] +#else + str r2, [r1] +#endif ret lr ENDPROC(debug_ll_addr) -#endif #else