Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3741872imm; Mon, 8 Oct 2018 08:48:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV6085B6n7yNUwOYmTFsNL/etVaX11S/qPap/aMYKqiBIF+Q3G+oPcyIMt5bo/E8JqwQxcK2d X-Received: by 2002:a63:a42:: with SMTP id z2-v6mr21331767pgk.209.1539013722926; Mon, 08 Oct 2018 08:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539013722; cv=none; d=google.com; s=arc-20160816; b=teNe8Vm1aXfrYUT77hLpggjtKewFBJ3pY0lHvX4T3j7PXekW1Nxsr/Js2texNllT5d esuECB/5QqPrYVa9guhDWwPasZ3ofyV/fUGxWhOkH3bXg8mf9GAh3/4PA+ANMEq72ru3 iiGt2yPurXPKteuUMx4wErMT0X5QSgAttbB56otFihH9UjCfJFK+nEKPyZnsupR2FL22 5HCXRkE850ynXv9cUEfopeowqBTP+sBVNQxVCBwVjlvZa00DrbrASEg2AJqgaG7VgEWn p5fvHaGsCn7wV4PGZ67lYy0gY48Sa2R4xYqeJRn8jZPnbIyJxVR2646tvL5VtbXmPSi/ PJzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Vi2/uku5IYxNJTJmia6m4ECLtTso7nN62ecI51I0Nyw=; b=wFQMEBySQBMIqcx+2ROjKFSYKU5i4yUWQfEqQCOUW5ifCyjkFRIB5lyFke4fKpS0aJ ejlLPjBIDcQQjlCzr1KJiPp4bOSZ+jbsx+XcRGgzWHnqlCmN6TdRhDJZwWp0Gf2vRDa5 78GXLduSfnYbjTJqMwY3eJaoH1yp5KXfolt1d9DfAkGGCX4M77GDsEMQsM08gmQavzuu iehsZPFWfWTOsSXzzNTimk+uxgDWdeCK1C27gZ2nnAsIg/xlRMx3NCba9tq7NrAiY3GU WYRUwrIQtbrWnghRjgX+j+DOobGnZh0MY4MEKRWx0QTnkC1BKhFv9YhRvkt17pOWWXeN m0TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Bn8TqaAy; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8-v6si19434022pfx.185.2018.10.08.08.48.26; Mon, 08 Oct 2018 08:48:42 -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=fail header.i=@gmail.com header.s=20161025 header.b=Bn8TqaAy; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbeJHW7V (ORCPT + 99 others); Mon, 8 Oct 2018 18:59:21 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35581 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbeJHW7V (ORCPT ); Mon, 8 Oct 2018 18:59:21 -0400 Received: by mail-lf1-f67.google.com with SMTP id r191-v6so14291976lff.2; Mon, 08 Oct 2018 08:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Vi2/uku5IYxNJTJmia6m4ECLtTso7nN62ecI51I0Nyw=; b=Bn8TqaAyVPIU8ZwVyHby1iPr3zyePtz8X9zn+LKTWsCSgm3zEpGOoMtTW6RjBTC2e7 k7iK4UWG9H/tgOYNMokCCCSZcCQXQi9y1MCaMQJidnIiTsFWe01bKv5i+iD3UKvq4BkG WJv0vDX55rRnBEubufOZFt0YbwfXmH+YoLqKo7lGy5xhTScyyO6E8extIjlUpAJsh1+L QJa2pV762is809d6srBcHZn0K0Xy61WVHy+nScOOT05+6turQjRf/tqDB46PF3fN28G7 QXZ0vXO/3WS+Gc3hz8Ekei8CJaoPOOgbrDRkMJAHaPzZEkr5BKONE/2Mlfp1dlcFivja m0sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Vi2/uku5IYxNJTJmia6m4ECLtTso7nN62ecI51I0Nyw=; b=qJ5nOWuG5D7PgatngjOCdISlye7nOJI79SoUvz2+4cWndo9YVWubDWQe1C9P6rx4Mq Newh47lQB4mQrFVkGde/RXMo+uC4t81Bb/GbQE1qdymq8cjXAYHMii+VGIZBiHeESXLe DMN1hoPzn+uYtwAUzrMuhPjnxHr0hXGwNGrUTcHrhvTosZyqHFN4j7ev2LgfYlsdMOc+ ajKdqyCVmLw9ypM9smnZ2EWQl+QaAW50PXd4TC67zOLI3i0fO0Z8AeWsWzQVBbvrrntx RPU3aezcA9CpY4c+CEkUM5AMOXv3Fr/57qwiM6hqxwkTA+gjWIqv9Jy1hibeiGtevUI8 M5Wg== X-Gm-Message-State: ABuFfogfUlg8qoSQXv62oOMJE+q5F1qXU8KzPUHxc/5Jb4FoDyC+53RV yiw5uSXEKOkFGeanECPeV5A= X-Received: by 2002:a19:a501:: with SMTP id o1-v6mr12728776lfe.41.1539013616835; Mon, 08 Oct 2018 08:46:56 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id v85-v6sm3592107lfa.18.2018.10.08.08.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 08:46:55 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1g9XkF-00035j-7q; Mon, 08 Oct 2018 17:46:56 +0200 Date: Mon, 8 Oct 2018 17:46:55 +0200 From: Johan Hovold To: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, Tobias Klausmann , Greg Kroah-Hartman , Jiri Slaby , Al Viro , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Gleixner , Kate Stewart , Philippe Ombredanne , Eugene Syromiatnikov , linux-alpha@vger.kernel.org, linux-serial@vger.kernel.org, Johan Hovold , Alan Cox , stable@vger.kernel.org Subject: Re: [PATCH stable v2 2/2] termios, tty/tty_baudrate.c: simplify, auto-generate baud table Message-ID: <20181008154655.GE3332@localhost> References: <20181008040620.1248277-1-hpa@zytor.com> <20181008040620.1248277-3-hpa@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181008040620.1248277-3-hpa@zytor.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 07, 2018 at 09:06:20PM -0700, H. Peter Anvin wrote: > From: "H. Peter Anvin (Intel)" > > Now when all architectures define BOTHER and IBSHIFT, we can > unconditionally rely on these constants. Furthermore, the code can be > significantly simplified in a number of places. > > Rather than having two tables and needing to be able to keep them in > sync at all times, have one auto-generated table. This also lets us > avoid the fact that architectures that have CBAUDEX == 0 have BOTHER > in a different location that those that don't. > > The code for masking CBAUDEX as a fallback is never exercised on any > architecture, because for all architectures, either the baud rate > table is completely defined for all CBAUD values, or CBAUDEX == 0, so > we can just remove it. > > Finally, this patch avoids overrunning the baud_table[] for > architectures with CBAUDEX == 0. So we need a minimal fix for this only as this patch in particular should not be backported to stable. I'm not sure when I'll have time to review this one thoroughly, so perhaps others can chime in meanwhile. Johan