From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbbETOUl (ORCPT ); Wed, 20 May 2015 10:20:41 -0400 Received: from www.linutronix.de ([62.245.132.108]:32932 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753853AbbETOUf (ORCPT ); Wed, 20 May 2015 10:20:35 -0400 Date: Wed, 20 May 2015 16:20:42 +0200 (CEST) From: Thomas Gleixner To: Viresh Kumar cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra Subject: Re: [PATCH 0/2] clockevents: Hide CLOCK_EVT_STATE_* from rest of the kernel In-Reply-To: <20150520140411.GB22904@linux> Message-ID: References: <20150520140411.GB22904@linux> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 May 2015, Viresh Kumar wrote: > So, probably we are left with following choices: > > - Maintain state internally within the driver. SMP cases need per-cpu > storage as clkevt devices are per-cpu. Probably that's a NONO as > well ? > > - Use CLK_EVT_STATE_* directly in drivers (similar to the way we use > CLK_EVT_MODE_* today). > > - Write the routines I proposed as macros or inline functions in > clockchips.h, and use them. Of course that wouldn't stop exposing > CLK_EVT_STATE_* to rest of the kernel. I don't think that there is anything wrong with letting drivers access it. We can make it a little bit harder to do it without accessor functions, like I did with the state in irq_data: state_use_accessors and have inline helpers to access it. That makes it simple to grep for abusers :) Thanks, tglx