* Re: dmapool (was: Re: Linux 2.6.3-rc2)
@ 2004-02-13 20:23 David Brownell
0 siblings, 0 replies; 13+ messages in thread
From: David Brownell @ 2004-02-13 20:23 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-kernel
> +static inline int
> +dma_supported(struct device *dev, u64 mask)
> +{
> + BUG();
> + return 0;
> +}
dma_supported() in particular shouldn't BUG(); this should work:
if (use_dma && dma_supported(dev, ~(u32)0)) {
... set up for DMA ...
} else {
... just use PIO instead ...
}
Likewise the other routines that have clearly defined fault paths
should probably just use those instead of BUG(). Examples of this
type would be dma_alloc_coherent(), dma_map_sg() and maybe also
dma_get_cache_alignment().
Of course the API still lacks clean fault reporting for the single
shot mapping calls -- like maybe an arch-settable
#define DMA_ADDR_INVALID (~(dma_addr_t)0)
return value -- but that'd be a different patch.
- Dave
^ permalink raw reply [flat|nested] 13+ messages in thread* Linux 2.6.3-rc2
@ 2004-02-10 3:17 Linus Torvalds
2004-02-10 13:31 ` dmapool (was: Re: Linux 2.6.3-rc2) Geert Uytterhoeven
0 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2004-02-10 3:17 UTC (permalink / raw)
To: Kernel Mailing List
Uhhuh. There was a bit more pending, so here's a -rc2. Now please calm
down, I'd like this to have some time to stabilize..
The rc1->rc2 changes are mostly driver side stuff: PnP update, USB, ACPI,
IRDA, i2c, hotplug-PCI and netdrivers etc. But there's a NFSv4 update and
soem XFS fixes there too.
And some ARM and sparc updates.
Linus
Summary of changes from v2.6.3-rc1 to v2.6.3-rc2
============================================
Adam Belay:
o PCI: Remove uneeded resource structures from pci_dev
o [PNP]: Fix Serial PnP driver
o [PNP]: Resource flags update
o [PNP]: Disable resources fix
o [PNP]: Avoid static requests
o [PNP] Move ID declarations
o [PNP]: file2alias support
o [PNP]: Card matching code fix
o [PNP]: Add additonal sysfs entries
o [PNP]: Cleanup Kconfig
Adrian Bunk:
o USB: remove USB_SCANNER from the build
Alan Stern:
o USB gadget: file_storage.c -- remove device_unregister_wait()
o USB gadget: fix usb/gadget/file_storage.c doesn't compile with gcc
2.95
o USB: change uhci maintainer
o USB: fix unneeded SubClass entry in unusual_devs.h
Alexander Viro:
o [netdrvr qeth] use alloc_etherdev instead of hand-allocating struct
net_device
o [netdrvr meth] use alloc_etherdev; fix leaks on error/cleanup
o [wireless ray_cs] use alloc_etherdev
o [netdrvr ne3210] remove #if 0'd code
o [appletalk ipddp] dynamically allocate struct net_device
o [arcnet com90io] use alloc_netdev
o [arcnet arc-rimi] use alloc_netdev; module params; fix bugs on
error/cleanup
o [arcnet com20020] netdev dynamic alloc; module params; fix bugs
o [arcnet com90xx] netdev dynamic alloc; module params; fix bugs
o [arcnet] create and use alloc_arcdev helper
o [netdrvr ppp] netdev dynamic alloc; convert ppp_net_init to
alloc_netdev setup function
o [wan synclink] netdev dynamic alloc
o [wan cosa] netdev dyamic alloc
o net_device and netdev private struct allocation improvements
o [hamradio dmascc] convert embedded net_device to dynamic allocation
o [char synclinkmp] convert net_device to dynamic allocation
o [pcmcia] synclink_cs] convert net_device to dynamic allocation
o [atm clip] convert to using alloc_netdev(), const-offset priv
o [netdrvr] s/kfree/free_netdev/ where appropriate
o [wireless wl3501_cs] remove unused constructor
o [netdrvr] convert most 8390 drivers to using alloc_ei_netdev()
o [netdrvr smc-mca] alloc_ei_netdev(), other fixes
o [netdrvr pcnet_cs] alloc_ei_netdev-associated cleanups
o [netdrvr 8390] convert 8390 lib to use const-offset priv struct
o [NET] s/kfree/free_netdev/ in bridge driver
o [netdrvr axnet_cs] use embedded private struct
o [netdrvr ns83820] Switched to sane net_device allocation
o [netdrvr ns83820] Plugs the races around too early
register_netdev()
o [netdrvr ibmlana] ibmlana switched to sane allocation, leaks fixed
o [netdrvr] A bunch of gratitious ->init() killed; several leaks
plugged
o [netdrvr 8390] Forgotten return 0; removed
o [netdrvr pcnet32] Added missing check and cleanup for
register_netdev() failure in pcnet32
o [netdrvr ibmtr, ibmtr_cs] cleanup and leak fixes
o [irda sa1100_ir] convert to using standard alloc_irdadev()
o Fix imm/ppa initializing bug in driver updates
Andrew Morton:
o [netdrvr] new-probe warning fix
o USB: gcc-3.5: drivers/usb/gadget/net2280.c
o USB: gcc-3.5: drivers/usb/input/hid-core.c
o USB: gcc-3.5: drivers/usb/misc/uss720.c
o USB: gcc-3.5: drivers/usb/storage/usb.c
o Fix qla2xxx warnings
o v850: Add some #includes for the v850 to eliminate some compiler
warnings
o v850: Define ARCH_HAS_*_EXTABLE macros for v850
o v850: make __delay function handle a loop count of zero
o add device id to radeonfb
o Fix ppa/imm warnings
o Fix __filemap_fdatawrite() comment
o bitmap_snprintf() optimization
o alpha: fix build error due to __attribute_const__ conversion
o vx222_ops.c warning fix
o cciss: PCI BAR sizing fix
o cciss: Fix freeing of incorrect IO memory address
o cciss: Add support for SA 6i embedded controller
o cciss: IRQ sharing fix
o cciss: disble prefetching in ASIC
o cciss: intialisation oops fix
o cciss: avoid reading PCI config space
o cciss: printk format fix
o cciss: improve /proc presentation
o cciss: use pci_module_init()
o cciss: rmmod oops fix
o NFS: fix for older gcc's
o Remove duplicated HPPA bits in kernel/sysctl.c
o getxattr error checking fix
Andrew Vasquez:
o qla2xxx Kconfig fix
Bartlomiej Zolnierkiewicz:
o remove MOD_INC_USE_COUNT from drivers/ide/
o fix ns87415.c for PA-RISC Super I/O chip
o fix too early probing of default IDE ports
o fix duplication of DMA {black,white}list in icside.c
o fix OOPS for multiple IDE PCI modules and CONFIG_PROC_FS=y
Benjamin Herrenschmidt:
o ide-cd: incorrect use of sector_div
Christoph Hellwig:
o [SUNRPC]: Use completions instead of sleep_on for rpciod
o [XFS] Fix buffer teardown on _pagebuf_lookup_pages failure
o [XFS] Remove the lockable/not lockable buffer distinction
o [XFS] Remove PBF_MAPPABLE
o [XFS] plug a pagebuf leak
o [XFS] Avoid NULL returns from pagebuf_get
o [XFS] Fix gcc 3.5 compilation for real
Dan Scholnik:
o USB: fix Casio digicam entry in unusual_devs.h
David Brownell:
o USB: fix Bug 1821: sleeping function called
o USB: remove pci_unmap_single() calls from usbcore
o PCI: dma_pool fixups
o USB Gadget: ethernet gadget locking tweaks
o USB Gadget: pxa2xx_udc updates
o USB: usbtest updates
o USB: usbnet updates (new devices)
o USB: USB misc OHCI updates
o USB: re-factor enumeration/reset paths
David Martínez Moreno:
o I2C: fix typos
David S. Miller:
o [SPARC]: Fix AIO syscall numbering
o [ECONET]: Use LL_RESERVED_SPACE() where applicable. Noticed by
yoshfuji
Deepak Saxena:
o PCI: Replace pci_pool with generic dma_pool
o PCI: Replace pci_pool with generic dma_pool, part 2
o USB: remove reference to usb_hcd.refcnt in ohci-sa111.c
Dely Sy:
o PCI: Patch to get cpqphp working with IOAPIC
Dominik Brodowski:
o [ACPI] update passive cooling algorithm from Dominik Brodowski
o [ACPI] remove unnecessary check in acpi-cpufreq driver from Dominik
Brodowski
o [ACPI] update _PPC handling -- from Dominik Brodowski
o [ACPI] acpi-cpufreq fixups from Dominik Brodowski
o [ACPI] more acpi-cpufreq fixups from Dominik Brodowski
o [ACPI] Move the _PSS and _PCT access to drivers/acpi/processor.c so
that it can be used by various low-level drivers (centrino,
acpi-io, powernow-k{7,8}, ...) from Dominik Brodowski
o [ACPI] Move the /proc/acpi/processor/./performance output to
drivers/acpi/processor.c -- it's the same for all lowlevel drivers.
o [ACPI] Abstract the registration method between low-level drivers
and the ACPI Processor P-States driver.
o [ACPI] add _PDC support
o [ACPI] make # of performance states dynamic
Eric Sandeen:
o [XFS] Make more xfs errors trappable with panic_mask
Eugene Teo:
o Kobject: export some missing symbols
Geert Uytterhoeven:
o m68k-related net driver fixes
o sun3-related net driver fixes
o 2.6.x experimental net driver queue fix
o I2C: add Hydra i2c bus driver
Greg Kroah-Hartman:
o USB: remove unused usb-debug.c file
o PCI: add back some pci.ids entries that got deleted in the last big
update
o dmapool: use dev_err() whenever we can to get the better
information in it
o USB: add support for the Aceeca Meazura device to the visor driver
o I2C: fix oops when CONFIG_I2C_DEBUG_CORE is enabled and the bttv
driver is loaded
o Driver core: remove device_unregister_wait() as it's a very bad
idea
o dmapool: Remove sentance in documentation that is now false on 2.6
o USB: remove scanner driver files
o PCI: remove stupid MSI debugging code that was never used
o PCI: move pci_msi.h out of include/linux to drivers/pci where it
belongs
o USB: fix bug number 1980 about keyspan devices not getting
recognized
o Driver Core: fix up list_for_each() calls to list_for_each_entry()
o dmapool: fix up list_for_each() calls to list_for_each_entry()
Hideaki Yoshifuji:
o [IPV6]: Kill broken and unused IPV6_AUTHHDR support
o [WANROUTER]: Use LL_RESERVED_SPACE() where applicable
o [PACKET]: Use LL_RESERVED_SPACE() where applicable
o [IPVS]: Use LL_RESERVED_SPACE() where applicable
o [IPV4/IGMP]: Use LL_RESERVED_SPACE() where applicable
o [NETFILER/ipt_REJECT]: Use LL_RESERVED_SPACE() where applicable
o [IPV6]: Use LL_RESERVED_SPACE() where applicable
Hirofumi Ogawa:
o [AF_UNIX]: Print out paths correctly in /proc/net/unix, matching
2.4.x
James Bottomley:
o SCSI: undelete qlogicfc driver
Jean Delvare:
o I2C: Bring w83l785ts in compliance with sysfs naming conventions
o I2C: Handle read errors in w83l785ts
o I2C: add new driver, gl518sm
o I2C: Update I2C maintainers entry
o I2C: add new chip driver: fscher
Jean Tourrilhes:
o [IRDA]: Ultra sendto support
o [IRDA]: IrLAP disconnection pending race
o [IRDA]: Remove net notifier
o [IRDA]: nsc-ircc irq retval
o [IRDA]: ali-ircc irq retval
o [IRDA]: smsc-ircc2 irq retval
o [IRDA]: via-ircc irq retval
o [IRDA]: w83977af_ir irq retval
Jeff Garzik:
o [netdrvr bonding] fix broken build
Jens Axboe:
o ide-cd invalidate toc cache on last close
Jes Sorensen:
o [ACPI] Check for overflow when parsing MADT entries from Jes
Sorensen
John Belmonte:
o toshiba_acpi 0.17 from John Belmonte
Jon Smirl:
o Driver core: add hotplug support for class_simple
Jonathan Corbet:
o Char drivers: cdev_unmap()
Karol Kozimor:
o acpi4asus update from Karol 'sziwan' Kozimor
Kevin Owen:
o USB: ehci - clear TT buffer command patch
Len Brown:
o [ACPI] add Bruno Ducrot to CREDITS
o fix build error from undefined NR_IRQ_VECTORS
o [ACPI] quiet numa boot -- from Jes Sorensen
o [ACPI] proposed fix for AML parameter passing from Bob Moore
http://bugzilla.kernel.org/show_bug.cgi?id=1766
o [ACPI] fix IA64 build warning from Martin Hicks
Linus Torvalds:
o Don't read i8042 data if no data exists
o Make SET_INPUT_KEYCODE return the old value, and clean up users of
this that were very confused indeed.
o Add forward-declaration of "struct nfs4_client" to make nfs_idmap.h
independent of CONFIG_NFS4 and other header files.
o Clean up dentry pointer validation by moving it into a function of
its own.
o Linux 2.6.3-rc2
Marcelo Tosatti:
o Fix pc300_tty.c -> implement tiocmset/tiocmget
Markus Demleitner:
o USB: DSBR-100 tiny patch
Matthew Dobson:
o PCI: fix "pcibus_class" Device Class, release function
Matthew Wilcox:
o PA-RISC needs IPC64 structs
o PA-RISC Harmony driver update
o New ptrace.h definitions
Nathan Scott:
o [XFS] Use list_move for moving pagebufs between lists, not
list_add/list_del
o [XFS] Fix compile warning, ensure _pagebuf_lookup_pages return
value is inited
o [XFS] Add back a missing pflags check in releasepage
o [XFS] Fix data loss when writing into unwritten extents while
memory is being reclaimed
o [XFS] Fix a trivial compiler warning, remove some no-longer-used
macros
o [XFS] Update XFS config entries - add security entry, update ACL
entry
Olaf Hering:
o USB storage: fix sign bug in usb-storage datafab
Oliver Neukum:
o USB: fix DMA to stack in tt-usb
o USB: fix URB leak in belkin driver
Petri Koistinen:
o [SCTP]: Unify URL referencing in Kconfig documentation
o [NET_SCHED]: Unify URL referencing in Kconfig documentation
o [IPV6]: Unify URL referencing in Kconfig documentation
o [IPVS]: Unify URL referencing in Kconfig documentation
o USB: usb-storage Kconfig_URL_update
o USB: drivers/usb/net config URI update and unify
o USB: drivers/usb/misc/Kconfig URI update & unify: modules.txt
o USB: drivers/usb/input/Kconfig URI unify
o USB: drivers/usb/media/Kconfig URL fixups
Rolf Eike Beer:
o PCI Hotplug: coding style for cpqphp_pci.c
o PCI Hotplug: Whitespace fixes for acpiphp
o PCI Hotplug: Kill spaces before \n in ibmphp*
o PCI Hotplug: Kill useless instructions from ibmphp_core.c
o PCI: avoid two returns directly after each other in pcidriver.c
o PCI Hotplug: Coding style fixes for drivers/pci/hotplug.c
o PCI Hotplug: very small optimisations for ibmphp_pci.c
o PCI Hotplug: kill hpcrc from several functions in ibmphp_core.c
o PCI Hotplug: make ibm_unconfigure_device void
o PCI Hotplug: mark functions __init/__exit in acpiphp
o PCI Hotplug: Convert error paths in ibmphp to use goto
Russell King:
o [netdrvr pcmcia] fix hot unplugging
o [irda sa1100_ir] "resurrect from bitrot hell"
o [ARM] Fix asm syntax for gcc3
o [ARM] Use scsi_host_{alloc,put}() rather than scsi_{un,}register()
o [ARM] Add prefix to driver constants to prevent namespace clashes
Shmulik Hen:
o bonding cleanup 2.6 - Simplify ifenslave
o bonding cleanup 2.6 - Consolidate prints
o bonding cleanup 2.6 - death of typedefs
o bonding cleanup 2.6 - remove dead code
o bonding cleanup 2.6 - Consolidate timer handling
o bonding cleanup 2.6 - Fix handling of bond->primary
o bonding cleanup 2.6 - Remove multicast_mode module param
o bonding cleanup 2.6 - Fix slave list iteration
o bonding cleanup 2.6 - Consolidate function declarations
o bonding cleanup 2.6 - consolidate param names of function params
and variables
o bonding cleanup 2.6 - Re-org struct bonding members (re-send)
o bonding cleanup 2.6 - consolidate return values of functions
o bonding cleanup 2.6 - Consolidate conditions & statements
o bonding cleanup 2.6 - Consolidate error handling in all xmit
functions
o bonding cleanup 2.6 - Whitespace cleanup
o bonding cleanup 2.6 - empty lines cleanup
o bonding cleanup 2.6 - fix indentations
o bonding cleanup 2.6 - Code re-org
o bonding cleanup 2.6 - Fix rejects from previous patches
Sridhar Samudrala:
o [SCTP] provide valid tos and oif values for ip_route_output_key.
(ja@ssi.bg)
o [SCTP] Add sysctl parameters to update socket send/receive buffers
o [SCTP] Removed the deprecated ADLER32 checksum support
o [SCTP] Removed SCTP specific rmem/wmem sysctl's and use the global
rmem_default/wmem_default values for SCTP socket buffer sizes.
Stephen Hemminger:
o [netdrvr skfddi] use PCI hotplug API; other cleanups
o USB: fix usb hc and shared irq handling
o USB: uhci - unused urbp element
Tom Rini:
o USB: mark the scanner driver BROKEN
Tony Lindgren:
o USB: Update ohci-omap to compile
Trond Myklebust:
o NFSv4/RPCSEC_GSS: Ensure that RPC userland upcalls time out
correctly if the corresponding userland daemon is not up and
running.
o RPCSEC_GSS: More fixes to the upcall mechanism
o RPCSEC_GSS: Make the upcalls detect if the userland daemon dies
while processing a request.
o NFSv4: Fix an Oopsable condition if we fail to get the root
directory under NFSv4.
o NFSv4: Bugfixes for the NFSv4 client name to uid mapper
o NFSv4: Bugfixes and cleanups for the NFSv4 client name to uid
mapper. Includes a fix by Tim Woods to deal with a caching bug in
the case where a user and a group share the same numerical id
and/or name.
o RPCSEC_GSS: Make it safe to share crypto tfms among multiple
threads.
o RPCSEC_GSS: Oops. Major memory leak here
o RPCSEC_GSS: Fix two more memory leaks found by the Stanford
checker.
o RPCSEC_GSS: Fix yet more memory leaks
o RPCSEC_GSS: Miscellaneous cleanups of the krb5 code required for
the integrity checksumming mode.
o RPCSEC_GSS: Instead of having gss_get_mic allocate memory for the
mic, require the caller to pass an output buffer whose data pointer
already points to preallocated memory.
o RPCSEC_GSS: Client-side only support for rpcsec_gss integrity
protection. Since this requires checksumming an entire request,
instead of just the header, and since the request may include, for
example, pages with write data, we modify the gss_api routines to
pass xdr_bufs instead of xdr_netobjs where necessary.
o RPCSEC_GSS: Move the gss sequence number history from the task
structure to the request structure, where it makes more sense.
o RPC: xdr_encode_pages either leaves the tail iovec pointing to null
or, if padding onthe page data is needed, sets it to point to a
little bit of static data. This is a problem if we're expecting to
later append some data in gss_wrap_req. Modify xdr_encode_pages to
make tail point to the end of the data in head, as xdr_inline_pages
and xdr_write_pages do.
o RPC: Add support for sharing the same RPC transport and credential
caches between different mountpoints by allowing cloning of the
rpc_client struct.
o NFSv4/RPCSEC_GSS: Make Frank's server->client_sys feature use RPC
cloning in order to avoid duplicating sockets etc. Make NFSv4 share
a single socket for all communication to the same server.
o NFSv4: Convert the RENEW operation from using nfs4_compound, to
being a standalone RPC call in preparation for the renew daemon
o NFSv4: Convert the lease renewal daemon from being per-mountpoint
to being per-server. Instead of running it on top of rpciod,
convert it to use keventd. This mean we can use the struct
nfs4_client semaphores for ordering purposes.
o NFSv4: Split out the code for retrieving static server information
out of the GETATTR compound.
o NFSv4: Convert SETCLIENTID and SETCLIENTID_CONFIRM to be standalone
operations. Ensure that SETCLIENTID_CONFIRM always returns the
lease timeout length.
o NFSv4: Don't translate those NFSv4 errors that are needed by the
kernel itself into EIO.
o NFSv4: Preparation for the server reboot recovery code
o NFSv4: Basic code for recovering file OPEN state after a server
reboot.
o RPC/NFSv4: Allow lease RENEW calls to be soft (i.e. to time
o RPC: Ensure that we disconnect TCP sockets if there has been no NFS
traffic for the last 5 minutes. This code also affects NFSv2/v3.
o NFSv4: Atomic open(). Fixes races w.r.t. opening files
o NFSv4: Share open_owner structs between several different
processes. Reduces the load on the server.
o NFSv4: Fix a bug which was causing Oopses if the client was
mounting more than one partition from the same server.
o NFSv4: Add support for POSIX file locking
^ permalink raw reply [flat|nested] 13+ messages in thread* dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 3:17 Linux 2.6.3-rc2 Linus Torvalds @ 2004-02-10 13:31 ` Geert Uytterhoeven 2004-02-10 14:32 ` Geert Uytterhoeven 0 siblings, 1 reply; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-10 13:31 UTC (permalink / raw) To: Linus Torvalds, Greg Kroah-Hartman; +Cc: Kernel Mailing List The dmapool code makes dma_{alloc,free}_coherent() a requirement for all platforms, breaking platforms that don't have it (e.g. m68k, and from a quick browse sparc and sparc64 probably, too). May not be that nice for a release candidate in a stable series... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 13:31 ` dmapool (was: Re: Linux 2.6.3-rc2) Geert Uytterhoeven @ 2004-02-10 14:32 ` Geert Uytterhoeven 2004-02-10 14:47 ` Russell King 2004-02-10 14:55 ` Christoph Hellwig 0 siblings, 2 replies; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-10 14:32 UTC (permalink / raw) To: Linus Torvalds, Greg Kroah-Hartman; +Cc: Kernel Mailing List On Tue, 10 Feb 2004, Geert Uytterhoeven wrote: > The dmapool code makes dma_{alloc,free}_coherent() a requirement for all > platforms, breaking platforms that don't have it (e.g. m68k, and from a quick > browse sparc and sparc64 probably, too). > > May not be that nice for a release candidate in a stable series... This patch seems to fix the problem (all offending platforms include <asm/generic.h> if CONFIG_PCI only): --- linux-2.6.3-rc2/drivers/base/Makefile 2004-02-10 11:14:46.000000000 +0100 +++ linux-m68k-2.6.3-rc2/drivers/base/Makefile 2004-02-10 15:23:13.000000000 +0100 @@ -2,7 +2,8 @@ obj-y := core.o sys.o interface.o bus.o \ driver.o class.o class_simple.o platform.o \ - cpu.o firmware.o init.o map.o dmapool.o + cpu.o firmware.o init.o map.o obj-y += power/ obj-$(CONFIG_FW_LOADER) += firmware_class.o obj-$(CONFIG_NUMA) += node.o +obj-$(CONFIG_PCI) += dmapool.o Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 14:32 ` Geert Uytterhoeven @ 2004-02-10 14:47 ` Russell King 2004-02-10 14:57 ` Geert Uytterhoeven 2004-02-10 14:55 ` Christoph Hellwig 1 sibling, 1 reply; 13+ messages in thread From: Russell King @ 2004-02-10 14:47 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Linus Torvalds, Greg Kroah-Hartman, Kernel Mailing List On Tue, Feb 10, 2004 at 03:32:47PM +0100, Geert Uytterhoeven wrote: > On Tue, 10 Feb 2004, Geert Uytterhoeven wrote: > > The dmapool code makes dma_{alloc,free}_coherent() a requirement for all > > platforms, breaking platforms that don't have it (e.g. m68k, and from a quick > > browse sparc and sparc64 probably, too). > > > > May not be that nice for a release candidate in a stable series... > > This patch seems to fix the problem (all offending platforms include > <asm/generic.h> if CONFIG_PCI only): Please don't - that breaks ARM. Part of the whole point of dmapool is that it provides a generic DMA pool implementation, especially for non-PCI USB devices. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 14:47 ` Russell King @ 2004-02-10 14:57 ` Geert Uytterhoeven 0 siblings, 0 replies; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-10 14:57 UTC (permalink / raw) To: Russell King; +Cc: Linus Torvalds, Greg Kroah-Hartman, Kernel Mailing List On Tue, 10 Feb 2004, Russell King wrote: > On Tue, Feb 10, 2004 at 03:32:47PM +0100, Geert Uytterhoeven wrote: > > On Tue, 10 Feb 2004, Geert Uytterhoeven wrote: > > > The dmapool code makes dma_{alloc,free}_coherent() a requirement for all > > > platforms, breaking platforms that don't have it (e.g. m68k, and from a quick > > > browse sparc and sparc64 probably, too). > > > > > > May not be that nice for a release candidate in a stable series... > > > > This patch seems to fix the problem (all offending platforms include > > <asm/generic.h> if CONFIG_PCI only): > > Please don't - that breaks ARM. Part of the whole point of dmapool is > that it provides a generic DMA pool implementation, especially for > non-PCI USB devices. Fine, so what about this (add your favorite subsystem that _does use_ dmapool)? --- linux-2.6.3-rc2/drivers/base/Makefile 2004-02-10 11:14:46.000000000 +0100 +++ linux-m68k-2.6.3-rc2/drivers/base/Makefile 2004-02-10 15:23:13.000000000 +0100 @@ -2,7 +2,9 @@ obj-y := core.o sys.o interface.o bus.o \ driver.o class.o class_simple.o platform.o \ - cpu.o firmware.o init.o map.o dmapool.o + cpu.o firmware.o init.o map.o obj-y += power/ obj-$(CONFIG_FW_LOADER) += firmware_class.o obj-$(CONFIG_NUMA) += node.o +obj-$(CONFIG_PCI) += dmapool.o +obj-$(CONFIG_USB) += dmapool.o Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 14:32 ` Geert Uytterhoeven 2004-02-10 14:47 ` Russell King @ 2004-02-10 14:55 ` Christoph Hellwig 2004-02-10 16:23 ` Greg KH 1 sibling, 1 reply; 13+ messages in thread From: Christoph Hellwig @ 2004-02-10 14:55 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Linus Torvalds, Greg Kroah-Hartman, Kernel Mailing List On Tue, Feb 10, 2004 at 03:32:47PM +0100, Geert Uytterhoeven wrote: > This patch seems to fix the problem (all offending platforms include > <asm/generic.h> if CONFIG_PCI only): Umm, no the whole point of the dmapool is that it's not pci-dependent. Just fix your arch to have proper stub dma_ routines. There were at least two headsups during 2.5 and 2.6-test that this will be required. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 14:55 ` Christoph Hellwig @ 2004-02-10 16:23 ` Greg KH 2004-02-10 16:29 ` Geert Uytterhoeven 2004-02-13 21:27 ` Roman Zippel 0 siblings, 2 replies; 13+ messages in thread From: Greg KH @ 2004-02-10 16:23 UTC (permalink / raw) To: Christoph Hellwig, Geert Uytterhoeven, Linus Torvalds, Kernel Mailing List On Tue, Feb 10, 2004 at 02:55:58PM +0000, Christoph Hellwig wrote: > On Tue, Feb 10, 2004 at 03:32:47PM +0100, Geert Uytterhoeven wrote: > > This patch seems to fix the problem (all offending platforms include > > <asm/generic.h> if CONFIG_PCI only): > > Umm, no the whole point of the dmapool is that it's not pci-dependent. > Just fix your arch to have proper stub dma_ routines. There were at > least two headsups during 2.5 and 2.6-test that this will be required. Exactly. Why is your arch including a header file that you can't build? How about dropping this into your arch if you can't use the include/asm-generic/dma-mapping.h file. Or I can add it as include/asm-generic/dma-mapping-broken.h and you can repoint your arch to use it. Which would be easier for you? thanks, greg k-h ----- /* This is used for archs that do not support dma */ #ifndef _ASM_DMA_MAPPING_H #define _ASM_DMA_MAPPING_H static inline int dma_supported(struct device *dev, u64 mask) { BUG(); } static inline int dma_set_mask(struct device *dev, u64 dma_mask) { BUG(); } static inline void * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, int flag) { BUG(); } static inline void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle) { BUG(); } static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction direction) { BUG(); } static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction direction) { BUG(); } static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction direction) { BUG(); } static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, enum dma_data_direction direction) { BUG(); } static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) { BUG(); } static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, enum dma_data_direction direction) { BUG(); } static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) { BUG(); } static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction direction) { BUG(); } #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) #define dma_is_consistent(d) (1) static inline int dma_get_cache_alignment(void) { BUG(); } static inline void dma_sync_single_range(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction) { BUG(); } static inline void dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction direction) { BUG(); } #endif ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 16:23 ` Greg KH @ 2004-02-10 16:29 ` Geert Uytterhoeven 2004-02-10 18:14 ` David S. Miller 2004-02-13 21:27 ` Roman Zippel 1 sibling, 1 reply; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-10 16:29 UTC (permalink / raw) To: Greg KH; +Cc: Christoph Hellwig, Linus Torvalds, Kernel Mailing List On Tue, 10 Feb 2004, Greg KH wrote: > On Tue, Feb 10, 2004 at 02:55:58PM +0000, Christoph Hellwig wrote: > > On Tue, Feb 10, 2004 at 03:32:47PM +0100, Geert Uytterhoeven wrote: > > > This patch seems to fix the problem (all offending platforms include > > > <asm/generic.h> if CONFIG_PCI only): > > > > Umm, no the whole point of the dmapool is that it's not pci-dependent. > > Just fix your arch to have proper stub dma_ routines. There were at > > least two headsups during 2.5 and 2.6-test that this will be required. > > Exactly. Why is your arch including a header file that you can't build? It's included if CONFIG_PCI is enabled (for the few m68k platforms that do have PCI). In that case everything should work fine (fingers crossed). > How about dropping this into your arch if you can't use the > include/asm-generic/dma-mapping.h file. Or I can add it as > include/asm-generic/dma-mapping-broken.h and you can repoint your arch > to use it. Which would be easier for you? Since others may need it as well, include/asm-generic/dma-mapping-broken.h should be fine. Let's see what the sparc guys have to comment... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 16:29 ` Geert Uytterhoeven @ 2004-02-10 18:14 ` David S. Miller 2004-02-12 9:52 ` Geert Uytterhoeven 0 siblings, 1 reply; 13+ messages in thread From: David S. Miller @ 2004-02-10 18:14 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: greg, hch, torvalds, linux-kernel On Tue, 10 Feb 2004 17:29:15 +0100 (MET) Geert Uytterhoeven <geert@linux-m68k.org> wrote: > Let's see what the sparc guys have to comment... I think we'll just add the necessary stubs, it's not unreasonable. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 18:14 ` David S. Miller @ 2004-02-12 9:52 ` Geert Uytterhoeven 2004-02-12 10:25 ` Gerd Knorr 0 siblings, 1 reply; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-12 9:52 UTC (permalink / raw) To: Linus Torvalds, Andrew Morton Cc: David S. Miller, Greg Kroah-Hartman, Christoph Hellwig, Linus Torvalds, Linux Kernel Development On Tue, 10 Feb 2004, David S. Miller wrote: > On Tue, 10 Feb 2004 17:29:15 +0100 (MET) > Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > Let's see what the sparc guys have to comment... > > I think we'll just add the necessary stubs, it's not unreasonable. So here's a patch for m68k, based on Greg's stubs. I only added a few `return 0;' statements to kill compiler warnings. It increased kernel size by a bit less than 0.5 KiB. Feel free to move the stubs to asm-generic/no-dma-mapping.h, if there are enough users to warrant that. --- linux-2.6.3-rc2/include/asm-m68k/dma-mapping.h 2003-07-29 18:19:20.000000000 +0200 +++ linux-m68k-2.6.3-rc2/include/asm-m68k/dma-mapping.h 2004-02-12 10:21:29.000000000 +0100 @@ -5,6 +5,123 @@ #ifdef CONFIG_PCI #include <asm-generic/dma-mapping.h> +#else + +static inline int +dma_supported(struct device *dev, u64 mask) +{ + BUG(); + return 0; +} + +static inline int +dma_set_mask(struct device *dev, u64 dma_mask) +{ + BUG(); + return 0; +} + +static inline void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + int flag) +{ + BUG(); + return 0; +} + +static inline void +dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, + dma_addr_t dma_handle) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_single(struct device *dev, void *cpu_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_page(struct device *dev, struct page *page, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline int +dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems, + enum dma_data_direction direction) +{ + BUG(); +} + +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) +#define dma_is_consistent(d) (1) + +static inline int +dma_get_cache_alignment(void) +{ + BUG(); + return 0; +} + +static inline void +dma_sync_single_range(struct device *dev, dma_addr_t dma_handle, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_cache_sync(void *vaddr, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + #endif #endif /* _M68K_DMA_MAPPING_H */ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-12 9:52 ` Geert Uytterhoeven @ 2004-02-12 10:25 ` Gerd Knorr 2004-02-13 15:24 ` Geert Uytterhoeven 0 siblings, 1 reply; 13+ messages in thread From: Gerd Knorr @ 2004-02-12 10:25 UTC (permalink / raw) To: linux-kernel Geert Uytterhoeven <geert@linux-m68k.org> writes: > Feel free to move the stubs to asm-generic/no-dma-mapping.h, if there are > enough users to warrant that. Yes, please. user-mode-linux needs this too. Gerd -- "... und auch das ganze Wochenende oll" -- Wetterbericht auf RadioEins ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-12 10:25 ` Gerd Knorr @ 2004-02-13 15:24 ` Geert Uytterhoeven 0 siblings, 0 replies; 13+ messages in thread From: Geert Uytterhoeven @ 2004-02-13 15:24 UTC (permalink / raw) To: Gerd Knorr; +Cc: Linux Kernel Development On Thu, 12 Feb 2004, Gerd Knorr wrote: > Geert Uytterhoeven <geert@linux-m68k.org> writes: > > Feel free to move the stubs to asm-generic/no-dma-mapping.h, if there are > > enough users to warrant that. > > Yes, please. user-mode-linux needs this too. So here's a new patch: --- /dev/null 2004-02-08 10:50:36.000000000 +0100 +++ linux-m68k-2.6.3-rc2/include/asm-generic/dma-mapping-broken.h 2004-02-13 16:17:05.000000000 +0100 @@ -0,0 +1,121 @@ +#ifndef _ASM_GENERIC_DMA_MAPPING_H +#define _ASM_GENERIC_DMA_MAPPING_H + +/* This is used for archs that do not support DMA */ + + +static inline int +dma_supported(struct device *dev, u64 mask) +{ + BUG(); + return 0; +} + +static inline int +dma_set_mask(struct device *dev, u64 dma_mask) +{ + BUG(); + return 0; +} + +static inline void * +dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + int flag) +{ + BUG(); + return 0; +} + +static inline void +dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, + dma_addr_t dma_handle) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_single(struct device *dev, void *cpu_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline dma_addr_t +dma_map_page(struct device *dev, struct page *page, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline int +dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, + enum dma_data_direction direction) +{ + BUG(); + return 0; +} + +static inline void +dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems, + enum dma_data_direction direction) +{ + BUG(); +} + +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) +#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) +#define dma_is_consistent(d) (1) + +static inline int +dma_get_cache_alignment(void) +{ + BUG(); + return 0; +} + +static inline void +dma_sync_single_range(struct device *dev, dma_addr_t dma_handle, + unsigned long offset, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction direction) +{ + BUG(); +} + +#endif /* _ASM_GENERIC_DMA_MAPPING_H */ --- linux-2.6.3-rc2/include/asm-m68k/dma-mapping.h 2003-07-29 18:19:20.000000000 +0200 +++ linux-m68k-2.6.3-rc2/include/asm-m68k/dma-mapping.h 2004-02-13 16:14:30.000000000 +0100 @@ -5,6 +5,8 @@ #ifdef CONFIG_PCI #include <asm-generic/dma-mapping.h> +#else +#include <asm-generic/dma-mapping-broken.h> #endif #endif /* _M68K_DMA_MAPPING_H */ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: dmapool (was: Re: Linux 2.6.3-rc2) 2004-02-10 16:23 ` Greg KH 2004-02-10 16:29 ` Geert Uytterhoeven @ 2004-02-13 21:27 ` Roman Zippel 1 sibling, 0 replies; 13+ messages in thread From: Roman Zippel @ 2004-02-13 21:27 UTC (permalink / raw) To: Greg KH Cc: Christoph Hellwig, Geert Uytterhoeven, Linus Torvalds, Kernel Mailing List Hi, On Tue, 10 Feb 2004, Greg KH wrote: > How about dropping this into your arch if you can't use the > include/asm-generic/dma-mapping.h file. Or I can add it as > include/asm-generic/dma-mapping-broken.h and you can repoint your arch > to use it. Which would be easier for you? I don't think adding a dma-mapping-broken.h is correct either. Some m68k scsi drivers are still badly broken, because they use some archaic API and need an update to something sane. I think the problem is that DMA-API.txt suggest there is separate API for coherent/noncoherent (especially dma_alloc_coherent()/ dma_alloc_noncoherent()). DMA-mapping.txt is better here as it distinguishes between consistent and streaming mappings. m68k needs something similiar as arm, consistent allocations are mapped noncachable into the kernel and dma_map* does the necessary cache flushes. With that you would already get very far and would do the right thing for most noncoherent archs. This would only would only leave us with some special cases which had to be fixed to make a driver coherency aware. So I would suggest to drop e.g. dma_alloc_noncoherent() (parisc seems to be the only user and it's simply a kmalloc) and merge the rest of DMA-API.txt with DMA-mapping.txt or make at least consistent with it and maybe add a bit more information what the functions do in the coherent/ noncoherent case. bye, Roman ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-02-13 21:29 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-02-13 20:23 dmapool (was: Re: Linux 2.6.3-rc2) David Brownell -- strict thread matches above, loose matches on Subject: below -- 2004-02-10 3:17 Linux 2.6.3-rc2 Linus Torvalds 2004-02-10 13:31 ` dmapool (was: Re: Linux 2.6.3-rc2) Geert Uytterhoeven 2004-02-10 14:32 ` Geert Uytterhoeven 2004-02-10 14:47 ` Russell King 2004-02-10 14:57 ` Geert Uytterhoeven 2004-02-10 14:55 ` Christoph Hellwig 2004-02-10 16:23 ` Greg KH 2004-02-10 16:29 ` Geert Uytterhoeven 2004-02-10 18:14 ` David S. Miller 2004-02-12 9:52 ` Geert Uytterhoeven 2004-02-12 10:25 ` Gerd Knorr 2004-02-13 15:24 ` Geert Uytterhoeven 2004-02-13 21:27 ` Roman Zippel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox