Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2179140ybg; Sat, 19 Oct 2019 09:46:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwb1xjcqx/SuEhjWI/Bx50XX7nvN+b2StOn8A1Ts4L8sdUzlezzbY3UzDuPjyde2R0SQ06q X-Received: by 2002:a17:906:3913:: with SMTP id f19mr14273736eje.161.1571503586851; Sat, 19 Oct 2019 09:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571503586; cv=none; d=google.com; s=arc-20160816; b=poRSL00Jk3iowrxCd9RbrZKMlyMdLHriOuzzpSPw7eyNaXZuu7q9FBvveEdNynCsEG JPqSNN6bJmeo7vTOVyBW0P0HPRqyPqwvrd8qFHjdrQQTrK2QaUlxe98ojKJF5bBbVfA2 7Nb7IoRusudzLxPJS/Ha0Xb6h3DI9knOr5RNV01B4na4urLgKJQS4ww86IRZtfONBvqN MqW2XcSUNxU2wLg2tklDJEJB7744Sm0wIVvgHTaM1YUhrYXKza8deGNm4tqxifpujt7X DL48G1OiF2IgvqGyMh6h3vYxISzbgXUjGZicb4aD1KWtxC5vz3PevMVeZcKcH7Lfs+3/ s25w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=0bulbVbLFGY/pgLXwzKHTMch+8Jp9lMq9IfLMGu0aYU=; b=pyVzAnbOeMbZpd4Ali+iuAB3wwVktagLaBfcdPaYgJhYwrQQcsl1hSo1uDSZUcogvJ CAxNpe5zedmshOx6dQEmUpAeoipysCVYVKXpYGR+FgTPWkVMYVtqDMCezbxDFYQof+Sh NEfy8sd80i5u2dzOSIbCivFQGf0/+tIu0+kMwbAZhxKtMEwSjRiJXN8nRr7egjALnKFW o0I3m2Bj2jVqbGdroQh7jfGlBfk4R2NeWDJ1KPtt38SkW65NUfMRBHeHGMYsnWdBBt55 vcvR4yXzRFLfAzDsb6sUux46ZRzVt7A6CrGlhDk3jkMrlhwr67SkXXcoL0CDZCDRjSsM 4RuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HgIyqCuU; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b26si5419642eju.87.2019.10.19.09.46.02; Sat, 19 Oct 2019 09:46: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=@gmail.com header.s=20161025 header.b=HgIyqCuU; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726180AbfJSQmj (ORCPT + 99 others); Sat, 19 Oct 2019 12:42:39 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35957 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfJSQmj (ORCPT ); Sat, 19 Oct 2019 12:42:39 -0400 Received: by mail-wr1-f68.google.com with SMTP id w18so8782253wrt.3 for ; Sat, 19 Oct 2019 09:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0bulbVbLFGY/pgLXwzKHTMch+8Jp9lMq9IfLMGu0aYU=; b=HgIyqCuUO+e+giNE3pXqdKKKNkzDBd/g7tALz2r5hkQthl3/8yUK+5arjmMrt0O7nR koMmynGdv1ZbjNfbEVxCr7dngv4FM5oaZ+hgqvVReIcaoMKpfMly6lBltbyE1kQtgYoF XY5hDpI0yXdzWh3LM+xXCymu6CMemw+vwM+slnxnoeNW340l94hK9kFbdBo80TS8bQkR aBWxDWy7ANe+niAEN/yPp+gxgHyyXxtTeaKcicBuhuz87s/NiSqS9cXV3xptQZ5RgRgd BI0B7i9xUUiowVJCJtVphjcGoje5iyciLfiUFPRH8rZaVSgcTX8eoMJwfMYaKBAykGLI LpiQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0bulbVbLFGY/pgLXwzKHTMch+8Jp9lMq9IfLMGu0aYU=; b=P0Nq7K+Wm0/K3qezltUacdYDrpTTaoTPMMKaklsHouogVjy8pSSIar1z3qmGHtXbkh h+HOBulB1QS9xvRtHtXNvDkxNPKv70QvmpSoRa4DlKHkaLY4hEBjkyyfsli/g5B6YdjX GvS1qw/oi7cuOpvgt73Fcy9v2lfgjgUyDguB7cKbyFEWALnNdEsPHL4Acju0MsZ+0kUd Us8/n0ok5MERF/3C+eVoHU3dNl4igrjKdW6poGsYFyNqZBowQKsJOCyZAWSNBxXwstrI 6SyXPYVI5wZB25lweYv8dsX0QaSbmN+v3elMQVSWHrJKdXbzaxueEAsEvQ6qKF3oUXa5 vj+Q== X-Gm-Message-State: APjAAAXoNHbDW/g8Px3+Gg4L1dzqhPDxC64pbgy4WkVXNtAgTj6MpYNM 3cPL19odTItxyaHBDCjK1Bw= X-Received: by 2002:adf:8567:: with SMTP id 94mr9317417wrh.65.1571503356410; Sat, 19 Oct 2019 09:42:36 -0700 (PDT) Received: from giga-mm ([62.68.26.146]) by smtp.gmail.com with ESMTPSA id 143sm15047896wmb.33.2019.10.19.09.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 09:42:35 -0700 (PDT) Date: Sat, 19 Oct 2019 18:42:34 +0200 From: Alexander Sverdlin To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hartley Sweeten , Hubert Feurstein , Lukasz Majewski Subject: Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ Message-Id: <20191019184234.4cdb37a735fe632528880d76@gmail.com> In-Reply-To: <20191018163047.1284736-2-arnd@arndb.de> References: <20191018163047.1284736-1-arnd@arndb.de> <20191018163047.1284736-2-arnd@arndb.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Arnd, On Fri, 18 Oct 2019 18:29:15 +0200 Arnd Bergmann wrote: > Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS > globally. Do the minimal conversion by setting .nr_irqs in each > machine descriptor. > > Only the vision_ep9307 machine has extra IRQs for GPIOs, so make > .nr_irqs the original value there, while using the plain NR_EP93XX_IRQS > everywhere else. This patch causes multiple problems on EDB9302: 1. WARNINGs during gpiochip registration, for instance: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at kernel/irq/chip.c:1013 __irq_do_set_handler+0x94/0x188 CPU: 0 PID: 1 Comm: swapper Tainted: G W 5.4.0-rc3 #1 Hardware name: Cirrus Logic EDB9302 Evaluation Board [] (unwind_backtrace) from [] (show_stack+0x10/0x18) [] (show_stack) from [] (dump_stack+0x18/0x24) [] (dump_stack) from [] (__warn+0xa4/0xc8) [] (__warn) from [] (warn_slowpath_fmt+0xa8/0xb8) [] (warn_slowpath_fmt) from [] (__irq_do_set_handler+0x94/0x188) [] (__irq_do_set_handler) from [] (irq_set_chained_handler_and_data+0x48/0x7c) [] (irq_set_chained_handler_and_data) from [] (gpiochip_add_data_with_key+0x6d4/0xabc) [] (gpiochip_add_data_with_key) from [] (devm_gpiochip_add_data+0x40/0x88) [] (devm_gpiochip_add_data) from [] (ep93xx_gpio_probe+0x1ac/0x280) [] (ep93xx_gpio_probe) from [] (platform_drv_probe+0x28/0x6c) [] (platform_drv_probe) from [] (really_probe+0x1c8/0x340) [] (really_probe) from [] (bus_for_each_drv+0x58/0xc0) [] (bus_for_each_drv) from [] (__device_attach+0xb4/0x104) [] (__device_attach) from [] (bus_probe_device+0x8c/0x94) [] (bus_probe_device) from [] (device_add+0x3d0/0x59c) [] (device_add) from [] (platform_device_add+0x100/0x20c) [] (platform_device_add) from [] (ep93xx_init_devices+0x16c/0x20c) [] (ep93xx_init_devices) from [] (edb93xx_init_machine+0xc/0x84) [] (edb93xx_init_machine) from [] (customize_machine+0x20/0x38) [] (customize_machine) from [] (do_one_initcall+0x78/0x1a0) [] (do_one_initcall) from [] (kernel_init_freeable+0x104/0x1b8) [] (kernel_init_freeable) from [] (kernel_init+0x8/0xf8) [] (kernel_init) from [] (ret_from_fork+0x14/0x24) Exception stack(0xc4433fb0 to 0xc4433ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ---[ end trace 8f9e35e2d6224882 ]--- 2. Broken sound (I2S), this looks like below in the log: ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0 CS4271: ASoC: pcm constructor failed: -22 edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22 And /proc/interrupts has two entries less. Without patch: # cat /proc/interrupts CPU0 7: 0 VIC 7 Edge i2s-pcm-out 8: 0 VIC 8 Edge i2s-pcm-in 39: 2 VIC 7 Edge eth0 51: 7532 VIC 19 Edge ep93xx timer 52: 144 VIC 20 Edge uart-pl010 53: 4 VIC 21 Edge ep93xx-spi 60: 0 VIC 28 Edge ep93xx-i2s Err: 0 With patch: # cat /proc/interrupts CPU0 39: 146 VIC 7 Edge eth0 51: 162161 VIC 19 Edge ep93xx timer 52: 139 VIC 20 Edge uart-pl010 53: 4 VIC 21 Edge ep93xx-spi 60: 0 VIC 28 Edge ep93xx-i2s Err: 0 I will try to look into I2S problem... > --- > It's been a while since I did this, no idea what else is needed > here or if this is correct at all. > > Cc: Hartley Sweeten > Cc: Alexander Sverdlin > Cc: Hubert Feurstein > Cc: Lukasz Majewski > Signed-off-by: Arnd Bergmann > --- > arch/arm/Kconfig | 2 ++ > arch/arm/mach-ep93xx/adssphere.c | 1 + > arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++ > arch/arm/mach-ep93xx/gesbc9312.c | 1 + > arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 ------- > arch/arm/mach-ep93xx/micro9.c | 4 ++++ > arch/arm/mach-ep93xx/simone.c | 1 + > arch/arm/mach-ep93xx/snappercl15.c | 1 + > arch/arm/mach-ep93xx/soc.h | 1 + > arch/arm/mach-ep93xx/ts72xx.c | 3 ++- > arch/arm/mach-ep93xx/vision_ep9307.c | 1 + > 11 files changed, 22 insertions(+), 8 deletions(-) > rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (94%) -- Alexander Sverdlin.