mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
This includes the following changes related to sparc for v7.2:
- 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 -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQQfqfbgobF48oKMeq81AykqDLayywUCajuFDhQcYW5kcmVhc0Bn YWlzbGVyLmNvbQAKCRA1AykqDLayy2QqAQDLwIeGHu6ZzVpAvmZlBn3Hl823/UoZ LnAn1UfSmXL3JQEAyeu/EN9/+8IVIDECWxYzSp+1OCLdla/v/cVrAvv7BQ4= =cUkR -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
0587402115
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
3
arch/sparc/include/uapi/asm/ucontext.h
Normal file
3
arch/sparc/include/uapi/asm/ucontext.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
|
||||
#include <asm/uctx.h>
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
EXPORT_SYMBOL(_mcount)
|
||||
.globl mcount
|
||||
.type mcount,#function
|
||||
EXPORT_SYMBOL(mcount)
|
||||
_mcount:
|
||||
mcount:
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user