From patchwork Thu Apr 25 19:52:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 162858 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2362069jan; Thu, 25 Apr 2019 12:53:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGcJjZPxvZmK22SearMOs7NhrHNMhNKMOUwbSv5yEHK/X14HE9rYgvPhmB5why6Xxub/St X-Received: by 2002:a62:a503:: with SMTP id v3mr10141103pfm.32.1556221999346; Thu, 25 Apr 2019 12:53:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556221999; cv=none; d=google.com; s=arc-20160816; b=irLFC0TPhvDTh3u/r4pmc376bE+16fg0yDrj6RjZAXcoaql2eAd2BHICL9D6sMu2Qj C2HDREgRBGyS3g/65u016RzsVzhp18zot+ZlVpHEegD3n6GpaDWGEfl0KACYRqIma4c7 67VcYMnm6B0hnLVoZUGHsd2WeBP9HWWEM9SfN51gmSULhRzGRerT2FI6ewAnww8pWmOo GNdOdgxV5ZYxShXBYd0vlsYGB4OVGfWGg7qOaV1l9AINYQDHxAvUBpPcCD2VdMdQw2SP nSmkveBRh0eJ+1uKbO1xq/OTbrYrEfBc7KMNJyfxOa/5EhTzCbuwdDNoFSfPFqffUozQ H0LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4lhsES5zrfmug+wtErL+IQRdyF1VD03Excx4/nk2IFg=; b=EGGXcECwZcCUbnF1P7nBePyfb9PrbzV6k4+M0B602sP316WXy2xDmPRNCvjSMlhDcV 8lowosX9Aekj7L2GLzvTkryl2UXpyerOIfK/CMSI8e4ftwObBYBaGaWa8KVpsRtaIVN1 QzwRcj1oBc8OJXA1aimmehHqNCYLrPBVbpyzWPXjIfGno2GRwTwBZL79d/Le2ReTFZPI BZXB9RcKdKHHo5kErCeWKTsJ4q5F/aqOsriP5AIXfXM92vOh8XeNOoESR6aBicwCwp7S q4yrUB/NlQ4Iey8siF0/Vbs/e90ij9p8PPh2ENL5nVgcZbEgxksEwgJwpqKQ3k3MEINO AAmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gwNLFIBD; 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 t16si7556588pgl.97.2019.04.25.12.53.19; Thu, 25 Apr 2019 12:53:19 -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=gwNLFIBD; 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 S2387628AbfDYTxS (ORCPT + 30 others); Thu, 25 Apr 2019 15:53:18 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46849 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387602AbfDYTxQ (ORCPT ); Thu, 25 Apr 2019 15:53:16 -0400 Received: by mail-pg1-f195.google.com with SMTP id n2so346405pgg.13 for ; Thu, 25 Apr 2019 12:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4lhsES5zrfmug+wtErL+IQRdyF1VD03Excx4/nk2IFg=; b=gwNLFIBD7Wlzfx1grISAVu4PM/6mAnUJ3raeI1DsQCgo9cxK6BUfEdhsW6huBUZqMY eyzBFsoEoHvoCD7+D2stG7psx3D/GJKWewnck0g6mQRId8LKle1QP7Pg839lD8zDlOzG b48ZslCc7V6r8729eh/R1JFiog6JjBW+hCnTzEO3K98cidLQV4tmE4SEkVkFLoCskxlE yZIL4orKRU4mD+y7Jc9+0IfIIPeHSOQa/BFFB/QNbP3s82jvXVtc1FGaq2R4TE8R3ogN THphlqzFAtjWEw3UldGknPLKqJlkQXzyeRN2+TSZUx+MSSolI4ExnGVzWK4nkcWXLNMv B7zQ== 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:in-reply-to :references; bh=4lhsES5zrfmug+wtErL+IQRdyF1VD03Excx4/nk2IFg=; b=L+PHMK42GiaZ0Hq8AUcmSoaIFf6v503HSXt9ngaD4G+rT6O9OnygNIZN3JjWHPe5c0 miUeYMDkKP/yLYc7lgJSesoYuuHcpyJRD4a9zhK5qEdfalg2/7OskLXwH89LBvSEVP7E IKP1z74b+H4d53cxIk/wTZO4Y9JfBMqXjRRgNUuEj9/VcjGZBQCUEOsVoDA5YZHj4WWH SOWQlVqjZTUF2M2gTYOAUPKsDZ60WfFIuH0mS/KpTTyiqqR0t2PwbbihJHoZ6JOFcRt6 UUtLHqrwIwjHg2/FsPPet1ASATySjs5jG/vcyPn6u9Bu1RCZ/Eq4K81Zp29KK4S/jHmE QaBw== X-Gm-Message-State: APjAAAX2pNb2SW0F/ne5ZEs4ObSBsv1Zmp7FWgjdv8gI483FWLFBWC8I F7L5OFkh8RF8LLNtmbny4SkLvw== X-Received: by 2002:aa7:8dc2:: with SMTP id j2mr3872589pfr.82.1556221996361; Thu, 25 Apr 2019 12:53:16 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id t64sm47261961pfa.86.2019.04.25.12.53.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 12:53:15 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/32] coresight: tmc: Report DMA setup failures Date: Thu, 25 Apr 2019 13:52:41 -0600 Message-Id: <20190425195310.31562-4-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190425195310.31562-1-mathieu.poirier@linaro.org> References: <20190425195310.31562-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose If we failed to setup the DMA mask for TMC-ETR, report the error before failing the probe. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 2a02da3d630f..647b6aa93554 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -340,6 +340,8 @@ static inline bool tmc_etr_can_use_sg(struct tmc_drvdata *drvdata) static int tmc_etr_setup_caps(struct tmc_drvdata *drvdata, u32 devid, void *dev_caps) { + int rc; + u32 dma_mask = 0; /* Set the unadvertised capabilities */ @@ -369,7 +371,10 @@ static int tmc_etr_setup_caps(struct tmc_drvdata *drvdata, dma_mask = 40; } - return dma_set_mask_and_coherent(drvdata->dev, DMA_BIT_MASK(dma_mask)); + rc = dma_set_mask_and_coherent(drvdata->dev, DMA_BIT_MASK(dma_mask)); + if (rc) + dev_err(drvdata->dev, "Failed to setup DMA mask: %d\n", rc); + return rc; } static int tmc_probe(struct amba_device *adev, const struct amba_id *id)