Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1382523ybm; Sat, 30 May 2020 07:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVEneOvPtpVCcJM/O9woiCotzyQRmxg+y2DHmNQ2x/6v1nlOI3mZKRihSebOe6F0OHn7uN X-Received: by 2002:a17:906:7a19:: with SMTP id d25mr12352367ejo.333.1590848126561; Sat, 30 May 2020 07:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590848126; cv=none; d=google.com; s=arc-20160816; b=OxocBAdjgy8dhY7V3cU6byEsZdkhh1BbDESdEaShY91tEznXvH+jcr0mg58aEiYqjE ceKwzR3OPWXOzBSmYJ6v4xeogqMrDz9+mukVPcN4Td35Dj0vzrvGX+Ok1DHIShq1zcEF HGGz1eJ259RzkK0yl5l0QMAl9y0uUTDUO5NDg3IBxTiQLzvVnHMrAmxq1l4B2MOlMzCg MYvshrbIt/9/EM+IKHIHTqHqD0rorUxqnLPzAIU8DGqYm/WTPXOUnh33r0zsbvPPvPSI ROzolAFGJoQ7tVATaRrCTMCWtFUqusy6LSOhoZxuS7xQ4Z5Q1AAtjjrHK0j5ysI7cvJv jArA== 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:date:subject:cc:to:from :dkim-signature; bh=x58eHoVSj2EsoDHj00eFW2N6J24tVHIYG4kbz700Y+U=; b=Ttn8t7i7Bjbs/A9nX2IK3kbMyDDE5C5UE3LE7wNDl++Kh4ybYXQuTQ0H/JBFR+2VHE wZi0Hw/Wx4/fl3dLvKczkRfEwLjV12SOiqImYZMGRbOKJlTHCV/qQFGeuk+qf73bw2Yo J/TcQQxDIEiQ5jhPfMMram7Ks5F7jgBPA8B5vQgHyXb9K0pJe6abL0qBp2UTPidOp/ZK yh+Iudcl5112sVPwtuOXI0j0WCHEA2fyfUV75NS+izmHxdnNmXwlDKRdzZqgeHXmbrRB YM71Wj94uHX44hSmWfMoOX9XfuVTsOuHTTWEuDeEWnGS4k9Okje145rl+pN0MAHOufEM dTiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b="KOnE/fEg"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si7148281ejx.566.2020.05.30.07.15.03; Sat, 30 May 2020 07:15:26 -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=@gmx.net header.s=badeba3b8450 header.b="KOnE/fEg"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729109AbgE3ONT (ORCPT + 99 others); Sat, 30 May 2020 10:13:19 -0400 Received: from mout.gmx.net ([212.227.15.19]:35333 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729010AbgE3ONR (ORCPT ); Sat, 30 May 2020 10:13:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590847975; bh=VwkT9W/eCoeMypTuqR4X64dMx6qnkNnC0OSefVf8Ut0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=KOnE/fEgwMGIRcV+X+JFG01J41kK3TwmN9khzSF4Hs5bGbrBGra/AXxWnznHG8uKe y3OEWZ8tm0uojFo01dFKzmP/qO6u0r8dVfQLESHtGaa4YsRLl7grwP97KmEXAC+qCm 0X/KXT+9pKxM5S7LL2oWVay1wvTDC2b+Q9O/T8fc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MN5eR-1jOkGQ1j2T-00J2CL; Sat, 30 May 2020 16:12:55 +0200 From: Oscar Carter To: Kees Cook , Thomas Gleixner , Jason Cooper , Marc Zyngier , "Rafael J. Wysocki" , Len Brown Cc: Oscar Carter , kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 2/3] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY Date: Sat, 30 May 2020 16:12:17 +0200 Message-Id: <20200530141218.4690-3-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530141218.4690-1-oscar.carter@gmx.com> References: <20200530141218.4690-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:KSFJmjg5dkwrVKgtoNNJGFp5HGBWuPjWSuoaFf3Pyd8FrL91ODF D0aKga5ATiXUGeeglnF0FS7ilmNRRmHJvLFfs1pxJzlZi+Wz0MF+qSMOc/qHS6WzKA2Pnbf 2JTQvaHJcU+nL1/YKfoj5op9ziwODLSiC+CFWx+iCFBCpgEOOOXqUVASECaajogHxlXwBap fbwBF0PwDbLxHMn8F64Eg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qORPe2HUidY=:yIsJzNxV6Spub5Z+bZyi93 NwWxNzvCiTI70Hwz9u82g3hLT4YMU+QGXyJCBaha+0DY0DltbB/bWQCDKTCxwS3WAVX++NHef XI5YwGXWiv+RyzsrRGjNvKAyh+Y0SI4GFq+18i/7LQY9s8rOjOUkB/n4JlSc5OKKv0HYoxxhx SO4wHaOogVZ9flzXV1DDLaiyt9wuVNXPAZnp8MNZOTftYoAFmfcd/3Cvy2p5kjGSxiEoas8aX +T8BChYG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mailing-List: linux-kernel@vger.kernel.org In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, there are the need to remove all the function callback casts. To do this, modify the IRQCHIP_ACPI_DECLARE macro to use the new defined macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY instead of the macro ACPI_DECLARE_PROBE_ENTRY. This is necessary to be able to initialize the the acpi_probe_entry struct using the probe_subtbl field instead of the probe_table field and avoid function cast mismatches. Also, modify the prototype of the functions used by the invocation of the IRQCHIP_ACPI_DECLARE macro to match all the parameters. Signed-off-by: Oscar Carter =2D-- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c | 2 +- include/linux/irqchip.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index d7006ef18a0d..3870e9d4d3a8 100644 =2D-- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -2117,7 +2117,7 @@ static void __init gic_acpi_setup_kvm_info(void) } static int __init -gic_acpi_init(struct acpi_subtable_header *header, const unsigned long en= d) +gic_acpi_init(union acpi_subtable_headers *header, const unsigned long en= d) { struct acpi_madt_generic_distributor *dist; struct fwnode_handle *domain_handle; diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 30ab623343d3..fc431857ce90 100644 =2D-- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -1593,7 +1593,7 @@ static void __init gic_acpi_setup_kvm_info(void) gic_set_kvm_info(&gic_v2_kvm_info); } -static int __init gic_v2_acpi_init(struct acpi_subtable_header *header, +static int __init gic_v2_acpi_init(union acpi_subtable_headers *header, const unsigned long end) { struct acpi_madt_generic_distributor *dist; diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 950e4b2458f0..447f22880a69 100644 =2D-- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -39,8 +39,9 @@ * @fn: initialization function */ #define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \ - ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \ - subtable, validate, data, fn) + ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(irqchip, name, \ + ACPI_SIG_MADT, subtable, \ + validate, data, fn) #ifdef CONFIG_IRQCHIP void irqchip_init(void); =2D- 2.20.1