Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp103688imj; Thu, 14 Feb 2019 16:18:33 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibyyh6//3vLE8wvHI+BWXRVquNNBty0QmjtHaFlxaP6+kOmGSvDv20cqXD324qCC7DNF5Bt X-Received: by 2002:a63:6cc8:: with SMTP id h191mr2486835pgc.366.1550189913662; Thu, 14 Feb 2019 16:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550189913; cv=none; d=google.com; s=arc-20160816; b=tBbK2VsM39dTigK1fu2R/IeIJQeuD5offN4/WSDkdZNPtk2CsQKAImVnt3SRHGIVM3 SndmHvP0SlPTVT0oKLSGnbJphUoZZcKxzF2f5xrpyL6qxGK1gV0gGEI1fWuUtN2OuFlp qlSUgJdH0xuGAsZGllnAuH3IBNq9ziZ6o+P350zrGUVA8dFoa0mBjEwz6YcLOYx9kBeE 5guojP7RyOEUjH9TV+Ch4C/JgSJnBcQd3aYH2FrHKnQHaAsWWxFBLO3IWuEdzQYrk5d1 TsHlmdTeemWDikyT78bc3pXv5MM+zBRgVDqoLe6n+zvEeaBQWXFyk6UHuBnkcZEqQyBT ReyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3Hwye1NlQfpROfiatGP4AAPQ8WZ+X3wpSFiN169P8MI=; b=YDcVCy+4E2Zy/Ii+9lkw1IkGRDkjXy0ZJD0YX8zSICLpJ4WYD1J/pKaO6hZ2MUZuZs SshcKADhhgQlJEGTjt2nUtXO7+h67fUnZVzasQK3DJ6bviQD8J7Cv5p8l16YhmKuiZwo /yIc6LiGfYUsO9I94zSPMgoGk5vr7xk2ksuUCPkHDO+Xcgn0RDJgM8KkNw+AYJAdSnz+ wTdWWzpEKgJ5+dwmc70DEdYSIl+gTB2rTIp5gF9G/m9VPomeDhqrrlkIMiXXmvFZEzce rRDQeRBRWeI62/7GO5bWDnMFK8re+B+gB4hdx154ktCCl2ppYsLyqLJiEpVF//VJti6E Y9/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=p3TAfOVk; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si3853989pgd.57.2019.02.14.16.18.17; Thu, 14 Feb 2019 16:18:33 -0800 (PST) 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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=p3TAfOVk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502006AbfBNOzG (ORCPT + 99 others); Thu, 14 Feb 2019 09:55:06 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34575 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439578AbfBNOxI (ORCPT ); Thu, 14 Feb 2019 09:53:08 -0500 Received: by mail-wr1-f65.google.com with SMTP id f14so6831731wrg.1 for ; Thu, 14 Feb 2019 06:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Hwye1NlQfpROfiatGP4AAPQ8WZ+X3wpSFiN169P8MI=; b=p3TAfOVkbiOaW5lFI5ffS8BiePv7lfLsTiJ0jg1d8hlUJPyWE+1ow1/4eiTVLV4HqV A6OnQPEzCwxxxsX1CD7l/SEEnz+DpAK7PbcWCGHtqMHPDhmof5rFfDf6Irw3wtvJYnH3 PAzl201jbV9t3JRfQR8Te6sncbcy9GY8Q8q1JPI00aje8EuWPdZ94ZvdJP5oPokaiMjC +FHJvZs2TrjAxRcInw+W1RfNq7//QLMxvBcN10zz9YtjHRyyJZ7QPtIXyUfiY/0D/7cd b3gdvA3+sk/NmWSfmQcWP9zdttPWYr5LMmhRFkGQFBXdfBjOM/9ZTvdOUzWPXvtG9IDA 3pfA== 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:mime-version:content-transfer-encoding; bh=3Hwye1NlQfpROfiatGP4AAPQ8WZ+X3wpSFiN169P8MI=; b=AI0KPwvassxjdQ2U9H8cedSbxfvhZwPihUKgo+qbT1Sz7a4kzcSxXnMvNarbrL8ix3 2zSmNm0MItUG7m4BQ6jMQXdRGjwwi4/FFjWf/mDPtX+hIrTj1ohVoF/7xAFvsqawyzRP tCDlSzkgycywhS6v1bn2JZoQxfrVEB3Uljyulg6O++qdgxuwANvBsZCx2P2keSjOmrca FCVYR6cQA0c7FesV4x40+YaKuWZdt7CWw2ztpPN69UrxMq768t3PpDGv+d2uGBj1CBgY +iaNTI8kE1BnG+E+by0VS4pgnOJbIkCwb0b+aSlcT9aCoJFzLgFZDnCI1idaXalxbHhh kOuQ== X-Gm-Message-State: AHQUAubrwOcPUk++uHJCilrzr8y+XIo+mzdujsYYG3vLuIi5qsF8Anfp Y7+t6CbjUPsBbrRa8npuUGiJkw== X-Received: by 2002:adf:c543:: with SMTP id s3mr285860wrf.192.1550155985925; Thu, 14 Feb 2019 06:53:05 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id y20sm4181005wra.51.2019.02.14.06.53.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 06:53:05 -0800 (PST) From: Bartosz Golaszewski To: Dmitry Torokhov , Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier , David Lechner Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v4 19/37] ARM: davinci: aintc: request memory region before remapping it Date: Thu, 14 Feb 2019 15:52:13 +0100 Message-Id: <20190214145231.8750-20-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190214145231.8750-1-brgl@bgdev.pl> References: <20190214145231.8750-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Add a missing call to request_mem_region() before calling ioremap() to make sure the region is not being used by anyone else. Signed-off-by: Bartosz Golaszewski --- arch/arm/mach-davinci/irq.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c index 2afaf19dc46c..2b6943731af9 100644 --- a/arch/arm/mach-davinci/irq.c +++ b/arch/arm/mach-davinci/irq.c @@ -86,9 +86,18 @@ davinci_aintc_handle_irq(struct pt_regs *regs) void __init davinci_aintc_init(const struct davinci_aintc_config *config) { unsigned int irq_off, reg_off, prio, shift; + void __iomem *req; int ret, irq_base; const u8 *prios; + req = request_mem_region(config->reg.start, + resource_size(&config->reg), + "davinci-cp-intc"); + if (!req) { + pr_err("%s: register range busy\n", __func__); + return; + } + davinci_aintc_base = ioremap(config->reg.start, resource_size(&config->reg)); if (!davinci_aintc_base) { -- 2.20.1