2000-11-29 07:28:57

by Linus Torvalds

[permalink] [raw]
Subject: test12-pre3


The bulk of this is architecture updates (most lately mips64). The most
interesting (but fairly small) part is the VM cleanups. Any day now
kiobuf's can just use PageDirty on everything, and we won't have any nasty
races any more.

Linus

----

- pre3:
- me: more PageDirty / swapcache handling
- Neil Brown: raid and md init fixes
- David Brownell: pci hotplug sanitization.
- Kanoj Sarcar: mips64 update
- Kai Germaschewski: ISDN sync
- Andreas Bombe: ieee1394 cleanups and fixes
- Johannes Erdfelt: USB update
- David Miller: Sparc and net update
- Trond Myklebust: RPC layer SMP fixes
- Thomas Sailer: mixed sound driver fixes
- Tigran Aivazian: use atomic_dec_and_lock() for free_uid()

- pre2:
- Peter Anvin: more P4 configuration parsing
- Stephen Tweedie: O_SYNC patches. Make O_SYNC/fsync/fdatasync
do the right thing.
- Keith Owens: make mdule loading use the right struct module size
- Boszormenyi Zoltan: get MTRR's right for the >32-bit case
- Alan Cox: various random documentation etc
- Dario Ballabio: EATA and u14-34f update
- Ivan Kokshaysky: unbreak alpha ruffian
- Richard Henderson: PCI bridge initialization on alpha
- Zach Brown: correct locking in Maestro driver
- Geert Uytterhoeven: more m68k updates
- Andrey Savochkin: eepro100 update
- Dag Brattli: irda update
- Johannes Erdfelt: USB update

- pre1: (for ISDN synchronization _ONLY_! Not complete!)
- Byron Stanoszek: correct decimal precision for CPU MHz in
/proc/cpuinfo
- Ollie Lho: SiS pirq routing.
- Andries Brouwer: isofs cleanups
- Matt Kraai: /proc read() on directories should return EISDIR, not EINVAL
- me: be stricter about what we accept as a PCI bridge setup.
- me: always set PCI interrupts to be level-triggered when we enable them.
- me: updated PageDirty and swap cache handling
- Peter Anvin: update A20 code to work without keyboard controller
- Kai Germaschewski: ISDN updates
- Russell King: ARM updates
- Geert Uytterhoeven: m68k updates


2000-11-29 23:41:10

by Keith Owens

[permalink] [raw]
Subject: [patch] test12-pre3 include/linux/elf.h

Linus, please apply.

The kernel incorrectly defines Elf64_Word and Elf64_Sword as 8 bytes,
they should be 4 bytes, Elf64_Xword and Elf64_Sxword are the 8 byte
versions. The type mismatch between kernel and user space causes field
misalignments if you copy a user space definition into the kernel or
vice versa. This patch corrects Elf64_[S]Word to 4 bytes and adds the
correct Elf64_[S]Xword where it really needs 8 bytes. It also replaces
several other incorrect types in elf.h, they now match user space and
the ELF standards.

The structures sizes and offsets have not changed, it is just a type
cleanup. Patch tested on IA64. It was sent to various 64 bit mailing
lists for review, nobody has complained.

Index: 0-test12-pre3.1/include/linux/elf.h
--- 0-test12-pre3.1/include/linux/elf.h Tue, 31 Oct 2000 08:28:16 +1100 kaos (linux-2.4/Y/0_elf.h 1.4 644)
+++ 0-test12-pre3.1(w)/include/linux/elf.h Thu, 30 Nov 2000 10:00:55 +1100 kaos (linux-2.4/Y/0_elf.h 1.4 644)
@@ -16,8 +16,10 @@ typedef __u64 Elf64_Addr;
typedef __u16 Elf64_Half;
typedef __s16 Elf64_SHalf;
typedef __u64 Elf64_Off;
-typedef __s64 Elf64_Sword;
+typedef __s32 Elf64_Sword;
-typedef __u64 Elf64_Word;
+typedef __u32 Elf64_Word;
+typedef __u64 Elf64_Xword;
+typedef __s64 Elf64_Sxword;

/* These constants are for the segment types stored in the image headers */
#define PT_NULL 0
@@ -176,10 +178,10 @@ typedef struct dynamic{
} Elf32_Dyn;

typedef struct {
- Elf64_Word d_tag; /* entry tag value */
+ Elf64_Sxword d_tag; /* entry tag value */
union {
- Elf64_Word d_val;
+ Elf64_Xword d_val;
- Elf64_Word d_ptr;
+ Elf64_Addr d_ptr;
} d_un;
} Elf64_Dyn;

