From patchwork Tue May 28 20:59:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 17253 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0380C20F2E for ; Tue, 28 May 2013 20:59:17 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id bs12sf4447955qab.3 for ; Tue, 28 May 2013 13:59:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:date:from :to:cc:subject:message-id:user-agent:mime-version:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=54uytCWKpN5YNRL3qt7unVbI3Uh5nR4P/cM1LFlN89s=; b=aDhxjRRQiRErnJ6/ntJS+puNX4a9tCd5YeeuPYoyAsEquqEb5tXNOiuHO/4f6gIKGX sXBTWa4O5ZmOXxukP94Ld37YyLrcpIOUO+34BLkp1NyXHH1fUQhCrRNpZOGOxaj+jqMr xpKkS/7ptp6sL0FBmI7Z99yHmxSE7hvYHd1lY9X+Z6DK22dpexapaoVxq1xIRVayRIjD floNf8v089mI/+wdMFUm48VvUObIl1pQw0ZbrIVPU35oAkDKAxfqBA7hSYLypLGyria6 1gFOo/a+zSJVA1BLQKaQV0obGB2gVZdXb7skyNOpICMRTq7ce2IhYgVy/wrg8Jn4iF3Z pkvw== X-Received: by 10.224.205.138 with SMTP id fq10mr148566qab.1.1369774757295; Tue, 28 May 2013 13:59:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.78 with SMTP id 14ls3686099qec.10.gmail; Tue, 28 May 2013 13:59:17 -0700 (PDT) X-Received: by 10.220.179.201 with SMTP id br9mr7541852vcb.42.1369774757049; Tue, 28 May 2013 13:59:17 -0700 (PDT) Received: from mail-vb0-x235.google.com (mail-vb0-x235.google.com [2607:f8b0:400c:c02::235]) by mx.google.com with ESMTPS id ha8si19651545vdb.61.2013.05.28.13.59.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 May 2013 13:59:17 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::235; Received: by mail-vb0-f53.google.com with SMTP id p13so4359154vbe.40 for ; Tue, 28 May 2013 13:59:17 -0700 (PDT) X-Received: by 10.220.10.212 with SMTP id q20mr6212988vcq.9.1369774756966; Tue, 28 May 2013 13:59:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp56753vcb; Tue, 28 May 2013 13:59:16 -0700 (PDT) X-Received: by 10.224.109.71 with SMTP id i7mr146754qap.80.1369774756136; Tue, 28 May 2013 13:59:16 -0700 (PDT) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [2607:f8b0:400d:c01::233]) by mx.google.com with ESMTPS id r2si5236867qcr.99.2013.05.28.13.59.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 May 2013 13:59:16 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400d:c01::233 is neither permitted nor denied by best guess record for domain of nicolas.pitre@linaro.org) client-ip=2607:f8b0:400d:c01::233; Received: by mail-qc0-f179.google.com with SMTP id e1so4388413qcx.10 for ; Tue, 28 May 2013 13:59:15 -0700 (PDT) X-Received: by 10.229.173.194 with SMTP id q2mr6455835qcz.73.1369774755769; Tue, 28 May 2013 13:59:15 -0700 (PDT) Received: from xanadu.home (modemcable044.209-83-70.mc.videotron.ca. [70.83.209.44]) by mx.google.com with ESMTPSA id oh9sm26976095qeb.5.2013.05.28.13.59.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 28 May 2013 13:59:15 -0700 (PDT) Date: Tue, 28 May 2013 16:59:13 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org cc: Shawn Guo , patches@linaro.org Subject: [PATCH] ARM: fix kernel decompressor compilation error with CONFIG_DEBUG_SEMIHOSTING Message-ID: User-Agent: Alpine 2.03 (LFD 1266 2009-07-14) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlWh1UGic2sQZwnZAwwnkomfdLvHoBmz+Bg5Svlfg6M2tPuHOJtfZo6vdCTVP0pdmceW9mO X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ... and add semihosting output support to the decompressor while at it. Signed-off-by: Nicolas Pitre Acked-by: Shawn Guo diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S index 6e8382d5b7..5392ee6333 100644 --- a/arch/arm/boot/compressed/debug.S +++ b/arch/arm/boot/compressed/debug.S @@ -1,6 +1,8 @@ #include #include +#ifndef CONFIG_DEBUG_SEMIHOSTING + #include CONFIG_DEBUG_LL_INCLUDE ENTRY(putc) @@ -10,3 +12,29 @@ ENTRY(putc) busyuart r3, r1 mov pc, lr ENDPROC(putc) + +#else + +ENTRY(putc) + adr r1, 1f + ldmia r1, {r2, r3} + add r2, r2, r1 + ldr r1, [r2, r3] + strb r0, [r1] + mov r0, #0x03 @ SYS_WRITEC + ARM( svc #0x123456 ) + THUMB( svc #0xab ) + mov pc, lr + .align 2 +1: .word _GLOBAL_OFFSET_TABLE_ - . + .word semi_writec_buf(GOT) +ENDPROC(putc) + + .bss + .global semi_writec_buf + .type semi_writec_buf, %object +semi_writec_buf: + .space 4 + .size semi_writec_buf, 4 + +#endif