kobj: Add basic infrastructure for dealing with namespaces.
[safe/jmp/linux-2.6] / include / linux / ioport.h
index 11ef795..26fad18 100644 (file)
@@ -34,22 +34,24 @@ struct resource_list {
  */
 #define IORESOURCE_BITS                0x000000ff      /* Bus-specific bits */
 
-#define IORESOURCE_TYPE_BITS   0x00000f00      /* Resource type */
+#define IORESOURCE_TYPE_BITS   0x00001f00      /* Resource type */
 #define IORESOURCE_IO          0x00000100
 #define IORESOURCE_MEM         0x00000200
 #define IORESOURCE_IRQ         0x00000400
 #define IORESOURCE_DMA         0x00000800
+#define IORESOURCE_BUS         0x00001000
 
-#define IORESOURCE_PREFETCH    0x00001000      /* No side effects */
-#define IORESOURCE_READONLY    0x00002000
-#define IORESOURCE_CACHEABLE   0x00004000
-#define IORESOURCE_RANGELENGTH 0x00008000
-#define IORESOURCE_SHADOWABLE  0x00010000
+#define IORESOURCE_PREFETCH    0x00002000      /* No side effects */
+#define IORESOURCE_READONLY    0x00004000
+#define IORESOURCE_CACHEABLE   0x00008000
+#define IORESOURCE_RANGELENGTH 0x00010000
+#define IORESOURCE_SHADOWABLE  0x00020000
 
-#define IORESOURCE_SIZEALIGN   0x00020000      /* size indicates alignment */
-#define IORESOURCE_STARTALIGN  0x00040000      /* start field is alignment */
+#define IORESOURCE_SIZEALIGN   0x00040000      /* size indicates alignment */
+#define IORESOURCE_STARTALIGN  0x00080000      /* start field is alignment */
 
 #define IORESOURCE_MEM_64      0x00100000
+#define IORESOURCE_WINDOW      0x00200000      /* forwarded by bridge */
 
 #define IORESOURCE_EXCLUSIVE   0x08000000      /* Userland may not map this resource */
 #define IORESOURCE_DISABLED    0x10000000
@@ -110,27 +112,32 @@ struct resource_list {
 extern struct resource ioport_resource;
 extern struct resource iomem_resource;
 
+extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
 extern int request_resource(struct resource *root, struct resource *new);
 extern int release_resource(struct resource *new);
+void release_child_resources(struct resource *new);
 extern void reserve_region_with_split(struct resource *root,
                             resource_size_t start, resource_size_t end,
                             const char *name);
+extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
 extern int insert_resource(struct resource *parent, struct resource *new);
 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
 extern int allocate_resource(struct resource *root, struct resource *new,
                             resource_size_t size, resource_size_t min,
                             resource_size_t max, resource_size_t align,
-                            void (*alignf)(void *, struct resource *,
-                                           resource_size_t, resource_size_t),
+                            resource_size_t (*alignf)(void *,
+                                                      const struct resource *,
+                                                      resource_size_t,
+                                                      resource_size_t),
                             void *alignf_data);
 int adjust_resource(struct resource *res, resource_size_t start,
                    resource_size_t size);
 resource_size_t resource_alignment(struct resource *res);
-static inline resource_size_t resource_size(struct resource *res)
+static inline resource_size_t resource_size(const struct resource *res)
 {
        return res->end - res->start + 1;
 }
-static inline unsigned long resource_type(struct resource *res)
+static inline unsigned long resource_type(const struct resource *res)
 {
        return res->flags & IORESOURCE_TYPE_BITS;
 }
@@ -188,7 +195,5 @@ extern int
 walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
                void *arg, int (*func)(unsigned long, unsigned long, void *));
 
-extern int page_is_ram(unsigned long pfn);
-
 #endif /* __ASSEMBLY__ */
 #endif /* _LINUX_IOPORT_H */