Skip to contentSkip to conversation

2.5.74-mm3

DISCUSSION Andrew Morton 13 participants 30 messages Jul 9, 2003 – Jul 11, 2003 Memory management

lore
Share & tools
lore
#0 lore raw

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.74/2.5.74-mm3/

. More CPU scheduler tweaks from Con

. All the rest is new bugfixes. Twenty three in fact.

Changes since 2.5.74-mm2:

linus.patch

Latest bitkeeper tree

-netstat-oops-fix.patch
-task_cpu-cleanup.patch
-misc9.patch
-breadahead-tweaks.patch
-xattr-cleanup.patch
-xattr-sharing.patch
-xattr-just-replace.patch
-xattr-fine-grained-locking-prep.patch
-xattr-fine-grained-locking.patch
-ipconfig-display-boot-server.patch
-quota-autoloading.patch
-bsd-accounting-speedup.patch
-add_timer-fix.patch

Merged

-cpumask_t-1.patch
-gcc-bug-workaround.patch
-sparse-apic-fix.patch
-nuke-cpumask_arith.patch
-p4-clockmod-cpumask-fix.patch

Folded into cpumask_t-1.patch

+cpumask_t-s390-fix.patch
+kgdb-cpumask_t.patch
+cpumask_t-x86_64-fix.patch
+sparc64-cpumask_t-fix.patch

cpumask_t fixes

+div64-fix.patch

Fix the consolidated div64() code

+compat_sys_sched_getaffinity-return-fix.patch

return value fix.

+reiserfs-dirty-memory-fix.patch

Fix VFS lockup with reiserfs.

+reiserfs-64-bit-fix.patch

Make reiserfs work on 64-bit machines

+kmap-removal-1.patch

kmap->kmap_atomic

+kallsyms-defaults-to-on.patch

make CONFIG_KALLSYMS harder to turn off

+misc29.patch

misc fixes

-mmap-prefault.patch

Dropped - readaround rework made it ineffective

+knfsd-umask-fix.patch

Fix kNFSd file creation modes

+aio-fork-fix.patch
+aio_complete-barrier-fix.patch

AIO bugfixes

+aio-O_SYNC-fix.patch
+aio-readahead-rework.patch

More AIO work.

-sleepometer.patch
-time-goes-backwards.patch

Dropped - I wasn't using it.

-nbd-locking-fixes.patch
-nbd-ioctl-compat.patch
+nbd-remove-open-release.patch
+nbd-use-set_blocksize.patch

NBD work.

+ext3_sync_fs-fix.patch

ext3 correctness fix

-fnup-stats.patch

debug stuff. Dropped.

+o3int.patch

More CPU scheduler interactivity work.

+oom-kiler-fixes.patch

ry not to kill kernel threads

+synaptics-reset-fix.patch

Synaptics fix

+yenta_socket-init-fix.patch

Cardbus initialisation ordering fix

+devfs-oops-fix.patch
+devfs-deadlock-fix.patch

devfs fixes

+ext3-block-allocation-cleanup.patch

Untangle the block allocator

+epoll-multiple-fds.patch

eventpoll fix.

All 113 patches:

linus.patch

mm.patch
add -mmN to EXTRAVERSION

