From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966364AbaFTTcI (ORCPT ); Fri, 20 Jun 2014 15:32:08 -0400 Received: from qmta15.emeryville.ca.mail.comcast.net ([76.96.27.228]:45239 "EHLO qmta15.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754662AbaFTTcD (ORCPT ); Fri, 20 Jun 2014 15:32:03 -0400 Message-Id: <20140620193126.630055484@linux.com> Date: Fri, 20 Jun 2014 14:31:30 -0500 From: Christoph Lameter To: Tejun Heo Cc: akpm@linuxfoundation.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , nicolas.pitre@linaro.org, Russell King Subject: [PATCH 15/31] irqchips: Replace __this_cpu_ptr uses References: <20140620193115.547427118@linux.com> Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=this_irqchip Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ARM specific] These are generally replaced with raw_cpu_ptr. However, in gic_get_percpu_base() we immediately dereference the pointer. This is equivalent to a raw_cpu_read. So use that operation there. Cc: nicolas.pitre@linaro.org Cc: Russell King Signed-off-by: Christoph Lameter Index: linux/drivers/irqchip/irq-gic.c =================================================================== --- linux.orig/drivers/irqchip/irq-gic.c 2014-06-16 09:14:29.772747511 -0500 +++ linux/drivers/irqchip/irq-gic.c 2014-06-16 09:14:29.768747590 -0500 @@ -102,7 +102,7 @@ #ifdef CONFIG_GIC_NON_BANKED static void __iomem *gic_get_percpu_base(union gic_base *base) { - return *__this_cpu_ptr(base->percpu_base); + return raw_cpu_read(base->percpu_base); } static void __iomem *gic_get_common_base(union gic_base *base) @@ -556,11 +556,11 @@ if (!dist_base || !cpu_base) return; - ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); + ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); for (i = 0; i < DIV_ROUND_UP(32, 32); i++) ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4); - ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); + ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); for (i = 0; i < DIV_ROUND_UP(32, 16); i++) ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4); @@ -582,11 +582,11 @@ if (!dist_base || !cpu_base) return; - ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); + ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_enable); for (i = 0; i < DIV_ROUND_UP(32, 32); i++) writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4); - ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); + ptr = raw_cpu_ptr(gic_data[gic_nr].saved_ppi_conf); for (i = 0; i < DIV_ROUND_UP(32, 16); i++) writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4); Index: linux/kernel/irq/chip.c =================================================================== --- linux.orig/kernel/irq/chip.c 2014-06-16 09:14:29.772747511 -0500 +++ linux/kernel/irq/chip.c 2014-06-16 09:14:29.768747590 -0500 @@ -669,7 +669,7 @@ { struct irq_chip *chip = irq_desc_get_chip(desc); struct irqaction *action = desc->action; - void *dev_id = __this_cpu_ptr(action->percpu_dev_id); + void *dev_id = raw_cpu_ptr(action->percpu_dev_id); irqreturn_t res; kstat_incr_irqs_this_cpu(irq, desc);