Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1049293pxb; Tue, 26 Oct 2021 01:47:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvw7zgHMQfOic1iZlSNkLKEjlBPdvsbV6RMVDTnjT28sBfsQh/QzNqKIMBry9nf0ArcgRy X-Received: by 2002:a63:2d46:: with SMTP id t67mr17675216pgt.15.1635238053331; Tue, 26 Oct 2021 01:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635238053; cv=none; d=google.com; s=arc-20160816; b=PRaXFJqHNUj4qwaXdQVyG9paZZmc7gYPSWcYNvxCieKeOp8q46iDBgMwIDR8UN1nI+ v+EK+vyHj568gbMECCfpfrvA1f54dL+Vz+ARuDXJjsilE6byg1vJ/poADH4aPW7nVQf8 X12SpuyMCWJiWA+3PHPwerFE89zcWi6YUq6jPzHROgb1hSJuvkYj7oxdoTeqcKwXyrJc 3k669foiW6tiopsCruDbsFCpF39z0kMfLqKma9blQEw/Xwj8g0OuCEKhn+1yJ0fB/xuS weteZFGXZH2KliOpbskU14JqMK8+4OKvc09Pot8i/6irpAlZNf+8DvLkkPs1OjDhhka9 Iacw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=P3Zc6yeCZnILUVTPl/gZcYbGqf9vc97cwBNzsoT0q3g=; b=cl54ekIyHst/pgYF9OjUnnxzmuL16lDzzg+Z7fJ8UhkkN1S0x7AEbQJeDMZj0j+FOx d5LntltzAAgMjmvtmMgcxZw5x+vSYGGM4mX5GfWC3xkx7XTeit2qInnTaChkfg1nGrYm gUu1K5Hf+sEY5ofLFK/0ACNJaiUu+x6dzyAeBmVAk7pzzLTB6m1r1rn9vbq9NqRszmpD HmLwATWVzXuTye8vUgMkD0Lr9lUHP5xdWBnqThmZkCFMZhjOMrZL8lbOprnweJteOxKR e77sqNsjC68UEQdNltmY2kv0qMMHIXz9I5nHg8PwsarM7ApYdhcO1vIq59z+ecilLT+A TXkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si35077738pgu.467.2021.10.26.01.47.19; Tue, 26 Oct 2021 01:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230294AbhJZFNU (ORCPT + 99 others); Tue, 26 Oct 2021 01:13:20 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:42734 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbhJZFNU (ORCPT ); Tue, 26 Oct 2021 01:13:20 -0400 Received: by mail-wr1-f48.google.com with SMTP id v17so15532382wrv.9 for ; Mon, 25 Oct 2021 22:10:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=P3Zc6yeCZnILUVTPl/gZcYbGqf9vc97cwBNzsoT0q3g=; b=30B5uFW3LEKKoRDZ+JxbNxI+am8eOrKyYXeolKCIf/kxdfiy0jNyb+6UTOGlBQUhQf hJGWYmUAggclaHa/eqPdc2O4r3hRWlg0isRQ/pb69pCnTqYPpbUHsn1mhsCmRZDNCerc JjtdSQqozjLtSP5FTW+FcRSluztpTtw+4jGqmtwnzI9nJg/iCc2UnBrwWeMRdShjqUlG dUdqzB+bt547rulpmWkVQQPnTakMdgumalgeIwWjxnRks34DOrp2up0pDdGuX6e3GTDr UEltcbC7c+Lt8Rg1DGgze9Ukh7t67R3a47UUkinqGVG1MQySQeOcNGQvVTpdMyDZvO9C iYvQ== X-Gm-Message-State: AOAM532Lg4hDFC6hkfuamFIOplsoDhpdbI8SINwQAAA3lu0RCrKabhqj m6vKdk//k2GzKx55RVNaKc0= X-Received: by 2002:a5d:6c65:: with SMTP id r5mr28856932wrz.26.1635225055992; Mon, 25 Oct 2021 22:10:55 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::49? ([2a0b:e7c0:0:107::49]) by smtp.gmail.com with ESMTPSA id n11sm8532947wrs.14.2021.10.25.22.10.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Oct 2021 22:10:55 -0700 (PDT) Message-ID: <208f7a41-a9fa-630c-cb44-c37c503f3a72@kernel.org> Date: Tue, 26 Oct 2021 07:10:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v11 2/3] tty: hvc: pass DMA capable memory to put_chars() Content-Language: en-US To: Xianting Tian , gregkh@linuxfoundation.org, amit@kernel.org, arnd@arndb.de, osandov@fb.com Cc: shile.zhang@linux.alibaba.com, linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20211015024658.1353987-1-xianting.tian@linux.alibaba.com> <20211015024658.1353987-3-xianting.tian@linux.alibaba.com> From: Jiri Slaby In-Reply-To: <20211015024658.1353987-3-xianting.tian@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15. 10. 21, 4:46, Xianting Tian wrote: > @@ -151,9 +142,11 @@ static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] = > static void hvc_console_print(struct console *co, const char *b, > unsigned count) > { > - char c[N_OUTBUF] __ALIGNED__; > + char *c; > unsigned i = 0, n = 0; > int r, donecr = 0, index = co->index; > + unsigned long flags; > + struct hvc_struct *hp; > > /* Console access attempt outside of acceptable console range. */ > if (index >= MAX_NR_HVC_CONSOLES) > @@ -163,6 +156,13 @@ static void hvc_console_print(struct console *co, const char *b, > if (vtermnos[index] == -1) > return; > > + hp = cons_hvcs[index]; > + if (!hp) > + return; You effectively make the console unusable until someone calls hvc_alloc() for this device, correct? This doesn't look right. Neither you describe this change of behaviour in the commit log. regards, -- js suse labs