Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4590697pxj; Tue, 22 Jun 2021 03:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYJ9Hh1SpYdPge5aEFX1y8c33XlkDfdoPnj9p6kIH684vynWhBdGk6Z3CmP+b4U69IGwkr X-Received: by 2002:aa7:d590:: with SMTP id r16mr4097836edq.355.1624359089762; Tue, 22 Jun 2021 03:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624359089; cv=none; d=google.com; s=arc-20160816; b=DsvMNw77xZ3LKzQVuk0rmyOqIVXgMaf9FPl+2/HG5SaokJYg7obBAUVEvRbvlsvPi0 FVwoPIdJXqf76TzdnwLGTEnccX2y8pbXX5SJfxIkgvviiV1fAIGsH73+4jW9DC606and roc7fBm642XdeRnuFs4bOwg+VY6r2bDA7GerEgK1NBzOh8PPbqSYWVb0Uzg1xfgAJ2Er QL0/8y6d81Q7tf1AWNaVCmclkDZwrMizswZhyRrRI1uI+mdWJybddEI0MJbi9WDqf5Tl mdxIjc0lLARP5SQzZK1LGiO7Aw11vvdSQqGW5hs3Yq2xkSW4nEvYIaCdCN8XLCBf+ed+ /W3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TcUa3oSLANdktYnkP5q+ONN+THT7Iggm9MfRQHIR0pQ=; b=dSqaM75u58tzgF3EnoRwXkbYhFNDMgd3Vsogb6XQt1jufxQENX2wkvlGjJho0UKtti /Gadx17dtOCzRw+1ZRkmFcD6zb/kuVrqDy5AhR2Q7aTJCbxSuDQCvic0eSCI6GJEbOti YRm7u2IIdIXTIm0ulaBbiiyjmSyV/4+YobylnJis8n9OHrBIweORH1zKMRMly+NEBENs VlazV3khRiUOXD8NZAghaPsQGwHQ3rIjPY9hhr+FDG0mbMETdYIIwtxxu1LxBt+Ts/nK qmxh4NfjkepOkGDXKBRk3Bdx9HZtwOmEUdqVhi8bGwt2/nLs+OJOQH4CV5/BFQtf7XPG fS/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MyEXluny; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mm22si13528849ejb.68.2021.06.22.03.51.07; Tue, 22 Jun 2021 03:51:29 -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; dkim=pass header.i=@linaro.org header.s=google header.b=MyEXluny; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbhFVKuS (ORCPT + 99 others); Tue, 22 Jun 2021 06:50:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbhFVKuR (ORCPT ); Tue, 22 Jun 2021 06:50:17 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAA2FC061756 for ; Tue, 22 Jun 2021 03:48:01 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id m3so12501083wms.4 for ; Tue, 22 Jun 2021 03:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=TcUa3oSLANdktYnkP5q+ONN+THT7Iggm9MfRQHIR0pQ=; b=MyEXlunycAFENLsOQanw8aJoDEgUKECP3HKTWIVS/tFeBaY7xN23K5slVSufsuFDsj 0awsPRV7jcFJyntP9h8BGXeXELoaoY+lGZY1LxRh8NMHcgV6VE2b7xKGAkz+OVAD8eUT gKGVYbDTz8MgTfy3bmU/snSK8uB25ffZFBrt+o2lCk0oLTw3g/MMEy+zAX6nI7yZrUtU jN8uGETWnLx45eLg/506pLQExmmALFNZKBdATcs7abP3/YH6FXrgRElgAZS9BIvzH4eI 8wo5nZHZBKOmDONmZO+ySPio4tq1puds4m07POMZ14eJB8P5O9XuNa0EUNcOqEDnzD58 EZZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=TcUa3oSLANdktYnkP5q+ONN+THT7Iggm9MfRQHIR0pQ=; b=nbdt5PIYF8yHTM7Wi0LwdPJh6KH+1+GG71wra/FzkC7+ian0o5v7kWbbxptHgWFQg9 n3T0AFzSaqSnDOS8uHZvG6cWZ7T13o4EIn/+dfZOhLtQ29XTkWRTbO0iqVSkMHK9AHFI uRhr8wr8vB3me46pRW3mTqs1uOD+QwyXadlNkZbunuteO/6Q1nV3rDBzK2ZoaC+rrW25 oxKK4aPk/QT8DguBW5yoU1uhA/N8YWk5Zs3gz+2QNaWwiKR60UZpon5HOffdOxK1ivwg ICfWUAec6dcZmZmqC4eHLBkcSPyGPwMELtSk4Ptwpt6dHDJnWZHrYQ0Fr5KTWyOI4EpC NBCQ== X-Gm-Message-State: AOAM531JI8MrjyqGea/1uM+RSZJh7ivoYFb4ZSnJmug/w/JyOUhQvgTP BEx2TVwvWj91sI16HfGUHH/EaSq1z3djsA== X-Received: by 2002:a1c:4954:: with SMTP id w81mr3800576wma.182.1624358880393; Tue, 22 Jun 2021 03:48:00 -0700 (PDT) Received: from dell ([91.110.221.181]) by smtp.gmail.com with ESMTPSA id t9sm2082733wmq.14.2021.06.22.03.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 03:47:59 -0700 (PDT) Date: Tue, 22 Jun 2021 11:47:58 +0100 From: Lee Jones To: Mathias Nyman Cc: Sergei Shtylyov , linux-kernel@vger.kernel.org, Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: Re: [PATCH 21/24] usb: host: xhci: Move array of structs from the stack onto the heap Message-ID: References: <20210526130037.856068-1-lee.jones@linaro.org> <20210526130037.856068-22-lee.jones@linaro.org> <8551978f-27b0-767e-f92b-e96ab3064b33@gmail.com> <20210526144451.GB543307@dell> <20210526152835.GE543307@dell> <23bb1fc5-acff-74a6-c67a-11b0e0d85011@linux.intel.com> <20210601092513.GC543307@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210601092513.GC543307@dell> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 01 Jun 2021, Lee Jones wrote: > On Thu, 27 May 2021, Mathias Nyman wrote: > > > On 26.5.2021 18.28, Lee Jones wrote: > > > On Wed, 26 May 2021, Sergei Shtylyov wrote: > > > > > >> On 5/26/21 5:44 PM, Lee Jones wrote: > > >> > > >> [...] > > >>>>> Fixes the following W=1 kernel build warning(s): > > >>>>> > > >>>>> drivers/usb/host/xhci.c: In function ‘xhci_reserve_bandwidth’: > > >>>>> drivers/usb/host/xhci.c:2859:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] > > >>>>> > > >>>>> Cc: Mathias Nyman > > >>>>> Cc: Greg Kroah-Hartman > > >>>>> Cc: linux-usb@vger.kernel.org > > >>>>> Signed-off-by: Lee Jones > > >>>>> --- > > >>>>> drivers/usb/host/xhci.c | 8 +++++++- > > >>>>> 1 file changed, 7 insertions(+), 1 deletion(-) > > >>>>> > > >>>>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > > >>>>> index ac2a7d4288883..40ce4b4eb12ad 100644 > > >>>>> --- a/drivers/usb/host/xhci.c > > >>>>> +++ b/drivers/usb/host/xhci.c > > >>>> [...] > > >>>>> @@ -2788,6 +2788,10 @@ static int xhci_reserve_bandwidth(struct xhci_hcd *xhci, > > >>>>> return -ENOMEM; > > >>>>> } > > >>>>> > > >>>>> + ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_KERNEL); > > > > GFP_KERNEL might not be suitable for all cases. > > > > xhci_reserve_bandwidth() is called from xhci_configure_endpoint(), which again > > is called from a lot of places. > > For example from xhci_update_hub_device() which can be called with GFP_NOIO mem_flags. > > What do you suggest as an alternative? Just working on rectifying this now. Which Get Free Page flag do you suggest here please? -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog