From patchwork Mon Oct 28 15:57:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 177946 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3576164ill; Mon, 28 Oct 2019 08:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSxHqei0QmEjeAOjY3mDc7fsUGHsL/ufwHaDPbl92yDFj5X1CmJbd7buzh71xp0X3MW09K X-Received: by 2002:a17:906:670c:: with SMTP id a12mr17145420ejp.273.1572278262563; Mon, 28 Oct 2019 08:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572278262; cv=none; d=google.com; s=arc-20160816; b=oYF9Nq7wN+QOVHw6UjaKaiKoYCp1Zc5mMwnjApzQu5NGfpMaqRIlSoze34veQzfTnC XJHoR+hz0eFjR2icSodFGbv3hfS4jd9Gx2DMM8IM1h7o9QmdX+CGF+PN/j/gi1KiR1H6 d42QXCiGvZuNiTQw9oavK0BCL8AR54IU6lyxMyi/1lXZIY8eS3LJGDprE38mtW/fKzML JFIlwR3YhCX7cKHQlv28Re2e5gfIxnI/7KUckz/d/HdHnVPqRnRbVLqmNbFV7k0TX9h3 ACbSD6aD2MkSVFLyhUs6I5M7/WNANGtDrNyXhlrBL2HpiRepL6N+RnY8n7863IrCyyQM m6RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=vl1oAr7RM/zca7FwT/vXMjuwpEGjQxC9D0ySoZ6dSQg=; b=E/GeBUc7LhxrjRwqQEQSYPvfYyltO8UjcIje23Wy+YLiKaXug1qitC9BIa9ACBQd62 4poFVpKRr7a1o36+b+zHC9+yuyhdvAsn6atHrZXHOqA8tLTSyOVzMEJPYo+INkDN4tpI wCSkJCqGY4/3D1I9Fsj7mM5LjeSio0o71lLsOJwmvzEFTq0eVw8kNmA01iSpOlfwDI3R lkGvq+qyxxdozDLX8HfjFEB9FMOfyB3SEIS6IE+Qjx8U1nK4aHTCWgFCY6J9bZEkACtG wyMucAtTSy6FCk9MtKlsdtsfxPkPzDC40AS7i4PcDJbmPVofPaCu1/fZHarNEQ/Pfjj3 wG/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rwx1pjEe; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si9117991edc.238.2019.10.28.08.57.42; Mon, 28 Oct 2019 08:57:42 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=rwx1pjEe; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390753AbfJ1P5c (ORCPT + 26 others); Mon, 28 Oct 2019 11:57:32 -0400 Received: from mail-pf1-f201.google.com ([209.85.210.201]:33377 "EHLO mail-pf1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730220AbfJ1P5b (ORCPT ); Mon, 28 Oct 2019 11:57:31 -0400 Received: by mail-pf1-f201.google.com with SMTP id z4so8869271pfn.0 for ; Mon, 28 Oct 2019 08:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=vl1oAr7RM/zca7FwT/vXMjuwpEGjQxC9D0ySoZ6dSQg=; b=rwx1pjEeHweipdLqJFc0f5AUWZAt8f6HXKzgo85WscfDfpxJvb0YoHuhVcrwDm/Y2K +j9mtodjaOIEYD8wniTDB2wvsC67omtrPVrl+aass6UblAf/IrU0nPkok+Y/zg4LYLWp 9A+UQLVPy7bHJBX8av35/sm9p+KV+5GMkLv70djWsjb00967Q9Qs1y7jyblGPK2+h3mh o2DYex0fmo7JSQn5aOlfvOiKm8EAOoaT6HFrbMKPssgQbz5uUOP+4IsJ3eDKyUUiwlHf oCkBDsYEROwNTcs5tUAd5qatUOz92rhtqKg3UAI1IVzpdOdd3w60mCa0kPsIhyzMEQOX 4ykA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=vl1oAr7RM/zca7FwT/vXMjuwpEGjQxC9D0ySoZ6dSQg=; b=PPSNl2R/NqUDV+ZGW2E1pxHNMy8umcbvqxzLv32D8i6IRjhFIqyvtLhXZqHkqjtDOP MLiGH7ZvWcMnLMsZHa6qHSb3pU5wWM1Sp4Dj1VfzeT+CugyJv3qhO1j2GVPp487sZB+p dBDGgwxrh1fp6awbl1EBL50lb7OkEvz80wa6Uy/fLBp35nbbtT/EDCROKMnBK9CWOdGM m3bETQ39BWcGEZfdXaYJMztTSs/RXA+auVNkL7MxCEA2AaH070dpHazcJgsIEij6mZC5 CPP1SJI1U7RoJVYwsn7kSjb9mJfGZ10AvB8fT/X1/kyL2eY9OYou8mo07ggUzQiA1JPb w79A== X-Gm-Message-State: APjAAAUzRHpG1S1oDCTQ3zDEqBA204GIOkFt9khFU6t/HY0lHeaWByEx krLxDdl/r/T4dkSW30stX4DsUHHZzx/2biWzGUY= X-Received: by 2002:a63:9a09:: with SMTP id o9mr21533674pge.276.1572278250647; Mon, 28 Oct 2019 08:57:30 -0700 (PDT) Date: Mon, 28 Oct 2019 08:57:21 -0700 Message-Id: <20191028155722.23419-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.24.0.rc0.303.g954a862665-goog Subject: [PATCH] hexagon: work around compiler crash From: Nick Desaulniers To: bcain@codeaurora.org Cc: Nick Desaulniers , Sid Manning , Allison Randal , Greg Kroah-Hartman , Richard Fontana , Thomas Gleixner , linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang cannot translate the string "r30" into a valid register yet. Link: https://github.com/ClangBuiltLinux/linux/issues/755 Suggested-by: Sid Manning Signed-off-by: Nick Desaulniers --- arch/hexagon/kernel/stacktrace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.24.0.rc0.303.g954a862665-goog Reviewed-by: Brian Cain diff --git a/arch/hexagon/kernel/stacktrace.c b/arch/hexagon/kernel/stacktrace.c index 35f29423fda8..5ed02f699479 100644 --- a/arch/hexagon/kernel/stacktrace.c +++ b/arch/hexagon/kernel/stacktrace.c @@ -11,8 +11,6 @@ #include #include -register unsigned long current_frame_pointer asm("r30"); - struct stackframe { unsigned long fp; unsigned long rets; @@ -30,7 +28,7 @@ void save_stack_trace(struct stack_trace *trace) low = (unsigned long)task_stack_page(current); high = low + THREAD_SIZE; - fp = current_frame_pointer; + fp = (unsigned long)__builtin_frame_address(0); while (fp >= low && fp <= (high - sizeof(*frame))) { frame = (struct stackframe *)fp;