@@ -370,7 +372,7 @@ typedef struct elf32_rel {

typedef struct elf64_rel {
Elf64_Addr r_offset; /* Location at which to apply the action */
- Elf64_Word r_info; /* index and type of relocation */
+ Elf64_Xword r_info; /* index and type of relocation */
} Elf64_Rel;

typedef struct elf32_rela{
@@ -381,8 +383,8 @@ typedef struct elf32_rela{

typedef struct elf64_rela {
Elf64_Addr r_offset; /* Location at which to apply the action */
- Elf64_Word r_info; /* index and type of relocation */
+ Elf64_Xword r_info; /* index and type of relocation */
- Elf64_Word r_addend; /* Constant addend used to compute value */
+ Elf64_Sxword r_addend; /* Constant addend used to compute value */
} Elf64_Rela;

typedef struct elf32_sym{
@@ -395,12 +397,12 @@ typedef struct elf32_sym{
} Elf32_Sym;

typedef struct elf64_sym {
- Elf32_Word st_name; /* Symbol name, index in string tbl (yes, Elf32) */
+ Elf64_Word st_name; /* Symbol name, index in string tbl */
unsigned char st_info; /* Type and binding attributes */
unsigned char st_other; /* No defined meaning, 0 */
Elf64_Half st_shndx; /* Associated section index */
Elf64_Addr st_value; /* Value of the symbol */
- Elf64_Word st_size; /* Associated symbol size */
+ Elf64_Xword st_size; /* Associated symbol size */
} Elf64_Sym;


@@ -425,19 +427,19 @@ typedef struct elf32_hdr{

typedef struct elf64_hdr {
unsigned char e_ident[16]; /* ELF "magic number" */
- Elf64_SHalf e_type;
+ Elf64_Half e_type;
Elf64_Half e_machine;
- __s32 e_version;
+ Elf64_Word e_version;
Elf64_Addr e_entry; /* Entry point virtual address */
Elf64_Off e_phoff; /* Program header table file offset */
Elf64_Off e_shoff; /* Section header table file offset */
- __s32 e_flags;
+ Elf64_Word e_flags;
- Elf64_SHalf e_ehsize;
+ Elf64_Half e_ehsize;
- Elf64_SHalf e_phentsize;
+ Elf64_Half e_phentsize;
- Elf64_SHalf e_phnum;
+ Elf64_Half e_phnum;
- Elf64_SHalf e_shentsize;
+ Elf64_Half e_shentsize;
- Elf64_SHalf e_shnum;
+ Elf64_Half e_shnum;
- Elf64_SHalf e_shstrndx;
+ Elf64_Half e_shstrndx;
} Elf64_Ehdr;

/* These constants define the permissions on sections in the program
@@ -458,14 +460,14 @@ typedef struct elf32_phdr{
} Elf32_Phdr;

typedef struct elf64_phdr {
- __s32 p_type;
+ Elf64_Word p_type;
- __s32 p_flags;
+ Elf64_Word p_flags;
Elf64_Off p_offset; /* Segment file offset */
Elf64_Addr p_vaddr; /* Segment virtual address */
Elf64_Addr p_paddr; /* Segment physical address */
- Elf64_Word p_filesz; /* Segment size in file */
+ Elf64_Xword p_filesz; /* Segment size in file */
- Elf64_Word p_memsz; /* Segment size in memory */
+ Elf64_Xword p_memsz; /* Segment size in memory */
- Elf64_Word p_align; /* Segment alignment, file & memory */
+ Elf64_Xword p_align; /* Segment alignment, file & memory */
} Elf64_Phdr;

/* sh_type */
@@ -522,16 +524,16 @@ typedef struct {
} Elf32_Shdr;

typedef struct elf64_shdr {
- Elf32_Word sh_name; /* Section name, index in string tbl (yes Elf32) */
+ Elf64_Word sh_name; /* Section name, index in string tbl */
- Elf32_Word sh_type; /* Type of section (yes Elf32) */
+ Elf64_Word sh_type; /* Type of section */
- Elf64_Word sh_flags; /* Miscellaneous section attributes */
+ Elf64_Xword sh_flags; /* Miscellaneous section attributes */
Elf64_Addr sh_addr; /* Section virtual addr at execution */
Elf64_Off sh_offset; /* Section file offset */
- Elf64_Word sh_size; /* Size of section in bytes */
+ Elf64_Xword sh_size; /* Size of section in bytes */
- Elf32_Word sh_link; /* Index of another section (yes Elf32) */
+ Elf64_Word sh_link; /* Index of another section */
- Elf32_Word sh_info; /* Additional section information (yes Elf32) */
+ Elf64_Word sh_info; /* Additional section information */
- Elf64_Word sh_addralign; /* Section alignment */
+ Elf64_Xword sh_addralign; /* Section alignment */
- Elf64_Word sh_entsize; /* Entry size if section holds table */
+ Elf64_Xword sh_entsize; /* Entry size if section holds table */
} Elf64_Shdr;

#define EI_MAG0 0 /* e_ident[] indexes */
@@ -578,15 +580,10 @@ typedef struct elf32_note {
} Elf32_Nhdr;

/* Note header in a PT_NOTE section */
-/*
- * For now we use the 32 bit version of the structure until we figure
- * out whether we need anything better. Note - on the Alpha, "unsigned int"
- * is only 32 bits.
- */
typedef struct elf64_note {
- Elf32_Word n_namesz; /* Name size */
+ Elf64_Word n_namesz; /* Name size */
- Elf32_Word n_descsz; /* Content size */
+ Elf64_Word n_descsz; /* Content size */
- Elf32_Word n_type; /* Content type */
+ Elf64_Word n_type; /* Content type */
} Elf64_Nhdr;

#if ELF_CLASS == ELFCLASS32

2000-11-30 00:09:29

by Rick Haines

[permalink] [raw]
Subject: Re: test12-pre3 (broke my usb)

On Tue, Nov 28, 2000 at 10:57:35PM -0800, Linus Torvalds wrote:
> - pre3:
> - Johannes Erdfelt: USB update

Seems to have broken my IntelliMouse Optical (logs from the third time
I inserted usb-uhci):

Nov 29 17:12:08 sasami kernel: usb-uhci.c: Detected 2 ports
Nov 29 17:12:08 sasami kernel: usb.c: new USB bus registered, assigned bus number 1
Nov 29 17:12:08 sasami kernel: hub.c: USB hub found
Nov 29 17:12:08 sasami kernel: hub.c: 2 ports detected
Nov 29 17:12:08 sasami kernel: hub.c: USB new device connect on bus1/1, assigned device number 5
Nov 29 17:12:11 sasami kernel: usb_control/bulk_msg: timeout
Nov 29 17:12:11 sasami kernel: usb.c: USB device not accepting new address=5 (error=-110)
Nov 29 17:12:11 sasami kernel: hub.c: USB new device connect on bus1/1, assigned device number 6
Nov 29 17:12:14 sasami kernel: usb_control/bulk_msg: timeout
Nov 29 17:12:14 sasami kernel: usb.c: USB device not accepting new address=6 (error=-110)

--
Rick ([email protected])
http://www.kuroyi.net

I think the slogan of the fansubbers puts
it best: "Cheaper than crack, and lots more fun."

2000-11-30 00:19:10

by Miles Lane

[permalink] [raw]
Subject: Re: test12-pre3 (broke my usb)

Rick Haines wrote:

> On Tue, Nov 28, 2000 at 10:57:35PM -0800, Linus Torvalds wrote:
>
>> - pre3:
>> - Johannes Erdfelt: USB update
>
>
> Seems to have broken my IntelliMouse Optical (logs from the third time
> I inserted usb-uhci):

Yes. This problem has been reported by two others on the
Linux USB Development list. It is being explored.

If you'd like to contribute to testing whatever patches get
offered to fix this bug, you could send a note saying so to
[email protected]. If you want to stay in the
loop on USB development, you might also want to join the
Linux-USB-Users list. You can join by filling out the form here:

http://lists.sourceforge.net/mailman/listinfo/linux-usb-users

Best wishes and thanks for the bug report!

Miles

2000-11-30 01:01:29

by David Ford

[permalink] [raw]
Subject: Re: test12-pre3 (broke my usb)

> Seems to have broken my IntelliMouse Optical (logs from the third time
> I inserted usb-uhci):
>
> Nov 29 17:12:08 sasami kernel: usb-uhci.c: Detected 2 ports
> Nov 29 17:12:08 sasami kernel: usb.c: new USB bus registered, assigned bus number 1
> Nov 29 17:12:08 sasami kernel: hub.c: USB hub found
> Nov 29 17:12:08 sasami kernel: hub.c: 2 ports detected
> Nov 29 17:12:08 sasami kernel: hub.c: USB new device connect on bus1/1, assigned device number 5
> Nov 29 17:12:11 sasami kernel: usb_control/bulk_msg: timeout
> Nov 29 17:12:11 sasami kernel: usb.c: USB device not accepting new address=5 (error=-110)
> Nov 29 17:12:11 sasami kernel: hub.c: USB new device connect on bus1/1, assigned device number 6
> Nov 29 17:12:14 sasami kernel: usb_control/bulk_msg: timeout
> Nov 29 17:12:14 sasami kernel: usb.c: USB device not accepting new address=6 (error=-110)

Actually it started several versions back. I can frequently trigger it after an apm suspend/resume
cycle.

-d


Attachments:
david.vcf (274.00 B)
Card for David Ford

2000-11-30 06:28:43

by Greg KH

[permalink] [raw]
Subject: Re: [linux-usb-devel] Re: test12-pre3 (broke my usb)

> > Nov 29 17:12:14 sasami kernel: usb_control/bulk_msg: timeout
> > Nov 29 17:12:14 sasami kernel: usb.c: USB device not accepting new address=6 (error=-110)

This message is now showing up for a lot of people.
I think we need to change the source to have it say what is really
happening:


diff -Naur -X dontdiff linux-2.4.0-test11/drivers/usb/usb.c linux-2.4.0-test11-greg/drivers/usb/usb.c
--- linux-2.4.0-test11/drivers/usb/usb.c Fri Nov 24 16:19:36 2000
+++ linux-2.4.0-test11-greg/drivers/usb/usb.c Wed Nov 29 21:55:38 2000
@@ -2008,7 +2008,8 @@

err = usb_set_address(dev);
if (err < 0) {
- err("USB device not accepting new address=%d (error=%d)",
+ err("USB device not accepting new address=%d (error=%d), "
+ "host controller probably not getting any interrupts",
dev->devnum, err);
clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
dev->devnum = -1;



greg k-h

--
greg@(kroah|wirex).com

2000-12-01 06:30:53

by Dax Kelson

[permalink] [raw]
Subject: Re: test12-pre3 (FireWire issue)

Linus Torvalds said once upon a time (Tue, 28 Nov 2000):

> - pre3:
> - Andreas Bombe: ieee1394 cleanups and fixes

Linus, Andreas,

I've been using this same config since FireWire was merged, just tried out
test12-pre3 and got an unresolved symbol problem with raw1394.o

#
# IEEE 1394 (FireWire) support
#
CONFIG_IEEE1394=y
# CONFIG_IEEE1394_PCILYNX is not set
CONFIG_IEEE1394_OHCI1394=y
CONFIG_IEEE1394_VIDEO1394=m
CONFIG_IEEE1394_RAWIO=m
# CONFIG_IEEE1394_VERBOSEDEBUG is not set


make bzImage; make modules; make modules_install

modules_install bombs out with:

cd /lib/modules/2.4.0-test12; \
mkdir -p pcmcia; \
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.0-test12; fi
depmod: *** Unresolved symbols in
/lib/modules/2.4.0-test12/kernel/drivers/ieee1394/raw1394.o
depmod: free_tlabel
depmod: fill_iso_packet
depmod: hpsb_register_highlevel
depmod: highlevel_lock
depmod: hpsb_unregister_highlevel
depmod: hpsb_send_packet
depmod: highlevel_read
depmod: hpsb_make_lockpacket
depmod: alloc_hpsb_packet
depmod: highlevel_write
depmod: hpsb_dec_host_usage
depmod: hpsb_reset_bus
depmod: hpsb_generation
depmod: hpsb_unlisten_channel
depmod: hpsb_make_readbpacket
depmod: hpsb_listen_channel
depmod: free_hpsb_packet
depmod: hpsb_make_readqpacket
depmod: hpsb_make_writebpacket
depmod: hpsb_inc_host_usage
depmod: hpsb_make_writeqpacket
[root@thud linux]#


Dax Kelson
Guru Labs

2000-12-04 00:40:06

by Andreas Bombe

[permalink] [raw]
Subject: Re: test12-pre3 (FireWire issue)

On Thu, Nov 30, 2000 at 11:00:07PM -0700, Dax Kelson wrote:
> Linus Torvalds said once upon a time (Tue, 28 Nov 2000):
>
> > - pre3:
> > - Andreas Bombe: ieee1394 cleanups and fixes
>
> Linus, Andreas,
>
> I've been using this same config since FireWire was merged, just tried out
> test12-pre3 and got an unresolved symbol problem with raw1394.o

Frankly, I don't know where the missing symbols could come from.
Nothing in that area was recently changed. The patch merged into pre3
was just removing Linux 2.2 compatibility macros and fixing two bugs,
symbols were not messed with.

I haven't compiled pre3 myself so far, however.

--
Andreas E. Bombe <[email protected]> DSA key 0x04880A44
http://home.pages.de/~andreas.bombe/ http://linux1394.sourceforge.net/