From patchwork Sat Sep 10 04:49:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 4013 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C9BD523E54 for ; Sat, 10 Sep 2011 04:49:50 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id B4E6BA1849F for ; Sat, 10 Sep 2011 04:49:50 +0000 (UTC) Received: by fxd18 with SMTP id 18so4593237fxd.11 for ; Fri, 09 Sep 2011 21:49:50 -0700 (PDT) Received: by 10.223.47.67 with SMTP id m3mr526750faf.27.1315630190545; Fri, 09 Sep 2011 21:49:50 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs34150lab; Fri, 9 Sep 2011 21:49:50 -0700 (PDT) Received: by 10.150.212.12 with SMTP id k12mr2600978ybg.413.1315630189522; Fri, 09 Sep 2011 21:49:49 -0700 (PDT) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by mx.google.com with ESMTPS id e14si5850378yba.38.2011.09.09.21.49.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 09 Sep 2011 21:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.y.miao@gmail.com designates 209.85.213.178 as permitted sender) client-ip=209.85.213.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.y.miao@gmail.com designates 209.85.213.178 as permitted sender) smtp.mail=eric.y.miao@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by yxj19 with SMTP id 19so1834936yxj.37 for ; Fri, 09 Sep 2011 21:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=BVgUSru6oJSrf1LKOqXmVqcGLkCfQM3dgUvOlBsUlIo=; b=vg+u4TDcV9zCdD+b5LH94tYl7LpXczpfChcqI3nrFryKfFcbtRKuj94xcZpe2rJACu bypuS75vQ9tni2x937kN7eEm0WIgxdrIsUGBm2KxHPDc0P5PjU1kh26fq0bQbtk9wvQH 8kmvEXN/eJh8JJLecKfOacosK04C7xLfX/Wm0= Received: by 10.42.197.131 with SMTP id ek3mr1486728icb.478.1315630188464; Fri, 09 Sep 2011 21:49:48 -0700 (PDT) Received: from ycmiao-macbookpro.globalsuite.net ([12.139.69.140]) by mx.google.com with ESMTPS id o5sm10963946ibu.12.2011.09.09.21.49.47 (version=SSLv3 cipher=OTHER); Fri, 09 Sep 2011 21:49:47 -0700 (PDT) Sender: Eric Miao From: eric.miao@linaro.org To: Cc: linux-arm-kernel , Eric Miao Subject: [PATCH v2] ARM: make cpu_is_v6_unaligned() and safe_usermode() independent of CONFIG_PROC_FS Date: Fri, 9 Sep 2011 21:49:46 -0700 Message-Id: <1315630186-29654-1-git-send-email-eric.miao@linaro.org> X-Mailer: git-send-email 1.7.4.1 From: Eric Miao Signed-off-by: Eric Miao --- It turned out both cpu_is_v6_unaligned and safe_usermode() could be referenced without CONFIG_PROC_FS being defined. arch/arm/mm/alignment.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index cfbcf8b..c335c76 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c @@ -86,16 +86,6 @@ core_param(alignment, ai_usermode, int, 0600); #define UM_FIXUP (1 << 1) #define UM_SIGNAL (1 << 2) -#ifdef CONFIG_PROC_FS -static const char *usermode_action[] = { - "ignored", - "warn", - "fixup", - "fixup+warn", - "signal", - "signal+warn" -}; - /* Return true if and only if the ARMv6 unaligned access model is in use. */ static bool cpu_is_v6_unaligned(void) { @@ -123,6 +113,16 @@ static int safe_usermode(int new_usermode, bool warn) return new_usermode; } +#ifdef CONFIG_PROC_FS +static const char *usermode_action[] = { + "ignored", + "warn", + "fixup", + "fixup+warn", + "signal", + "signal+warn" +}; + static int alignment_proc_show(struct seq_file *m, void *v) { seq_printf(m, "User:\t\t%lu\n", ai_user);