mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'for-5.16/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller:
"Lots of new features and fixes:
- Added TOC (table of content) support, which is a debugging feature
which is either initiated by pressing the TOC button or via command
in the BMC. If pressed the Linux built-in KDB/KGDB will be called
(Sven Schnelle)
- Fix CONFIG_PREEMPT (Sven)
- Fix unwinder on 64-bit kernels (Sven)
- Various kgdb fixes (Sven)
- Added KFENCE support (me)
- Switch to ARCH_STACKWALK implementation (me)
- Fix ptrace check on syscall return (me)
- Fix kernel crash with fixmaps on PA1.x machines (me)
- Move thread_info into task struct, aka CONFIG_THREAD_INFO_IN_TASK
(me)
- Updated defconfigs
- Smaller cleanups, including Makefile cleanups (Masahiro Yamada),
use kthread_run() macro (Cai Huoqing), use swap() macro (Yihao
Han)"
* tag 'for-5.16/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (36 commits)
parisc: Fix set_fixmap() on PA1.x CPUs
parisc: Use swap() to swap values in setup_bootmem()
parisc: Update defconfigs
parisc: decompressor: clean up Makefile
parisc: decompressor: remove repeated depenency of misc.o
parisc: Remove unused constants from asm-offsets.c
parisc/ftrace: use static key to enable/disable function graph tracer
parisc/ftrace: set function trace function
parisc: Make use of the helper macro kthread_run()
parisc: mark xchg functions notrace
parisc: enhance warning regarding usage of O_NONBLOCK
parisc: Drop ifdef __KERNEL__ from non-uapi kernel headers
parisc: Use PRIV_USER and PRIV_KERNEL in ptrace.h
parisc: Use PRIV_USER in syscall.S
parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling
parisc: Move thread_info into task struct
parisc: add support for TOC (transfer of control)
parisc/firmware: add functions to retrieve TOC data
parisc: add PIM TOC data structures
parisc: move virt_map macro to assembly.h
...
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
| nds32: | ok |
|
||||
| nios2: | TODO |
|
||||
| openrisc: | TODO |
|
||||
| parisc: | TODO |
|
||||
| parisc: | ok |
|
||||
| powerpc: | ok |
|
||||
| riscv: | ok |
|
||||
| s390: | ok |
|
||||
|
||||
@@ -13,6 +13,8 @@ config PARISC
|
||||
select ARCH_NO_SG_CHAIN
|
||||
select ARCH_SUPPORTS_HUGETLBFS if PA20
|
||||
select ARCH_SUPPORTS_MEMORY_FAILURE
|
||||
select ARCH_STACKWALK
|
||||
select HAVE_RELIABLE_STACKTRACE
|
||||
select DMA_OPS
|
||||
select RTC_CLASS
|
||||
select RTC_DRV_GENERIC
|
||||
@@ -46,6 +48,7 @@ config PARISC
|
||||
select HAVE_ARCH_HASH
|
||||
select HAVE_ARCH_JUMP_LABEL
|
||||
select HAVE_ARCH_JUMP_LABEL_RELATIVE
|
||||
select HAVE_ARCH_KFENCE
|
||||
select HAVE_ARCH_SECCOMP_FILTER
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||
@@ -53,6 +56,7 @@ config PARISC
|
||||
select HAVE_UNSTABLE_SCHED_CLOCK if SMP
|
||||
select LEGACY_TIMER_TICK
|
||||
select CPU_NO_EFFICIENT_FFS
|
||||
select THREAD_INFO_IN_TASK
|
||||
select NEED_DMA_MAP_STATE
|
||||
select NEED_SG_DMA_LENGTH
|
||||
select HAVE_ARCH_KGDB
|
||||
@@ -252,11 +256,11 @@ config PARISC_PAGE_SIZE_4KB
|
||||
|
||||
config PARISC_PAGE_SIZE_16KB
|
||||
bool "16KB"
|
||||
depends on PA8X00 && BROKEN
|
||||
depends on PA8X00 && BROKEN && !KFENCE
|
||||
|
||||
config PARISC_PAGE_SIZE_64KB
|
||||
bool "64KB"
|
||||
depends on PA8X00 && BROKEN
|
||||
depends on PA8X00 && BROKEN && !KFENCE
|
||||
|
||||
endchoice
|
||||
|
||||
@@ -288,6 +292,20 @@ config SMP
|
||||
|
||||
If you don't know what to do here, say N.
|
||||
|
||||
config TOC
|
||||
bool "Support TOC switch"
|
||||
default y if 64BIT || !SMP
|
||||
help
|
||||
Most PA-RISC machines have either a switch at the back of the machine
|
||||
or a command in BMC to trigger a TOC interrupt. If you say Y here a
|
||||
handler will be installed which will either show a backtrace on all
|
||||
CPUs, or enter a possible configured debugger like kgdb/kdb.
|
||||
|
||||
Note that with this option enabled, the kernel will use an additional 16KB
|
||||
per possible CPU as a special stack for the TOC handler.
|
||||
|
||||
If you don't want to debug the Kernel, say N.
|
||||
|
||||
config PARISC_CPU_TOPOLOGY
|
||||
bool "Support cpu topology definition"
|
||||
depends on SMP
|
||||
|
||||
@@ -9,9 +9,10 @@ KCOV_INSTRUMENT := n
|
||||
GCOV_PROFILE := n
|
||||
UBSAN_SANITIZE := n
|
||||
|
||||
OBJECTS := head.o real2.o firmware.o misc.o piggy.o
|
||||
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
|
||||
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
|
||||
targets += misc.o piggy.o sizes.h head.o real2.o firmware.o
|
||||
targets += $(OBJECTS) sizes.h
|
||||
targets += real2.S firmware.c
|
||||
|
||||
KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
|
||||
@@ -23,10 +24,8 @@ ifndef CONFIG_64BIT
|
||||
KBUILD_CFLAGS += -mfast-indirect-calls
|
||||
endif
|
||||
|
||||
OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o
|
||||
|
||||
LDFLAGS_vmlinux := -X -e startup --as-needed -T
|
||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(LIBGCC) FORCE
|
||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\|parisc_kernel_start\)$$/\#define SZ\2 0x\1/p'
|
||||
@@ -52,8 +51,6 @@ $(obj)/real2.o: $(obj)/real2.S
|
||||
$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
|
||||
$(call cmd,shipped)
|
||||
|
||||
$(obj)/misc.o: $(obj)/sizes.h
|
||||
|
||||
CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
|
||||
$(obj)/vmlinux.lds: $(obj)/sizes.h
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ CONFIG_PCI_LBA=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_NET=y
|
||||
@@ -55,13 +54,14 @@ CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_ST=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_SCSI_LASI700=y
|
||||
CONFIG_SCSI_SYM53C8XX_2=y
|
||||
CONFIG_SCSI_ZALON=y
|
||||
CONFIG_SCSI_DH=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATA_GENERIC=y
|
||||
CONFIG_PATA_NS87415=y
|
||||
CONFIG_ATA_GENERIC=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_MD=m
|
||||
CONFIG_MD_LINEAR=m
|
||||
@@ -212,7 +212,6 @@ CONFIG_NFS_FS=m
|
||||
CONFIG_NFSD=m
|
||||
CONFIG_NFSD_V3=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_CIFS_XATTR=y
|
||||
CONFIG_CIFS_POSIX=y
|
||||
# CONFIG_CIFS_DEBUG is not set
|
||||
@@ -221,16 +220,12 @@ CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_TGR192=m
|
||||
CONFIG_CRYPTO_WP512=m
|
||||
CONFIG_CRYPTO_ANUBIS=m
|
||||
CONFIG_CRYPTO_BLOWFISH=m
|
||||
CONFIG_CRYPTO_CAST5=m
|
||||
CONFIG_CRYPTO_CAST6=m
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_KHAZAD=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
CONFIG_CRYPTO_TWOFISH=m
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRC_CCITT=m
|
||||
|
||||
@@ -8,9 +8,10 @@ CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_MEMCG_SWAP=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_RELAY=y
|
||||
@@ -124,14 +125,13 @@ CONFIG_QLCNIC=m
|
||||
# CONFIG_NET_VENDOR_TI is not set
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
CONFIG_MDIO_BITBANG=m
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_BROADCOM_PHY=m
|
||||
CONFIG_CICADA_PHY=m
|
||||
CONFIG_DAVICOM_PHY=m
|
||||
CONFIG_ICPLUS_PHY=m
|
||||
CONFIG_LSI_ET1011C_PHY=m
|
||||
CONFIG_LXT_PHY=m
|
||||
CONFIG_LSI_ET1011C_PHY=m
|
||||
CONFIG_MARVELL_PHY=m
|
||||
CONFIG_NATIONAL_PHY=m
|
||||
CONFIG_QSEMI_PHY=m
|
||||
@@ -139,6 +139,7 @@ CONFIG_REALTEK_PHY=m
|
||||
CONFIG_SMSC_PHY=m
|
||||
CONFIG_STE10XP=m
|
||||
CONFIG_VITESSE_PHY=m
|
||||
CONFIG_MDIO_BITBANG=m
|
||||
CONFIG_SLIP=m
|
||||
# CONFIG_WLAN is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
@@ -150,7 +151,6 @@ CONFIG_SERIO_SERPORT=m
|
||||
# CONFIG_HP_SDC is not set
|
||||
CONFIG_SERIO_RAW=m
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
CONFIG_NOZOMI=m
|
||||
CONFIG_SERIAL_8250=y
|
||||
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
@@ -160,6 +160,7 @@ CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_JSM=m
|
||||
CONFIG_NOZOMI=m
|
||||
CONFIG_IPMI_HANDLER=y
|
||||
CONFIG_IPMI_DEVICE_INTERFACE=y
|
||||
CONFIG_IPMI_SI=y
|
||||
@@ -188,9 +189,13 @@ CONFIG_AGP=y
|
||||
CONFIG_AGP_PARISC=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_RADEON=y
|
||||
CONFIG_FIRMWARE_EDID=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_MATROX=y
|
||||
CONFIG_FB_MATROX_MYSTIQUE=y
|
||||
CONFIG_FB_MATROX_G=y
|
||||
CONFIG_FB_MATROX_I2C=y
|
||||
CONFIG_FB_MATROX_MAVEN=y
|
||||
CONFIG_FB_RADEON=y
|
||||
CONFIG_HIDRAW=y
|
||||
CONFIG_HID_PID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
@@ -202,7 +207,6 @@ CONFIG_UIO_SERCOS3=m
|
||||
CONFIG_UIO_PCI_GENERIC=m
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_QLGE=m
|
||||
CONFIG_HP100=m
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT2_FS_SECURITY=y
|
||||
@@ -245,7 +249,6 @@ CONFIG_CRYPTO_PCBC=m
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=m
|
||||
CONFIG_CRYPTO_ARC4=m
|
||||
CONFIG_CRYPTO_FCRYPT=m
|
||||
CONFIG_CRYPTO_DEFLATE=m
|
||||
# CONFIG_CRYPTO_HW is not set
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#define ASM_ULONG_INSN .word
|
||||
#endif
|
||||
|
||||
/* Frame alignment for 32- and 64-bit */
|
||||
#define FRAME_ALIGN 64
|
||||
|
||||
#define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
|
||||
|
||||
#ifdef CONFIG_PA20
|
||||
@@ -58,6 +61,10 @@
|
||||
#define PA_ASM_LEVEL 1.1
|
||||
#endif
|
||||
|
||||
/* Privilege level field in the rightmost two bits of the IA queues */
|
||||
#define PRIV_USER 3
|
||||
#define PRIV_KERNEL 0
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
@@ -71,6 +78,7 @@
|
||||
#include <asm/types.h>
|
||||
|
||||
#include <asm/asmregs.h>
|
||||
#include <asm/psw.h>
|
||||
|
||||
sp = 30
|
||||
gp = 27
|
||||
@@ -497,6 +505,30 @@
|
||||
nop /* 7 */
|
||||
.endm
|
||||
|
||||
/* Switch to virtual mapping, trashing only %r1 */
|
||||
.macro virt_map
|
||||
/* pcxt_ssm_bug */
|
||||
rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */
|
||||
mtsp %r0, %sr4
|
||||
mtsp %r0, %sr5
|
||||
mtsp %r0, %sr6
|
||||
tovirt_r1 %r29
|
||||
load32 KERNEL_PSW, %r1
|
||||
|
||||
rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */
|
||||
mtctl %r0, %cr17 /* Clear IIASQ tail */
|
||||
mtctl %r0, %cr17 /* Clear IIASQ head */
|
||||
mtctl %r1, %ipsw
|
||||
load32 4f, %r1
|
||||
mtctl %r1, %cr18 /* Set IIAOQ tail */
|
||||
ldo 4(%r1), %r1
|
||||
mtctl %r1, %cr18 /* Set IIAOQ head */
|
||||
rfir
|
||||
nop
|
||||
4:
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
* ASM_EXCEPTIONTABLE_ENTRY
|
||||
*
|
||||
|
||||
@@ -104,8 +104,6 @@ static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr)
|
||||
|
||||
#include <asm-generic/bitops/non-atomic.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/**
|
||||
* __ffs - find first bit in word. returns 0 to "BITS_PER_LONG-1".
|
||||
* @word: The word to search
|
||||
@@ -205,16 +203,8 @@ static __inline__ int fls(unsigned int x)
|
||||
#include <asm-generic/bitops/hweight.h>
|
||||
#include <asm-generic/bitops/lock.h>
|
||||
#include <asm-generic/bitops/sched.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#include <asm-generic/bitops/find.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <asm-generic/bitops/le.h>
|
||||
#include <asm-generic/bitops/ext2-atomic-setbit.h>
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _PARISC_BITOPS_H */
|
||||
|
||||
19
arch/parisc/include/asm/current.h
Normal file
19
arch/parisc/include/asm/current.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_PARISC_CURRENT_H
|
||||
#define _ASM_PARISC_CURRENT_H
|
||||
|
||||
#include <asm/special_insns.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
struct task_struct;
|
||||
|
||||
static __always_inline struct task_struct *get_current(void)
|
||||
{
|
||||
return (struct task_struct *) mfctl(30);
|
||||
}
|
||||
|
||||
#define current get_current()
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_PARISC_CURRENT_H */
|
||||
@@ -2,8 +2,6 @@
|
||||
#ifndef _ASM_PARISC_FUTEX_H
|
||||
#define _ASM_PARISC_FUTEX_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/futex.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/atomic.h>
|
||||
@@ -119,5 +117,4 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /*_ASM_PARISC_FUTEX_H*/
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#ifndef __ASM_PARISC_IDE_H
|
||||
#define __ASM_PARISC_IDE_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* Generic I/O and MEMIO string operations. */
|
||||
|
||||
#define __ide_insw insw
|
||||
@@ -53,6 +51,4 @@ static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* __ASM_PARISC_IDE_H */
|
||||
|
||||
44
arch/parisc/include/asm/kfence.h
Normal file
44
arch/parisc/include/asm/kfence.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* PA-RISC KFENCE support.
|
||||
*
|
||||
* Copyright (C) 2021, Helge Deller <deller@gmx.de>
|
||||
*/
|
||||
|
||||
#ifndef _ASM_PARISC_KFENCE_H
|
||||
#define _ASM_PARISC_KFENCE_H
|
||||
|
||||
#include <linux/kfence.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
static inline bool arch_kfence_init_pool(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Protect the given page and flush TLB. */
|
||||
static inline bool kfence_protect_page(unsigned long addr, bool protect)
|
||||
{
|
||||
pte_t *pte = virt_to_kpte(addr);
|
||||
|
||||
if (WARN_ON(!pte))
|
||||
return false;
|
||||
|
||||
/*
|
||||
* We need to avoid IPIs, as we may get KFENCE allocations or faults
|
||||
* with interrupts disabled.
|
||||
*/
|
||||
|
||||
if (protect)
|
||||
set_pte(pte, __pte(pte_val(*pte) & ~_PAGE_PRESENT));
|
||||
else
|
||||
set_pte(pte, __pte(pte_val(*pte) | _PAGE_PRESENT));
|
||||
|
||||
flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* _ASM_PARISC_KFENCE_H */
|
||||
@@ -1,10 +1,8 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef ASM_PARISC_MCKINLEY_H
|
||||
#define ASM_PARISC_MCKINLEY_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* declared in arch/parisc/kernel/setup.c */
|
||||
extern struct proc_dir_entry * proc_mckinley_root;
|
||||
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /*ASM_PARISC_MCKINLEY_H*/
|
||||
|
||||
@@ -51,6 +51,8 @@ int pdc_spaceid_bits(unsigned long *space_bits);
|
||||
int pdc_btlb_info(struct pdc_btlb_info *btlb);
|
||||
int pdc_mem_map_hpa(struct pdc_memory_map *r_addr, struct pdc_module_path *mod_path);
|
||||
#endif /* !CONFIG_PA20 */
|
||||
int pdc_pim_toc11(struct pdc_toc_pim_11 *ret);
|
||||
int pdc_pim_toc20(struct pdc_toc_pim_20 *ret);
|
||||
int pdc_lan_station_id(char *lan_addr, unsigned long net_hpa);
|
||||
|
||||
int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/threads.h>
|
||||
|
||||
#include <asm/assembly.h>
|
||||
#include <asm/prefetch.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/pdc.h>
|
||||
@@ -37,16 +38,12 @@
|
||||
#define DEFAULT_MAP_BASE DEFAULT_MAP_BASE32
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
|
||||
* prumpf */
|
||||
|
||||
#define STACK_TOP TASK_SIZE
|
||||
#define STACK_TOP_MAX DEFAULT_TASK_SIZE
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
unsigned long calc_max_stack_size(unsigned long stack_max);
|
||||
@@ -101,8 +98,6 @@ DECLARE_PER_CPU(struct cpuinfo_parisc, cpu_data);
|
||||
|
||||
#define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF)
|
||||
|
||||
#define ARCH_MIN_TASKALIGN 8
|
||||
|
||||
struct thread_struct {
|
||||
struct pt_regs regs;
|
||||
unsigned long task_size;
|
||||
@@ -294,6 +289,10 @@ extern int _parisc_requires_coherency;
|
||||
|
||||
extern int running_on_qemu;
|
||||
|
||||
extern void toc_handler(void);
|
||||
extern unsigned int toc_handler_size;
|
||||
extern unsigned int toc_handler_csum;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_PARISC_PROCESSOR_H */
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
#ifndef _PARISC_PTRACE_H
|
||||
#define _PARISC_PTRACE_H
|
||||
|
||||
#include <asm/assembly.h>
|
||||
#include <uapi/asm/ptrace.h>
|
||||
|
||||
|
||||
#define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
|
||||
|
||||
#define arch_has_single_step() 1
|
||||
#define arch_has_block_step() 1
|
||||
|
||||
/* XXX should we use iaoq[1] or iaoq[0] ? */
|
||||
#define user_mode(regs) (((regs)->iaoq[0] & 3) ? 1 : 0)
|
||||
#define user_space(regs) (((regs)->iasq[1] != 0) ? 1 : 0)
|
||||
#define user_mode(regs) (((regs)->iaoq[0] & 3) != PRIV_KERNEL)
|
||||
#define user_space(regs) ((regs)->iasq[1] != PRIV_KERNEL)
|
||||
#define instruction_pointer(regs) ((regs)->iaoq[0] & ~3)
|
||||
#define user_stack_pointer(regs) ((regs)->gr[30])
|
||||
unsigned long profile_pc(struct pt_regs *);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef ASM_PARISC_RUNWAY_H
|
||||
#define ASM_PARISC_RUNWAY_H
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* declared in arch/parisc/kernel/setup.c */
|
||||
extern struct proc_dir_entry * proc_runway_root;
|
||||
@@ -9,5 +8,4 @@ extern struct proc_dir_entry * proc_runway_root;
|
||||
#define RUNWAY_STATUS 0x10
|
||||
#define RUNWAY_DEBUG 0x40
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* ASM_PARISC_RUNWAY_H */
|
||||
|
||||
@@ -34,8 +34,23 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
||||
|
||||
#endif /* !ASSEMBLY */
|
||||
|
||||
#define raw_smp_processor_id() (current_thread_info()->cpu)
|
||||
|
||||
/*
|
||||
* This is particularly ugly: it appears we can't actually get the definition
|
||||
* of task_struct here, but we need access to the CPU this task is running on.
|
||||
* Instead of using task_struct we're using TASK_CPU which is extracted from
|
||||
* asm-offsets.h by kbuild to get the current processor ID.
|
||||
*
|
||||
* This also needs to be safeguarded when building asm-offsets.s because at
|
||||
* that time TASK_CPU is not defined yet. It could have been guarded by
|
||||
* TASK_CPU itself, but we want the build to fail if TASK_CPU is missing
|
||||
* when building something else than asm-offsets.s
|
||||
*/
|
||||
#ifdef GENERATING_ASM_OFFSETS
|
||||
#define raw_smp_processor_id() (0)
|
||||
#else
|
||||
#include <asm/asm-offsets.h>
|
||||
#define raw_smp_processor_id() (*(unsigned int *)((void *)current + TASK_CPU))
|
||||
#endif
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
static inline void smp_send_all_nop(void) { return; }
|
||||
|
||||
@@ -2,30 +2,21 @@
|
||||
#ifndef _ASM_PARISC_THREAD_INFO_H
|
||||
#define _ASM_PARISC_THREAD_INFO_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/processor.h>
|
||||
#include <asm/special_insns.h>
|
||||
|
||||
struct thread_info {
|
||||
struct task_struct *task; /* main task structure */
|
||||
unsigned long flags; /* thread_info flags (see TIF_*) */
|
||||
__u32 cpu; /* current CPU */
|
||||
int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */
|
||||
};
|
||||
|
||||
#define INIT_THREAD_INFO(tsk) \
|
||||
{ \
|
||||
.task = &tsk, \
|
||||
.flags = 0, \
|
||||
.cpu = 0, \
|
||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||
}
|
||||
|
||||
/* how to get the thread information struct from C */
|
||||
#define current_thread_info() ((struct thread_info *)mfctl(30))
|
||||
|
||||
#endif /* !__ASSEMBLY */
|
||||
|
||||
/* thread information allocation */
|
||||
@@ -57,6 +48,7 @@ struct thread_info {
|
||||
#define TIF_BLOCKSTEP 10 /* branch stepping? */
|
||||
#define TIF_SECCOMP 11 /* secure computing */
|
||||
#define TIF_SYSCALL_TRACEPOINT 12 /* syscall tracepoint instrumentation */
|
||||
#define TIF_NONBLOCK_WARNING 13 /* warned about wrong O_NONBLOCK usage */
|
||||
|
||||
#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
|
||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
@@ -87,6 +79,4 @@ struct thread_info {
|
||||
# define is_32bit_task() (1)
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ASM_PARISC_THREAD_INFO_H */
|
||||
|
||||
@@ -14,6 +14,7 @@ void parisc_terminate(char *msg, struct pt_regs *regs,
|
||||
void die_if_kernel(char *str, struct pt_regs *regs, long err);
|
||||
|
||||
/* mm/fault.c */
|
||||
unsigned long parisc_acctyp(unsigned long code, unsigned int inst);
|
||||
const char *trap_name(unsigned long code);
|
||||
void do_page_fault(struct pt_regs *regs, unsigned long code,
|
||||
unsigned long address);
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
|
||||
#include <asm-generic/unaligned.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct pt_regs;
|
||||
void handle_unaligned(struct pt_regs *regs);
|
||||
int check_unaligned(struct pt_regs *regs);
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_PARISC_UNALIGNED_H */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user