kgdb-ga.patch
kgdb stub for ia32 (George Anzinger's one)

kgdb-remove-cpu_callout_map.patch
kgdb: remove cpu_callout_map decls

kgdb-use-ggdb.patch

kgdb-ga-docco-fixes.patch
kgdb doc. edits/corrections

cpumask_t-1.patch
cpumask_t: allow more than BITS_PER_LONG CPUs

cpumask_t-s390-fix.patch
cpumask_t fix for s390

kgdb-cpumask_t.patch

cpumask_t-x86_64-fix.patch
Fix cpumask changes for x86_64

sparc64-cpumask_t-fix.patch
fix cpumask_t for sparc64

reslabify-pgds-and-pmds.patch
re-slabify i386 pgd's and pmd's

div64-fix.patch
Fix do_div() for all architectures

compat_sys_sched_getaffinity-return-fix.patch
fix return of compat_sys_sched_getaffinity

reiserfs-dirty-memory-fix.patch
reiserfs dirty memory accounting fix

reiserfs-64-bit-fix.patch
fix reiserfs for 64bit arches

seqcount-locking.patch
i_size atomic access: infrastructure

i_size-atomic-access.patch
i_size atomic access

config_spinline.patch
uninline spinlocks for profiling accuracy.

ppc64-pci-update.patch

ppc64-reloc_hide.patch

ppc64-semaphore-reimplementation.patch
ppc64: use the ia32 semaphore implementation

sym-do-160.patch
make the SYM driver do 160 MB/sec

x86_64-fixes.patch
x86_64 fixes

delay-ksoftirqd-fallback.patch
Try harded in IRQ context before falling back to ksoftirqd

ds-09-vicam-usercopy-fix.patch
vicam usercopy fix

fbdev-2.patch

buffer-debug.patch
buffer.c debugging

rcu-stats.patch
RCU statistics reporting

mtrr-hang-fix.patch
Fix mtrr-related hang

intel8x0-cleanup.patch
intel8x0 cleanups

bio-too-big-fix.patch
Fix raid "bio too big" failures

kmap-removal-1.patch
replace some kmap()s with kmap_atomic()

kallsyms-defaults-to-on.patch
make CONFIG_KALLSYMS default to "on"

misc29.patch
misc fixes

linux-isp-2.patch

linux-isp-2-fix-again.patch
lost feral fix

list_del-debug.patch
list_del debug check

airo-schedule-fix.patch
airo.c: don't sleep in atomic regions

print-build-options-on-oops.patch
print a few config options on oops

show_task-free-stack-fix.patch
show_task() fix and cleanup

put_task_struct-debug.patch

ia32-mknod64.patch
mknod64 for ia32

ext2-64-bit-special-inodes.patch
ext2: support for 64-bit device nodes

ext3-64-bit-special-inodes.patch
ext3: support for 64-bit device nodes

64-bit-dev_t-kdev_t.patch
64-bit dev_t and kdev_t

oops-dump-preceding-code.patch
i386 oops output: dump preceding code

lockmeter.patch

invalidate_mmap_range.patch
Interface to invalidate regions of mmaps

knfsd-umask-fix.patch
Set umask correctly for nfsd kernel threads

aio-fork-fix.patch
Bug fix in AIO initialization

aio_complete-barrier-fix.patch
Fix race condition between aio_complete and aio_read_evt

aio-mm-refcounting-fix.patch
fix /proc mm_struct refcounting bug

aio-01-retry.patch
AIO: Core retry infrastructure

io_submit_one-EINVAL-fix.patch
Fix aio process hang on EINVAL

aio-02-lockpage_wq.patch
AIO: Async page wait

aio-03-fs_read.patch
AIO: Filesystem aio read

aio-04-buffer_wq.patch
AIO: Async buffer wait

aio-05-fs_write.patch
AIO: Filesystem aio write

aio-05-fs_write-fix.patch

aio-06-bread_wq.patch
AIO: Async block read

aio-06-bread_wq-fix.patch

aio-07-ext2getblk_wq.patch
AIO: Async get block for ext2

O_SYNC-speedup-2.patch
speed up O_SYNC writes

aio-09-o_sync.patch
aio O_SYNC

aio-10-BUG-fix.patch
AIO: fix a BUG

aio-11-workqueue-flush.patch
AIO: flush workqueues before destroying ioctx'es

aio-12-readahead.patch
AIO: readahead fixes

aio-dio-no-readahead.patch
aio O_DIRECT no readahead

lock_buffer_wq-fix.patch
lock_buffer_wq fix

unuse_mm-locked.patch
AIO: hold the context lock across unuse_mm

aio-take-task_lock.patch
From: Suparna Bhattacharya <[email protected]>
Subject: Re: 2.5.72-mm1 - Under heavy testing with AIO,.. vmstat seems to blow the kernel

aio-O_SYNC-fix.patch
Unify o_sync changes for aio and regular writes

aio-readahead-rework.patch
Unified page range readahead for aio and regular reads

vfsmount_lock.patch
From: Maneesh Soni <[email protected]>
Subject: [patch 1/2] vfsmount_lock

sched-hot-balancing-fix.patch
fix for CPU scheduler load distribution

truncate-pagefault-race-fix.patch
Fix vmtruncate race and distributed filesystem race

truncate-pagefault-race-fix-fix.patch
Make sure truncate fix has no race

printk-oops-mangle-fix.patch
disentangle printk's whilst oopsing on SMP

20-odirect_enable.patch

21-odirect_cruft.patch

22-read_proc.patch

23-write_proc.patch

24-commit_proc.patch

25-odirect.patch

nfs-O_DIRECT-always-enabled.patch
Force CONFIG_NFS_DIRECTIO

aha152x-oops-fix.patch
aha152X oops fixes

nbd-cleanups.patch
NBD: cosmetic cleanups

nbd-enhanced-diagnostics.patch
nbd: enhanced diagnostics support

nbd-remove-blksize-bits.patch
nbd: remove unneeded blksize_bits field

nbd-kobject-oops-fix.patch
nbd: initialise the embedded kobject

nbd-paranioa-cleanups.patch
nbd: cleanup PARANOIA usage & code

nbd-docco-update.patch
NBD documentation update

nbd-remove-open-release.patch
nbd: remove unneeded nbd_open/nbd_release and refcnt

nbd-use-set_blocksize.patch
nbd: make nbd and block layer agree about device and block sizes

acpismp-fix.patch
ACPI_HT_ONLY acpismp=force

oomkill-if-free-swap.patch
Don't skip oomkilling if there's free swap

apci-nmi-watchdog-fix.patch
ACPI poweroff trigers the NMI watchdog

jbd-commit-tricks.patch
JBD: checkpointing optimisations

jbd-dont-account-blocks-twice.patch
JBD: transaction buffer accounting fix

ext3_sync_fs-fix.patch
sync_fs() fix

kjournald-PF_SYNCWRITE.patch

o1-interactivity.patch
CPU scheduler interactivity patch

o2int.patch
O2int 0307041440 for 2.5.74-mm1

o3int.patch
O3int interactivity for 2.5.74-mm2

highpmd.patch
highpmd

oom-kiler-fixes.patch
oom killer fixes

synaptics-reset-fix.patch
synaptics driver reset fix

yenta_socket-init-fix.patch
yenta-socket initialisation fix

devfs-oops-fix.patch
devfs oops fix

devfs-deadlock-fix.patch
devfs deadlock fix

ext3-block-allocation-cleanup.patch

epoll-multiple-fds.patch
epoll-per-fd fix ...

#1 lore raw

Review

Quoted 7 lines
(quoted diff) +0 -5
-cpumask_t-1.patch
-gcc-bug-workaround.patch
-sparse-apic-fix.patch
-nuke-cpumask_arith.patch
-p4-clockmod-cpumask-fix.patch
 
 Folded into cpumask_t-1.patch

This gives following compile error when compiling the kernel with APM support for UP:

arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:600: error: incompatible types in assignment arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:643: error: incompatible types in assignment

The attached patch fixes this...

Best regards
Thomas Schlichter

arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c.orig +7 -7
@@ -508,13 +508,12 @@
  
 #ifdef CONFIG_SMP
 
-static cpumask_t apm_save_cpus(void)
+static inline void apm_save_cpus(cpumask_t *mask)
 {
-	cpumask_t x = current->cpus_allowed;
+	*mask = current->cpus_allowed;
 	/* Some bioses don't like being called from CPU != 0 */
 	set_cpus_allowed(current, cpumask_of_cpu(0));
 	BUG_ON(smp_processor_id() != 0);
-	return x;
 }
 
 static inline void apm_restore_cpus(cpumask_t mask)
@@ -528,7 +527,7 @@
  *	No CPU lockdown needed on a uniprocessor
  */
  
-#define apm_save_cpus()	0
+#define apm_save_cpus(x) 	(void)(x)
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif
@@ -597,7 +596,7 @@
 	int			cpu;
 	struct desc_struct	save_desc_40;
 
-	cpus = apm_save_cpus();
+	apm_save_cpus(&cpus);
 	
 	cpu = get_cpu();
 	save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
@@ -640,7 +639,7 @@
 	struct desc_struct	save_desc_40;
 
 
-	cpus = apm_save_cpus();
+	apm_save_cpus(&cpus);
 	
 	cpu = get_cpu();
 	save_desc_40 = cpu_gdt_table[cpu][0x40 / 8];
@@ -918,7 +917,8 @@
 #endif
 	if (apm_info.realmode_power_off)
 	{
-		(void)apm_save_cpus();
+		cpumask_t dummy;
+		apm_save_cpus(&dummy);
 		machine_real_restart(po_bios_call, sizeof(po_bios_call));
 	}
 	else
#2 lore raw
Quoted 10 lines · Thomas Schlichter

This gives following compile error when compiling the kernel with APM support
for UP:

arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:600: error: incompatible types in assignment arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:643: error: incompatible types in assignment

The attached patch fixes this...

Seems complex. I just have this:

arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~cpumask-apm-fix-2 +1 -1
diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c
@@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
  *	No CPU lockdown needed on a uniprocessor
  */
  
-#define apm_save_cpus()	0
+#define apm_save_cpus()		CPU_MASK_NONE
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif

_

#3 lore raw
Quoted 22 lines · Andrew Morton
Quoted 9 lines · Thomas Schlichter

This gives following compile error when compiling the kernel with APM support for UP:

arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:600: error: incompatible types in assignment arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:643: error: incompatible types in assignment

The attached patch fixes this...

Seems complex. I just have this:

diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c
--- 25/arch/i386/kernel/apm.c~cpumask-apm-fix-2 2003-07-08
23:09:23.000000000 -0700 +++ 25-akpm/arch/i386/kernel/apm.c 2003-07-08
23:28:50.000000000 -0700 @@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
* No CPU lockdown needed on a uniprocessor
*/

arch/i386/kernel/apm.c static inline void apm_restore_cpus(cpum · line 534

Quoted 5 lines
arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~cpumask-apm-fix-2 +1 -1
-#define apm_save_cpus()	0
+#define apm_save_cpus()		CPU_MASK_NONE
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif

I thought about this one, too, but I wasn't sure if gcc is able to optimize away the assignment and the local cpumask_t variable with this oneliner...

But for me it is OK, too...

#4 lore raw
In reply to Andrew Morton

On Wednesday 09 July 2003 11:18, Andrew Morton wrote:

Hi Andrew,

Quoted 17 lines
Quoted 5 lines

arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:600: error: incompatible types in assignment arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:643: error: incompatible types in assignment The attached patch fixes this...

Seems complex. I just have this:

diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c
--- 25/arch/i386/kernel/apm.c~cpumask-apm-fix-2 2003-07-08
23:09:23.000000000 -0700 +++ 25-akpm/arch/i386/kernel/apm.c 2003-07-08
23:28:50.000000000 -0700 @@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
* No CPU lockdown needed on a uniprocessor
*/

Review

Quoted 5 lines
(quoted diff) +1 -1
-#define apm_save_cpus()	0
+#define apm_save_cpus()		CPU_MASK_NONE
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif

better use the attached one ;)

ciao, Marc

arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~cpumask-apm-fix-2 +2 -1
diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c
@@ -222,6 +222,7 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/cpumask.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -528,7 +529,7 @@ static inline void apm_restore_cpus(cpum
  *	No CPU lockdown needed on a uniprocessor
  */
  
-#define apm_save_cpus()	0
+#define apm_save_cpus()		CPU_MASK_NONE
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif
#5 lore raw
Quoted 4 lines · Marc-Christian Petersen

better use the attached one ;)

ciao, Marc

Still bombs out:

CC [M] arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:601: error: syntax error before '{' token arch/i386/kernel/apm.c:595: warning: unused variable saved_fs' arch/i386/kernel/apm.c:595: warning: unused variable saved_gs' arch/i386/kernel/apm.c:596: warning: unused variable flags' arch/i386/kernel/apm.c:598: warning: unused variable cpu' arch/i386/kernel/apm.c:599: warning: unused variable `save_desc_40' arch/i386/kernel/apm.c: At top level:
arch/i386/kernel/apm.c:603: warning: type defaults to int' in declaration of cpu'
arch/i386/kernel/apm.c:603: error: braced-group within expression allowed only inside a function
arch/i386/kernel/apm.c:603: error: syntax error before ')' token arch/i386/kernel/apm.c:604: warning: type defaults to int' in declaration of save_desc_40'
arch/i386/kernel/apm.c:604: error: incompatible types in initialization arch/i386/kernel/apm.c:604: error: initializer element is not constant arch/i386/kernel/apm.c:604: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:605: warning: type defaults to int' in declaration of cpu_gdt_table'
arch/i386/kernel/apm.c:605: error: variable-size type declared outside of any function
arch/i386/kernel/apm.c:605: error: variable-sized object may not be initialized
arch/i386/kernel/apm.c:605: error: conflicting types for cpu_gdt_table' include/asm/desc.h:14: error: previous declaration of cpu_gdt_table' arch/i386/kernel/apm.c:605: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:607: error: syntax error before "do" arch/i386/kernel/apm.c:607: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:607: warning: type defaults to int' in declaration of `__dummy2'
arch/i386/kernel/apm.c:607: error: syntax error before "void" arch/i386/kernel/apm.c:609: error: syntax error before "volatile" arch/i386/kernel/apm.c:610: warning: type defaults to int' in declaration of apm_bios_call_asm'
arch/i386/kernel/apm.c:610: warning: parameter names (without types) in function declaration
arch/i386/kernel/apm.c:610: error: conflicting types for apm_bios_call_asm' include/asm-i386/mach-default/apm.h:31: error: previous declaration of apm_bios_call_asm'
arch/i386/kernel/apm.c:610: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:611: error: syntax error before "volatile" arch/i386/kernel/apm.c:612: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:612: warning: type defaults to int' in declaration of `__dummy2'
arch/i386/kernel/apm.c:612: error: syntax error before "void" arch/i386/kernel/apm.c:613: warning: type defaults to int' in declaration of cpu_gdt_table'
arch/i386/kernel/apm.c:613: error: variable-size type declared outside of any function
arch/i386/kernel/apm.c:613: error: variable-sized object may not be initialized
arch/i386/kernel/apm.c:613: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:614: error: syntax error before "do" arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:644: error: syntax error before '{' token arch/i386/kernel/apm.c:636: warning: unused variable error' arch/i386/kernel/apm.c:637: warning: unused variable saved_fs' arch/i386/kernel/apm.c:637: warning: unused variable saved_gs' arch/i386/kernel/apm.c:638: warning: unused variable flags' arch/i386/kernel/apm.c:640: warning: unused variable cpu' arch/i386/kernel/apm.c:641: warning: unused variable save_desc_40' arch/i386/kernel/apm.c: At top level:
arch/i386/kernel/apm.c:646: warning: type defaults to int' in declaration of cpu'
arch/i386/kernel/apm.c:646: error: redefinition of cpu' arch/i386/kernel/apm.c:603: error: cpu' previously defined here arch/i386/kernel/apm.c:646: error: braced-group within expression allowed only inside a function
arch/i386/kernel/apm.c:646: error: syntax error before ')' token arch/i386/kernel/apm.c:647: warning: type defaults to int' in declaration of save_desc_40'
arch/i386/kernel/apm.c:647: error: redefinition of save_desc_40' arch/i386/kernel/apm.c:604: error: save_desc_40' previously defined here arch/i386/kernel/apm.c:647: error: initializer element is not constant arch/i386/kernel/apm.c:647: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:648: warning: type defaults to int' in declaration of cpu_gdt_table'
arch/i386/kernel/apm.c:648: error: variable-size type declared outside of any function
arch/i386/kernel/apm.c:648: error: variable-sized object may not be initialized
arch/i386/kernel/apm.c:648: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:650: error: syntax error before "do" arch/i386/kernel/apm.c:650: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:650: warning: type defaults to int' in declaration of `__dummy2'
arch/i386/kernel/apm.c:650: error: syntax error before "void" arch/i386/kernel/apm.c:652: error: syntax error before "volatile" arch/i386/kernel/apm.c:653: warning: type defaults to int' in declaration of error'
arch/i386/kernel/apm.c:653: error: func' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: ebx_in' undeclared here (not in a function)
arch/i386/kernel/apm.c:653: error: `ecx_in' undeclared here (not in a function)
arch/i386/kernel/apm.c:653: error: `eax' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: initializer element is not constant arch/i386/kernel/apm.c:653: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:654: error: syntax error before "volatile" arch/i386/kernel/apm.c:655: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:655: warning: type defaults to int' in declaration of `__dummy2'
arch/i386/kernel/apm.c:655: error: syntax error before "void" arch/i386/kernel/apm.c:656: warning: type defaults to int' in declaration of cpu_gdt_table'
arch/i386/kernel/apm.c:656: error: conflicting types for cpu_gdt_table' arch/i386/kernel/apm.c:648: error: previous declaration of cpu_gdt_table' arch/i386/kernel/apm.c:656: warning: data definition has no type or storage class
arch/i386/kernel/apm.c:657: error: syntax error before "do" arch/i386/kernel/apm.c: In function `apm_power_off':
arch/i386/kernel/apm.c:922: warning: braces around scalar initializer arch/i386/kernel/apm.c:922: warning: (near initialization for (anonymous)') arch/i386/kernel/apm.c:922: error: array index in non-array initializer arch/i386/kernel/apm.c:922: error: (near initialization for (anonymous)') arch/i386/kernel/apm.c:922: error: invalid initializer arch/i386/kernel/apm.c:922: error: (near initialization for `(anonymous)') {standard input}: Assembler messages:
{standard input}:502: Error: symbol cpu' is already defined {standard input}:508: Error: symbol save_desc_40' is already defined make[2]: *** [arch/i386/kernel/apm.o] Error 1
make[1]: *** [arch/i386/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux'
make: *** [stamp-build] Error 2

laptop:/usr/src/linux# '
#6 lore raw
In reply to Marc-Christian Petersen
Quoted 1 line · Marc-Christian Petersen

better use the attached one ;)

Still not build

Signature · 9 lines
/================================================\
| Ramón Rey Vicente <ramon.rey at hispalinux.es> |
|                                                |
| Jabber ID <rreylinux at jabber.org>            |
|                                                |
| Public GPG Key http://pgp.escomposlinux.org    |
|                                                |
| GLiSa http://glisa.hispalinux.es               |
\================================================/

arch/i386/kernel/apm.c: En la función `apm_bios_call':
arch/i386/kernel/apm.c:601: error: error sintáctico before '{' token arch/i386/kernel/apm.c:595: aviso: unused variable saved_fs' arch/i386/kernel/apm.c:595: aviso: unused variable saved_gs' arch/i386/kernel/apm.c:596: aviso: unused variable flags' arch/i386/kernel/apm.c:598: aviso: unused variable cpu'
arch/i386/kernel/apm.c:599: aviso: unused variable `save_desc_40' arch/i386/kernel/apm.c: En el nivel principal:
arch/i386/kernel/apm.c:603: aviso: type defaults to int' in declaration of cpu' arch/i386/kernel/apm.c:603: error: braced-group within expression allowed only inside a function arch/i386/kernel/apm.c:603: error: error sintáctico before ')' token arch/i386/kernel/apm.c:604: aviso: type defaults to int' in declaration of save_desc_40' arch/i386/kernel/apm.c:604: error: incompatible types in inicialización arch/i386/kernel/apm.c:604: error: el elemento inicializador no es constante arch/i386/kernel/apm.c:604: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:605: aviso: type defaults to int' in declaration of cpu_gdt_table' arch/i386/kernel/apm.c:605: error: variable-size type declared outside of any function arch/i386/kernel/apm.c:605: error: variable-sized object may not be initialized arch/i386/kernel/apm.c:605: error: conflicting types for cpu_gdt_table' include/asm/desc.h:14: error: previous declaration of cpu_gdt_table' arch/i386/kernel/apm.c:605: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:607: error: error sintáctico before "do" arch/i386/kernel/apm.c:607: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:607: aviso: type defaults to int' in declaration of __dummy2' arch/i386/kernel/apm.c:607: error: error sintáctico before "void" arch/i386/kernel/apm.c:609: error: error sintáctico before "volatile" arch/i386/kernel/apm.c:610: aviso: type defaults to int' in declaration of apm_bios_call_asm' arch/i386/kernel/apm.c:610: aviso: nombres de parámetros (sin tipos) en la declaración de la función arch/i386/kernel/apm.c:610: error: conflicting types for apm_bios_call_asm' include/asm-i386/mach-default/apm.h:31: error: previous declaration of `apm_bios_call_asm' arch/i386/kernel/apm.c:610: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:611: error: error sintáctico before "volatile" arch/i386/kernel/apm.c:612: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:612: aviso: type defaults to int' in declaration of __dummy2' arch/i386/kernel/apm.c:612: error: error sintáctico before "void" arch/i386/kernel/apm.c:613: aviso: type defaults to int' in declaration of `cpu_gdt_table' arch/i386/kernel/apm.c:613: error: variable-size type declared outside of any function arch/i386/kernel/apm.c:613: error: variable-sized object may not be initialized arch/i386/kernel/apm.c:613: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:614: error: error sintáctico before "do" arch/i386/kernel/apm.c: En la función `apm_bios_call_simple':
arch/i386/kernel/apm.c:644: error: error sintáctico before '{' token arch/i386/kernel/apm.c:636: aviso: unused variable error' arch/i386/kernel/apm.c:637: aviso: unused variable saved_fs' arch/i386/kernel/apm.c:637: aviso: unused variable saved_gs' arch/i386/kernel/apm.c:638: aviso: unused variable flags' arch/i386/kernel/apm.c:640: aviso: unused variable `cpu'
arch/i386/kernel/apm.c:641: aviso: unused variable `save_desc_40' arch/i386/kernel/apm.c: En el nivel principal:
arch/i386/kernel/apm.c:646: aviso: type defaults to int' in declaration of cpu' arch/i386/kernel/apm.c:646: error: redefinition of `cpu'
arch/i386/kernel/apm.c:603: error: `cpu' previously defined here arch/i386/kernel/apm.c:646: error: braced-group within expression allowed only inside a function arch/i386/kernel/apm.c:646: error: error sintáctico before ')' token arch/i386/kernel/apm.c:647: aviso: type defaults to int' in declaration of save_desc_40' arch/i386/kernel/apm.c:647: error: redefinition of save_desc_40' arch/i386/kernel/apm.c:604: error: save_desc_40' previously defined here arch/i386/kernel/apm.c:647: error: el elemento inicializador no es constante arch/i386/kernel/apm.c:647: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:648: aviso: type defaults to int' in declaration of cpu_gdt_table' arch/i386/kernel/apm.c:648: error: variable-size type declared outside of any function arch/i386/kernel/apm.c:648: error: variable-sized object may not be initialized arch/i386/kernel/apm.c:648: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:650: error: error sintáctico before "do" arch/i386/kernel/apm.c:650: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:650: aviso: type defaults to int' in declaration of __dummy2' arch/i386/kernel/apm.c:650: error: error sintáctico before "void" arch/i386/kernel/apm.c:652: error: error sintáctico before "volatile" arch/i386/kernel/apm.c:653: aviso: type defaults to int' in declaration of error' arch/i386/kernel/apm.c:653: error: func' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: ebx_in' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: ecx_in' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: `eax' undeclared here (not in a function) arch/i386/kernel/apm.c:653: error: el elemento inicializador no es constante arch/i386/kernel/apm.c:653: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:654: error: error sintáctico before "volatile" arch/i386/kernel/apm.c:655: error: flags' undeclared here (not in a function) arch/i386/kernel/apm.c:655: aviso: type defaults to int' in declaration of __dummy2' arch/i386/kernel/apm.c:655: error: error sintáctico before "void" arch/i386/kernel/apm.c:656: aviso: type defaults to int' in declaration of cpu_gdt_table' arch/i386/kernel/apm.c:656: error: conflicting types for cpu_gdt_table' arch/i386/kernel/apm.c:648: error: previous declaration of cpu_gdt_table' arch/i386/kernel/apm.c:656: aviso: data definition has no type or storage class arch/i386/kernel/apm.c:657: error: error sintáctico before "do" arch/i386/kernel/apm.c: En la función apm_power_off':
arch/i386/kernel/apm.c:922: aviso: llaves alrededor del inicializador escalar arch/i386/kernel/apm.c:922: aviso: (near initialization for (anonymous)') arch/i386/kernel/apm.c:922: error: índice de matriz en el inicializador que no es matriz arch/i386/kernel/apm.c:922: error: (near initialization for (anonymous)') arch/i386/kernel/apm.c:922: error: inicializador inválido arch/i386/kernel/apm.c:922: error: (near initialization for `(anonymous)')
{entrada estándar}: Mensajes del ensamblador:
{entrada estándar}:371: Error: el símbolo `cpu' ya está definido
{entrada estándar}:377: Error: el símbolo `save_desc_40' ya está definido
make[2]: *** [arch/i386/kernel/apm.o] Error 1
make[1]: *** [arch/i386/kernel] Error 2
make: *** [stamp-build] Error 2

#7 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

In reply to Andrew Morton
Quoted 1 line · Andrew Morton

Thomas Schlichter <[email protected]> wrote:

.
.
.

arch/i386/kernel/apm.c static inline void apm_restore_cpus(cpum · line 532

Quoted 13 lines

Seems complex. I just have this:

diff -puN arch/i386/kernel/apm.c~cpumask-apm-fix-2 arch/i386/kernel/apm.c

arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~cpumask-apm-fix-2 +1 -1
@@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
  *	No CPU lockdown needed on a uniprocessor
  */
 
-#define apm_save_cpus()	0
+#define apm_save_cpus()		CPU_MASK_NONE
 #define apm_restore_cpus(x)	(void)(x)

I tried this and got a parse error. So I assumed perhaps I needed to upgrade to the latest C compiler to be able to handle the assignment of a inline static initializer:

      #define CPU_MASK_NONE   { {[0 ... CPU_ARRAY_SIZE-1] =  0UL} }

I was disappointed that using gcc 3.3 didn't fix the problem:
----------------------------------------------------------------------
CC arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function `apm_bios_call':
arch/i386/kernel/apm.c:599: error: parse error before '{' token arch/i386/kernel/apm.c: In function `apm_bios_call_simple':
arch/i386/kernel/apm.c:642: error: parse error before '{' token arch/i386/kernel/apm.c: In function `apm_power_off':
arch/i386/kernel/apm.c:920: warning: braces around scalar initializer arch/i386/kernel/apm.c:920: warning: (near initialization for `(anonymous)')
arch/i386/kernel/apm.c:920: error: array index in non-array initializer arch/i386/kernel/apm.c:920: error: (near initialization for `(anonymous)')
arch/i386/kernel/apm.c:920: error: invalid initializer arch/i386/kernel/apm.c:920: error: (near initialization for `(anonymous)')
------------------------------------------------------------------------------

I'll settle for Matt Mackall <[email protected]> fix for now:

    +#define apm_save_cpus()        (current->cpus_allowed)

I wonder why other, like Thomas Schlichter <[email protected]>, had no problem with the CPU_MASK_NONE fix.

I tried adding the #include <linux/cpumask.h> that Marc-Christian Petersen <[email protected]> sugested but it didn't help. Looks like Jan De Luyck <[email protected]> had a similar result.

-piet

Quoted 5 lines
arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~cpumask-apm-fix-2 +0 -1
--

To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Signature · 1 line
[email protected]
#8 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 7 lines · Piet Delaney

I'll settle for Matt Mackall <[email protected]> fix for now:

    +#define apm_save_cpus()        (current->cpus_allowed)

I wonder why other, like Thomas Schlichter <[email protected]>, had no problem with the CPU_MASK_NONE fix.
I tried adding the #include <linux/cpumask.h> that Marc-Christian Petersen <[email protected]> sugested but it didn't help. Looks like Jan De Luyck <[email protected]> had a similar result.

Ugh. Fixing.

-- wli

#9 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 7 lines · Piet Delaney
Quoted 7 lines

I'll settle for Matt Mackall <[email protected]> fix for now:

    +#define apm_save_cpus()        (current->cpus_allowed)

I wonder why other, like Thomas Schlichter <[email protected]>, had no problem with the CPU_MASK_NONE fix.
I tried adding the #include <linux/cpumask.h> that Marc-Christian Petersen <[email protected]> sugested but it didn't help. Looks like Jan De Luyck <[email protected]> had a similar result.

Quoted 1 line · William Lee Irwin III

Ugh. Fixing.

arch/i386/kernel/apm.c +1 -1
diff -prauN mm3-2.5.74-1/arch/i386/kernel/apm.c mm3-2.5.74-apm-1/arch/i386/kernel/apm.c
@@ -528,7 +528,7 @@ static inline void apm_restore_cpus(cpum
  *	No CPU lockdown needed on a uniprocessor
  */
  
-#define apm_save_cpus()	0
+#define apm_save_cpus()	({ cpumask_t __mask__ = CPU_MASK_NONE; __mask__; })
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif
#10 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 3 lines · William Lee Irwin III

-#define apm_save_cpus() 0
+#define apm_save_cpus() ({ cpumask_t __mask__ = CPU_MASK_NONE; __mask__; })

Taking a look at what the APM code is actually doing, I think using current->cpus_allowed just more sense in here.

Not that it matters at all.

#11 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 2 lines · William Lee Irwin III
Quoted 2 lines

-#define apm_save_cpus() 0
+#define apm_save_cpus() ({ cpumask_t __mask__ = CPU_MASK_NONE; __mask__; })

Quoted 3 lines · Andrew Morton

Taking a look at what the APM code is actually doing, I think using current->cpus_allowed just more sense in here.
Not that it matters at all.

Going beyond pure substitution:

arch/i386/kernel/apm.c +0 -13
diff -prauN mm3-2.5.74-1/arch/i386/kernel/apm.c mm3-2.5.74-apm-1/arch/i386/kernel/apm.c
@@ -506,8 +506,6 @@ static void apm_error(char *str, int err
  * Lock APM functionality to physical CPU 0
  */
  
-#ifdef CONFIG_SMP
-
 static cpumask_t apm_save_cpus(void)
 {
 	cpumask_t x = current->cpus_allowed;
@@ -522,17 +520,6 @@ static inline void apm_restore_cpus(cpum
 	set_cpus_allowed(current, mask);
 }
 
-#else
-
-/*
- *	No CPU lockdown needed on a uniprocessor
- */
- 
-#define apm_save_cpus()	0
-#define apm_restore_cpus(x)	(void)(x)
-
-#endif
-
 /*
  * These are the actual BIOS calls.  Depending on APM_ZERO_SEGS and
  * apm_info.allow_ints, we are being really paranoid here!  Not only
#12 lore raw

hptraid.o -- No array found?

I have XP and Gentoo linux installed. In XP, my IDE RAID0 config can be seen and used flawlessly (highpoint). In linux, modprobe ataraid works fine, but modprobing hptraid gives me "Raid array not found" a few times and stops. Any ideas? I've googled around to no avail...

#13 lore raw

Re: hptraid.o -- No array found?

Quoted 4 lines · Seth Chromick

I have XP and Gentoo linux installed. In XP, my IDE RAID0 config can be seen and used flawlessly (highpoint). In linux, modprobe ataraid works fine, but modprobing hptraid gives me "Raid array not found" a few times and stops. Any ideas? I've googled around to no avail...

hptraid only understands a small subset of the disk layouts so not all forms are known. Wilfried has done some really good work on this so more formats are known by the later drivers.

Unfortunately HPT don't seem keen to document their disk layout.

#14 lore raw

Re: 2.5.74-mm3 - module-init-tools: necessary to replace root copies?

In reply to Andrew Morton

I followed your suggestion of installing the module-init-tools to get around the "make modules_install" problem. I modified the kernel Makefile to point to /usr/local:

#DEPMOD = /sbin/depmod
DEPMOD = /usr/local/sbin/depmod

I expect it's likely necessary to copy the /usr/local copies over the / copies so that they are available to the boot code; Perhaps not.

I thought I check to see how you and/or others did to for using the newer module-init-tools.

Also, do you think it's better to enable the use frame pointer when using kgdb. In the past I thought I had problems with modules due to my enabling the frame pointer being used.

-piet

Signature · 1 line
[email protected]
#15 lore raw

Re: 2.5.74-mm3 - module-init-tools: necessary to replace root copies?

In reply to Andrew Morton

I followed your suggestion of installing the module-init-tools to get around the "make modules_install" problem. I modified the kernel Makefile to point to /usr/local:

#DEPMOD = /sbin/depmod
DEPMOD = /usr/local/sbin/depmod

I expect it's likely necessary to copy the /usr/local copies over the / copies so that they are available to the boot code; Perhaps not.

I thought I check to see how you and/or others did to for using the newer module-init-tools.

Also, do you think it's better to enable the use frame pointer when using kgdb. In the past I thought I had problems with modules due to my enabling the frame pointer being used.

-piet

Signature · 1 line
[email protected]
#16 lore raw

Re: 2.5.74-mm3 - module-init-tools: necessary to replace root copies?

Quoted 3 lines · Piet Delaney

Also, do you think it's better to enable the use
frame pointer when using kgdb.

Enabled, definitely.

Quoted 3 lines

In the past I thought
I had problems with modules due to my enabling the frame pointer being used.

No, there are no such problems.

#17 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

In reply to Piet Delaney
Quoted 8 lines · Piet Delaney
Quoted 1 line · Andrew Morton

Thomas Schlichter <[email protected]> wrote:

.
.
.

Quoted 1 line

Seems complex. I just have this:

~~snip~~

Quoted 6 lines

I'll settle for Matt Mackall <[email protected]> fix for now:

    +#define apm_save_cpus()        (current->cpus_allowed)

I wonder why other, like Thomas Schlichter <[email protected]>, had no problem with the CPU_MASK_NONE fix.

Well, I didn't try the CPU_MASK_NONE fix. I am using my fix attached to my first mail, but Andrew ment it was too complex (your quoting from above). So he proposed the simpler fix, wich simply looked good to me...

Quoted 5 lines

I tried adding the #include <linux/cpumask.h> that Marc-Christian Petersen <[email protected]> sugested but it didn't help. Looks like Jan De Luyck <[email protected]> had a similar result.

-piet

Thomas

#18 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 3 lines · Thomas Schlichter

Well, I didn't try the CPU_MASK_NONE fix. I am using my fix attached to my first mail, but Andrew ment it was too complex (your quoting from above). So he proposed the simpler fix, wich simply looked good to me...

Could you try the following?

arch/i386/kernel/apm.c +0 -13
diff -prauN mm3-2.5.74-1/arch/i386/kernel/apm.c mm3-2.5.74-apm-1/arch/i386/kernel/apm.c
@@ -506,8 +506,6 @@ static void apm_error(char *str, int err
  * Lock APM functionality to physical CPU 0
  */
  
-#ifdef CONFIG_SMP
-
 static cpumask_t apm_save_cpus(void)
 {
 	cpumask_t x = current->cpus_allowed;
@@ -522,17 +520,6 @@ static inline void apm_restore_cpus(cpum
 	set_cpus_allowed(current, mask);
 }
 
-#else
-
-/*
- *	No CPU lockdown needed on a uniprocessor
- */
- 
-#define apm_save_cpus()	0
-#define apm_restore_cpus(x)	(void)(x)
-
-#endif
-
 /*
  * These are the actual BIOS calls.  Depending on APM_ZERO_SEGS and
  * apm_info.allow_ints, we are being really paranoid here!  Not only
#19 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 6 lines · William Lee Irwin III
Quoted 3 lines · Thomas Schlichter

Well, I didn't try the CPU_MASK_NONE fix. I am using my fix attached to my first mail, but Andrew ment it was too complex (your quoting from above). So he proposed the simpler fix, wich simply looked good to me...

Could you try the following?

OK, I tried it. For me it compiles!

But the size of the resulting objectfile's text section is about 64bytes larger than with my patch. So it seems that gcc3.3 wasn't able to optimize away all the unneeded stuff...

And I don't think my patch is that ugly, but hey, it's your decision...

Best regards
Thomas Schlichter

#20 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 1 line · William Lee Irwin III
Quoted 1 line

Could you try the following?

Quoted 5 lines · Thomas Schlichter

OK, I tried it. For me it compiles!
But the size of the resulting objectfile's text section is about 64bytes larger than with my patch. So it seems that gcc3.3 wasn't able to optimize away all the unneeded stuff...
And I don't think my patch is that ugly, but hey, it's your decision...

64B? Why do you care?

-- wli

#21 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 11 lines · William Lee Irwin III
Quoted 1 line · William Lee Irwin III
Quoted 1 line

Could you try the following?

Quoted 5 lines · Thomas Schlichter

OK, I tried it. For me it compiles!
But the size of the resulting objectfile's text section is about 64bytes larger than with my patch. So it seems that gcc3.3 wasn't able to optimize away all the unneeded stuff...
And I don't think my patch is that ugly, but hey, it's your decision...

64B? Why do you care?

It's not the 64B...
I care about the unneeded but executed code!
But I'm a hopeless perfectionist caring about such nits...

And I don't know why everybody hates my patches... ;-(

Thomas

#22 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 3 lines · William Lee Irwin III

It's not the 64B...
I care about the unneeded but executed code!
But I'm a hopeless perfectionist caring about such nits...

Quoted 1 line · Thomas Schlichter

And I don't know why everybody hates my patches... ;-(

It's not that anyone hates them, it's that
pass 1: the semantics (0 == empty cpu set) needed preserving pass 2: remove code instead of changing redundant stuff

NFI YTF gcc doesn't optimize out the whole shebang.

At any rate, if we're pounding APM BIOS calls or apm_power_off() like wild monkeys there's something far more disturbing going wrong than 64B of code gcc couldn't optimize (it's probably due to some jump target being aligned to death or some such nonsense).

-- wli

#23 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

Quoted 2 lines · William Lee Irwin III
Quoted 1 line · Thomas Schlichter

And I don't know why everybody hates my patches... ;-(

That was just fun, but OK, I forgot the 'fun' tags... ;-)

Quoted 2 lines

It's not that anyone hates them, it's that
pass 1: the semantics (0 == empty cpu set) needed preserving

Well the original code already had 2 different semantics:
In the MP case it returned the mask of currently allowed CPUs which should have been 1 for UP but was 0...

So as the value returned by apm_save_cpus() was only used for apm_restore_cpus () I optimized it away. Which was just an other change of the semantics...ACK

Quoted 1 line

pass 2: remove code instead of changing redundant stuff

ACK

Quoted 6 lines

NFI YTF gcc doesn't optimize out the whole shebang.

At any rate, if we're pounding APM BIOS calls or apm_power_off() like wild monkeys there's something far more disturbing going wrong than 64B of code gcc couldn't optimize (it's probably due to some jump target being aligned to death or some such nonsense).

OK, I see you're right and your actual patch looks better to me because it makes the semantics consistent! So come on and let's take it into the tree...!

Thomas

#24 lore raw

Re: 2.5.74-mm3 - apm_save_cpus() Macro still bombs out

In reply to William Lee Irwin III
Quoted 5 lines · William Lee Irwin III
Quoted 3 lines · William Lee Irwin III

It's not the 64B...
I care about the unneeded but executed code!
But I'm a hopeless perfectionist caring about such nits...

Quoted 8 lines
Quoted 1 line · Thomas Schlichter

And I don't know why everybody hates my patches... ;-(

It's not that anyone hates them, it's that
pass 1: the semantics (0 == empty cpu set) needed preserving pass 2: remove code instead of changing redundant stuff

NFI YTF gcc doesn't optimize out the whole shebang.

Probably would if inline were added to the function spec?

If we're going to worry about space, we'd start by worrying about the existence of current->cpus_allowed in the UP case.

Quoted 4 lines

At any rate, if we're pounding APM BIOS calls or apm_power_off() like wild monkeys there's something far more disturbing going wrong than 64B of code gcc couldn't optimize (it's probably due to some jump target being aligned to death or some such nonsense).

I much prefer the removal of #ifdef approach - would have prevented the bug getting out in the first place.

Signature · 1 line
Matt Mackall : http://www.selenic.com : of or relating to the moon
#25 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton

Merged

(quoted diff) +0 -4
-cpumask_t-1.patch
-gcc-bug-workaround.patch
-sparse-apic-fix.patch
-nuke-cpumask_arith.patch

Review

Quoted 10 lines
(quoted diff) +4 -1
-p4-clockmod-cpumask-fix.patch
 
 Folded into cpumask_t-1.patch
 
+cpumask_t-s390-fix.patch
+kgdb-cpumask_t.patch
+cpumask_t-x86_64-fix.patch
+sparc64-cpumask_t-fix.patch
 
 cpumask_t fixes

UP APM has broken since -mm2, looks like something like this is needed (compiles, untested):

arch/i386/kernel/apm.c +1 -1
diff -urN -x genksyms -x '*.ver' -x '.patch*' -x '*.orig' orig/arch/i386/kernel/apm.c patched/arch/i386/kernel/apm.c
@@ -528,7 +528,7 @@
  *	No CPU lockdown needed on a uniprocessor
  */
  
-#define apm_save_cpus()	0
+#define apm_save_cpus()	(current->cpus_allowed)
 #define apm_restore_cpus(x)	(void)(x)
 
 #endif
Signature · 1 line
Matt Mackall : http://www.selenic.com : of or relating to the moon
#26 lore raw

arch/i386/kernel/apm.c line 532

Quoted 3 lines · Matt Mackall
arch/i386/kernel/apm.c +1 -1
-#define apm_save_cpus()	0
+#define apm_save_cpus()	(current->cpus_allowed)
 #define apm_restore_cpus(x)	(void)(x)

It's trying to describe an empty set of cpus. This is denoted by CPU_MASK_NONE in the cpumask_t bits.

-- wli

#27 lore raw
In reply to Andrew Morton
Quoted 1 line · Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.74/2.5.74-mm3/

OK, I'm finally getting around to actually commenting, this has been a niggling issue for a while...

Quoted 4 lines

All 113 patches:

64-bit-dev_t-kdev_t.patch
64-bit dev_t and kdev_t

Yes, this patch says "not ready for prime time, it breaks things".

In particular, this gives the device-mapper userspace indigestion, because the ioctl passes something other than a 64-bit kdev_t in from libdevmapper. Upshot is that the LVM2 'vgchange -ay' fails gloriously.

Workaround: Compile the devmapper/LVM stuff with a private copy of include/ linux/kdev_t.h that matches the one the kernel uses. No, I didn't actually get that to work, so I backed out the 64-bit patch...

(And no, the recent devmapper/LVM2 stuff posted doesn't fix this).

#28 lore raw
Quoted 18 lines · On Thu, Jul 10, 2003 at 02:21:08PM -0400, [email protected] wrote:
Quoted 1 line · Andrew Morton

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.74/2.5.74-mm3/

OK, I'm finally getting around to actually commenting, this has been a niggling issue for a while...

Quoted 4 lines

All 113 patches:

64-bit-dev_t-kdev_t.patch
64-bit dev_t and kdev_t

Yes, this patch says "not ready for prime time, it breaks things".

In particular, this gives the device-mapper userspace indigestion, because the ioctl passes something other than a 64-bit kdev_t in from libdevmapper. Upshot is that the LVM2 'vgchange -ay' fails gloriously.

Quoted 5 lines

Workaround: Compile the devmapper/LVM stuff with a private copy of include/ linux/kdev_t.h that matches the one the kernel uses. No, I didn't actually get that to work, so I backed out the 64-bit patch...

(And no, the recent devmapper/LVM2 stuff posted doesn't fix this).

The v1 ioctl interface passes the dev in as a __kernel_dev_t, so unfortunately if you change the size of __kernel_dev_t you will have to rebuild the tools.

The v4 ioctl interface just uses a __u64 which I hope will be future proof.

- Joe

#29 lore raw
Quoted 7 lines

The v1 ioctl interface passes the dev in as a __kernel_dev_t, so unfortunately if you change the size of __kernel_dev_t you will have to rebuild the tools.

The v4 ioctl interface just uses a __u64 which I hope will be future proof.

This was the only thing that made the 32bit ioctls different to the 64bit ones on ppc64, so changing it to __u64 is a good thing.

Anton