From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8D7CC433F5 for ; Wed, 8 Dec 2021 07:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UVspYAauu6dYej/Uhof8x7BZScPjGZ+MQt0SSIbAV0I=; b=bvAkmh5yVVumVv MNZFYGVeQM7jttLbPGyx63nl2Ndeulj7pVeJufMWQfu+sSKV3Xh7dmd9Q0HY+aC5t4rlSaio5IlI+ uhnwURp8YiMCd/cscyHHFhkyw6vTrlpVij0Imxu4u/vJm6awD2uvbJQDbY4PAVg+6yLK8z76JFg43 Jr5H/0t5qC/71d0Mgks5dUHakqUvTnsrlRnbDHH7camAEhcyjxyO4OyQzU5caaEJHWFxHbtlbaBnu uysJHmM306saTIoBKCoZ/aYCZhfx7t6P5nki2b40zzy7BPWWrwSdyjV3nzJNMIu6ySuegusdtJLrm m+QkW5gwnTLNifCPbecg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muqwE-00BW1p-09; Wed, 08 Dec 2021 07:00:26 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muqw8-00BW11-WC for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 07:00:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 748C7B81691; Wed, 8 Dec 2021 07:00:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DE28C00446; Wed, 8 Dec 2021 07:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638946818; bh=Zo58PVhiAUB7WB93jNy6jtP1aFNBJALKU2W846/Rl1M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZcNvoAeQS8zNbQTu9LT03ABs+QaZ5hQBQbes9DRkHueVIBd7OvkspMkX8tIQEfTJz aZ2NUkBCopYxBoJ9GzfVbZYQDLFKuzY9Mn0qkqUFmh9jYz+BzX/TsEOiTBR/1SQIJY Tjlhj15LRpL8QVKAljZds4bM5Z5cXtdU9aWysvaU= Date: Wed, 8 Dec 2021 08:00:09 +0100 From: Greg Kroah-Hartman To: Sai Prakash Ranjan Cc: Jiri Slaby , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, quic_eberman@quicinc.com, quic_tsoni@quicinc.com, Shanker Donthineni , Adam Wallis , Timur Tabi , Elliot Berman Subject: Re: [RESEND PATCHv2] tty: hvc: dcc: Bind driver to core0 for reads and writes Message-ID: References: <20211208063847.27174-1-quic_saipraka@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211208063847.27174-1-quic_saipraka@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_230021_349094_82440B70 X-CRM114-Status: GOOD ( 24.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 08, 2021 at 12:08:47PM +0530, Sai Prakash Ranjan wrote: > From: Shanker Donthineni > > Some debuggers, such as Trace32 from Lauterbach GmbH, do not handle > reads/writes from/to DCC on secondary cores. Each core has its > own DCC device registers, so when a core reads or writes from/to DCC, > it only accesses its own DCC device. Since kernel code can run on > any core, every time the kernel wants to write to the console, it > might write to a different DCC. > > In SMP mode, Trace32 creates multiple windows, and each window shows > the DCC output only from that core's DCC. The result is that console > output is either lost or scattered across windows. > > Selecting this option will enable code that serializes all console > input and output to core 0. The DCC driver will create input and > output FIFOs that all cores will use. Reads and writes from/to DCC > are handled by a workqueue that runs only core 0. > > Link: https://lore.kernel.org/lkml/1435344756-20901-1-git-send-email-timur@codeaurora.org/ > Signed-off-by: Shanker Donthineni > Acked-by: Adam Wallis > Signed-off-by: Timur Tabi > Signed-off-by: Elliot Berman > Signed-off-by: Sai Prakash Ranjan > --- > > Resending this v2 since earlier one had a typo in the variable type. > > Changes in v2: > * Checkpatch warning fixes. > * Use of IS_ENABLED macros instead of ifdefs. > > I also thought of making it depends on !HOTPLUG_CPU since it is broken > in case core0 is hotplugged off, but apparently HOTPLUG_CPU kconfig > has weird dependency issues, i.e., gets selected by CONFIG_PM and others. > So it will be almost like this feature won't be selectable at all if > I add !HOTPLUG_CPU kconfig dependency. Also HVC_DCC is a debug feature > where we need Trace32 like tools to access DCC windows in which case > these shortcomings can be expected since manual intervention is required > anyways for attaching a core to Trace32, so it won't matter much. But your code will break on systems when cpu 0 goes away, so this isn't going to work well at all. Please make this work for any cpu or handle the case when the cpu it is running on goes away. Also, this REALLY looks like you are trying to fix the kernel for a crazy userspace program. Why not fix the userspace program instead? Isn't that easier and then that way it will work for any kernel version? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel