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=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 A056FC2D0A3 for ; Thu, 29 Oct 2020 16:37:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 12ED420719 for ; Thu, 29 Oct 2020 16:37:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="3GVNWNVF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="Kt6jAFYt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12ED420719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DxS1iBmu27L4Rn1e4x+Scx7ENNfP8C3dLU0Cy+T/93E=; b=3GVNWNVFeA78MooYavWkSUcBc DosYIjxmg/JMeNL0+MA59UW6WE/Kj0YzGgx+8nQ2r89FzP7/alJHWBVbQDtlTnQcDWSeiSH7lHosq g55QCsa5DzADh9FwuuDklsCn4a+ZP5wyb6xWaIY84y/xK9d2I/4ooQTgBe8UqdVijIHoQcphZ9Ual T2H5CjSOzdoL9tthYLaFO6d9GALO/cU/0XZtots8Xy0sQh1lgIC3G8MtBSmkhtkcyMODlXa+BI8R9 TI+Av11jBe91l7vh/u3f56E5xXMHDUk+WlBXc+jnaCVcDFZVygArQh8Q1RIj9iQM8Se5eIAOws7yC tbSTVnLlQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYAu7-0007Ee-W3; Thu, 29 Oct 2020 16:36:00 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYAu5-0007E5-HD for linux-arm-kernel@lists.infradead.org; Thu, 29 Oct 2020 16:35:58 +0000 Received: by mail-io1-xd42.google.com with SMTP id y20so4214637iod.5 for ; Thu, 29 Oct 2020 09:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/Et67eH3pq5h8xO0d68iSso5qfj/YZUk2h/+5xcZG4I=; b=Kt6jAFYt+r9B5060XIs5IFhB3LD4TPbZVE5ZPNiHaFYlTQLopHGhaLgKNfwwfDARuN CCekddAjwBduVuQfAtMbXzQtTvKoQTy594CQ9zJ1wEJDj2XPflt3EOdz/cq0jCwg785o 3ERAGtA2IiZJneb/mdCB0j7OqgPzDpTrYF0vm3ZSFeWiojJzze6Yt7Show8g+wa+nDe4 j2nk8LzifE/F7VdavV1dllRE9uuPQXJfYO4rU9lkNRIOHNp27XczWGodiYRgHi7zWusw 11RH+zBH6yxB+5d2w+4tHyFT+tJO4RZSDVBiYt0fjl7kThzyzdyflqjd/2gt4e7GsDWa porw== 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=/Et67eH3pq5h8xO0d68iSso5qfj/YZUk2h/+5xcZG4I=; b=VCKimfeSC/wRr6D0MvkdBUQV7t3b1P/snd+gpPsmVWRC87DyTT93HyGa9NJBhbY3Zs S5cPYk4wI+HftlxH6I+QTsvv8FazDmdxjun1+iDXPCABAXIDwP6xsDmwyTTZ0no3oGdI zif5cAhMeG/J2PA5OSPSS8OxfogusAFSknGccAEK2POpwLvtL/bgZPGABtQKdS3T/FSj XEKJkuao5MdFSPdBJHlNxWdp+5+ZaTYEVhga/zEEEJTGnEnMO+Um3UKBiMOzypM1BEgZ riqprsNI/Rahcr4VSgwe0axsjm6egqv7Gif7D4DhXlrAkT0ujkO2wtfcWTTr0Xsb2jEu Ox6A== X-Gm-Message-State: AOAM530QdmPXnMjEIFfDWkW1Jo6bgI+IZ7dubbha2wx/9JqSjVhapLXw Trz040RfM2me5o8BXmT+YJHTgotXEm2WUQ== X-Google-Smtp-Source: ABdhPJzsePH14Dew8MQEJEr4vT9/xtsXgStbbUkzZO7gHqh8+GQaIr3o4lBRYD5ENbSMfmftCTC0Ww== X-Received: by 2002:a05:6638:1189:: with SMTP id f9mr4511538jas.10.1603989355300; Thu, 29 Oct 2020 09:35:55 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id r3sm2483291iog.55.2020.10.29.09.35.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Oct 2020 09:35:54 -0700 (PDT) Subject: Re: [PATCH] arm: add support for TIF_NOTIFY_SIGNAL To: Russell King - ARM Linux admin References: <3c1ebfa5-38d9-e6b2-fcf7-d8b17c0fa515@kernel.dk> <20201029162934.GX1551@shell.armlinux.org.uk> From: Jens Axboe Message-ID: Date: Thu, 29 Oct 2020 10:35:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201029162934.GX1551@shell.armlinux.org.uk> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201029_123557_607828_414D4FE5 X-CRM114-Status: GOOD ( 24.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arm-kernel@lists.infradead.org" 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 10/29/20 10:29 AM, Russell King - ARM Linux admin wrote: > On Thu, Oct 29, 2020 at 10:11:07AM -0600, Jens Axboe wrote: >> Wire up TIF_NOTIFY_SIGNAL handling for arm. >> >> Cc: linux-arm-kernel@lists.infradead.org >> Signed-off-by: Jens Axboe >> --- >> >> 5.11 has support queued up for TIF_NOTIFY_SIGNAL, see this posting >> for details: >> >> https://lore.kernel.org/io-uring/20201026203230.386348-1-axboe@kernel.dk/ >> >> As part of that work, I'm adding TIF_NOTIFY_SIGNAL support to all archs, >> as that will enable a set of cleanups once all of them support it. >> >> This needs a bit of asm help, immediate doesn't like anything outside >> of 1 byte, it seems. Any clues? > > Correct - immediates take an 8 bit value shifted by an even number of > bits. > > I'm tempted to suggest that we simplify things by making TIF bits 0..15 > invoke do_work_pending() no matter what - which will require a comment > in thread_info.h that all those bits will have that effect. The > resulting assembly would be: > > ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing > - tst r1, #_TIF_SYSCALL_WORK | _TIF_WORK_MASK > + movs r1, r1, lsl #16 > > which avoids the additional load caused by "ldr r2, =..." > > It's not like we're desperate for bits here. So renumber TIF bits that don't need to worry about do_work_pending() > 15 then? I agree, there's plenty of bits available, so seems reasonable to me. But probably more work in terms of other bits being tested with tstcurrently - at least when I looked, I could not find any of them I could successfully remap from < 8 to > 8. Any chance I can talk you into hacking that up? > Further comments below if we don't decide on that approach... Totally up to you, of course. I'm fine with shifting the bits around. -- Jens Axboe _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel