From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9693E3090C2 for ; Tue, 11 Aug 2026 17:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786470308; cv=none; b=G/t0CPBpWILq3nbzGQnA+McHS2S88+vQuPz1HC6Aw9/scIa2I8KA0JjGFUGclSMkTqaPxdBGFzvauVV/jgqatNvyeTCQVfNbbwj91ovOxS+cs06oEFeSDSNHdP0Na4+AxaaNke/wNlis08C7Ze4RT68Lke4zrZhFLbnT5Rl51Qg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786470308; c=relaxed/simple; bh=cWEo8FsNzwLULwn2CFxYiVChwvARplzxVV5XI4k/OPg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X/r8PlK24ChxX+QE80NmLwVyJHOR7v2RSx39q/PahcPieD3Ne1DutVXTtDm3nLt/FsydMC8cjdGzlj5IyBEc4HV51yrxHlvY9VM/sMAYdHVqLT/6Qj9WeN0CKsPKLDejbv5y81G4L3nw2UrLPsl9IVlVs0fo9ojdxuq5lQ0MvZg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=s6V6YhrJ; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="s6V6YhrJ" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19C1F14BF; Tue, 11 Aug 2026 10:45:02 -0700 (PDT) Received: from localhost (unknown [10.2.196.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ABDC43F632; Tue, 11 Aug 2026 10:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1786470306; bh=cWEo8FsNzwLULwn2CFxYiVChwvARplzxVV5XI4k/OPg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s6V6YhrJ9xWdpWCqKS7Hk+J6g9gSWhaIuT8KA8d9MEtlqEAh5NIL/FNtwx7ibhEYv RqXrUECESPn/Wf9amRg6bD9D+jEA3PqnUsEkUJNSUFwwIPZwngaeh3ty74yyXPSkMW 5Wisd02iv6JLR2HgIfNDGIR9KnvDbSY7hW6crRiA= Date: Tue, 11 Aug 2026 18:45:03 +0100 From: Leo Yan To: Yeoreum Yun Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, suzuki.poulose@arm.com, mike.leach@arm.com, james.clark@linaro.org, alexander.shishkin@linux.intel.com, jie.gan@oss.qualcomm.com Subject: Re: [PATCH v9 04/13] coresight: etm4x: fix inconsistencies with sysfs configuration Message-ID: <20260811174503.GJ15499@e132581.arm.com> References: <20260725113645.57519-1-yeoreum.yun@arm.com> <20260725113645.57519-5-yeoreum.yun@arm.com> <20260811154521.GF15499@e132581.arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Aug 11, 2026 at 05:56:19PM +0100, Yeoreum Yun wrote: [...] > > Can we treat this as a refactoring instead and split it into at least > > two patches? This would make it easier to review now and easier to > > understand later if someone will read the changes. > > > > - Lock refactoring > > - SMP call refactoring > > - active_config refactoring > > It couldn't since separation of Lock and SMP can introduce the bug for > that patch. and the Lock and SMP call refactoring isn't meaningful > without active_config. Each time I read through this patch, I find it a bit difficult to follow the overall logic, as it combines several changes together. I have no strong opinion for this though. Perhaps we could split out the support for a NULL feat_csdev->drv_spinlock into a separate change first, as that seems independent and should not introduce regression. > > > +#define feat_csdev_lock(feat_csdev, flags) \ > > > > Could use inline here? > > > > static inline void feat_csdev_lock_irqsave(..., unsigned long *flags) > > { > > ... > > } > > I think this is much annyoing. since the deference might add more > instruction to save the flags. Otherwise the typecheck is for > compilet-time check and not for runtime. > > So, it would be better to remain as-is. An inline function provides stronger type checking at the API boundary. It is readable and easier to maintain. Dereferencing *flags would be fine, as this is not a hot path. I was inspired by the implementation in include/linux/serial_core.h (see uart_port_lock_irqsave() and uart_port_unlock_irqrestore()). Thanks, Leo