Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 2.3.x broken
@ 1999-05-17  9:17 Jean-Baptiste Vignaud
  1999-05-17 18:01 ` Ivan Kokshaysky
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Baptiste Vignaud @ 1999-05-17  9:17 UTC (permalink / raw)
  To: axp-list

Hi.

I'v downloaded the 2.2.8->2.3.0, 2.3.1 and 2.3.2 patches and the compilation
(redhat/sx164)  fails for
2.3.1 and 2.3.2 in semaphore.h.

I seems that the alpha stuff is not up to date (regarding i386/m68k stuff).

Someone have a patch?

Jean-Baptiste Vignaud.


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

* Re: 2.3.x broken
  1999-05-17  9:17 2.3.x broken Jean-Baptiste Vignaud
@ 1999-05-17 18:01 ` Ivan Kokshaysky
  1999-05-18  7:14   ` Vignaud Jean-Baptiste
  1999-05-28  2:30   ` Robert Bowles
  0 siblings, 2 replies; 4+ messages in thread
From: Ivan Kokshaysky @ 1999-05-17 18:01 UTC (permalink / raw)
  To: Jean-Baptiste Vignaud, Richard Henderson; +Cc: axp-list

On Mon, May 17, 1999 at 11:17:01AM +0200, Jean-Baptiste Vignaud wrote:
> 
> I'v downloaded the 2.2.8->2.3.0, 2.3.1 and 2.3.2 patches and the compilation
> (redhat/sx164)  fails for
> 2.3.1 and 2.3.2 in semaphore.h.
> 

Here is the patch against 2.3.3. It compiles, though I haven't boot it.

Ivan

diff -ur linux-2.3.3/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
--- linux-2.3.3/arch/alpha/kernel/process.c	Fri May 14 23:41:23 1999
+++ linux/arch/alpha/kernel/process.c	Mon May 17 21:14:46 1999
@@ -58,10 +58,10 @@
 static struct file * init_fd_array[NR_OPEN] = { NULL, };
 static struct files_struct init_files = INIT_FILES;
 static struct signal_struct init_signals = INIT_SIGNALS;
-struct mm_struct init_mm = INIT_MM;
+struct mm_struct init_mm = INIT_MM(init_mm);
 
 union task_union init_task_union __attribute__((section("init_task")))
-	 = { task: INIT_TASK };
+	 = { task: INIT_TASK(init_task_union.task) };
 
 /*
  * No need to acquire the kernel lock, we're entirely local..
diff -ur linux-2.3.3/include/asm-alpha/semaphore.h linux/include/asm-alpha/semaphore.h
--- linux-2.3.3/include/asm-alpha/semaphore.h	Sun May 16 02:05:37 1999
+++ linux/include/asm-alpha/semaphore.h	Mon May 17 21:09:19 1999
@@ -11,20 +11,63 @@
 #include <asm/current.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
+#include <linux/wait.h>
 
 struct semaphore {
 	/* Careful, inline assembly knows about the position of these two.  */
 	atomic_t count;
 	atomic_t waking;		/* biased by -1 */
 	wait_queue_head_t wait;
+#if WAITQUEUE_DEBUG
+	long __magic;
+#endif
 };
 
-#define MUTEX ((struct semaphore) \
- { ATOMIC_INIT(1), ATOMIC_INIT(-1), NULL })
-#define MUTEX_LOCKED ((struct semaphore) \
- { ATOMIC_INIT(0), ATOMIC_INIT(-1), NULL })
+#if WAITQUEUE_DEBUG
+# define __SEM_DEBUG_INIT(name) \
+		, (long)&(name).__magic
+#else
+# define __SEM_DEBUG_INIT(name)
+#endif
+
+#define __SEMAPHORE_INITIALIZER(name,count) \
+{ ATOMIC_INIT(count), ATOMIC_INIT(-1), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
+	__SEM_DEBUG_INIT(name) }
+
+#define __MUTEX_INITIALIZER(name) \
+	__SEMAPHORE_INITIALIZER(name,1)
 
-#define sema_init(sem, val)	atomic_set(&((sem)->count), val)
+#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
+	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
+
+#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
+#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+
+extern inline void sema_init (struct semaphore *sem, int val)
+{
+/*
+ *	*sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
+ *
+ * i'd rather use the more flexible initialization above, but sadly
+ * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well.
+ */
+	atomic_set(&sem->count, val);
+	atomic_set(&sem->waking, -1);
+	init_waitqueue_head(&sem->wait);
+#if WAITQUEUE_DEBUG
+	sem->__magic = (long)&sem->__magic;
+#endif
+}
+
+static inline void init_MUTEX (struct semaphore *sem)
+{
+	sema_init(sem, 1);
+}
+
+static inline void init_MUTEX_LOCKED (struct semaphore *sem)
+{
+	sema_init(sem, 0);
+}
 
 extern void __down(struct semaphore * sem);
 extern int  __down_interruptible(struct semaphore * sem);
@@ -59,6 +102,10 @@
 	   the linker.  */
 	register void *pv __asm__("$27") = __down_failed;
 	
