Skip to content

Commit 358f8c7

Browse files
Automatic merge of 'next-test' into merge-test (2024-12-18 14:05)
2 parents 671ef61 + d629d7a commit 358f8c7

File tree

16 files changed

+103
-125
lines changed

16 files changed

+103
-125
lines changed

Documentation/ABI/testing/sysfs-class-cxl Documentation/ABI/obsolete/sysfs-class-cxl

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
The cxl driver is no longer maintained, and will be removed from the kernel in
2+
the near future.
3+
14
Please note that attributes that are shared between devices are stored in
25
the directory pointed to by the symlink device/.
36
For example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is

MAINTAINERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -6228,8 +6228,8 @@ CXL (IBM Coherent Accelerator Processor Interface CAPI) DRIVER
62286228
M: Frederic Barrat <[email protected]>
62296229
M: Andrew Donnellan <[email protected]>
62306230
6231-
S: Supported
6232-
F: Documentation/ABI/testing/sysfs-class-cxl
6231+
S: Obsolete
6232+
F: Documentation/ABI/obsolete/sysfs-class-cxl
62336233
F: Documentation/arch/powerpc/cxl.rst
62346234
F: arch/powerpc/platforms/powernv/pci-cxl.c
62356235
F: drivers/misc/cxl/

arch/powerpc/include/asm/hugetlb.h

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515

1616
extern bool hugetlb_disabled;
1717

18+
static inline bool hugepages_supported(void)
19+
{
20+
if (hugetlb_disabled)
21+
return false;
22+
23+
return HPAGE_SHIFT != 0;
24+
}
25+
#define hugepages_supported hugepages_supported
26+
1827
void __init hugetlbpage_init_defaultsize(void);
1928

2029
int slice_is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,

arch/powerpc/kernel/process.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1960,8 +1960,8 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
19601960
* address of _start and the second entry is the TOC
19611961
* value we need to use.
19621962
*/
1963-
__get_user(entry, (unsigned long __user *)start);
1964-
__get_user(toc, (unsigned long __user *)start+1);
1963+
get_user(entry, (unsigned long __user *)start);
1964+
get_user(toc, (unsigned long __user *)start+1);
19651965

19661966
/* Check whether the e_entry function descriptor entries
19671967
* need to be relocated before we can use them.

arch/powerpc/kernel/vdso32_wrapper.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <linux/linkage.h>
33
#include <asm/page.h>
44

5-
__PAGE_ALIGNED_DATA
5+
.section ".data..ro_after_init", "aw"
66

77
.globl vdso32_start, vdso32_end
88
.balign PAGE_SIZE

arch/powerpc/kernel/vdso64_wrapper.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <linux/linkage.h>
33
#include <asm/page.h>
44

5-
__PAGE_ALIGNED_DATA
5+
.section ".data..ro_after_init", "aw"
66

77
.globl vdso64_start, vdso64_end
88
.balign PAGE_SIZE

arch/powerpc/platforms/8xx/cpm1.c

+60-59
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include <sysdev/fsl_soc.h>
4646

4747
#ifdef CONFIG_8xx_GPIO
48-
#include <linux/gpio/legacy-of-mm-gpiochip.h>
48+
#include <linux/gpio/driver.h>
4949
#endif
5050

5151
#define CPM_MAP_SIZE (0x4000)
@@ -376,7 +376,8 @@ int __init cpm1_clk_setup(enum cpm_clk_target target, int clock, int mode)
376376
#ifdef CONFIG_8xx_GPIO
377377

378378
struct cpm1_gpio16_chip {
379-
struct of_mm_gpio_chip mm_gc;
379+
struct gpio_chip gc;
380+
void __iomem *regs;
380381
spinlock_t lock;
381382

382383
/* shadowed data register to clear/set bits safely */
@@ -386,31 +387,27 @@ struct cpm1_gpio16_chip {
386387
int irq[16];
387388
};
388389

389-
static void cpm1_gpio16_save_regs(struct of_mm_gpio_chip *mm_gc)
390+
static void cpm1_gpio16_save_regs(struct cpm1_gpio16_chip *cpm1_gc)
390391
{
391-
struct cpm1_gpio16_chip *cpm1_gc =
392-
container_of(mm_gc, struct cpm1_gpio16_chip, mm_gc);
393-
struct cpm_ioport16 __iomem *iop = mm_gc->regs;
392+
struct cpm_ioport16 __iomem *iop = cpm1_gc->regs;
394393

395394
cpm1_gc->cpdata = in_be16(&iop->dat);
396395
}
397396

