From 233382d3d0f5efb03128b9106845a7ff95b9d2a9 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 10 Jul 2003 06:25:31 -0700 Subject: [PATCH] parisc updates arch/parisc, drivers/parisc and include/asm-parisc updates: - Fixups for struct timespec changes (James Bottomley) - Add CONFIG_FRAME_POINTER (Thibaut Varene) - Fix hpux ustat emulation (Helge Deller) - Add a ->remove operation to struct parisc_device (James Bottomley) - More work on modules (James Bottomley) - More unaligned instructions handled (LaMont Jones) - Fix byteswap assembly (Grant Grundler) - Allow ISA support to be selected (Matthew Wilcox) - Fix swapping (James Bottomley) --- include/asm-parisc/byteorder.h | 4 ++-- include/asm-parisc/parisc-device.h | 1 + include/asm-parisc/pgtable.h | 8 ++++---- include/asm-parisc/processor.h | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-parisc/byteorder.h b/include/asm-parisc/byteorder.h index 7b3a2ab4ca1b..9ddeab1777a5 100644 --- a/include/asm-parisc/byteorder.h +++ b/include/asm-parisc/byteorder.h @@ -30,9 +30,9 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) */ static __inline__ __const__ __u64 ___arch__swab64(__u64 x) { __u64 temp; - __asm__("permh 3210, %0, %0\n\t" + __asm__("permh,3210 %0, %0\n\t" "hshl %0, 8, %1\n\t" - "hshr u, %0, 8, %0\n\t" + "hshr,u %0, 8, %0\n\t" "or %1, %0, %0" : "=r" (x), "=&r" (temp) : "0" (x)); diff --git a/include/asm-parisc/parisc-device.h b/include/asm-parisc/parisc-device.h index bd12a223bf3f..8af731a4c913 100644 --- a/include/asm-parisc/parisc-device.h +++ b/include/asm-parisc/parisc-device.h @@ -33,6 +33,7 @@ struct parisc_driver { char *name; const struct parisc_device_id *id_table; int (*probe) (struct parisc_device *dev); /* New device discovered */ + int (*remove) (struct parisc_device *dev); struct device_driver drv; }; diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index 0262435e1514..be75436b1e51 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -368,11 +368,11 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); /* Encode and de-code a swap entry */ #define __swp_type(x) ((x).val & 0x1f) -#define __swp_offset(x) ( (((x).val >> 5) & 0xf) | \ - (((x).val >> 7) & ~0xf) ) +#define __swp_offset(x) ( (((x).val >> 6) & 0x7) | \ + (((x).val >> 8) & ~0x7) ) #define __swp_entry(type, offset) ((swp_entry_t) { (type) | \ - ((offset & 0xf) << 5) | \ - ((offset & ~0xf) << 7) }) + ((offset & 0x7) << 6) | \ + ((offset & ~0x7) << 8) }) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index 55c38a184b8c..ded1c4904510 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h @@ -142,6 +142,7 @@ struct thread_struct { */ unsigned long thread_saved_pc(struct task_struct *t); +void show_trace(struct task_struct *task, unsigned long *stack); /* * Start user thread in another space. -- cgit v1.2.3 From e572d2bc759a5c7a7b927601ec7b11c0d09b6142 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 10 Jul 2003 06:25:52 -0700 Subject: [PATCH] Add two sysctls for PA-RISC Add two PA-RISC sysctls. --- include/linux/sysctl.h | 2 ++ kernel/sysctl.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'include') diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e037c4de0522..c7bd946843b4 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -130,6 +130,8 @@ enum KERN_PIDMAX=55, /* int: PID # limit */ KERN_CORE_PATTERN=56, /* string: pattern for core-file names */ KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */ + KERN_HPPA_PWRSW=58, /* int: hppa soft-power enable */ + KERN_HPPA_UNALIGNED=59, /* int: hppa unaligned-trap enable */ }; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index edebad7ddec4..d190b98f996a 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -87,6 +87,11 @@ extern char reboot_command []; extern int stop_a_enabled; #endif +#ifdef __hppa__ +extern int pwrsw_enabled; +extern int unaligned_enabled; +#endif + #ifdef CONFIG_ARCH_S390 #ifdef CONFIG_MATHEMU extern int sysctl_ieee_emulation_warnings; @@ -313,6 +318,30 @@ static ctl_table kern_table[] = { .proc_handler = &proc_dointvec, }, #endif +#ifdef __hppa__ + { + .ctl_name = KERN_HPPA_PWRSW, + .procname = "soft-power", + .data = &pwrsw_enabled, + .maxlen = sizeof (int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, + { + .ctl_name = KERN_HPPA_UNALIGNED, + .procname = "unaligned-trap", + .data = &unaligned_enabled, + .maxlen = sizeof (int), + .mode = 0644, + .proc_handler = &proc_dointvec, + }, +#endif +#ifdef __hppa__ + {KERN_HPPA_PWRSW, "soft-power", &pwrsw_enabled, sizeof (int), + 0644, NULL, &proc_dointvec}, + {KERN_HPPA_UNALIGNED, "unaligned-trap", &unaligned_enabled, sizeof (int), + 0644, NULL, &proc_dointvec}, +#endif #if defined(CONFIG_PPC32) && defined(CONFIG_6xx) { .ctl_name = KERN_PPC_POWERSAVE_NAP, -- cgit v1.2.3