From patchwork Fri May 21 13:33:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 53154 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id CC32AB7D59 for ; Fri, 21 May 2010 23:33:37 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OFSLx-0006U4-Jw; Fri, 21 May 2010 14:33:29 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OFSLv-0006Tb-DG for kernel-team@lists.ubuntu.com; Fri, 21 May 2010 14:33:27 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OFSLv-0001mE-BS for ; Fri, 21 May 2010 14:33:27 +0100 Received: from 79-70-103-73.dynamic.dsl.as9105.com ([79.70.103.73] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OFSLv-0002fl-7Q for kernel-team@lists.ubuntu.com; Fri, 21 May 2010 14:33:27 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: powerpc: fix compile error when ptrace.h is included from userspace Date: Fri, 21 May 2010 14:33:24 +0100 Message-Id: <1274448804-31575-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1274448804-31575-1-git-send-email-apw@canonical.com> References: <1274448804-31575-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com The commit below introduced some new userspace structures to ptrace.h this necessarily required the inclusion of linux/types.h for the kernel and stdlib.h for userspace: commit 3162d92dfb79a0b5fc03380b8819fa5f870ebf1e Author: Dave Kleikamp Date: Mon Feb 8 11:51:05 2010 +0000 powerpc: Extended ptrace interface However although linux/types.h is assembly safe, stdlib.h is not. So that when the unifdef processed versions are included in assembly files such as occurs in eglibc, non-assembly type definitions are exposed leading to build errors. Looking at the original commit all of the added structures are correctly protected by __ASSEMBLY__ wrappers, therefor the headers are actually only required in that context. Move the headers inside the first __ASSEMBLY__ section. BugLink: http://bugs.launchpad.net/bugs/583733 Signed-off-by: Andy Whitcroft Acked-by: Tim Gardner --- arch/powerpc/include/asm/ptrace.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 9e2d84c..0ed710e 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h @@ -24,14 +24,14 @@ * 2 of the License, or (at your option) any later version. */ +#ifndef __ASSEMBLY__ + #ifdef __KERNEL__ #include #else #include #endif -#ifndef __ASSEMBLY__ - struct pt_regs { unsigned long gpr[32]; unsigned long nip;