From patchwork Wed Aug 31 11:05:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 75077 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp271965qga; Wed, 31 Aug 2016 04:08:08 -0700 (PDT) X-Received: by 10.66.138.108 with SMTP id qp12mr15590270pab.65.1472641688054; Wed, 31 Aug 2016 04:08:08 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id q75si50525102pfi.216.2016.08.31.04.08.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2016 04:08:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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 1bf3MG-0000VX-7k; Wed, 31 Aug 2016 11:07:04 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bf3LD-0008Hp-Hx for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2016 11:06:01 +0000 Received: by mail-wm0-x230.google.com with SMTP id w2so25731331wmd.0 for ; Wed, 31 Aug 2016 04:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ai5wcZQrqffTHjGcfXwhWGsRXxr+VtgeSM75aFpjmnc=; b=Cv/IXLx1ZBZEjuBloAxlri+RXYOf47soexpY66g2XYoam3t5Y7PkBjpV+uWgTnhvmb Hdongl3ye4LwQuweYSjDQsZCoHmPmSPtH3dslteqFPrzKztId/2Ycd2ghF8jaOkSPsEk KZ+fsMsZ3s5H7RiintT+gQ2FHKmsZbUP/yxjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ai5wcZQrqffTHjGcfXwhWGsRXxr+VtgeSM75aFpjmnc=; b=WDDTUPGhTKAfrz8WUvXCdyBA1kqJc+llXZOa42nid/m9Rj2cXfRSQeEEi4t0DPmEo/ 9rZ/6qtxgRe83flawl9vuKotGZvXPQ+k1Cm6jePhzT7AA++1b61y9IJHN6o0pkfcQJum awhzV8bNVFiT0wY/4O7HyeNZQd5ejdwSuQTaBg2zt9hEhQWOm8DpF/u5wAwcIWmUKR2L b8BHIVevZYouSQFIjMovPMSWBkWVNJIr511ypdVCgx8n+sdZ34V6+kbZPzIUTJBNw0a5 8ntqY2GYCJcbQew4TZoy1Jgon8H0iMClRVo0rPpvM0gjmiWoTpOfgBB5gl0TY+u44+kV SmiA== X-Gm-Message-State: AE9vXwMcpMXAYM/PuFNOKTb1gWYhLYWstcqVcEjYy5YOMopU7Em+k6UHI/TKMIPqqiad5LPr X-Received: by 10.194.135.147 with SMTP id ps19mr8507362wjb.6.1472641541123; Wed, 31 Aug 2016 04:05:41 -0700 (PDT) Received: from localhost.localdomain ([160.169.158.74]) by smtp.gmail.com with ESMTPSA id jq5sm44052154wjc.20.2016.08.31.04.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Aug 2016 04:05:40 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com Subject: [PATCH v3 7/7] arm64: head.S: document the use of callee saved registers Date: Wed, 31 Aug 2016 12:05:17 +0100 Message-Id: <1472641517-15362-8-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472641517-15362-1-git-send-email-ard.biesheuvel@linaro.org> References: <1472641517-15362-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160831_040559_973060_0E6EC833 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:230 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: mark.rutland@arm.com, catalin.marinas@arm.com, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Now that the only remaining occurrences of the use of callee saved registers are on the primary boot path, add a comment to the code which register is used for what. Reviewed-by: Mark Rutland Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 29a734ee0770..427f6d3f084c 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -208,6 +208,16 @@ efi_header_end: __INIT + /* + * The following callee saved general purpose registers are used on the + * primary lowlevel boot path: + * + * Register Scope Purpose + * x21 stext() .. start_kernel() FDT pointer passed at boot in x0 + * x23 stext() .. start_kernel() physical misalignment/KASLR offset + * x28 __create_page_tables() callee preserved temp register + * x19/x20 __primary_switch() callee preserved temp registers + */ ENTRY(stext) bl preserve_boot_args bl el2_setup // Drop to EL1, w0=cpu_boot_mode