Skip to content

Commit 8a15dce

Browse files
committed
Minor changes done to harmonize with Linux kernel v6.10
1 parent 4fa2783 commit 8a15dce

File tree

8 files changed

+33
-9
lines changed

8 files changed

+33
-9
lines changed

src/kernel/drivers/net/can/sja1000/sja1000.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,22 @@ static const struct can_bittiming_const sja1000_bittiming_const = {
9393

9494
static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
9595
{
96+
#ifndef __QNX__
97+
unsigned long flags;
98+
#endif
99+
96100
/*
97101
* The command register needs some locking and time to settle
98102
* the write_reg() operation - especially on SMP systems.
99103
*/
104+
#ifndef __QNX__
105+
spin_lock_irqsave(&priv->cmdreg_lock, flags);
106+
#endif
100107
priv->write_reg(priv, SJA1000_CMR, val);
101108
priv->read_reg(priv, SJA1000_SR);
109+
#ifndef __QNX__
110+
spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
111+
#endif
102112
}
103113

104114
static int sja1000_is_absent(struct sja1000_priv *priv)
@@ -691,6 +701,10 @@ struct net_device *alloc_sja1000dev(int sizeof_priv)
691701
CAN_CTRLMODE_PRESUME_ACK |
692702
CAN_CTRLMODE_CC_LEN8_DLC;
693703

704+
#ifndef __QNX__
705+
spin_lock_init(&priv->cmdreg_lock);
706+
#endif
707+
694708
if (sizeof_priv)
695709
priv->priv = (void *)malloc(sizeof_priv);
696710

src/kernel/drivers/net/can/sja1000/sja1000.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ struct sja1000_priv {
181181

182182
void __iomem *reg_base; /* ioremap'ed address to registers */
183183
unsigned long irq_flags; /* for request_irq() */
184+
#ifndef __QNX__
185+
spinlock_t cmdreg_lock; /* lock for concurrent cmd register writes */
186+
#endif
184187

185188
u16 flags; /* custom mode flags */
186189
u8 ocr; /* output control register */

src/kernel/include/asm-generic/bitops/__fls.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
*
3939
* Undefined if no set bit exists, so code should check against 0 first.
4040
*/
41-
static __always_inline unsigned long generic___fls(unsigned long word)
41+
static __always_inline unsigned int generic___fls(unsigned long word)
4242
{
43-
int num = BITS_PER_LONG - 1;
43+
unsigned int num = BITS_PER_LONG - 1;
4444

4545
#if BITS_PER_LONG == 64
4646
if (!(word & (~0ul << 32))) {

src/kernel/include/linux/math64.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,12 @@ static __always_inline u64 mul_u64_u64_shr(u64 a, u64 mul, unsigned int shift)
203203
#ifndef mul_u64_u32_shr
204204
static __always_inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
205205
{
206-
u32 ah, al;
206+
u32 ah = a >> 32, al = a;
207207
u64 ret;
208208

209-
al = a;
210-
ah = a >> 32;
211-
212209
ret = mul_u32_u32(al, mul) >> shift;
213210
if (ah)
214211
ret += mul_u32_u32(ah, mul) << (32 - shift);
215-
216212
return ret;
217213
}
218214
#endif /* mul_u64_u32_shr */

src/kernel/include/linux/minmax.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#ifndef _LINUX_MINMAX_H
2727
#define _LINUX_MINMAX_H
2828

29-
#include <linux/const.h>
3029
#include <linux/build_bug.h>
30+
#include <linux/const.h>
3131

3232
/*
3333
* min()/max()/clamp() macros must accomplish three things:

src/kernel/include/linux/pci_ids.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,8 @@
26322632

26332633
#define PCI_VENDOR_ID_ALIBABA 0x1ded
26342634

2635+
#define PCI_VENDOR_ID_CXL 0x1e98
2636+
26352637
#define PCI_VENDOR_ID_TEHUTI 0x1fc9
26362638
#define PCI_DEVICE_ID_TEHUTI_3009 0x3009
26372639
#define PCI_DEVICE_ID_TEHUTI_3010 0x3010
@@ -2711,8 +2713,10 @@
27112713
#define PCI_DEVICE_ID_INTEL_I960 0x0960
27122714
#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
27132715
#define PCI_DEVICE_ID_INTEL_HDA_HSW_0 0x0a0c
2716+
#define PCI_DEVICE_ID_INTEL_DSA_SPR0 0x0b25
27142717
#define PCI_DEVICE_ID_INTEL_HDA_HSW_2 0x0c0c
27152718
#define PCI_DEVICE_ID_INTEL_CENTERTON_ILB 0x0c60
2719+
#define PCI_DEVICE_ID_INTEL_IAX_SPR0 0x0cfe
27162720
#define PCI_DEVICE_ID_INTEL_HDA_HSW_3 0x0d0c
27172721
#define PCI_DEVICE_ID_INTEL_HDA_BYT 0x0f04
27182722
#define PCI_DEVICE_ID_INTEL_SST_BYT 0x0f28
@@ -3131,6 +3135,7 @@
31313135
#define PCI_DEVICE_ID_INTEL_HDA_CML_S 0xa3f0
31323136
#define PCI_DEVICE_ID_INTEL_HDA_LNL_P 0xa828
31333137
#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
3138+
#define PCI_DEVICE_ID_INTEL_HDA_BMG 0xe2f7
31343139
#define PCI_DEVICE_ID_INTEL_HDA_CML_R 0xf0c8
31353140
#define PCI_DEVICE_ID_INTEL_HDA_RKL_S 0xf1c8
31363141

src/kernel/include/uapi/linux/if.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* \file uapi/linux/if.h
44
* \brief This file is originally from the Linux Kernel source-code and has
5-
* been modified by removing contents until only the defitions for
5+
* been modified by removing contents until only the definitions for
66
* IFNAMSIZ macro and enum net_device_flags remains.
77
*
88
* Global definitions for the INET interface module.

src/kernel/include/uapi/linux/pci_regs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,8 +1166,14 @@
11661166
#define PCI_DOE_DATA_OBJECT_HEADER_2_LENGTH 0x0003ffff
11671167

11681168
#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_INDEX 0x000000ff
1169+
#define PCI_DOE_DATA_OBJECT_DISC_REQ_3_VER 0x0000ff00
11691170
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_VID 0x0000ffff
11701171
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_PROTOCOL 0x00ff0000
11711172
#define PCI_DOE_DATA_OBJECT_DISC_RSP_3_NEXT_INDEX 0xff000000
11721173

1174+
/* Compute Express Link (CXL r3.1, sec 8.1.5) */
1175+
#define PCI_DVSEC_CXL_PORT 3
1176+
#define PCI_DVSEC_CXL_PORT_CTL 0x0c
1177+
#define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
1178+
11731179
#endif /* LINUX_PCI_REGS_H */

0 commit comments

Comments
 (0)