Received: by 10.223.176.46 with SMTP id f43csp1543863wra; Wed, 24 Jan 2018 19:11:30 -0800 (PST) X-Google-Smtp-Source: AH8x226EaCykDzNvn/O0+zWKfzCXNZDT4oO/T4AT5XmQaljotE59dZ5JzVEsKffCz+Ks5cSr09H5 X-Received: by 2002:a17:902:4101:: with SMTP id e1-v6mr9980346pld.332.1516849890079; Wed, 24 Jan 2018 19:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516849890; cv=none; d=google.com; s=arc-20160816; b=q2KuYH1B3Y0DU2yYIIoeS87MZCCQqHOF6yalxtBdbOjmysXicDacb1eUlbNRP7LDjz FjulARz+GGdGUvvFoYCrguFSt/QCK1AmpRW2A2zzkbNFoBh6KieuUXPGOzYj0eTt0JdJ ek/aHPFjNUNNF/DB2xMRIG5VePq/O6n7h3cXynMUGKWJYkOLwixKCT3aP9rQUtclectl 8VDA2JKFHWXrdNRGLO7HWl4LrEVLSL8Ryjcp+kq8mO0RNN70Fw4th2O6lyFGk5xcurq7 MHZOR45UJqLeRo7+n8+4sOHzSsneeF0cEN3unwb/tIFYFVCJMLCQmnRoDVnAU5ToWsA9 QLtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:cc:message-id:date:subject :dkim-signature:arc-authentication-results; bh=GKNdz/2PjmUSzXohrkS7jE9rrw/a4CcarARbYY/06Yk=; b=Weq9caQYlkp9vy1B1jiaZzbydcheVUEEqiZLmzKoIaTiuWwkaHuv1exG6YRCRgeziY qoh7HwVF0jcsf0BXXoFfS7rh24V1YBTdrEDTluxmfaS/Cg8HXIadqqVvBoJWXk7LCuzE QWdWh4Cu/NzWdd/xUQNaKG4hjT940BDRlRr+d+JrduCFeCp0pz7Bn/TMIq/T5xo/Ulp2 9naZSsCfHtGTBWSbv30LsH2DXvSbM9VqQr9rZhkCnc/vx7FIexMNkahM5sPqdm1+3ezO a0pKVMaP4hMVcHF0E6O0aWG9Vf+XHxtQ8MqlilkvctWTJqn3TIjbPjiewagcM6JQ32qY bL0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=gFlyJR+1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si1185909pls.611.2018.01.24.19.11.15; Wed, 24 Jan 2018 19:11:30 -0800 (PST) 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=@sifive.com header.s=google header.b=gFlyJR+1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933187AbeAYDIN (ORCPT + 99 others); Wed, 24 Jan 2018 22:08:13 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:45953 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932906AbeAYDIM (ORCPT ); Wed, 24 Jan 2018 22:08:12 -0500 Received: by mail-pf0-f176.google.com with SMTP id a88so4754092pfe.12 for ; Wed, 24 Jan 2018 19:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:cc:from:to; bh=GKNdz/2PjmUSzXohrkS7jE9rrw/a4CcarARbYY/06Yk=; b=gFlyJR+1PihSVbmGzd60xypzEJtfJzKx3cGrlZ+Prq8JJzLMt0nCEgu2gTIksGiGQx x1BkwLXypxfQWqIBS+E3b9FJ23wZaUmVcaBj8b9q8aOCp/OMkyx+sstV0asDHvaY2JZ9 6/bOeXPu8WNzfUPlk/c982iLqXHWLSMG58oevt9NX9a6U0IeA5VGfpp+R0+KrVG6KjMS crayo6ysZqKd52AggHCVf8b55NKIsx4DFsTX8vxEJy7fg0w/77TWkwW/pnKnTgiINam9 4uzv8RAmB1BwMTQf5NIsSwX1qNdMt5Kae2d6Rb+yayAvcLrmJeVGqHlChaqFFZ0Wi7AW w1jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:cc:from:to; bh=GKNdz/2PjmUSzXohrkS7jE9rrw/a4CcarARbYY/06Yk=; b=uEvAyWKlpYa4wK03S3oBs/4r0wMgN3Xcf9qLMncOTOXsS37Zf1GryDbUF/QuoFLF7U ROSDauCErTw5mbpSSHCJYBPF6W/br98SlLqIG9GzYQO1LXGTd8+EAEP/jC6OtfUvj+Y9 sWAc/0AI+pFFHXrt/37O0Ni3J0st/qfp1XxlzEgv27yYtQAxUXkr/bZZMko1FTBs4u5N +4GfihXfkyIdPecLy+yoIYi6zzWDWjLiEp48iE0NirH+YPuT0R/7V7RXGHwp3CPRLTKQ mmBaMzvEO1vDQqnDiuwIBoAb9q/HigaOhcrLEvAAkOh4F1S5ANEKrP7tUiiKDkqb8jBr hbow== X-Gm-Message-State: AKwxytfvfswSvxuEiGclGVgxlRD8AuEgMkEBUyUttURw3ycONKimvXmb nQQdR9qaVm6du9k2b5LCZUEWJA== X-Received: by 10.98.195.2 with SMTP id v2mr14462516pfg.141.1516849691837; Wed, 24 Jan 2018 19:08:11 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id c83sm12396569pfk.8.2018.01.24.19.08.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 19:08:11 -0800 (PST) Subject: Make set_handle_irq and handle_arch_irq generic Date: Wed, 24 Jan 2018 19:07:52 -0800 Message-Id: <20180125030756.21787-1-palmer@sifive.com> X-Mailer: git-send-email 2.13.6 Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, patches@groups.riscv.org From: Palmer Dabbelt To: linux@armlinux.org.uk, catalin.marinas@arm.com, Will Deacon , jonas@southpole.se, stefan.kristiansson@saunalahti.fi, shorne@gmail.com, tglx@linutronix.de, Christoph Hellwig , Arnd Bergmann Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is the second version of a patch set titled "Use arm64's scheme for registering first-level IRQ handlers on RISC-V". That patch set's cover letter is still the best way to describe what's going on, so I'm just copying it here: This patch set has been sitting around for a while, but it got a bit lost in the shuffle. In RISC-V land we currently couple do_IRQ (the C entry point for interrupt handling) to our first-level interrupt controller. While this isn't completely crazy (as the first-level interrupt controller is specified by the ISA), it is a bit awkward. This patch set decouples our trap handler from our first-level IRQ chip driver by copying what a handful of other architectures are doing. This does add an additional load to the interrupt handling path, but there's a handful of performance problems in there that I've been meaning to look at so I don't mind adding another one for now. The advantage is that our irqchip driver is decoupled from our arch port, at least at compile time. I've build tested this on arm, arm64, and openrisc but haven't run on any of those systems. The goal was to make no functional changes, but the __ro_after_init addition does actaully change behavior. Changes since v1: * I based this on arm instead of arm64, which means we guard the selection of these routines with CONFIG_MULTI_IRQ_HANDLER. * The changes are in kernel/irq/handle.c and include/linux/irq.h instead of lib. * I've converted the arm, arm64, and openrisc ports to use the generic versions of these routines.