diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-15 17:12:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-15 17:12:58 -0400 |
commit | 1e09481365ce248dbb4eb06dad70129bb5807037 (patch) | |
tree | c0cff5bef95c8b5e7486f144718ade9a06c284dc /include/linux/firmware-map.h | |
parent | 3e2f69fdd1b00166e7d589bce56b2d36a9e74374 (diff) | |
parent | b9d2252c1e44fa83a4e65fdc9eb93db6297c55af (diff) |
Merge branch 'linus' into core/softlockup
Conflicts:
kernel/softlockup.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/firmware-map.h')
-rw-r--r-- | include/linux/firmware-map.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h new file mode 100644 index 000000000000..acbdbcc16051 --- /dev/null +++ b/include/linux/firmware-map.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * include/linux/firmware-map.h: | ||
3 | * Copyright (C) 2008 SUSE LINUX Products GmbH | ||
4 | * by Bernhard Walle <bwalle@suse.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License v2.0 as published by | ||
8 | * the Free Software Foundation | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | #ifndef _LINUX_FIRMWARE_MAP_H | ||
17 | #define _LINUX_FIRMWARE_MAP_H | ||
18 | |||
19 | #include <linux/list.h> | ||
20 | #include <linux/kobject.h> | ||
21 | |||
22 | /* | ||
23 | * provide a dummy interface if CONFIG_FIRMWARE_MEMMAP is disabled | ||
24 | */ | ||
25 | #ifdef CONFIG_FIRMWARE_MEMMAP | ||
26 | |||
27 | /** | ||
28 | * Adds a firmware mapping entry. This function uses kmalloc() for memory | ||
29 | * allocation. Use firmware_map_add_early() if you want to use the bootmem | ||
30 | * allocator. | ||
31 | * | ||
32 | * That function must be called before late_initcall. | ||
33 | * | ||
34 | * @start: Start of the memory range. | ||
35 | * @end: End of the memory range (inclusive). | ||
36 | * @type: Type of the memory range. | ||
37 | * | ||
38 | * Returns 0 on success, or -ENOMEM if no memory could be allocated. | ||
39 | */ | ||
40 | int firmware_map_add(resource_size_t start, resource_size_t end, | ||
41 | const char *type); | ||
42 | |||
43 | /** | ||
44 | * Adds a firmware mapping entry. This function uses the bootmem allocator | ||
45 | * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). | ||
46 | * | ||
47 | * That function must be called before late_initcall. | ||
48 | * | ||
49 | * @start: Start of the memory range. | ||
50 | * @end: End of the memory range (inclusive). | ||
51 | * @type: Type of the memory range. | ||
52 | * | ||
53 | * Returns 0 on success, or -ENOMEM if no memory could be allocated. | ||
54 | */ | ||
55 | int firmware_map_add_early(resource_size_t start, resource_size_t end, | ||
56 | const char *type); | ||
57 | |||
58 | #else /* CONFIG_FIRMWARE_MEMMAP */ | ||
59 | |||
60 | static inline int firmware_map_add(resource_size_t start, resource_size_t end, | ||
61 | const char *type) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static inline int firmware_map_add_early(resource_size_t start, | ||
67 | resource_size_t end, const char *type) | ||
68 | { | ||
69 | return 0; | ||
70 | } | ||
71 | |||
72 | #endif /* CONFIG_FIRMWARE_MEMMAP */ | ||
73 | |||
74 | #endif /* _LINUX_FIRMWARE_MAP_H */ | ||