Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3537692ybg; Fri, 25 Oct 2019 05:44:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqy87oWSoqNp/4NsCfgvOFy77EoAICQa/gMbYrXEE8aTIo0uaToZhhKx0Hvvx6QzpP3ELf6X X-Received: by 2002:a50:8969:: with SMTP id f38mr3663695edf.211.1572007466392; Fri, 25 Oct 2019 05:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572007466; cv=none; d=google.com; s=arc-20160816; b=IRjs5ypPwEl+mV6R+A/Z88Gi0PXfbLEq1ohZMn+b/lHSUSEnOYvkLyX6zEadI4X1n7 CviHO9vUsSTKzGZTKGPvAO/rbC0ptVnkyXCiC1HMvsQkmlHOdgDvrLRqsU9InW2scQ/4 CyqvcLEpZQFrGidg/yXBDsxJ4RwjipoVNDlH29n4ox/SMwMk0lOr1TXiQFItgyk6T7wG +ErXNCuxW54Q1it5KUcmzzqdS6HnPHy8QCchm1Mn6nFEJ8NoFN6YYqyhAhnoPZy531bv wgYUyTTNUG9STh8GuBiBtd2yN1qIh/aiMQ0PUIMIp48nPlBMM/T4YShd54ds7Ow5cAWU 2gLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sNS+0ZH0Gw7jjCkQeuG7rLnQoFmkx0bcU4Vuwapalrc=; b=z7po6bE2kXl15dG0v2c7/MAEI/NB6gQuLgee9st0b2RfEOpvMCfD6BqS++JCQcR0Io eBp0dZq934HarkYo69sXN6AdCX1+KLQWs1BPFPP2EO9wLNH7Zoa9msxyC7kFbJOzQjCy t7jEXd60nmAvVdxdJSmceKnT6fnDacx5Jp5GR15LaMD17mhcSzORIM0wA6AXHRCqhQMa wyI2FUHk7BAJIw7Gc2Grp72kgLRyiOpAFafD7hkRv5GvbVwl1NGJPF+DyM3+vLvBSllB sBxPCVLqpLupl8qFrhQb3CH7a7scDI70QeKXsjgm9dZu+j9yt5nDPg8b8+QeyBBaKMln 02fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TSznJC2N; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z25si1071454eju.56.2019.10.25.05.44.02; Fri, 25 Oct 2019 05:44:26 -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=@linaro.org header.s=google header.b=TSznJC2N; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439644AbfJXMR1 (ORCPT + 99 others); Thu, 24 Oct 2019 08:17:27 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:34110 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbfJXMR1 (ORCPT ); Thu, 24 Oct 2019 08:17:27 -0400 Received: by mail-vs1-f65.google.com with SMTP id d3so16074395vsr.1 for ; Thu, 24 Oct 2019 05:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sNS+0ZH0Gw7jjCkQeuG7rLnQoFmkx0bcU4Vuwapalrc=; b=TSznJC2NG3Y5TxoVaRiWfH4Vy4Dn5deWJutBTeFoKFBNaQKrmQRbnNNDFOE8ohWOfF O2ZHb7G8BmJZVjDnLUQ3cYhopl2cUmYsZkistSuia0JuY7Iv/OJiM6IGjeiekdEyR0lM +ddD8rWPzRWAXc2c9QOO3VbkBTLksRELKVUHcUeBejTxnpqLQJu6RQYb1WBnnGs5vGzD LDdWnb04rYzo07aM6eQ2NBMLBBA2sZpnD5FjjzY6LIFHltL28JjVEjIhPMleL2O0c+OM 41JlAUbbSjCvHJLIuU8Q7PgeLn5qEtGn+0QfHHxVGSMumOLsi0t5hm2w93PJcXxak/V0 qupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sNS+0ZH0Gw7jjCkQeuG7rLnQoFmkx0bcU4Vuwapalrc=; b=ONySxI5WuupD5L90p8h+U3Z4J7CITN4OVpcKPPhMOL/etnGGNrvqWr2jlrP/R8YnPj 5JFY1ADoEvXNy3mxf6F89GloIvALR8wNcx0VJzDi+yW+uDrp1VckTHKsV2E8sbU3oBQP 7KoQil1WG/R+UF1+FehfHF3e/S9RXyxjb588JgKJL/gePkj+ydTV4KYTHGSvk9DVkAwU qNGge2zJdrA3MyPtyaHib3KLa33rcJq3B8IqeCbemH6Q2hjhPJ3KruSWHIqCHONJI+GK n+IMnCBYcG/pjm3yOZsuiYHS9ZB/rp+MuWaKD/jUMCXbjNFR6rll2Vqiv+mwCga4nOs0 E6ig== X-Gm-Message-State: APjAAAVOKfTRh5gK4lOVaPPP4TBiBj9H0h6UdppHDY3JF8nHvFALVNMj QDWumKlZvgKJAgqYBR3iHYfNjTGthF0TjGqOVZ9DvQ== X-Received: by 2002:a05:6102:2436:: with SMTP id l22mr3492203vsi.93.1571919446500; Thu, 24 Oct 2019 05:17:26 -0700 (PDT) MIME-Version: 1.0 References: <20191017114906.30302-1-linux@rasmusvillemoes.dk> <20191017114906.30302-4-linux@rasmusvillemoes.dk> In-Reply-To: <20191017114906.30302-4-linux@rasmusvillemoes.dk> From: Linus Walleij Date: Thu, 24 Oct 2019 14:17:15 +0200 Message-ID: Subject: Re: [RFC PATCH 3/3] decompress/keepalive.h: add config option for toggling a set of bits To: Rasmus Villemoes Cc: Masahiro Yamada , Andrew Morton , Gao Xiang , "linux-kernel@vger.kernel.org" , Linux ARM , Sascha Hauer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 1:49 PM Rasmus Villemoes wrote: > +config DECOMPRESS_KEEPALIVE_TOGGLE_REG > + hex "Address of register to modify while decompressing" > + help > + Set this to a physical address of a 32-bit memory word to > + modify while decompressing. > + > +config DECOMPRESS_KEEPALIVE_TOGGLE_MASK > + hex "Bit mask to toggle while decompressing" > + help > + The register selected above will periodically be xor'ed with > + this value during decompression. I would not allow users to store these vital hex values in their defconfig and other unsafe places. Instead follow the pattern from arch/arm/Kconfig.debug for storing the DEBUG_UART_PHYS: config DEBUG_UART_PHYS hex "Physical base address of debug UART" default 0x01c20000 if DEBUG_DAVINCI_DMx_UART0 default 0x01c28000 if DEBUG_SUNXI_UART0 default 0x01c28400 if DEBUG_SUNXI_UART1 .... i.e. make sure to provide the right default values. We probably need at least one example for others to follow. Maybe this is your plan, I don't know, wanted to point it out anyways. Yours, Linus Walleij