398397
static int cpm1_gpio16_get(struct gpio_chip *gc, unsigned int gpio)
399398
{
400-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
401-
struct cpm_ioport16 __iomem *iop = mm_gc->regs;
399+
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(gc);
400+
struct cpm_ioport16 __iomem *iop = cpm1_gc->regs;
402401
u16 pin_mask;
403402

404403
pin_mask = 1 << (15 - gpio);
405404

406405
return !!(in_be16(&iop->dat) & pin_mask);
407406
}
408407

409-
static void __cpm1_gpio16_set(struct of_mm_gpio_chip *mm_gc, u16 pin_mask,
410-
int value)
408+
static void __cpm1_gpio16_set(struct cpm1_gpio16_chip *cpm1_gc, u16 pin_mask, int value)
411409
{
412-
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
413-
struct cpm_ioport16 __iomem *iop = mm_gc->regs;
410+
struct cpm_ioport16 __iomem *iop = cpm1_gc->regs;
414411

415412
if (value)
416413
cpm1_gc->cpdata |= pin_mask;
@@ -422,38 +419,35 @@ static void __cpm1_gpio16_set(struct of_mm_gpio_chip *mm_gc, u16 pin_mask,
422419

423420
static void cpm1_gpio16_set(struct gpio_chip *gc, unsigned int gpio, int value)
424421
{
425-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
426-
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
422+
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(gc);
427423
unsigned long flags;
428424
u16 pin_mask = 1 << (15 - gpio);
429425

430426
spin_lock_irqsave(&cpm1_gc->lock, flags);
431427

432-
__cpm1_gpio16_set(mm_gc, pin_mask, value);
428+
__cpm1_gpio16_set(cpm1_gc, pin_mask, value);
433429

434430
spin_unlock_irqrestore(&cpm1_gc->lock, flags);
435431
}
436432

437433
static int cpm1_gpio16_to_irq(struct gpio_chip *gc, unsigned int gpio)
438434
{
439-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
440-
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
435+
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(gc);
441436

442437
return cpm1_gc->irq[gpio] ? : -ENXIO;
443438
}
444439

445440
static int cpm1_gpio16_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
446441
{
447-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
448-
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
449-
struct cpm_ioport16 __iomem *iop = mm_gc->regs;
442+
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(gc);
443+
struct cpm_ioport16 __iomem *iop = cpm1_gc->regs;
450444
unsigned long flags;
451445
u16 pin_mask = 1 << (15 - gpio);
452446

453447
spin_lock_irqsave(&cpm1_gc->lock, flags);
454448

455449
setbits16(&iop->dir, pin_mask);
456-
__cpm1_gpio16_set(mm_gc, pin_mask, val);
450+
__cpm1_gpio16_set(cpm1_gc, pin_mask, val);
457451

458452
spin_unlock_irqrestore(&cpm1_gc->lock, flags);
459453

@@ -462,9 +456,8 @@ static int cpm1_gpio16_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
462456

463457
static int cpm1_gpio16_dir_in(struct gpio_chip *gc, unsigned int gpio)
464458
{
465-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
466-
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
467-
struct cpm_ioport16 __iomem *iop = mm_gc->regs;
459+
struct cpm1_gpio16_chip *cpm1_gc = gpiochip_get_data(gc);
460+
struct cpm_ioport16 __iomem *iop = cpm1_gc->regs;
468461
unsigned long flags;
469462
u16 pin_mask = 1 << (15 - gpio);
470463

@@ -481,11 +474,10 @@ int cpm1_gpiochip_add16(struct device *dev)
481474
{
482475
struct device_node *np = dev->of_node;
483476
struct cpm1_gpio16_chip *cpm1_gc;
484-
struct of_mm_gpio_chip *mm_gc;
485477
struct gpio_chip *gc;
486478
u16 mask;
487479

488-
cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL);
480+
cpm1_gc = devm_kzalloc(dev, sizeof(*cpm1_gc), GFP_KERNEL);
489481
if (!cpm1_gc)
490482
return -ENOMEM;
491483

@@ -499,10 +491,8 @@ int cpm1_gpiochip_add16(struct device *dev)
499491
cpm1_gc->irq[i] = irq_of_parse_and_map(np, j++);
500492
}
501493

502-
mm_gc = &cpm1_gc->mm_gc;
503-
gc = &mm_gc->gc;
504-
505-
mm_gc->save_regs = cpm1_gpio16_save_regs;
494+
gc = &cpm1_gc->gc;
495+
gc->base = -1;
506496
gc->ngpio = 16;
507497
gc->direction_input = cpm1_gpio16_dir_in;
508498
gc->direction_output = cpm1_gpio16_dir_out;
@@ -512,42 +502,49 @@ int cpm1_gpiochip_add16(struct device *dev)
512502
gc->parent = dev;
513503
gc->owner = THIS_MODULE;
514504

515-
return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc);
505+
gc->label = devm_kasprintf(dev, GFP_KERNEL, "%pOF", np);
506+
if (!gc->label)
507+
return -ENOMEM;
508+
509+
cpm1_gc->regs = devm_of_iomap(dev, np, 0, NULL);
510+
if (IS_ERR(cpm1_gc->regs))
511+
return PTR_ERR(cpm1_gc->regs);
512+
513+
cpm1_gpio16_save_regs(cpm1_gc);
514+
515+
return devm_gpiochip_add_data(dev, gc, cpm1_gc);
516516
}
517517

518518
struct cpm1_gpio32_chip {
519-
struct of_mm_gpio_chip mm_gc;
519+
struct gpio_chip gc;
520+
void __iomem *regs;
520521
spinlock_t lock;
521522

522523
/* shadowed data register to clear/set bits safely */
523524
u32 cpdata;
524525
};
525526

526-
static void cpm1_gpio32_save_regs(struct of_mm_gpio_chip *mm_gc)
527+
static void cpm1_gpio32_save_regs(struct cpm1_gpio32_chip *cpm1_gc)
527528
{
528-
struct cpm1_gpio32_chip *cpm1_gc =
529-
container_of(mm_gc, struct cpm1_gpio32_chip, mm_gc);
530-
struct cpm_ioport32b __iomem *iop = mm_gc->regs;
529+
struct cpm_ioport32b __iomem *iop = cpm1_gc->regs;
531530

532531
cpm1_gc->cpdata = in_be32(&iop->dat);
533532
}
534533

535534
static int cpm1_gpio32_get(struct gpio_chip *gc, unsigned int gpio)
536535
{
537-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
538-
struct cpm_ioport32b __iomem *iop = mm_gc->regs;
536+
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(gc);
537+
struct cpm_ioport32b __iomem *iop = cpm1_gc->regs;
539538
u32 pin_mask;
540539

541540
pin_mask = 1 << (31 - gpio);
542541

543542
return !!(in_be32(&iop->dat) & pin_mask);
544543
}
545544

546-
static void __cpm1_gpio32_set(struct of_mm_gpio_chip *mm_gc, u32 pin_mask,
547-
int value)
545+
static void __cpm1_gpio32_set(struct cpm1_gpio32_chip *cpm1_gc, u32 pin_mask, int value)
548546
{
549-
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
550-
struct cpm_ioport32b __iomem *iop = mm_gc->regs;
547+
struct cpm_ioport32b __iomem *iop = cpm1_gc->regs;
551548

552549
if (value)
553550
cpm1_gc->cpdata |= pin_mask;
@@ -559,30 +556,28 @@ static void __cpm1_gpio32_set(struct of_mm_gpio_chip *mm_gc, u32 pin_mask,
559556

560557
static void cpm1_gpio32_set(struct gpio_chip *gc, unsigned int gpio, int value)
561558
{
562-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
563-
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
559+
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(gc);
564560
unsigned long flags;
565561
u32 pin_mask = 1 << (31 - gpio);
566562

567563
spin_lock_irqsave(&cpm1_gc->lock, flags);
568564

569-
__cpm1_gpio32_set(mm_gc, pin_mask, value);
565+
__cpm1_gpio32_set(cpm1_gc, pin_mask, value);
570566

571567
spin_unlock_irqrestore(&cpm1_gc->lock, flags);
572568
}
573569

574570
static int cpm1_gpio32_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
575571
{
576-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
577-
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
578-
struct cpm_ioport32b __iomem *iop = mm_gc->regs;
572+
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(gc);
573+
struct cpm_ioport32b __iomem *iop = cpm1_gc->regs;
579574
unsigned long flags;
580575
u32 pin_mask = 1 << (31 - gpio);
581576

582577
spin_lock_irqsave(&cpm1_gc->lock, flags);
583578

584579
setbits32(&iop->dir, pin_mask);
585-
__cpm1_gpio32_set(mm_gc, pin_mask, val);
580+
__cpm1_gpio32_set(cpm1_gc, pin_mask, val);
586581

587582
spin_unlock_irqrestore(&cpm1_gc->lock, flags);
588583

@@ -591,9 +586,8 @@ static int cpm1_gpio32_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
591586

592587
static int cpm1_gpio32_dir_in(struct gpio_chip *gc, unsigned int gpio)
593588
{
594-
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
595-
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(&mm_gc->gc);
596-
struct cpm_ioport32b __iomem *iop = mm_gc->regs;
589+
struct cpm1_gpio32_chip *cpm1_gc = gpiochip_get_data(gc);
590+
struct cpm_ioport32b __iomem *iop = cpm1_gc->regs;
597591
unsigned long flags;
598592
u32 pin_mask = 1 << (31 - gpio);
599593

@@ -610,19 +604,16 @@ int cpm1_gpiochip_add32(struct device *dev)
610604
{
611605
struct device_node *np = dev->of_node;
612606
struct cpm1_gpio32_chip *cpm1_gc;
613-
struct of_mm_gpio_chip *mm_gc;
614607
struct gpio_chip *gc;
615608

616-
cpm1_gc = kzalloc(sizeof(*cpm1_gc), GFP_KERNEL);
609+
cpm1_gc = devm_kzalloc(dev, sizeof(*cpm1_gc), GFP_KERNEL);
617610
if (!cpm1_gc)
618611
return -ENOMEM;
619612

620613
spin_lock_init(&cpm1_gc->lock);
621614

622-
mm_gc = &cpm1_gc->mm_gc;
623-
gc = &mm_gc->gc;
624-
625-
mm_gc->save_regs = cpm1_gpio32_save_regs;
615+
gc = &cpm1_gc->gc;
616+
gc->base = -1;
626617
gc->ngpio = 32;
627618
gc->direction_input = cpm1_gpio32_dir_in;
628619
gc->direction_output = cpm1_gpio32_dir_out;
@@ -631,7 +622,17 @@ int cpm1_gpiochip_add32(struct device *dev)
631622
gc->parent = dev;
632623
gc->owner = THIS_MODULE;
633624

634-
return of_mm_gpiochip_add_data(np, mm_gc, cpm1_gc);
625+
gc->label = devm_kasprintf(dev, GFP_KERNEL, "%pOF", np);
626+
if (!gc->label)
627+
return -ENOMEM;
628+
629+
cpm1_gc->regs = devm_of_iomap(dev, np, 0, NULL);
630+
if (IS_ERR(cpm1_gc->regs))
631+
return PTR_ERR(cpm1_gc->regs);
632+
633+
cpm1_gpio32_save_regs(cpm1_gc);
634+
635+
return devm_gpiochip_add_data(dev, gc, cpm1_gc);
635636
}
636637

637638
#endif /* CONFIG_8xx_GPIO */

drivers/macintosh/mac_hid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int mac_hid_toggle_emumouse(const struct ctl_table *table, int write,
215215
}
216216

217217
/* file(s) in /proc/sys/dev/mac_hid */
218-
static struct ctl_table mac_hid_files[] = {
218+
static const struct ctl_table mac_hid_files[] = {
219219
{
220220
.procname = "mouse_button_emulation",
221221
.data = &mouse_emulate_buttons,

drivers/misc/cxl/Kconfig

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ config CXL_BASE
99
select PPC_64S_HASH_MMU
1010

1111
config CXL
12-
tristate "Support for IBM Coherent Accelerators (CXL)"
12+
tristate "Support for IBM Coherent Accelerators (CXL) (DEPRECATED)"
1313
depends on PPC_POWERNV && PCI_MSI && EEH
1414
select CXL_BASE
15-
default m
1615
help
16+
The cxl driver is deprecated and will be removed in a future
17+
kernel release.
18+
1719
Select this option to enable driver support for IBM Coherent
1820
Accelerators (CXL). CXL is otherwise known as Coherent Accelerator
1921
Processor Interface (CAPI). CAPI allows accelerators in FPGAs to be

drivers/misc/cxl/of.c

+2
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ int cxl_of_probe(struct platform_device *pdev)
295295
int ret;
296296
int slice = 0, slice_ok = 0;
297297

298+
dev_err_once(&pdev->dev, "DEPRECATION: cxl is deprecated and will be removed in a future kernel release\n");
299+
298300
pr_devel("in %s\n", __func__);
299301

300302
np = pdev->dev.of_node;

drivers/misc/cxl/pci.c

+2
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,8 @@ static int cxl_probe(struct pci_dev *dev, const struct pci_device_id *id)
17261726
int slice;
17271727
int rc;
17281728

1729+
dev_err_once(&dev->dev, "DEPRECATED: cxl is deprecated and will be removed in a future kernel release\n");
1730+
17291731
if (cxl_pci_is_vphb_device(dev)) {
17301732
dev_dbg(&dev->dev, "cxl_init_adapter: Ignoring cxl vphb device\n");
17311733
return -ENODEV;

0 commit comments

Comments
 (0)