[parisc-linux-cvs] Fix kernel to work with SMP kernels

Ryan Bradetich rbradetich@uswest.net
29 Nov 2001 20:55:57 -0700


--=-N6MD+u2PHCvVH1a0B8M3
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

The attached diff does the following:
	* Fix a compiler error under SMP kernels.
	* Added some casts to get rid of compiler warnings.
	* bump kernel version to -pa5

- Ryan



--=-N6MD+u2PHCvVH1a0B8M3
Content-Disposition: attachment; filename=smp.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1

Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.209
diff -u -p -r1.209 Makefile
--- Makefile	2001/11/30 02:36:04	1.209
+++ Makefile	2001/11/30 03:50:21
@@ -1,7 +1,7 @@
 VERSION =3D 2
 PATCHLEVEL =3D 4
 SUBLEVEL =3D 16
-EXTRAVERSION =3D -pa4
+EXTRAVERSION =3D -pa5
=20
 KERNELRELEASE=3D$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
=20
Index: arch/parisc/kernel/smp.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/linux/arch/parisc/kernel/smp.c,v
retrieving revision 1.15
diff -u -p -r1.15 smp.c
--- arch/parisc/kernel/smp.c	2001/11/26 08:19:37	1.15
+++ arch/parisc/kernel/smp.c	2001/11/30 03:50:22
@@ -66,7 +66,7 @@ volatile int __cpu_logical_map[NR_CPUS]=20
 static volatile int smp_commenced =3D 0;   /* Set when the idlers are all =
forked */
 static volatile int cpu_now_booting =3D 0;      /* track which CPU is boot=
ing */
 volatile unsigned long cpu_online_map =3D 0;   /* Bitmap of online CPUs */
-#define IS_LOGGED_IN(cpunum) (test_bit(cpunum, &cpu_online_map))
+#define IS_LOGGED_IN(cpunum) (test_bit(cpunum, (atomic_t *)&cpu_online_map=
))
=20
 int smp_num_cpus =3D 1;
 int smp_threads_ready =3D 0;
@@ -203,7 +203,7 @@ ipi_interrupt(int irq, void *dev_id, str
 					wait =3D data->wait;
=20
 					mb();
-					atomic_dec (&data->unstarted_count);
+					atomic_dec ((atomic_t *)&data->unstarted_count);
=20
 					/* At this point, *data can't
 					 * be relied upon.
@@ -216,7 +216,7 @@ ipi_interrupt(int irq, void *dev_id, str
 					 */
 					mb();
 					if (wait)
-						atomic_dec (&data->unfinished_count);
+						atomic_dec ((atomic_t *)&data->unfinished_count);
 				}
 				break;
=20
@@ -552,7 +552,6 @@ static int smp_boot_one_cpu(int cpuid, i
 	unhash_process(idle);
=20
 	idle->processor =3D cpunum;
-	idle->has_cpu =3D 1;	/* Schedule the first task manually */
=20
 	/* Let _start know what logical CPU we're booting
 	** (offset into init_tasks[],cpu_data[])

--=-N6MD+u2PHCvVH1a0B8M3--