From patchwork Wed Jan 24 18:10:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125699 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp581317ljf; Wed, 24 Jan 2018 10:14:18 -0800 (PST) X-Google-Smtp-Source: AH8x2271nvPfvAX1FrXsIm0fv9Hh1Kl1ItoadgW6LSwXX3ruyNoIpMunt98Azv8WLS/c2DqZ7Ikf X-Received: by 10.36.230.3 with SMTP id e3mr9363192ith.99.1516817658016; Wed, 24 Jan 2018 10:14:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516817658; cv=none; d=google.com; s=arc-20160816; b=zJ8nUDrgZHWY5nvdj0qRnaaksQtVS+SQ6GpmDLD8QLLIPB4voG2sGrJ/K+bpKSJRxW W+iv8rxr3nfthtlAVqzuaglZadhSvRCwztmpCgHFAxggwBZs/DFJrYZbH/x1aFb4aNh3 1Yx/K25aDzAPiqx6W1Gmn7qrl9ntsIMKVcmUVDTL09VHN4b3ye+batS0WAM/QwD+CKPz iDlAfy5GOi5mrDalJcDEoBb0sZl8J1kYqAdUcP9+KeR8SoeT35RlVau98BM1jDi5+fpB nLaVia+izV1l+xmXM/vffVkK9SjATbY7MMbih1BpZqCsirT4GSVYmyYfvWDzx1yQYGsb d8rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=glT/3Sev27juvX3wYqWMDDsnIrFi2KkkXa0pRhUQkug=; b=LfioJ9ag69Bda9luk47qA/mCuVMmRjOoc6H+qCB0GRta0t1hnzEQnHAC+luQVx0Q02 TcqabPc0FqvLri0s3lNimt1iSngOHhKLhB8tfhSFiWgpLQsdgcy/A9m5g9Ui0mQMT0Ka 6XrSNW4kSMf9804zgMZ78dUeIfjtoR62Maxh9//bEpHPULbcojANYVvx655PJu6m4FRV /+hZSf4bVCiytUlrcdXUXaT5L/g/WAg7cpApiuEYxQXrl7EM/F06hJUpCgWMR+CUMjYm iWnIKD444Y2ojjJ2/rLNlnBJKyVauh0Erh1xTDMdhUFShMSLnpQyF9M43ALun8CNFE/6 mWIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ki/zzG60; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 6si600497iob.240.2018.01.24.10.14.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 10:14:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ki/zzG60; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eePWm-0007gN-Rr; Wed, 24 Jan 2018 18:12:04 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eePWm-0007gA-6P for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 18:12:04 +0000 X-Inumbo-ID: 112a9af3-0132-11e8-ba59-bc764e045a96 Received: from mail-wm0-f66.google.com (unknown [74.125.82.66]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 112a9af3-0132-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 19:11:59 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id f3so10367018wmc.1 for ; Wed, 24 Jan 2018 10:12:02 -0800 (PST) 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=gb0NqHECGiC+hVQtsTKZBeRt9Mo7mH1xVxxCGnQ3c8I=; b=ki/zzG60BzvV1o1KRCVJyJrVJa+ysAPH36LadCXglyfYBn//8mCX/IE06zs7fJ6d7d EtGaZbgWeQGpnocOY8uZwwiHj9ZzpxmBoUfQcmk9huQfQwaJk26nY/DKBpx/XZWUxKGx a+UDss1EXjS1uq6KyyezqZhTWrfLBVwjnqtc8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gb0NqHECGiC+hVQtsTKZBeRt9Mo7mH1xVxxCGnQ3c8I=; b=s8ar4zAR+pgcf3+s59sdqW4VYvc8XKZW0EHmxpSPjJH1zMxvI91WvEIhuO24++Cv/Q 6+4BRtlQ0POe1xDRFwrArHl2MeJ0kdDDsf+tDEwbzB1S05p1AGKgNod45jzbBCl5QK8s WRXDgXC0unYWLmsY+eQrNtXQ//o6AYZNKN6svjs+5AHPpwC0aX0ewKhQO6tdZ4SCG8b9 s1a5MDxU4a3ga3GMY4M+06eVzyCZpMSiP89vTuV1kFDS45moV1th+6FY7mSslimxJpzF 8wIkK6GtHLakuX6xx9m2uDW8cN/h0LXJwMVTNpE4RHC4/o7wfcKM7GrQYKAG61+s4yd5 SOgA== X-Gm-Message-State: AKwxytfzRNuRPd0rBqn+fWNJLmqolS/MZZ+RW6Vi4GSJhiJ80Bh/k7Rz VGJ7NzabZv/SMb42COG7Fapz4EbBw+o= X-Received: by 10.28.20.8 with SMTP id 8mr5296562wmu.106.1516817461675; Wed, 24 Jan 2018 10:11:01 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id r68sm899379wmd.47.2018.01.24.10.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 10:11:01 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Wed, 24 Jan 2018 18:10:58 +0000 Message-Id: <20180124181058.6157-9-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180124181058.6157-1-andre.przywara@linaro.org> References: <20180124181058.6157-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v3 8/8] ARM: make nr_irqs a constant X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On ARM the maximum number of IRQs is a constant, but we share it being a variable to match x86. Since we are not supposed to alter it, let's mark it as "const" to avoid accidental change. Suggested-by: Julien Grall Signed-off-by: Andre Przywara Acked-by: Julien Grall --- xen/arch/arm/irq.c | 2 +- xen/include/asm-arm/irq.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index 62103a20e3..d229cb6871 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -27,7 +27,7 @@ #include #include -unsigned int __read_mostly nr_irqs = NR_IRQS; +const unsigned int __read_mostly nr_irqs = NR_IRQS; static unsigned int local_irqs_type[NR_LOCAL_IRQS]; static DEFINE_SPINLOCK(local_irqs_type_lock); diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h index 0d110ecb08..9d55e9b122 100644 --- a/xen/include/asm-arm/irq.h +++ b/xen/include/asm-arm/irq.h @@ -34,7 +34,7 @@ struct arch_irq_desc { /* This is a spurious interrupt ID which never makes it into the GIC code. */ #define INVALID_IRQ 1023 -extern unsigned int nr_irqs; +extern const unsigned int nr_irqs; #define nr_static_irqs NR_IRQS #define arch_hwdom_irqs(domid) NR_IRQS