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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23EB7C4332D for ; Sun, 7 Mar 2021 20:00:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E513565130 for ; Sun, 7 Mar 2021 20:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232768AbhCGTvn (ORCPT ); Sun, 7 Mar 2021 14:51:43 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:56878 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232744AbhCGTvO (ORCPT ); Sun, 7 Mar 2021 14:51:14 -0500 Received: from mail-wm1-f72.google.com ([209.85.128.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lIzQg-0001jF-DE for linux-kernel@vger.kernel.org; Sun, 07 Mar 2021 19:51:06 +0000 Received: by mail-wm1-f72.google.com with SMTP id o9so1132629wmq.9 for ; Sun, 07 Mar 2021 11:51:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kfxTFWpE+U1s7RCH9bz3J8B1Q2nmRmVCf8INgvhDrDk=; b=Y/w9g9aLPLD9DzoMNwPnzjiGZ8rpMCKrB5Mi6TVtmmHgHf8s9ImCjb0o3hrhMQxyio Lw3CKX+fnE6IIGNtkcT4tN+M6eBJZQcE4vfdttugHi5eWObXl1DroWOX54H4WKOGx3Ft ZxOxJAKUxTv/cA66kk/6WBGIf7nxjz21zFF42cgV8153UBxzYex4bIwW7QcO6Hg+B6NQ i0hiH9p06Xu3rcYvrfSP5GciCtSE2NjATsSRg3K/c/zQCTEVnzP5qFNwDOkOuYldORfZ SNpd6ePrtu+1Dojcfn/ApKz3/6af8x4Ap93s9szaGCosv/10C6qO5r60ANaGi16Kq9CB hNbA== X-Gm-Message-State: AOAM531h8epZRuJr9vnTdZoGMsxHfTdFT9YNUekWsCUXymhjX5XnYGCo gu8p2sBP+Fa2j/MCQl70x0b/uCZEiANUAppy0B/NfseLWqIwYFnJhiXP0m6dtg6jLl/56PgEFuO D4YMLa6VGt1CC8rbBUAAOXOU+LFy/wgA2qFi+tWI5mw== X-Received: by 2002:a1c:df8a:: with SMTP id w132mr18775265wmg.53.1615146665649; Sun, 07 Mar 2021 11:51:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwffZzLs3PiQ9TeAhZa+zD26CO9uqpWEoQh7UlJniVKzU7h8Kyv9yC8ZT05jpfXr7Q8PQWSPQ== X-Received: by 2002:a1c:df8a:: with SMTP id w132mr18775242wmg.53.1615146665465; Sun, 07 Mar 2021 11:51:05 -0800 (PST) Received: from [192.168.1.116] (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.gmail.com with ESMTPSA id h6sm10016643wmi.6.2021.03.07.11.51.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Mar 2021 11:51:04 -0800 (PST) Subject: Re: [RFT PATCH v3 21/27] tty: serial: samsung_tty: IRQ rework To: Arnd Bergmann Cc: Hector Martin , Andy Shevchenko , linux-arm Mailing List , Marc Zyngier , Rob Herring , Olof Johansson , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , devicetree , "open list:SERIAL DRIVERS" , Linux Documentation List , Linux Samsung SOC , Linux-Arch , Linux Kernel Mailing List References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-22-marcan@marcan.st> <535ff48e-160e-4ba4-23ac-54e478a2f3ee@marcan.st> <05ccc09f-ffea-71cd-4288-beed3020bd45@marcan.st> From: Krzysztof Kozlowski Message-ID: <20a8ce3e-bffa-4fc0-1f1d-185c04be8d9f@canonical.com> Date: Sun, 7 Mar 2021 20:51:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2021 17:01, Arnd Bergmann wrote: > On Sun, Mar 7, 2021 at 12:34 PM Krzysztof Kozlowski > wrote: >> On 05/03/2021 17:29, Hector Martin wrote: >>> On 06/03/2021 01.20, Andy Shevchenko wrote: >>>>> I am just splitting an >>>>> existing function into two, where one takes the lock and the other does >>>>> the work. Do you mean using a different locking function? I'm not >>>>> entirely sure what you're suggesting. >>>> >>>> Yes, as a prerequisite >>>> >>>> spin_lock_irqsave -> spin_lock(). >>> >>> Krzysztof, is this something you want in this series? I was trying to >>> avoid logic changes to the non-Apple paths. >> >> I don't quite get the need for such change (the code will be still >> called in interrupt handler, right?), but assuming the "why?" is >> properly documented, it can be a separate patch here. > > This is only for readability: the common rule is to not disable > interrupts when they are already disabled, so a reader might wonder > if this instance of the handler is special in some case that it might > be called with interrupts enabled. > > There is also a small overhead in accessing the global irq mask > register on some architectures, but for a uart that does not make > any difference of course. > > While I'm generally in favor of that kind of cleanup, I'd also > prefer to leave it out of this series -- once you get into details > like this the series gets harder to review. So it's only about the spinlock in the IRQ handler (which does not need to disable the IRQs). Makes sense but not related at all to the topic of bringing up Apple M1, therefore should not stop the review/merging. Best regards, Krzysztof 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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C89C433E0 for ; Sun, 7 Mar 2021 19:53:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B78865048 for ; Sun, 7 Mar 2021 19:53:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B78865048 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QGoXKnXGnfZKDdqX0D1j5ohh3SWuRefjeAQnEaUeE14=; b=pBOEluFmu3FBM7PX5gWGj1KOg E5sORi+ufAU14qTH3OU2XPmaCnTVgXMFHLIJFcQdz3viLT2fZrpsmSgrldXUH7m6VIDJ8qFzShcBq 6NHVZ9cc1nHeYOZOTJi4I6WkKEP0aA2UTyw6HBclmp1Tlb0xSQbuEKraficxE5hIh9nKRJ7dblQoR nTln0zE8dKU9JyXpeL+wPE5vhmIBiYHlNpEg/OWozrjVALpJD7PQhFRqnD94WkbPGYjh4G0V89UBS CVPOMLwNFOmJxKGYsNuQ78SEjkPWjd81dFWKJOQVdZaQdWndsrU0hpktv12odnuqZ2Dn9bYNWCuNl zr2YTv6Sg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIzQm-00C8Ov-C4; Sun, 07 Mar 2021 19:51:12 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIzQh-00C8MY-PH for linux-arm-kernel@lists.infradead.org; Sun, 07 Mar 2021 19:51:09 +0000 Received: from mail-wm1-f70.google.com ([209.85.128.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lIzQf-0001iu-R5 for linux-arm-kernel@lists.infradead.org; Sun, 07 Mar 2021 19:51:05 +0000 Received: by mail-wm1-f70.google.com with SMTP id v5so3783613wml.9 for ; Sun, 07 Mar 2021 11:51:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kfxTFWpE+U1s7RCH9bz3J8B1Q2nmRmVCf8INgvhDrDk=; b=fBGJsTCY++xNmitBZfyHcFh8AmWdSLcYxs0qzI7VG7qn+G5cOVAfiOkih9JZ7jXeXX Zdb36M8dajmjdQ5d1Cv+h20q5w5UGpZQGDH2/5HAfqpZVNmZfRbJPOBLSgZxT7YC0h0B Xa0TgvUIjSAcxSRRtEKdhJvabb4LI5bWXYhfdOrpWuXbl4jiS1jEkd7gLCEev9nIZSgz 72SjjTBH/HPl+VM+w8uTo3rOwbwAnx4MG+vKnDvSj4OoGJygwAh9TokveGKlsO0wmpQs Aim1cMiGaipSwU+BaCr3HZvy/B88TJos/sOG6l2nh8x9URaMvGItaq8UpntKKaoeh7OX kBsw== X-Gm-Message-State: AOAM531aoKoKuWKZ2hO9n6dK0QU2+e5ifUj84K+smaRToexP4/pdmqLC 1nGYwR/djOW+Uh9E/IaXvmXZ47TMBVrNKA/khXmLohmXJwNqtR0iF6J/8p6W1xOA8PGDZPt1HYm FOykGVrWF7G0c8ZorK9o7O6/NiMVQjJfwcInqAHHufj4308PnvfPK X-Received: by 2002:a1c:df8a:: with SMTP id w132mr18775260wmg.53.1615146665598; Sun, 07 Mar 2021 11:51:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwffZzLs3PiQ9TeAhZa+zD26CO9uqpWEoQh7UlJniVKzU7h8Kyv9yC8ZT05jpfXr7Q8PQWSPQ== X-Received: by 2002:a1c:df8a:: with SMTP id w132mr18775242wmg.53.1615146665465; Sun, 07 Mar 2021 11:51:05 -0800 (PST) Received: from [192.168.1.116] (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.gmail.com with ESMTPSA id h6sm10016643wmi.6.2021.03.07.11.51.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Mar 2021 11:51:04 -0800 (PST) Subject: Re: [RFT PATCH v3 21/27] tty: serial: samsung_tty: IRQ rework To: Arnd Bergmann Cc: Hector Martin , Andy Shevchenko , linux-arm Mailing List , Marc Zyngier , Rob Herring , Olof Johansson , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , Greg Kroah-Hartman , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , devicetree , "open list:SERIAL DRIVERS" , Linux Documentation List , Linux Samsung SOC , Linux-Arch , Linux Kernel Mailing List References: <20210304213902.83903-1-marcan@marcan.st> <20210304213902.83903-22-marcan@marcan.st> <535ff48e-160e-4ba4-23ac-54e478a2f3ee@marcan.st> <05ccc09f-ffea-71cd-4288-beed3020bd45@marcan.st> From: Krzysztof Kozlowski Message-ID: <20a8ce3e-bffa-4fc0-1f1d-185c04be8d9f@canonical.com> Date: Sun, 7 Mar 2021 20:51:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210307_195107_946650_0450593D X-CRM114-Status: GOOD ( 26.23 ) 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 07/03/2021 17:01, Arnd Bergmann wrote: > On Sun, Mar 7, 2021 at 12:34 PM Krzysztof Kozlowski > wrote: >> On 05/03/2021 17:29, Hector Martin wrote: >>> On 06/03/2021 01.20, Andy Shevchenko wrote: >>>>> I am just splitting an >>>>> existing function into two, where one takes the lock and the other does >>>>> the work. Do you mean using a different locking function? I'm not >>>>> entirely sure what you're suggesting. >>>> >>>> Yes, as a prerequisite >>>> >>>> spin_lock_irqsave -> spin_lock(). >>> >>> Krzysztof, is this something you want in this series? I was trying to >>> avoid logic changes to the non-Apple paths. >> >> I don't quite get the need for such change (the code will be still >> called in interrupt handler, right?), but assuming the "why?" is >> properly documented, it can be a separate patch here. > > This is only for readability: the common rule is to not disable > interrupts when they are already disabled, so a reader might wonder > if this instance of the handler is special in some case that it might > be called with interrupts enabled. > > There is also a small overhead in accessing the global irq mask > register on some architectures, but for a uart that does not make > any difference of course. > > While I'm generally in favor of that kind of cleanup, I'd also > prefer to leave it out of this series -- once you get into details > like this the series gets harder to review. So it's only about the spinlock in the IRQ handler (which does not need to disable the IRQs). Makes sense but not related at all to the topic of bringing up Apple M1, therefore should not stop the review/merging. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel