mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 09:41:44 +00:00
fd2f3bddae
The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes + sizeof(struct csr1212_csr_rom_cache) big. Most of the time much smaller data structures are allocated. Therefore vmalloc is a waste. The one exception is csr1212_append_new_cache() which is called to append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct csr1212_csr_rom_cache) if the currently allocated ROM cache is too small. CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes. In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the config_rom_2.4 branch. This same commit also switched CSR1212_MALLOC from kmalloc to vmalloc in the SVN trunk branch: > r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines > > CSR1212 Extended ROM bug fixes: > trunk line changes: > - Use vmalloc instead of kmalloc > - Change delayed_reset_bus() to operate in a work_queue instead of a > timer interrupt. > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. > config-rom-2.4 changes: > - Changed extended rom allocation from 256K to 8K. (It was actually 2 kB, not 8 kB.) > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of struct csr1212_csr_rom_cache. Note, this code path is not used by the in-kernel drivers though. raw1394 could trigger it, but the respective libraw1394 functions don't exist yet. Furthermore, userspace programs can replace the entire local ROM via raw1394. If kmalloc does not fulfill their needs --- well, tough luck. I decree that nobody needs such huge extended ROMs. (Extended ROMs are defined by IEEE 1212 clause 7.7.18. The spec does not impose practically relevant restrictions on the size of extended ROM chunks.) Another potentially demanding use of CSR1212_MALLOC is if external FireWire devices come with Extended ROM entries. If they are too big for kmalloc (or have been too big for vmalloc) we just fail to read their ROM. This is quite unlikely though, to my knowledge. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> |
||
---|---|---|
.. | ||
config_roms.c | ||
config_roms.h | ||
csr1212.c | ||
csr1212.h | ||
csr.c | ||
csr.h | ||
dma.c | ||
dma.h | ||
dv1394-private.h | ||
dv1394.c | ||
dv1394.h | ||
eth1394.c | ||
eth1394.h | ||
highlevel.c | ||
highlevel.h | ||
hosts.c | ||
hosts.h | ||
ieee1394_core.c | ||
ieee1394_core.h | ||
ieee1394_hotplug.h | ||
ieee1394_transactions.c | ||
ieee1394_transactions.h | ||
ieee1394_types.h | ||
ieee1394-ioctl.h | ||
ieee1394.h | ||
iso.c | ||
iso.h | ||
Kconfig | ||
Makefile | ||
nodemgr.c | ||
nodemgr.h | ||
ohci1394.c | ||
ohci1394.h | ||
pcilynx.c | ||
pcilynx.h | ||
raw1394-private.h | ||
raw1394.c | ||
raw1394.h | ||
sbp2.c | ||
sbp2.h | ||
video1394.c | ||
video1394.h |