+#if WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
+
 	__asm__ __volatile__ (
 		"/* semaphore down operation */\n"
 		"1:	ldl_l	$24,%1\n"
@@ -90,6 +137,9 @@
 	register int ret __asm__("$24");
 	register void *pv __asm__("$27") = __down_failed_interruptible;
 
+#if WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
 	__asm__ __volatile__ (
 		"/* semaphore down interruptible operation */\n"
 		"1:	ldl_l	$24,%2\n"
@@ -125,6 +175,9 @@
 {
 	long ret, tmp, tmp2, sub;
 
+#if WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
 	/* "Equivalent" C.  Note that we have to do this all without
 	   (taken) branches in order to be a valid ll/sc sequence.
 
@@ -181,6 +234,9 @@
 
 	register void *pv __asm__("$27") = __up_wakeup;
 
+#if WAITQUEUE_DEBUG
+	CHECK_MAGIC(sem->__magic);
+#endif
 	__asm__ __volatile__ (
 		"/* semaphore up operation */\n"
 		"	mb\n"


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

* RE: 2.3.x broken
  1999-05-17 18:01 ` Ivan Kokshaysky
@ 1999-05-18  7:14   ` Vignaud Jean-Baptiste
  1999-05-28  2:30   ` Robert Bowles
  1 sibling, 0 replies; 4+ messages in thread
From: Vignaud Jean-Baptiste @ 1999-05-18  7:14 UTC (permalink / raw)
  To: axp-list



> On Mon, May 17, 1999 at 11:17:01AM +0200, Jean-Baptiste Vignaud wrote:
> >
> > I'v downloaded the 2.2.8->2.3.0, 2.3.1 and 2.3.2 patches and
> the compilation
> > (redhat/sx164)  fails for
> > 2.3.1 and 2.3.2 in semaphore.h.
> >
>
> Here is the patch against 2.3.3. It compiles, though I haven't boot it.

Tanks for this patch!
2.3.3+patch compile and boot.

I hope that this patch'll be in 2.3.4...

Just a word to say that 2.3.3 have a wrong version (SUBLEVEL in main
Makefile)
number wich tell that 2.3.3 is still 2.3.2 :)

Jean-Baptiste Vignaud


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

* Re: 2.3.x broken
  1999-05-17 18:01 ` Ivan Kokshaysky
  1999-05-18  7:14   ` Vignaud Jean-Baptiste
@ 1999-05-28  2:30   ` Robert Bowles
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Bowles @ 1999-05-28  2:30 UTC (permalink / raw)
  To: axp-list

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

On Mon, May 17, 1999 at 10:01:21PM +0400, Ivan Kokshaysky wrote:
> 
> On Mon, May 17, 1999 at 11:17:01AM +0200, Jean-Baptiste Vignaud wrote:
> > 
> > I'v downloaded the 2.2.8->2.3.0, 2.3.1 and 2.3.2 patches and the compilation
> > (redhat/sx164)  fails for
> > 2.3.1 and 2.3.2 in semaphore.h.
> > 
> 
> Here is the patch against 2.3.3. It compiles, though I haven't boot it.

Thank you.
I've been running with this patch on an LX164 problem-free (so far...)
Please find attached my '.config', such that problems might be more
easily pinned down.

On another note, have you posted this to the linux-kernel list?
(one of the mail-hubs at work went crazy and I lost a day of mail)

> 
> Ivan
> 
> diff -ur linux-2.3.3/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
>

<--snip--> (actual patch omitted for brevity)

> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> 

-- 
void rbowles(int sig)
{
	signal(sig, rbowles);
	raise(sig);
}

[-- Attachment #2: FOO --]
[-- Type: text/plain, Size: 1956 bytes --]

CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
CONFIG_ALPHA_LX164=y
CONFIG_PCI=y
CONFIG_ALPHA_EV5=y
CONFIG_ALPHA_PYXIS=y
CONFIG_PCI_QUIRKS=y
CONFIG_PCI_OLD_PROC=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_PNP=y
CONFIG_BLK_DEV_FD=m
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=m
CONFIG_PARIDE_PARPORT=y
CONFIG_BLK_DEV_IDE_MODES=y
CONFIG_PACKET=y
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ALIAS=y
CONFIG_SKB_LARGE=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SYM53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_ETHERTAP=m
CONFIG_NET_ETHERNET=y
CONFIG_YELLOWFIN=y
CONFIG_NET_ISA=y
CONFIG_NE2000=m
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=512
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
CONFIG_WATCHDOG=y
CONFIG_SOFT_WATCHDOG=m
CONFIG_RTC=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_BT848=m
CONFIG_JOYSTICK=m
CONFIG_JOY_ANALOG=m
CONFIG_AUTOFS_FS=y
CONFIG_ISO9660_FS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_ROMFS_FS=m
CONFIG_EXT2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_NFSD_SUN=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
CONFIG_PCI_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SOUND=m
CONFIG_SOUND_ES1371=m
CONFIG_SOUND_OSS=m
CONFIG_SOUND_SB=m
CONFIG_SOUND_ADLIB=m
CONFIG_SOUND_MSS=m
CONFIG_MATHEMU=y
CONFIG_MAGIC_SYSRQ=y

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

end of thread, other threads:[~1999-05-28  3:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-17  9:17 2.3.x broken Jean-Baptiste Vignaud
1999-05-17 18:01 ` Ivan Kokshaysky
1999-05-18  7:14   ` Vignaud Jean-Baptiste
1999-05-28  2:30   ` Robert Bowles

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