From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A3852857EE for ; Mon, 15 Dec 2025 21:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765835697; cv=none; b=WXnYnHcoa/odC0+Lto1PTjyJ/iLVCkp9vAsMi1CblVPPlkaQQxhUIrvjMjM0hG0j/1QHGCv26gnMmwJgsL+Ml4t1eQ5bVit1rtq/FdM2PNWFlifuEE03RsE4f5DGjvjEA8If/QOb0ibd4qrNxah7L2+3858r3yr6WY3cl5cWil0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765835697; c=relaxed/simple; bh=Ys9PX5OJDQV3p1mo7HMt0zbWbBnDZcFRjy4JCLpTyOs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OP/r+m00AGtxkPS4ehMexNA2xSnlxXReqv0OenBZxNTdZ2T+gqK2vyhoN4dybRXnCA0rj44YPFugac5eg65JH1pzck+u03QM75O+q3KIgbo46Mmqgydj1ZXvnjrWsZbEmO1raJDPLmAZsuMCi5NSk8eOtHI7J/qlw/SVSow4iuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WAKUZ308; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WAKUZ308" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-477b5e0323bso17216695e9.0 for ; Mon, 15 Dec 2025 13:54:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765835694; x=1766440494; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=S0gVhXTFg9zWfdIo9rMVKiNC2uPKLwZh3wLJdvlg9AM=; b=WAKUZ308VupohZpk+NELZDRQdtGufgWbmAKdyTGKG9B6UviLX+MMCMJpf+EWuvwSbQ ClgHJo9OGTohTKy2XLTbmV5lacnycEz6sSJwiztWaDrYjV/MXJD5YifQBlp17Mkr8CBq P3/1fnv+5qZgu5bJe0xFX0rsJWyFn+oURcrxXRZ2Ocl3ripsk/9CK8+mytOGjzuIZDia kbW9EQyzpxoEu/+qiPUFiBRPX774Hlk42Mdh2zZ6vr0d3BC9VRk2xx1TG9aLKSjdtJBU u2yK+yyXCX5JtLsFV3FgpTyvmxzALhBoPplyKI+g5/GalzlTqOE1JzCoFNYGEN0LwOns FUsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765835694; x=1766440494; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S0gVhXTFg9zWfdIo9rMVKiNC2uPKLwZh3wLJdvlg9AM=; b=C4qKpWZLdkfJtjo5DGxVXr5brS+99h2cy6MQ2FKVXIiI1HjqKOFuKGP8ACmETpTzZc 9y1D4qdE3rmDDsOtEmKaJvGnLN1rehRE9SNAqD+tx9U7hQKffvRhsYWPL4OzcxBn8NoA BjmQ99OphzaiD4/uPlmqV8Ec3zzC/hBg8bHoT/QXCJaXh2XWDoAoy/KuAssec1fSh7kk dF8KH3R4fJ6qKHu87TYtW7SE1giftsJCI2l6jkBBTxwIoX4sDUrLOi1S8jpW+LvouU16 5GBr2UQtJ+QUompMDS8kCd7sbW7Epo4elBYGLE60e0YqZhITa5xspbbfBQd1Y+IfB015 if5w== X-Forwarded-Encrypted: i=1; AJvYcCVZdTads6P8lvBR5UaMMsSyXdvItMtfuYeZyqF7H3s/csZWIHUle2cNRfNNnfgoD/NsnfBUAroaak21Oww=@vger.kernel.org X-Gm-Message-State: AOJu0YxBhldT3ilbN+GG7XvLdm2yJS0Z1SnKhTH9niRsx9BdAZNu6z7k 4s1v7vYjz/4orDgFsQhYPEktqDnsPrXqdTU656M81r8T8tGYtvuKnxv7 X-Gm-Gg: AY/fxX6tni4LVAwtwOSXZMGijkerJLtupMXybUJYlk2ju6rKO6zQ6o3A9uJ11G5bhgF 3vlnmLgSO3qPTiLkqIEc6OjkGcwyhTZVA3BXSTWRgzccPJgoBTu4XB/AUEGw8hi7/9iUHLBCP6Z wGgQIsSCX+I2U1L7FMTIqlWzpMcUWA/nFhCqKRhyOo8g9SnfyAz0KhfiG8FXr77W+dyoU3GVmS6 gupXmHHppksTtKzLD4y624mAGM00Xvdlb7RjJKXT0JjDEQXnUjzf3OyWlWEAxIxbPenemnMF7qZ rIOc1UNVYHnUhUQ72osGBh06RPR3crcxsOuB5RuFz+Yw2qRF8cOWeCQuCdCFEG4ZR818lLp7g+k 75kmUGvXBG/X2x25CLfKuNpdhJHL0G9KB/wvspRzhSWbqNyRTAIvxtLcLJDRDuq/Wj5/gjO4bu+ Ej5rpm90YHL+OrwIclchTQjeBcrAD8JLR6tLxSb2+bY3eZn7V5wrOVnxD8qP0gYuse X-Google-Smtp-Source: AGHT+IFTI4sYZEjMk9f2jahtygMSkLe3aHnWEHuPYwgG0FKH1gYqgH6WE4YA1M3QQ33/1/9P9JEDFg== X-Received: by 2002:a05:6000:186d:b0:425:86da:325f with SMTP id ffacd0b85a97d-42fb3ee6156mr13239778f8f.27.1765835693293; Mon, 15 Dec 2025 13:54:53 -0800 (PST) Received: from localhost (brnt-04-b2-v4wan-170138-cust2432.vm7.cable.virginm.net. [94.175.9.129]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42fb7118267sm24170397f8f.27.2025.12.15.13.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 13:54:52 -0800 (PST) Date: Mon, 15 Dec 2025 21:54:51 +0000 From: Stafford Horne To: Lyude Paul Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Boqun Feng , Daniel Almeida , Miguel Ojeda , Alex Gaynor , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Andrew Morton , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long Subject: Re: [PATCH v16 04/17] openrisc: Include in smp.h Message-ID: References: <20251215175806.102713-1-lyude@redhat.com> <20251215175806.102713-5-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251215175806.102713-5-lyude@redhat.com> On Mon, Dec 15, 2025 at 12:57:51PM -0500, Lyude Paul wrote: > While OpenRISC currently doesn't fail to build upstream, it appears that > include in the right headers is enough to break that - > primarily because OpenRISC's asm/smp.h header doesn't actually provide any > definition for struct cpumask. Which means the only reason we aren't > failing to build kernel is because we've been lucky enough that every spot > including asm/smp.h already has definitions for struct cpumask pulled in. > > This became evident when trying to work on a patch series for adding > ref-counted interrupt enable/disables to the kernel, where introducing a > new interrupt_rc.h header suddenly introduced a build error on OpenRISC: > > In file included from include/linux/interrupt_rc.h:17, > from include/linux/spinlock.h:60, > from include/linux/mmzone.h:8, > from include/linux/gfp.h:7, > from include/linux/mm.h:7, > from arch/openrisc/include/asm/pgalloc.h:20, > from arch/openrisc/include/asm/io.h:18, > from include/linux/io.h:12, > from drivers/irqchip/irq-ompic.c:61: > arch/openrisc/include/asm/smp.h:21:59: warning: 'struct cpumask' > declared inside parameter list will not be visible outside of this > definition or declaration > 21 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); > | ^~~~~~~ > arch/openrisc/include/asm/smp.h:23:54: warning: 'struct cpumask' > declared inside parameter list will not be visible outside of this > definition or declaration > 23 | extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); > | ^~~~~~~ > drivers/irqchip/irq-ompic.c: In function 'ompic_of_init': > >> drivers/irqchip/irq-ompic.c:191:28: error: passing argument 1 of > 'set_smp_cross_call' from incompatible pointer type > [-Werror=incompatible-pointer-types] > 191 | set_smp_cross_call(ompic_raise_softirq); > | ^~~~~~~~~~~~~~~~~~~ > | | > | void (*)(const struct cpumask *, unsigned int) > arch/openrisc/include/asm/smp.h:23:32: note: expected 'void (*)(const > struct cpumask *, unsigned int)' but argument is of type 'void > (*)(const struct cpumask *, unsigned int)' > 23 | extern void set_smp_cross_call(void (*)(const struct cpumask *, unsigned int)); > > To fix this, let's take an example from the smp.h headers of other > architectures (x86, hexagon, arm64, probably more): just include > linux/cpumask.h at the top. > > Signed-off-by: Lyude Paul > --- > arch/openrisc/include/asm/smp.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/openrisc/include/asm/smp.h b/arch/openrisc/include/asm/smp.h > index e21d2f12b5b67..0327d8cdae2d0 100644 > --- a/arch/openrisc/include/asm/smp.h > +++ b/arch/openrisc/include/asm/smp.h > @@ -9,6 +9,8 @@ > #ifndef __ASM_OPENRISC_SMP_H > #define __ASM_OPENRISC_SMP_H > > +#include > + > #include > #include This looks good to me. Acked-by: Stafford Horne