From patchwork Sat Jun 22 05:54:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 2765321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A02B6C0AB1 for ; Sat, 22 Jun 2013 05:56:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC8BE20106 for ; Sat, 22 Jun 2013 05:56:45 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37C3B20107 for ; Sat, 22 Jun 2013 05:56:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UqGo4-0000BM-K8; Sat, 22 Jun 2013 05:56:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UqGo2-0003Rs-3g; Sat, 22 Jun 2013 05:56:14 +0000 Received: from intranet.asianux.com ([58.214.24.6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UqGnf-0003RJ-P1 for linux-arm-kernel@lists.infradead.org; Sat, 22 Jun 2013 05:56:12 +0000 Received: by intranet.asianux.com (Postfix, from userid 103) id E9BF818402EC; Sat, 22 Jun 2013 13:55:08 +0800 (CST) X-Spam-Score: -100.8 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.1.0.143] (unknown [219.143.36.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranet.asianux.com (Postfix) with ESMTP id 046AF1840293; Sat, 22 Jun 2013 13:55:06 +0800 (CST) Message-ID: <51C53C06.7050205@asianux.com> Date: Sat, 22 Jun 2013 13:54:14 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Catalin Marinas , Will Deacon Subject: [PATCH] arch: arm64: kernel: add '#ifdef CONFIG_COMPAT' for aarch32_break_handler() X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130622_015552_020791_5E2443DF X-CRM114-Status: GOOD ( 12.24 ) X-Spam-Score: -3.4 (---) Cc: Linux-Arch , Tony Lindgren , "linux-kernel@vger.kernel.org" , Santosh Shilimkar , "olof@lixom.net" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 If 'COMPAT' not defined, aarch32_break_handler() cannot pass compiling, so need add '#ifdef' for it just like the header file has done. The related make: make ARCH=arm64 randconfig make ARCH=arm64 menuconfig make ARCH=arm64 V=1 EXTRA_CFLAGS=-W The related error: arch/arm64/kernel/debug-monitors.c:249:5: error: redefinition of ‘aarch32_break_handler’ In file included from arch/arm64/kernel/debug-monitors.c:29:0: /root/linux-next/arch/arm64/include/asm/debug-monitors.h:89:12: note: previous definition of ‘aarch32_break_handler’ was here Signed-off-by: Chen Gang --- arch/arm64/kernel/debug-monitors.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 08018e3..ceedcd7 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c @@ -246,6 +246,7 @@ static int brk_handler(unsigned long addr, unsigned int esr, return 0; } +#ifdef CONFIG_COMPAT int aarch32_break_handler(struct pt_regs *regs) { siginfo_t info; @@ -285,6 +286,7 @@ int aarch32_break_handler(struct pt_regs *regs) force_sig_info(SIGTRAP, &info, current); return 0; } +#endif static int __init debug_traps_init(void) {