mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] (1/6) alpha fixes
@ 2002-04-19  4:45 Alexander Viro
  2002-04-19  4:46 ` [PATCH] (2/6) " Alexander Viro
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

	Contents:
1)	bogus return value type for ->open() and ->release() on nfsd
(generic, caught on alpha since there ssize_t != int)

2)	missing defines/fields/includes for alpha (accumulated since 2.5.0)

3)	s/p_pptr/parent/, s/p_opptr/real_parent/ done for alpha

4)	(dumb) default_idle() provided (alpha)

5)	alpha/mm/init.c forgot to set max_pfn

6)	fixed off-by-PAGE_OFFSET in populate_pmd() (alpha, again)

	With that patchset the thing builds, boots and seems to be working
(on AS200).

diff -urN C8/fs/nfsd/nfsctl.c C8-nfsctl/fs/nfsd/nfsctl.c
--- C8/fs/nfsd/nfsctl.c	Sun Apr 14 17:53:09 2002
+++ C8-nfsctl/fs/nfsd/nfsctl.c	Thu Apr 18 23:21:29 2002
@@ -98,13 +98,13 @@
 	return size;
 }
 
-static ssize_t TA_open(struct inode *inode, struct file *file)
+static int TA_open(struct inode *inode, struct file *file)
 {
 	file->private_data = NULL;
 	return 0;
 }
 
-static ssize_t TA_release(struct inode *inode, struct file *file)
+static int TA_release(struct inode *inode, struct file *file)
 {
 	void *p = file->private_data;
 	file->private_data = NULL;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] (2/6) alpha fixes
  2002-04-19  4:45 [PATCH] (1/6) alpha fixes Alexander Viro
@ 2002-04-19  4:46 ` Alexander Viro
  2002-04-19  4:46   ` [PATCH] (3/6) " Alexander Viro
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


diff -urN C8-nfsctl/arch/alpha/kernel/semaphore.c C8-alpha-defines/arch/alpha/kernel/semaphore.c
--- C8-nfsctl/arch/alpha/kernel/semaphore.c	Tue Nov 20 18:49:31 2001
+++ C8-alpha-defines/arch/alpha/kernel/semaphore.c	Thu Apr 18 23:23:15 2002
@@ -5,8 +5,8 @@
  * (C) Copyright 1999, 2000 Richard Henderson
  */
 
+#include <linux/errno.h>
 #include <linux/sched.h>
-
 
 /*
  * Semaphores are implemented using a two-way counter:
diff -urN C8-nfsctl/include/asm-alpha/mman.h C8-alpha-defines/include/asm-alpha/mman.h
--- C8-nfsctl/include/asm-alpha/mman.h	Thu Mar 16 17:07:09 2000
+++ C8-alpha-defines/include/asm-alpha/mman.h	Thu Apr 18 23:23:15 2002
@@ -4,6 +4,7 @@
 #define PROT_READ	0x1		/* page can be read */
 #define PROT_WRITE	0x2		/* page can be written */
 #define PROT_EXEC	0x4		/* page can be executed */
+#define PROT_SEM	0x8		/* page may be used for atomic ops */
 #define PROT_NONE	0x0		/* page can not be accessed */
 
 #define MAP_SHARED	0x01		/* Share changes */
diff -urN C8-nfsctl/include/asm-alpha/siginfo.h C8-alpha-defines/include/asm-alpha/siginfo.h
--- C8-nfsctl/include/asm-alpha/siginfo.h	Sun Feb 10 23:06:16 2002
+++ C8-alpha-defines/include/asm-alpha/siginfo.h	Thu Apr 18 23:23:15 2002
@@ -108,6 +108,7 @@
 #define SI_ASYNCIO	-4		/* sent by AIO completion */
 #define SI_SIGIO	-5		/* sent by queued SIGIO */
 #define SI_TKILL	-6		/* sent by tkill system call */
+#define SI_DETHREAD	-7		/* sent by execve() killing subsidiary threads */
 
 #define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
 #define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
diff -urN C8-nfsctl/include/asm-alpha/thread_info.h C8-alpha-defines/include/asm-alpha/thread_info.h
--- C8-nfsctl/include/asm-alpha/thread_info.h	Tue Feb 19 22:33:05 2002
+++ C8-alpha-defines/include/asm-alpha/thread_info.h	Thu Apr 18 23:23:15 2002
@@ -20,6 +20,7 @@
 	struct exec_domain	*exec_domain;	/* execution domain */
 	mm_segment_t		addr_limit;	/* thread address space */
 	int			cpu;		/* current CPU */
+	int			preempt_count; /* 0 => preemptable, <0 => BUG */
 
 	int bpt_nsaved;
 	unsigned long bpt_addr[2];		/* breakpoint handling  */
@@ -52,6 +53,8 @@
 #define put_thread_info(ti) put_task_struct((ti)->task)
 
 #endif /* __ASSEMBLY__ */
+
+#define PREEMPT_ACTIVE		0x4000000
 
 /*
  * Thread information flags:
diff -urN C8-nfsctl/include/asm-alpha/unistd.h C8-alpha-defines/include/asm-alpha/unistd.h
--- C8-nfsctl/include/asm-alpha/unistd.h	Sun Apr 14 17:53:11 2002
+++ C8-alpha-defines/include/asm-alpha/unistd.h	Thu Apr 18 23:23:15 2002
@@ -528,6 +528,7 @@
 
 static inline long close(int fd)
 {
+	extern long sys_close(unsigned int);
 	return sys_close(fd);
 }
 
@@ -603,6 +604,6 @@
  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
  * but it doesn't work on all toolchains, so we just do it by hand
  */
-#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
+#define cond_syscall(x) asmlinkage long x(void) __attribute__((weak,alias("sys_ni_syscall")));
 
 #endif /* _ALPHA_UNISTD_H */
diff -urN C8-nfsctl/init/main.c C8-alpha-defines/init/main.c
--- C8-nfsctl/init/main.c	Sun Apr 14 17:53:13 2002
+++ C8-alpha-defines/init/main.c	Thu Apr 18 23:23:15 2002
@@ -271,6 +271,9 @@
 #else
 #define smp_init()	do { } while (0)
 #endif
+static inline void setup_per_cpu_areas(void)
+{
+}
 
 #else
 
diff -urN C8-nfsctl/lib/radix-tree.c C8-alpha-defines/lib/radix-tree.c
--- C8-nfsctl/lib/radix-tree.c	Sun Apr 14 17:53:13 2002
+++ C8-alpha-defines/lib/radix-tree.c	Thu Apr 18 23:23:15 2002
@@ -24,6 +24,7 @@
 #include <linux/module.h>
 #include <linux/radix-tree.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 
 /*
  * Radix tree node definition.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] (3/6) alpha fixes
  2002-04-19  4:46 ` [PATCH] (2/6) " Alexander Viro
