summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-06-24 12:39:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-06-24 12:39:09 -0700
commit05874021158ae80f6c3d867a784318f7cda41df6 (patch)
treea6bd5e75ef3ff0c64531d79699c0d022376a5f1e /arch
parent6535a84bfdc4ab56fc901cbd9bd0d1a22315aa93 (diff)
parent5b2a3b1a98fb47c593144c2770e012d463952b70 (diff)
downloadlinux-05874021158ae80f6c3d867a784318f7cda41df6.tar.gz
linux-05874021158ae80f6c3d867a784318f7cda41df6.zip
Merge tag 'sparc-for-7.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc
Pull sparc updates from Andreas Larsson: - Align sparc to other archs by providing ucontext.h wrapper - Fix buffer underflow in led driver - Export mcount for clang and disable compat when using lld for linking - API choice improvement for sysfs code for vio - Fix build warnings and notification of missing prototype - Remove dead code and dead configs * tag 'sparc-for-7.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc: sparc: Remove remaining defconfig references to the pktcdvd driver sparc: led: avoid trimming a newline from empty writes sparc: Export mcount for Clang-built modules sparc: Disable compat support with LLD sparc: Avoid -Wunused-but-set-parameter in clear_user_page() sparc: add _mcount() prototype sparc64: uprobes: add missing break sparc: remove unused SERIAL_CONSOLE config option sparc32: remove deadwood swift_flush_tlb_page() debug code sparc: uapi: Add ucontext.h sparc: vio: use sysfs_emit in sysfs show functions
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/Kconfig25
-rw-r--r--arch/sparc/configs/sparc64_defconfig2
-rw-r--r--arch/sparc/include/asm/asm-prototypes.h2
-rw-r--r--arch/sparc/include/asm/page_32.h2
-rw-r--r--arch/sparc/include/uapi/asm/ucontext.h3
-rw-r--r--arch/sparc/kernel/led.c2
-rw-r--r--arch/sparc/kernel/uprobes.c1
-rw-r--r--arch/sparc/kernel/vio.c9
-rw-r--r--arch/sparc/lib/mcount.S1
-rw-r--r--arch/sparc/mm/srmmu.c29
10 files changed, 16 insertions, 60 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index f83d5065c3cf..0e9c906c4b5d 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -326,30 +326,6 @@ config SPARC_LED
by reading /proc/led and its blinking mode can be changed
via writes to /proc/led
-config SERIAL_CONSOLE
- bool
- depends on SPARC32
- default y
- help
- If you say Y here, it will be possible to use a serial port as the
- system console (the system console is the device which receives all
- kernel messages and warnings and which allows logins in single user
- mode). This could be useful if some terminal or printer is connected
- to that serial port.
-
- Even if you say Y here, the currently visible virtual console
- (/dev/tty0) will still be used as the system console by default, but
- you can alter that using a kernel command line option such as
- "console=ttyS1". (Try "man bootparam" or see the documentation of
- your boot loader (silo) about how to pass options to the kernel at
- boot time.)
-
- If you don't have a graphics card installed and you say Y here, the
- kernel will automatically use the first serial line, /dev/ttyS0, as
- system console.
-
- If unsure, say N.
-
config SPARC_LEON
bool "Sparc Leon processor family"
depends on SPARC32
@@ -473,6 +449,7 @@ endmenu
config COMPAT
bool
depends on SPARC64
+ depends on !LD_IS_LLD
default y
select HAVE_UID16
select ARCH_WANT_OLD_COMPAT_IPC
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index 3763108c3bd4..34a6a31e6e14 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -60,8 +60,6 @@ CONFIG_CONNECTOR=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_WCACHE=y
CONFIG_ATA_OVER_ETH=m
CONFIG_SUNVDC=m
CONFIG_ATA=y
diff --git a/arch/sparc/include/asm/asm-prototypes.h b/arch/sparc/include/asm/asm-prototypes.h
index bbd1a8afaabf..a39a24c53216 100644
--- a/arch/sparc/include/asm/asm-prototypes.h
+++ b/arch/sparc/include/asm/asm-prototypes.h
@@ -25,6 +25,8 @@ void *memcpy(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);
typedef int TItype __attribute__((mode(TI)));
TItype __multi3(TItype a, TItype b);
+void _mcount(void);
+void mcount(void);
s64 __ashldi3(s64, int);
s64 __lshrdi3(s64, int);
diff --git a/arch/sparc/include/asm/page_32.h b/arch/sparc/include/asm/page_32.h
index c1bccbedf567..9f0b54f70908 100644
--- a/arch/sparc/include/asm/page_32.h
+++ b/arch/sparc/include/asm/page_32.h
@@ -20,10 +20,12 @@
#define clear_user_page(addr, vaddr, page) \
do { clear_page(addr); \
sparc_flush_page_to_ram(page); \
+ (void)(vaddr); \
} while (0)
#define copy_user_page(to, from, vaddr, page) \
do { copy_page(to, from); \
sparc_flush_page_to_ram(page); \
+ (void)(vaddr); \
} while (0)
/* The following structure is used to hold the physical
diff --git a/arch/sparc/include/uapi/asm/ucontext.h b/arch/sparc/include/uapi/asm/ucontext.h
new file mode 100644
index 000000000000..e9b5dbbedefb
--- /dev/null
+++ b/arch/sparc/include/uapi/asm/ucontext.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+#include <asm/uctx.h>
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
index f4fb82b019bb..9b53ac1fe533 100644
--- a/arch/sparc/kernel/led.c
+++ b/arch/sparc/kernel/led.c
@@ -78,7 +78,7 @@ static ssize_t led_proc_write(struct file *file, const char __user *buffer,
return PTR_ERR(buf);
/* work around \n when echo'ing into proc */
- if (buf[count - 1] == '\n')
+ if (count > 0 && buf[count - 1] == '\n')
buf[count - 1] = '\0';
/* before we change anything we want to stop any running timers,
diff --git a/arch/sparc/kernel/uprobes.c b/arch/sparc/kernel/uprobes.c
index 305017bec164..c8cac64e9988 100644
--- a/arch/sparc/kernel/uprobes.c
+++ b/arch/sparc/kernel/uprobes.c
@@ -280,6 +280,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self,
case DIE_SSTEP:
if (uprobe_post_sstep_notifier(args->regs))
ret = NOTIFY_STOP;
+ break;
default:
break;
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index 8b4f55047716..b7b06752a038 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/string.h>
+#include <linux/sysfs.h>
#include <linux/irq.h>
#include <linux/export.h>
#include <linux/init.h>
@@ -121,7 +122,7 @@ static ssize_t devspec_show(struct device *dev,
else if (!strcmp(vdev->type, "vdc-port"))
str = "vdisk";
- return sprintf(buf, "%s\n", str);
+ return sysfs_emit(buf, "%s\n", str);
}
static DEVICE_ATTR_RO(devspec);
@@ -129,7 +130,7 @@ static ssize_t type_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct vio_dev *vdev = to_vio_dev(dev);
- return sprintf(buf, "%s\n", vdev->type);
+ return sysfs_emit(buf, "%s\n", vdev->type);
}
static DEVICE_ATTR_RO(type);
@@ -138,7 +139,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
{
const struct vio_dev *vdev = to_vio_dev(dev);
- return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
+ return sysfs_emit(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
}
static DEVICE_ATTR_RO(modalias);
@@ -192,7 +193,7 @@ show_pciobppath_attr(struct device *dev, struct device_attribute *attr,
vdev = to_vio_dev(dev);
dp = vdev->dp;
- return scnprintf(buf, PAGE_SIZE, "%pOF\n", dp);
+ return sysfs_emit(buf, "%pOF\n", dp);
}
static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH,
diff --git a/arch/sparc/lib/mcount.S b/arch/sparc/lib/mcount.S
index f7f7910eb41e..0309ba2c4712 100644
--- a/arch/sparc/lib/mcount.S
+++ b/arch/sparc/lib/mcount.S
@@ -21,6 +21,7 @@
EXPORT_SYMBOL(_mcount)
.globl mcount
.type mcount,#function
+ EXPORT_SYMBOL(mcount)
_mcount:
mcount:
#ifdef CONFIG_FUNCTION_TRACER
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 1b24c5e8d73d..9a74902ad181 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -581,35 +581,6 @@ extern void swift_flush_tlb_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end);
extern void swift_flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
-#if 0 /* P3: deadwood to debug precise flushes on Swift. */
-void swift_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
-{
- int cctx, ctx1;
-
- page &= PAGE_MASK;
- if ((ctx1 = vma->vm_mm->context) != -1) {
- cctx = srmmu_get_context();
-/* Is context # ever different from current context? P3 */
- if (cctx != ctx1) {
- printk("flush ctx %02x curr %02x\n", ctx1, cctx);
- srmmu_set_context(ctx1);
- swift_flush_page(page);
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (page), "i" (ASI_M_FLUSH_PROBE));
- srmmu_set_context(cctx);
- } else {
- /* Rm. prot. bits from virt. c. */
- /* swift_flush_cache_all(); */
- /* swift_flush_cache_page(vma, page); */
- swift_flush_page(page);
-
- __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
- "r" (page), "i" (ASI_M_FLUSH_PROBE));
- /* same as above: srmmu_flush_tlb_page() */
- }
- }
-}
-#endif
/*
* The following are all MBUS based SRMMU modules, and therefore could