aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/lib.c
Commit message (Collapse)AuthorAgeFilesLines
* coverage: fix on ARMIan Campbell2013-03-121-8/+5
| | | | | | | | | | Use a list of pointers to simplify the handling of 32- vs 64-bit. Also on ARM the section name is ".init_array" and not ".ctors". Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> [ ijc -- tweak whitespace per Frediano's comment ]
* gcov: Call constructors during initializationFrediano Ziglio2013-02-211-0/+14
| | | | | | This allow modules to set initializer functions. This is used by Gcc instrumentation code for profiling arcs and test coverage.
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* In most of the codebase, use CONFIG_X86 in place of __i386__||__x86_64__Keir Fraser2012-09-121-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* xen: implement an signed 64 bit division helper functionStefano Stabellini2012-01-231-0/+19
| | | | | | | | | Implement a C function to perform 64 bit signed division and return both quotient and remainder. Useful as an helper function to implement __aeabi_ldivmod. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* Miscellaneous data placement adjustmentsKeir Fraser2009-10-281-1/+1
| | | | | | | Make various data items const or __read_mostly where possible/reasonable. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Move muldiv64 out and make it as a public function.Keir Fraser2009-06-241-0/+29
| | | | | | | | muldiv64 is used to caculate u64*u32/u32, and we will use it for TSC scaling. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Remove little-endian assumption from library code.kfraser@localhost.localdomain2007-01-291-1/+8
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Clean up long division code, fix for C99-mandatedkaf24@localhost.localdomain2007-01-131-335/+291
| | | | | truncation-towards-zero. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Skip over the unit in parse_size_and_unit() when returning the remainderIan Campbell2007-01-051-1/+1
| | | | | | of the string. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Improve consistency of type-attribute usage (volatile/const).kfraser@localhost.localdomain2006-12-211-4/+7
| | | | | From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Extend dom0_mem syntax to support min/max clamps.kfraser@localhost.localdomain2006-11-011-3/+10
| | | | | | | | | | | | | | | | | | | | | | | dom0_mem=[min:<min_amt>,][max:<max_amt>,][<amt>] <min_amt>: The minimum amount of memory which should be allocated for dom0. <max_amt>: The maximum amount of memory which should be allocated for dom0. <amt>: The precise amount of memory to allocate for dom0. Notes: 1. <amt> is clamped from below by <min_amt> and from above by available memory and <max_amt> 2. <min_amt> is clamped from above by available memory and <max_amt> 3. <min_amt> is ignored if it is greater than <max_amt> 4. If <amt> is not specified, it is calculated as follows: "All of memory is allocated to domain 0, minus 1/16th which is reserved for uses such as DMA buffers (the reservation is clamped to 128MB)." Each value can be specified as positive or negative: If +ve: The specified amount is an absolute value. If -ve: The specified amount is subtracted from total available memory. Signed-off-by: Keir Fraser <keir@xensource.com>
* More build config changes:kaf24@firebug.cl.cam.ac.uk2006-03-101-4/+2
| | | | | | | | | | - Build -O2 rather than -O3 - Build with -Wstrict-prototypes - Move target-specific generic compiler switches to Config.mk Signed-off-by: Keir Fraser <keir@xensource.com>
* Default unit for all Xen memory parameters is kilobytes.kaf24@firebug.cl.cam.ac.uk2005-08-191-1/+3
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1466.2.1 (428d01177uVxPlsgcWtGU3xUZaKeJw)kaf24@firebug.cl.cam.ac.uk2005-05-191-1/+1
| | | | | | | Rename memparse() to parse_size_and_unit(). A more general-purpose name, and avoids unecessary clash with Linux function name. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1389.17.1 (42823056RNtq4AlseRHL98DJV2uJgA)kaf24@firebug.cl.cam.ac.uk2005-05-111-0/+16
| | | | | | | | | | | | | | | | | Change the Xen command-line parameter syntax. 'noacpi' and 'ignorebiostables' are gone. 'dom0_mem' can optionally take a k/m/g suffix to specify units (default units are still kilobytes). Also added: 1. 'mem=xxx' to specify maximum physical RAM address (supports k/m/g suffix) 2. acpi=xxx/acpi_skip_timer_override/noapic: These all have same semantics as in Linux. They are *automatically* propagated to the domain0 command line, as dom0 shares resposibility for platform initialisation. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1236.1.58 (42288505tf22vxeNSISpP2B48DpV5A)kaf24@scramble.cl.cam.ac.uk2005-03-041-0/+1
| | | | | | Fix the Emacs 'local variables' block to include required end stmt. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1236.1.14 (421db08d6LIbanwxXMIaE6u0X5DIbQ)kaf24@scramble.cl.cam.ac.uk2005-02-241-1/+9
| | | | | | Move Emacs mode lines to end of files, out of the way. Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
* bitkeeper revision 1.1159.212.95 (4204aa0ee0re5Xx1zWrJ9ejxzgRs3w)kaf24@scramble.cl.cam.ac.uk2005-02-051-16/+16
| | | | | | | Various cleanups. Remove PDB pending simpler GDB stub and/or NetBSD debugger. Force emacs mode to appropriate tabbing in various files. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1144.1.1 (41110cafHhGko2QnIa3NEGARA_3f3Q)gm281@boulderdash.cl.cam.ac.uk2004-08-041-1/+53
| | | | | Addition of libc functions which allow to do 64 bit mod operations.
* bitkeeper revision 1.970 (40d07ec6txkdBLgbvygm7O1rxKCY1A)kaf24@scramble.cl.cam.ac.uk2004-06-161-80/+0
| | | | | Cleanups allowed by new ngio world.
* bitkeeper revision 1.821 (406007d6uu0vZYDxa9P1ZfNO9kF_Cg)kaf24@scramble.cl.cam.ac.uk2004-03-231-2/+2
| | | | | | | | | | | | Many files: xeno -> xen renames. ide-xen.c: Rename: xen/drivers/ide/ide-xeno.c -> xen/drivers/ide/ide-xen.c xen.lds: Rename: xen/arch/i386/xeno.lds -> xen/arch/i386/xen.lds Many files: mvdir
* bitkeeper revision 1.802.1.1 (405853fcN7rcf_nAOUv8-8C-udNDkw)kaf24@scramble.cl.cam.ac.uk2004-03-171-136/+16
| | | | | | | | | | | | | | | | | | | | vnetif.c, Makefile: new file Many files: Relaid out xenolinux drivers. More x86_64 stuff. domain_page.c: Rename: xen/common/domain_page.c -> xen/arch/i386/domain_page.c vbd.c: Rename: xenolinux-2.4.25-sparse/arch/xeno/drivers/block/xl_vbd.c -> xenolinux-2.4.25-sparse/arch/xeno/drivers/block/vbd.c block.h: Rename: xenolinux-2.4.25-sparse/arch/xeno/drivers/block/xl_block.h -> xenolinux-2.4.25-sparse/arch/xeno/drivers/block/block.h block.c: Rename: xenolinux-2.4.25-sparse/arch/xeno/drivers/block/xl_block.c -> xenolinux-2.4.25-sparse/arch/xeno/drivers/block/block.c core.c: Rename: xenolinux-2.4.25-sparse/arch/xeno/drivers/dom0/dom0_core.c -> xenolinux-2.4.25-sparse/arch/xeno/drivers/dom0/core.c evtchn.c: Rename: xenolinux-2.4.25-sparse/arch/xeno/drivers/evtchn/xl_evtchn.c -> xenolinux-2.4.25-sparse/arch/xeno/drivers/evtchn/evtchn.c
* bitkeeper revision 1.225 (3ec0d7a2BpgJXl0j-8Y1KilL1argzw)kaf24@scramble.cl.cam.ac.uk2003-05-131-0/+64
| | | | | | lib.h, network.c, lib.c, kernel.c: A better method for calculating virtual MAC addresses. Dom0/VIF0 (the boot VIF) can be forced to use the physical MAC address by specifying 'phys_bootmac' on Xen's command line.
* bitkeeper revision 1.154.1.1 (3e7f35e65e93xTR77zgPWlou5QJAgw)jws@cairnwell.research2003-03-241-1/+2
| | | | | | | Added aic7xxx support Included linux string library in place of cut down lib.{c,h} versions Added missing strtoul prototype in lib.h
* bitkeeper revision 1.94 (3e5a4f5fzVaxemjfCt0N0OH8PYPiuw)iap10@labyrinth.cl.cam.ac.uk2003-02-241-0/+526
Rename xen-2.4.16 to just "xen" to reflect that it hasn't got any relation to the Linux kernel version.