@ 2002-04-19  4:46   ` Alexander Viro
  2002-04-19  4:47     ` [PATCH] (4/6) " Alexander Viro
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


diff -urN C8-alpha-defines/arch/alpha/kernel/osf_sys.c C8-pptr/arch/alpha/kernel/osf_sys.c
--- C8-alpha-defines/arch/alpha/kernel/osf_sys.c	Tue Feb 19 22:32:51 2002
+++ C8-pptr/arch/alpha/kernel/osf_sys.c	Thu Apr 18 23:25:18 2002
@@ -219,7 +219,7 @@
 	 * isn't actually going to matter, as if the parent happens
 	 * to change we can happily return either of the pids.
 	 */
-	(&regs)->r20 = tsk->p_opptr->pid;
+	(&regs)->r20 = tsk->real_parent->pid;
 	return tsk->pid;
 }
 
diff -urN C8-alpha-defines/arch/alpha/kernel/ptrace.c C8-pptr/arch/alpha/kernel/ptrace.c
--- C8-alpha-defines/arch/alpha/kernel/ptrace.c	Tue Feb 19 22:32:51 2002
+++ C8-pptr/arch/alpha/kernel/ptrace.c	Thu Apr 18 23:25:18 2002
@@ -292,7 +292,7 @@
 		if (request != PTRACE_KILL)
 			goto out;
 	}
-	if (child->p_pptr != current) {
+	if (child->parent != current) {
 		DBG(DBG_MEM, ("child not parent of this process\n"));
 		goto out;
 	}
diff -urN C8-alpha-defines/arch/alpha/kernel/signal.c C8-pptr/arch/alpha/kernel/signal.c
--- C8-alpha-defines/arch/alpha/kernel/signal.c	Tue Feb 19 22:32:51 2002
+++ C8-pptr/arch/alpha/kernel/signal.c	Thu Apr 18 23:25:18 2002
@@ -661,8 +661,8 @@
 				info.si_signo = signr;
 				info.si_errno = 0;
 				info.si_code = SI_USER;
-				info.si_pid = current->p_pptr->pid;
-				info.si_uid = current->p_pptr->uid;
+				info.si_pid = current->parent->pid;
+				info.si_uid = current->parent->uid;
 			}
 
 			/* If the (new) signal is now blocked, requeue it.  */
@@ -701,7 +701,7 @@
 			case SIGSTOP:
 				current->state = TASK_STOPPED;
 				current->exit_code = signr;
-				if (!(current->p_pptr->sig->action[SIGCHLD-1]
+				if (!(current->parent->sig->action[SIGCHLD-1]
 				      .sa.sa_flags & SA_NOCLDSTOP))
 					notify_parent(current, SIGCHLD);
 				schedule();



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] (4/6) alpha fixes
  2002-04-19  4:46   ` [PATCH] (3/6) " Alexander Viro
@ 2002-04-19  4:47     ` Alexander Viro
  2002-04-19  4:47       ` [PATCH] (5/6) " Alexander Viro
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


diff -urN C8-pptr/arch/alpha/kernel/process.c C8-cpu_idle/arch/alpha/kernel/process.c
--- C8-pptr/arch/alpha/kernel/process.c	Fri Mar  8 02:09:42 2002
+++ C8-cpu_idle/arch/alpha/kernel/process.c	Thu Apr 18 23:26:58 2002
@@ -54,15 +54,21 @@
 	return 0;
 }
 
+void default_idle(void)
+{
+	barrier();
+}
+
 void
 cpu_idle(void)
 {
 	while (1) {
+		void (*idle)(void) = default_idle;
 		/* FIXME -- EV6 and LCA45 know how to power down
 		   the CPU.  */
 
 		while (!need_resched())
-			barrier();
+			idle();
 		schedule();
 	}
 }



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] (5/6) alpha fixes
  2002-04-19  4:47     ` [PATCH] (4/6) " Alexander Viro
@ 2002-04-19  4:47       ` Alexander Viro
  2002-04-19  4:48         ` [PATCH] (6/6) " Alexander Viro
  2002-04-19  9:23         ` [PATCH] (5/6) " Oliver Pitzeier
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


diff -urN C8-cpu_idle/arch/alpha/mm/init.c C8-max_pfn/arch/alpha/mm/init.c
--- C8-cpu_idle/arch/alpha/mm/init.c	Fri Mar  8 02:09:42 2002
+++ C8-max_pfn/arch/alpha/mm/init.c	Thu Apr 18 23:28:48 2002
@@ -283,7 +283,7 @@
 	unsigned long dma_pfn, high_pfn;
 
 	dma_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
-	high_pfn = max_low_pfn;
+	high_pfn = max_pfn = max_low_pfn;
 
 	if (dma_pfn >= high_pfn)
 		zones_size[ZONE_DMA] = high_pfn;



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] (6/6) alpha fixes
  2002-04-19  4:47       ` [PATCH] (5/6) " Alexander Viro
@ 2002-04-19  4:48         ` Alexander Viro
  2002-04-19  9:23         ` [PATCH] (5/6) " Oliver Pitzeier
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Viro @ 2002-04-19  4:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


diff -urN C8-max_pfn/include/asm-alpha/pgalloc.h C8-populate_pmd/include/asm-alpha/pgalloc.h
--- C8-max_pfn/include/asm-alpha/pgalloc.h	Sun Apr 14 17:53:11 2002
+++ C8-populate_pmd/include/asm-alpha/pgalloc.h	Thu Apr 18 23:29:18 2002
@@ -12,7 +12,7 @@
 static inline void
 pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *pte)
 {
-	pmd_set(pmd, (pte_t *)((pte - mem_map) << PAGE_SHIFT));
+	pmd_set(pmd, (pte_t *)(((pte - mem_map) << PAGE_SHIFT) + PAGE_OFFSET));
 }
 
 static inline void



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] (5/6) alpha fixes
  2002-04-19  4:47       ` [PATCH] (5/6) " Alexander Viro
  2002-04-19  4:48         ` [PATCH] (6/6) " Alexander Viro
@ 2002-04-19  9:23         ` Oliver Pitzeier
  1 sibling, 0 replies; 7+ messages in thread
From: Oliver Pitzeier @ 2002-04-19  9:23 UTC (permalink / raw)
  To: 'Alexander Viro', 'Linus Torvalds'; +Cc: linux-kernel

Are those changes (all Patches) for alpha already in some
kernel? Or do I have to do it on my own? For what kernel
is this?

Best Regards,
  Oliver

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org 
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
> Alexander Viro
> Sent: Friday, April 19, 2002 6:47 AM
> To: Linus Torvalds
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH] (5/6) alpha fixes
> 
> 
> 
> diff -urN C8-cpu_idle/arch/alpha/mm/init.c 
> C8-max_pfn/arch/alpha/mm/init.c
> --- C8-cpu_idle/arch/alpha/mm/init.c	Fri Mar  8 02:09:42 2002
> +++ C8-max_pfn/arch/alpha/mm/init.c	Thu Apr 18 23:28:48 2002
> @@ -283,7 +283,7 @@
>  	unsigned long dma_pfn, high_pfn;
>  
>  	dma_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
> -	high_pfn = max_low_pfn;
> +	high_pfn = max_pfn = max_low_pfn;
>  
>  	if (dma_pfn >= high_pfn)
>  		zones_size[ZONE_DMA] = high_pfn;
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in the body of a message to 
> majordomo@vger.kernel.org More majordomo info at  
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-04-19  9:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-19  4:45 [PATCH] (1/6) alpha fixes Alexander Viro
2002-04-19  4:46 ` [PATCH] (2/6) " Alexander Viro
2002-04-19  4:46   ` [PATCH] (3/6) " Alexander Viro
2002-04-19  4:47     ` [PATCH] (4/6) " Alexander Viro
2002-04-19  4:47       ` [PATCH] (5/6) " Alexander Viro
2002-04-19  4:48         ` [PATCH] (6/6) " Alexander Viro
2002-04-19  9:23         ` [PATCH] (5/6) " Oliver Pitzeier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®