From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A3101E9B0D for ; Wed, 18 Dec 2024 14:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734532694; cv=none; b=tanRI9j+lV42XsVKKLUOKvCIXGS4kAbAybcmHP5g3bvZx/UMIGvJmctINVmi043XaNNlxOUhExFqeWohcrkd4okBO4is5VDHLxoLXcZaEQrxSfe8caA2iagK8FnZQ+YVREwmINaCR4KS8m8y2PBBExhV+zau/ga2FJ0TxUmIW04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734532694; c=relaxed/simple; bh=1reKVDfr1mOGKGQD71+NlPRXqgpOEBkEDjuhK16R16U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TSnZCp4nUFF+bL4lWE8WXBBa2Mt5Q+dlc8dnV4QnAtt/GLrm6oBGusZHM1dm+D+Uz1vXnqw4Ta6Tb5oGbcBz45bYR4SYaJD4mSJc6ksR0JvMrtGzUubfanc7GRERG+7u9yb49n53YAYZzAFMC4sd/d4wkF3z2n+5SngExO73H/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Kb3agPgc; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Kb3agPgc" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4361e89b6daso46395255e9.3 for ; Wed, 18 Dec 2024 06:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734532689; x=1735137489; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HghZUTdW0XXbFLWN1muFrcSsQ1ZihgfgslndjD0QVzU=; b=Kb3agPgchlveCZkePep8dJvp57M/lgwTlucVF2Qcc2HRstLMj4fhVdvqtMCHbw9lxK CfFPfkiwBSwoIa3ulhkEym74aXrILIVbcXVH8lgt2x6/kehOIUscpgEzG+CLf6wGoDSB IrAhXSGZTjO54mcvA5Nm9cDro6J+/YFzCcF70nTfwsGdvEMB6L7wMI+6nxBv6BR630kj WtoJZdzbA2Kg0KS+czomZm96CAC3vCPg8Nmj8OqJXUGw4BAZUt5uQ8paWRDkzGKYzdOi Tw455iuQhYZOuBaz34cH/7v5Go229ZVr5qDC3qOR1F+nxz8zMeYvBKaKIjGSwNdmI+qQ ZTlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734532689; x=1735137489; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HghZUTdW0XXbFLWN1muFrcSsQ1ZihgfgslndjD0QVzU=; b=QN9cps+w0lsitQQtBnLJhF3XMNXXJfRy98KydGfJ31A4khN+T9HSOFU5RWHDUIxX5J Ql6DZr4XyeovUTneJJxCvCgUq4gUVtMh0hhL+bgk8MMbWCK+A3grYkVqpT4LDQI77Kit mmJJK1Pc5Wt2OcXXJ6ZZkuKDZ+Ufm3DqPNqX6tiB19JuvvnQESg25Z/zn4AT1scvNaXd UPISzlLSjLAIOARaLfz/oE8ilmCMDN2fO16djVfchjVz+pHT3WUM24ar68ZjnY2ZjD6A 8yz0dFhTWsrbT1/XbOD7rdNX0LDQ6XMowK12nELiWcXq/IeuUePdS8TzG0oaiX4sXGbe banQ== X-Forwarded-Encrypted: i=1; AJvYcCWYhNYcGvdMmJNOKQpnwOnnCqdFsrMDjYiwyTpl3P0MBMhd7GPQvh2xF5P7g2cyP19qDpZvA0ku7ps2c+0=@vger.kernel.org X-Gm-Message-State: AOJu0Yzr8YHHc2UIGX9WjMaBSQZP62hrWhHY14Wgt86a4RxMAs1mbiD3 amW/5O0DsZVDmueqZXgE74KbAWtyBI7dL2wdNpk2d0Cf1hqcqYmEhLACUUhURIY= X-Gm-Gg: ASbGnctNCIW8EczI134Leq8GB7yLBfkzIVImV9JTtqg0nlE0FMlJj15so3E3LRGkWBd mjiE6B8TWyK72ZwTJFMAqT3SCsBRM+xVVXdAvkbfSfH75QATucK08B53aF4XDYe8ovtpDQT1E8y PSsfrKv1Yu/Ta7+WTL28cQGJa/ncHnAIgWlOKoQMQqyoy5tyVmAKww6gzgehiQ9xaTLweRFKCuS pln2D8440d/gBeJAQvuO8Pxf9Y/V/9ZSMuO0nnfY0AohKqoTvgeqY18szS0XiZLyvQ= X-Google-Smtp-Source: AGHT+IF+yf8lOXI6vWUd8PEcKXkFdISeBDrUKk8fn98+vBPawVSHM5et30l0PCEbj2o6tGQL7Xglig== X-Received: by 2002:a05:600c:4586:b0:436:1c04:aa9a with SMTP id 5b1f17b1804b1-43655370395mr29857435e9.14.1734532689484; Wed, 18 Dec 2024 06:38:09 -0800 (PST) Received: from [192.168.68.163] ([145.224.66.247]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c804a34fsm14393947f8f.76.2024.12.18.06.38.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Dec 2024 06:38:08 -0800 (PST) Message-ID: <7a370fb3-f5eb-4d6a-a42d-b43960efb930@linaro.org> Date: Wed, 18 Dec 2024 14:38:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/9] coresight: change some driver' spinlock type to raw_spinlock_t To: Mike Leach , Yeoreum Yun Cc: suzuki.poulose@arm.com, alexander.shishkin@linux.intel.com, bigeasy@linutronix.de, clrkwllms@kernel.org, rostedt@goodmis.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev, nd@arm.com References: <20241203114942.697188-1-yeoreum.yun@arm.com> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 18/12/2024 1:44 pm, Mike Leach wrote: > This change seems to omit devices: > > etm3x - which provides support for ETMv3 and PTM, both of which are > valid trace sources in the cs_etm handling code. > stm - can be integrated into the kernel STM via configfs providing a > MIPI source for ftrace. > > Mike > Isn't ETMv3 32 bit only? arm32 is still missing ARCH_SUPPORTS_RT so we could technically leave the spinlocks as is. It might be better to update them anyway though or add !PREEMPT_RT to CONFIG_CORESIGHT_SOURCE_ETM3X. > On Tue, 3 Dec 2024 at 11:49, Yeoreum Yun wrote: >> >> In some coresight drivers, drvdata->spinlock can be held during __schedule() >> by perf_event_task_sched_out()/in(). >> >> Since drvdata->spinlock type is spinlock_t and >> perf_event_task_sched_out()/in() is called after acquiring rq_lock, >> which is raw_spinlock_t (an unsleepable lock), >> this poses an issue in PREEMPT_RT kernel where spinlock_t is sleepable. >> >> To address this,change type drvdata->spinlock in some coresight drivers, >> which can be called by perf_event_task_sched_out()/in(), >> from spinlock_t to raw_spinlock_t. >> >> Reviewed-by: James Clark >> >> v1 to v2: >> - seperate patchsets to change locktype and apply gurad API. >> >> Levi Yun (9): >> coresight: change coresight_device lock type to raw_spinlock_t >> coresight-etm4x: change etmv4_drvdata spinlock type to raw_spinlock_t >> coresight: change coresight_trace_id_map's lock type to raw_spinlock_t >> coresight-cti: change cti_drvdata spinlock's type to raw_spinlock_t >> coresight-etb10: change etb_drvdata spinlock's type to raw_spinlock_t >> coresight-funnel: change funnel_drvdata spinlock's type to >> raw_spinlock_t >> coresight-replicator: change replicator_drvdata spinlock's type to >> raw_spinlock_t >> coresight-tmc: change tmc_drvdata spinlock's type to raw_spinlock_t >> coresight/ultrasoc: change cti_drvdata spinlock's type to >> raw_spinlock_t >> >> .../hwtracing/coresight/coresight-config.c | 21 +- >> .../hwtracing/coresight/coresight-config.h | 2 +- >> drivers/hwtracing/coresight/coresight-core.c | 2 +- >> .../hwtracing/coresight/coresight-cti-core.c | 65 +- >> .../hwtracing/coresight/coresight-cti-sysfs.c | 135 +++-- >> drivers/hwtracing/coresight/coresight-cti.h | 2 +- >> drivers/hwtracing/coresight/coresight-etb10.c | 62 +- >> .../coresight/coresight-etm4x-core.c | 71 ++- >> .../coresight/coresight-etm4x-sysfs.c | 566 +++++++++--------- >> drivers/hwtracing/coresight/coresight-etm4x.h | 2 +- >> .../hwtracing/coresight/coresight-funnel.c | 34 +- >> .../coresight/coresight-replicator.c | 36 +- >> .../hwtracing/coresight/coresight-syscfg.c | 75 ++- >> .../hwtracing/coresight/coresight-tmc-core.c | 9 +- >> .../hwtracing/coresight/coresight-tmc-etf.c | 195 +++--- >> .../hwtracing/coresight/coresight-tmc-etr.c | 199 +++--- >> drivers/hwtracing/coresight/coresight-tmc.h | 2 +- >> .../hwtracing/coresight/coresight-trace-id.c | 93 ++- >> drivers/hwtracing/coresight/ultrasoc-smb.c | 12 +- >> drivers/hwtracing/coresight/ultrasoc-smb.h | 2 +- >> include/linux/coresight.h | 4 +- >> 21 files changed, 751 insertions(+), 838 deletions(-) >> >> -- >> LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7} >> > >