Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4132919yba; Wed, 17 Apr 2019 05:25:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZsOD9TvwuBnXY0GZXZ6fvcgZ2jBd8Vxw+JDOBRXiRH9sK3hKYiLACTFRgEWu7lpVGmpK6 X-Received: by 2002:a63:3287:: with SMTP id y129mr82343283pgy.9.1555503900997; Wed, 17 Apr 2019 05:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555503900; cv=none; d=google.com; s=arc-20160816; b=an2hWpPOSyZpOa9+yoQ9HO02Wxln7IDjLRCUGGQusdNam87JvqSnSWWvpLMrqfyNxR C+qKrHu4KFqXDJP+DBwo3taW0x/wRvMMNGT4OV9yIQMvA4Av/bRZEQpYuyLRzhBpNfCc FWE3O2hSk7GOdcVDx2bZe+XqSpwNZcmA2B8DaEwjcxtIm65SqpFNaQJdLjezKxwyMId7 3eLNig3PM8UI1udqryXqdXSDb5/ca5+c1KKlWOW5KnvBKG/mifttW8Lhse1cfJOClPmY sxEJrn99k6X8lK6WaB9+VesY5exO9FSJ2Dq5JATAgM799alps6a6csBZimX9AAJTBclK 4SRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:message-id:date:subject:cc:to :from:dkim-signature; bh=irC0YKrZlFHQzTSprKMgg8BG6Zvb8X0gh/lcKUUr0Qc=; b=ljQO34I5v9RNc0y91TOV9OYBpSxxzHNjJ9T0x3FAAGu6fnXqzUFW1N8qLJln8Jju3i /2S6T1jvOxyP2ygAvOgbIAVIokEIt7Zz/m6PjLgpk3xIU68mA/DVQ2vB0JerYDwh5uCn RjJBeLHs7fETtmH+7upriYXJqh58fLFAUgkYzJdeBfGj7VNYk2YthTKjWBB+hg7oR7Wf FfoMH0eheaiHP8KtnuklF9jK2HJihf0DDFvSePYRDZtoZ9ACcQS32PcS9crRLdpV3NWk ist4WxAcrJTn7dMZLBY5IpWvCjFHiRJfKcBtcpcYXctEzePFBlELaF51OqayDsDy4+7M uFXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AXx4lmYY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si28435424pgq.416.2019.04.17.05.24.45; Wed, 17 Apr 2019 05:25:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AXx4lmYY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731992AbfDQMVi (ORCPT + 99 others); Wed, 17 Apr 2019 08:21:38 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:35815 "EHLO mail-wr1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729522AbfDQMVi (ORCPT ); Wed, 17 Apr 2019 08:21:38 -0400 Received: by mail-wr1-f54.google.com with SMTP id o12so2241208wrn.2 for ; Wed, 17 Apr 2019 05:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:references; bh=irC0YKrZlFHQzTSprKMgg8BG6Zvb8X0gh/lcKUUr0Qc=; b=AXx4lmYYipWzKUE08Q3dwUnLRP6mrDqS10j8mMw/alipHvi2b0Sp5aPJGHLBCBud+X rOVOjqGBziUPbqIryBN+NfgXUkfQFec/2jbnz8qgxF7Xs4300Lolu4/eycoW1zUYGvhz vHkPUhMA6oG4lv0UrE0lLm+65LYC170m9evq6CY6N3eDL7YYDKv7LYuQ2I7gDuUo0LhD yayU7Kzyh3okQSLqyOhatxO18qkCPx/BhlEdUElDzxpCT1Uz5mpz9qjeI2UoKSAGPTHq y7Bw8Z8c+VgQfMGa4mXzuoaljnCfhgSs/JujCGcNx2s1gYdtD+DrrrNEa+HX/sKMcjmr akXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:references; bh=irC0YKrZlFHQzTSprKMgg8BG6Zvb8X0gh/lcKUUr0Qc=; b=MPmQgh4SBfqf9V+CAtghgMP2vYNsoC8DuCXUkjLjKDd9SoSs6jsErCtFTZs5g/XVab 70wdJZJhvWsJW7dRc9S5wbwyEz36d1DH0K5bnNMWNmt2BVvi6mjxl+0j1doOhnMXN73p BfRg8gaX27VmXOm53Ue3HyNL/gkiZ9JY8EOMhAI+Vx3TPnG9oa+c3YO5vfiVynSSHxXb 8N5dBx2x8Y4ECOO/cBkyfGeMjmJIkVA/J0QNsCRefL+GeA/RN3lbf9cbihuMaO3nF8Ny dbGM8vndKw5jO4N0qIebWtuQD2dBurzovXAc+wrOtvI/lsGQSCTDFXLcENO0MbjGHM+a oZdg== X-Gm-Message-State: APjAAAULhtT69iF07Qftp4J2bsd+706waRAMSaMHVXHdRvnMyR7EkI7b Iv9W95lBAAu7lnJmzdjqOcf/BS8M2gI= X-Received: by 2002:adf:edca:: with SMTP id v10mr28277701wro.157.1555503696794; Wed, 17 Apr 2019 05:21:36 -0700 (PDT) Received: from ghost.lan ([94.11.212.240]) by smtp.gmail.com with ESMTPSA id g84sm3810696wmf.25.2019.04.17.05.21.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 05:21:35 -0700 (PDT) From: Okash Khawaja To: Greg Kroah-Hartman , Samuel Thibault , Gregory Nowak , linux-kernel@vger.kernel.org Cc: Jiri Slaby , Alan Cox , Ben Hutchings , William Hubbs , Chris Brannon , Kirk Reiser , John Covici , Peter Hurley , devel@driverdev.osuosl.org, speakup@linux-speakup.org Subject: [PATCH v2 0/2] staging: speakup: factor out selection code Date: Wed, 17 Apr 2019 13:21:12 +0100 Message-Id: <1555503674-8219-1-git-send-email-okash.khawaja@gmail.com> X-Mailer: git-send-email 1.8.3.1 References: <20190404194530.1170-1-okash.khawaja@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The v2 renames set_selection() and do_set_selection() to following more explicit names: set_selection_user() /* includes copying data from user space */ set_selection_kernel() /* no copying from user space */ The patches also update references to set_selection() to be set_selection_user(). Original intro: Speakup's selection functionality parallels that of drivers/tty/vt/selection.c. This patch set replaces speakup's implementation with calls to vt's selection code. This is one of the remaining items in our TODO file and it's needed for moving speakup out of staging. Please note that in speakup selection is set inside interrupt context of keyboard handler. Set selection code in vt happens in process context and hence expects ability to sleep. To address this, there were two options: farm out speakup's set selection into a work_struct thread, or create atomic version of vt's set_selection. These patches implement the former option. Here's a summary: Patch 1 re-arranges code in vt and exports some functions. Patch 2 replaces speakup's selection code with calls to vt's functions exported in patch 1. Thanks, Okash