* [PATCH 0/9] Random OF cleanups and merges
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Here's another batch of cleanup patches from my test-devicetree branch.
A number of cleanups, corrections and minor merges of common code.
Also a patch from Jeremy to make the flat tree work on architectures
without LMB (arm).
Once I've collected acks on these, I'll move them over to my
next-devicetree branch on git://git.secretlab.ca/git/linux-2.6
Cheers,
g.
---
Grant Likely (6):
of: remove undefined request_OF_resource & release_OF_resource
of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
of: move definition of of_chosen into common code.
of: remove unused extern reference to devtree_lock
of: put default string compare and #a/s-cell values into common header
of: Remove old and misplaced function declarations
Jeremy Kerr (3):
of/flattree: Don't assume HAVE_LMB
of: protect linux/of.h with CONFIG_OF
proc_devtree: fix THIS_MODULE without module.h
arch/microblaze/include/asm/prom.h | 15 ---------------
arch/microblaze/kernel/prom.c | 8 +++++---
arch/powerpc/include/asm/prom.h | 14 --------------
arch/powerpc/kernel/prom.c | 10 +++++-----
arch/sparc/kernel/prom.h | 3 ---
drivers/of/base.c | 1 +
drivers/of/fdt.c | 9 ++++++---
fs/proc/proc_devtree.c | 1 +
include/linux/of.h | 27 +++++++++++++++++++++++++++
include/linux/of_fdt.h | 11 +----------
10 files changed, 46 insertions(+), 53 deletions(-)
^ permalink raw reply [flat|nested] 77+ messages in thread
* [PATCH 0/9] Random OF cleanups and merges
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Here's another batch of cleanup patches from my test-devicetree branch.
A number of cleanups, corrections and minor merges of common code.
Also a patch from Jeremy to make the flat tree work on architectures
without LMB (arm).
Once I've collected acks on these, I'll move them over to my
next-devicetree branch on git://git.secretlab.ca/git/linux-2.6
Cheers,
g.
---
Grant Likely (6):
of: remove undefined request_OF_resource & release_OF_resource
of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
of: move definition of of_chosen into common code.
of: remove unused extern reference to devtree_lock
of: put default string compare and #a/s-cell values into common header
of: Remove old and misplaced function declarations
Jeremy Kerr (3):
of/flattree: Don't assume HAVE_LMB
of: protect linux/of.h with CONFIG_OF
proc_devtree: fix THIS_MODULE without module.h
arch/microblaze/include/asm/prom.h | 15 ---------------
arch/microblaze/kernel/prom.c | 8 +++++---
arch/powerpc/include/asm/prom.h | 14 --------------
arch/powerpc/kernel/prom.c | 10 +++++-----
arch/sparc/kernel/prom.h | 3 ---
drivers/of/base.c | 1 +
drivers/of/fdt.c | 9 ++++++---
fs/proc/proc_devtree.c | 1 +
include/linux/of.h | 27 +++++++++++++++++++++++++++
include/linux/of_fdt.h | 11 +----------
10 files changed, 46 insertions(+), 53 deletions(-)
^ permalink raw reply [flat|nested] 77+ messages in thread
* [PATCH 1/9] of: Remove old and misplaced function declarations
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
The following functions don't exist:
finish_device_tree()
print_properties()
prom_n_intr_cells()
prom_get_irq_senses()
The following functions are in drivers/of/base.c, so the declaration
belongs in of.h instead of of_fdt.h
of_machine_is_compatible()
prom_add_property()
prom_remove_property()
prom_update_property()
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
include/linux/of.h | 8 ++++++++
include/linux/of_fdt.h | 10 ----------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index fa5571b..5c7b6a6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
const char *list_name, const char *cells_name, int index,
struct device_node **out_node, const void **out_args);
+extern int of_machine_is_compatible(const char *compat);
+
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+ struct property *newprop,
+ struct property *oldprop);
+
#if defined(CONFIG_OF_DYNAMIC)
/* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 0007187..c9cb8a7 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
int depth, void *data);
/* Other Prototypes */
-extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
-extern int of_machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
- struct property *newprop,
- struct property *oldprop);
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_OF_FDT_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 1/9] of: Remove old and misplaced function declarations
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
The following functions don't exist:
finish_device_tree()
print_properties()
prom_n_intr_cells()
prom_get_irq_senses()
The following functions are in drivers/of/base.c, so the declaration
belongs in of.h instead of of_fdt.h
of_machine_is_compatible()
prom_add_property()
prom_remove_property()
prom_update_property()
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
include/linux/of.h | 8 ++++++++
include/linux/of_fdt.h | 10 ----------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index fa5571b..5c7b6a6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
const char *list_name, const char *cells_name, int index,
struct device_node **out_node, const void **out_args);
+extern int of_machine_is_compatible(const char *compat);
+
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+ struct property *newprop,
+ struct property *oldprop);
+
#if defined(CONFIG_OF_DYNAMIC)
/* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 0007187..c9cb8a7 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
int depth, void *data);
/* Other Prototypes */
-extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
-extern int of_machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
- struct property *newprop,
- struct property *oldprop);
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_OF_FDT_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 1/9] of: Remove old and misplaced function declarations
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
The following functions don't exist:
finish_device_tree()
print_properties()
prom_n_intr_cells()
prom_get_irq_senses()
The following functions are in drivers/of/base.c, so the declaration
belongs in of.h instead of of_fdt.h
of_machine_is_compatible()
prom_add_property()
prom_remove_property()
prom_update_property()
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
include/linux/of.h | 8 ++++++++
include/linux/of_fdt.h | 10 ----------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index fa5571b..5c7b6a6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
const char *list_name, const char *cells_name, int index,
struct device_node **out_node, const void **out_args);
+extern int of_machine_is_compatible(const char *compat);
+
+extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+ struct property *newprop,
+ struct property *oldprop);
+
#if defined(CONFIG_OF_DYNAMIC)
/* For updating the device tree at runtime */
extern void of_attach_node(struct device_node *);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 0007187..c9cb8a7 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
int depth, void *data);
/* Other Prototypes */
-extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
-extern int of_machine_is_compatible(const char *compat);
-extern void print_properties(struct device_node *node);
-extern int prom_n_intr_cells(struct device_node* np);
-extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
-extern int prom_add_property(struct device_node* np, struct property* prop);
-extern int prom_remove_property(struct device_node *np, struct property *prop);
-extern int prom_update_property(struct device_node *np,
- struct property *newprop,
- struct property *oldprop);
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_OF_FDT_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
breakage for ARM devtree work: the THIS_MODULE macro was added, but we
don't have module.h
This change adds the necessary #include to get THIS_MODULE defined.
While we could just replace it with NULL (PROC_FS is a bool, not a
tristate), using THIS_MODULE will prevent unexpected breakage if we
ever do compile this as a module.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
fs/proc/proc_devtree.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 0ec4511..f8650dc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -11,6 +11,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/of.h>
+#include <linux/module.h>
#include <asm/prom.h>
#include <asm/uaccess.h>
#include "internal.h"
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
2010-02-13 16:02 ` Grant Likely
` (2 preceding siblings ...)
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
breakage for ARM devtree work: the THIS_MODULE macro was added, but we
don't have module.h
This change adds the necessary #include to get THIS_MODULE defined.
While we could just replace it with NULL (PROC_FS is a bool, not a
tristate), using THIS_MODULE will prevent unexpected breakage if we
ever do compile this as a module.
Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
fs/proc/proc_devtree.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 0ec4511..f8650dc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -11,6 +11,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/of.h>
+#include <linux/module.h>
#include <asm/prom.h>
#include <asm/uaccess.h>
#include "internal.h"
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
breakage for ARM devtree work: the THIS_MODULE macro was added, but we
don't have module.h
This change adds the necessary #include to get THIS_MODULE defined.
While we could just replace it with NULL (PROC_FS is a bool, not a
tristate), using THIS_MODULE will prevent unexpected breakage if we
ever do compile this as a module.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
fs/proc/proc_devtree.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 0ec4511..f8650dc 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -11,6 +11,7 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/of.h>
+#include <linux/module.h>
#include <asm/prom.h>
#include <asm/uaccess.h>
#include "internal.h"
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
For platforms that have CONFIG_OF optional, we need to make the contents
of linux/of.h conditional on CONFIG_OF.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
include/linux/of.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 5c7b6a6..48b0ee6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -22,6 +22,8 @@
#include <asm/byteorder.h>
+#ifdef CONFIG_OF
+
typedef u32 phandle;
typedef u32 ihandle;
@@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *);
#endif
+#endif /* CONFIG_OF */
#endif /* _LINUX_OF_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
2010-02-13 16:02 ` Grant Likely
` (4 preceding siblings ...)
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
For platforms that have CONFIG_OF optional, we need to make the contents
of linux/of.h conditional on CONFIG_OF.
Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
include/linux/of.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 5c7b6a6..48b0ee6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -22,6 +22,8 @@
#include <asm/byteorder.h>
+#ifdef CONFIG_OF
+
typedef u32 phandle;
typedef u32 ihandle;
@@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *);
#endif
+#endif /* CONFIG_OF */
#endif /* _LINUX_OF_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
For platforms that have CONFIG_OF optional, we need to make the contents
of linux/of.h conditional on CONFIG_OF.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
include/linux/of.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 5c7b6a6..48b0ee6 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -22,6 +22,8 @@
#include <asm/byteorder.h>
+#ifdef CONFIG_OF
+
typedef u32 phandle;
typedef u32 ihandle;
@@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *);
#endif
+#endif /* CONFIG_OF */
#endif /* _LINUX_OF_H */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
We don't always have lmb available, so make arches provide an
early_init_dt_alloc_memory_arch() to handle the allocation of
memory in the fdt code.
When we don't have lmb.h included, we need asm/page.h for __va.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/kernel/prom.c | 5 +++++
arch/powerpc/kernel/prom.c | 5 +++++
drivers/of/fdt.c | 9 ++++++---
include/linux/of_fdt.h | 1 +
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index 050b799..a7dcaf0 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
lmb_add(base, size);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_EARLY_PRINTK
/* MS this is Microblaze specifig function */
static int __init early_init_dt_scan_serial(unsigned long node,
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 43c78d7..5bbbdb2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memstart_addr = min((u64)memstart_addr, base);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index b51f797..406757a 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -10,16 +10,18 @@
*/
#include <linux/kernel.h>
-#include <linux/lmb.h>
#include <linux/initrd.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
-
+#include <linux/string.h>
+#include <linux/errno.h>
#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif /* CONFIG_PPC */
+#include <asm/page.h>
+
int __initdata dt_root_addr_cells;
int __initdata dt_root_size_cells;
@@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
pr_debug(" size is %lx, allocating...\n", size);
/* Allocate memory for the expanded device tree */
- mem = lmb_alloc(size + 4, __alignof__(struct device_node));
+ mem = early_init_dt_alloc_memory_arch(size + 4,
+ __alignof__(struct device_node));
mem = (unsigned long) __va(mem);
((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index c9cb8a7..a1ca92c 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
int depth, void *data);
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
+extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);
/*
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
2010-02-13 16:02 ` Grant Likely
` (5 preceding siblings ...)
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
We don't always have lmb available, so make arches provide an
early_init_dt_alloc_memory_arch() to handle the allocation of
memory in the fdt code.
When we don't have lmb.h included, we need asm/page.h for __va.
Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/microblaze/kernel/prom.c | 5 +++++
arch/powerpc/kernel/prom.c | 5 +++++
drivers/of/fdt.c | 9 ++++++---
include/linux/of_fdt.h | 1 +
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index 050b799..a7dcaf0 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
lmb_add(base, size);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_EARLY_PRINTK
/* MS this is Microblaze specifig function */
static int __init early_init_dt_scan_serial(unsigned long node,
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 43c78d7..5bbbdb2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memstart_addr = min((u64)memstart_addr, base);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index b51f797..406757a 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -10,16 +10,18 @@
*/
#include <linux/kernel.h>
-#include <linux/lmb.h>
#include <linux/initrd.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
-
+#include <linux/string.h>
+#include <linux/errno.h>
#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif /* CONFIG_PPC */
+#include <asm/page.h>
+
int __initdata dt_root_addr_cells;
int __initdata dt_root_size_cells;
@@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
pr_debug(" size is %lx, allocating...\n", size);
/* Allocate memory for the expanded device tree */
- mem = lmb_alloc(size + 4, __alignof__(struct device_node));
+ mem = early_init_dt_alloc_memory_arch(size + 4,
+ __alignof__(struct device_node));
mem = (unsigned long) __va(mem);
((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index c9cb8a7..a1ca92c 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
int depth, void *data);
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
+extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);
/*
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
From: Jeremy Kerr <jeremy.kerr@canonical.com>
We don't always have lmb available, so make arches provide an
early_init_dt_alloc_memory_arch() to handle the allocation of
memory in the fdt code.
When we don't have lmb.h included, we need asm/page.h for __va.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/kernel/prom.c | 5 +++++
arch/powerpc/kernel/prom.c | 5 +++++
drivers/of/fdt.c | 9 ++++++---
include/linux/of_fdt.h | 1 +
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index 050b799..a7dcaf0 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
lmb_add(base, size);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_EARLY_PRINTK
/* MS this is Microblaze specifig function */
static int __init early_init_dt_scan_serial(unsigned long node,
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 43c78d7..5bbbdb2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memstart_addr = min((u64)memstart_addr, base);
}
+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+ return lmb_alloc(size, align);
+}
+
#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index b51f797..406757a 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -10,16 +10,18 @@
*/
#include <linux/kernel.h>
-#include <linux/lmb.h>
#include <linux/initrd.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
-
+#include <linux/string.h>
+#include <linux/errno.h>
#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif /* CONFIG_PPC */
+#include <asm/page.h>
+
int __initdata dt_root_addr_cells;
int __initdata dt_root_size_cells;
@@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
pr_debug(" size is %lx, allocating...\n", size);
/* Allocate memory for the expanded device tree */
- mem = lmb_alloc(size + 4, __alignof__(struct device_node));
+ mem = early_init_dt_alloc_memory_arch(size + 4,
+ __alignof__(struct device_node));
mem = (unsigned long) __va(mem);
((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index c9cb8a7..a1ca92c 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
int depth, void *data);
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
+extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);
/*
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 5/9] of: put default string compare and #a/s-cell values into common header
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Most architectures don't need to change these. Put them into common
code to eliminate some duplication
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 7 -------
arch/powerpc/include/asm/prom.h | 7 -------
include/linux/of.h | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6c6b386..ddc5c57 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,13 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index f384db8..4a5070e 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,13 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/include/linux/of.h b/include/linux/of.h
index 48b0ee6..5cd2840 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
#include <asm/prom.h>
+/* Default #address and #size cells. Allow arch asm/prom.h to override */
+#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
+#endif
+
+/* Default string compare functions, Allow arch asm/prom.h to override */
+#if !defined(of_compat_cmp)
+#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
+#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
+#endif
+
/* flag descriptions */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
#define OF_DETACHED 2 /* node has been detached from the device tree */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 5/9] of: put default string compare and #a/s-cell values into common header
2010-02-13 16:02 ` Grant Likely
` (7 preceding siblings ...)
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
Most architectures don't need to change these. Put them into common
code to eliminate some duplication
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/microblaze/include/asm/prom.h | 7 -------
arch/powerpc/include/asm/prom.h | 7 -------
include/linux/of.h | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6c6b386..ddc5c57 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,13 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index f384db8..4a5070e 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,13 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/include/linux/of.h b/include/linux/of.h
index 48b0ee6..5cd2840 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
#include <asm/prom.h>
+/* Default #address and #size cells. Allow arch asm/prom.h to override */
+#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
+#endif
+
+/* Default string compare functions, Allow arch asm/prom.h to override */
+#if !defined(of_compat_cmp)
+#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
+#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
+#endif
+
/* flag descriptions */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
#define OF_DETACHED 2 /* node has been detached from the device tree */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 5/9] of: put default string compare and #a/s-cell values into
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Most architectures don't need to change these. Put them into common
code to eliminate some duplication
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 7 -------
arch/powerpc/include/asm/prom.h | 7 -------
include/linux/of.h | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 6c6b386..ddc5c57 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,13 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index f384db8..4a5070e 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,13 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
-
-#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
-#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
-#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
-
extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
diff --git a/include/linux/of.h b/include/linux/of.h
index 48b0ee6..5cd2840 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
#include <asm/prom.h>
+/* Default #address and #size cells. Allow arch asm/prom.h to override */
+#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
+#endif
+
+/* Default string compare functions, Allow arch asm/prom.h to override */
+#if !defined(of_compat_cmp)
+#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
+#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
+#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
+#endif
+
/* flag descriptions */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
#define OF_DETACHED 2 /* node has been detached from the device tree */
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 6/9] of: remove unused extern reference to devtree_lock
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Neither the powerpc nor the microblaze code use devtree_lock anymore.
Remove the extern reference.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index ddc5c57..8b1ebd3 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* Other Prototypes */
extern int early_uartlite_console(void);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5bbbdb2..4869c93 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,8 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* export that to outside world */
struct device_node *of_chosen;
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 6/9] of: remove unused extern reference to devtree_lock
2010-02-13 16:02 ` Grant Likely
` (10 preceding siblings ...)
(?)
@ 2010-02-13 16:02 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
Neither the powerpc nor the microblaze code use devtree_lock anymore.
Remove the extern reference.
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index ddc5c57..8b1ebd3 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* Other Prototypes */
extern int early_uartlite_console(void);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5bbbdb2..4869c93 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,8 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* export that to outside world */
struct device_node *of_chosen;
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 6/9] of: remove unused extern reference to devtree_lock
@ 2010-02-13 16:02 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:02 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Neither the powerpc nor the microblaze code use devtree_lock anymore.
Remove the extern reference.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index ddc5c57..8b1ebd3 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
#define HAVE_ARCH_DEVTREE_FIXUPS
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* Other Prototypes */
extern int early_uartlite_console(void);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5bbbdb2..4869c93 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,8 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-extern rwlock_t devtree_lock; /* temporary while merging */
-
/* export that to outside world */
struct device_node *of_chosen;
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 7/9] of: move definition of of_chosen into common code.
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Rather than defining of_chosen in each arch, it can be defined for all
in driver/of/base.c
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/microblaze/kernel/prom.c | 3 ---
arch/powerpc/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 3 ---
drivers/of/base.c | 1 +
include/linux/of.h | 1 +
6 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 8b1ebd3..aa1a437 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,8 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
/* Other Prototypes */
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index a7dcaf0..a15ef6d 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -42,9 +42,6 @@
#include <asm/sections.h>
#include <asm/pci-bridge.h>
-/* export that to outside world */
-struct device_node *of_chosen;
-
void __init early_init_dt_scan_chosen_arch(unsigned long node)
{
/* No Microblaze specific code here */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 4a5070e..7f9a50a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,8 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
#ifdef CONFIG_PPC32
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4869c93..43238b2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,9 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-/* export that to outside world */
-struct device_node *of_chosen;
-
static int __init early_parse_mem(char *p)
{
if (!p)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 873479a..cb96888 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -23,6 +23,7 @@
#include <linux/proc_fs.h>
struct device_node *allnodes;
+struct device_node *of_chosen;
/* use when traversing tree through the allnext, child, sibling,
* or parent members of struct device_node.
diff --git a/include/linux/of.h b/include/linux/of.h
index 5cd2840..d34cc5d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -66,6 +66,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
+extern struct device_node *of_chosen;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 7/9] of: move definition of of_chosen into common code.
2010-02-13 16:02 ` Grant Likely
` (11 preceding siblings ...)
(?)
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
Rather than defining of_chosen in each arch, it can be defined for all
in driver/of/base.c
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/microblaze/kernel/prom.c | 3 ---
arch/powerpc/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 3 ---
drivers/of/base.c | 1 +
include/linux/of.h | 1 +
6 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 8b1ebd3..aa1a437 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,8 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
/* Other Prototypes */
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index a7dcaf0..a15ef6d 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -42,9 +42,6 @@
#include <asm/sections.h>
#include <asm/pci-bridge.h>
-/* export that to outside world */
-struct device_node *of_chosen;
-
void __init early_init_dt_scan_chosen_arch(unsigned long node)
{
/* No Microblaze specific code here */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 4a5070e..7f9a50a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,8 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
#ifdef CONFIG_PPC32
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4869c93..43238b2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,9 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-/* export that to outside world */
-struct device_node *of_chosen;
-
static int __init early_parse_mem(char *p)
{
if (!p)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 873479a..cb96888 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -23,6 +23,7 @@
#include <linux/proc_fs.h>
struct device_node *allnodes;
+struct device_node *of_chosen;
/* use when traversing tree through the allnext, child, sibling,
* or parent members of struct device_node.
diff --git a/include/linux/of.h b/include/linux/of.h
index 5cd2840..d34cc5d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -66,6 +66,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
+extern struct device_node *of_chosen;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 7/9] of: move definition of of_chosen into common code.
@ 2010-02-13 16:03 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Rather than defining of_chosen in each arch, it can be defined for all
in driver/of/base.c
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 2 --
arch/microblaze/kernel/prom.c | 3 ---
arch/powerpc/include/asm/prom.h | 2 --
arch/powerpc/kernel/prom.c | 3 ---
drivers/of/base.c | 1 +
include/linux/of.h | 1 +
6 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 8b1ebd3..aa1a437 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -26,8 +26,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
/* Other Prototypes */
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index a7dcaf0..a15ef6d 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -42,9 +42,6 @@
#include <asm/sections.h>
#include <asm/pci-bridge.h>
-/* export that to outside world */
-struct device_node *of_chosen;
-
void __init early_init_dt_scan_chosen_arch(unsigned long node)
{
/* No Microblaze specific code here */
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 4a5070e..7f9a50a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -23,8 +23,6 @@
#include <asm/irq.h>
#include <asm/atomic.h>
-extern struct device_node *of_chosen;
-
#define HAVE_ARCH_DEVTREE_FIXUPS
#ifdef CONFIG_PPC32
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4869c93..43238b2 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -67,9 +67,6 @@ int __initdata iommu_force_on;
unsigned long tce_alloc_start, tce_alloc_end;
#endif
-/* export that to outside world */
-struct device_node *of_chosen;
-
static int __init early_parse_mem(char *p)
{
if (!p)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 873479a..cb96888 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -23,6 +23,7 @@
#include <linux/proc_fs.h>
struct device_node *allnodes;
+struct device_node *of_chosen;
/* use when traversing tree through the allnext, child, sibling,
* or parent members of struct device_node.
diff --git a/include/linux/of.h b/include/linux/of.h
index 5cd2840..d34cc5d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -66,6 +66,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
+extern struct device_node *of_chosen;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Both allnodes and devtree_lock are defined in common code. The
extern declaration should be in the common header too so that the
compiler can type check. allnodes is already in of.h, but
devtree_lock should be declared there too.
This patch removes the SPARC declarations and uses decls in of.h instead.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/kernel/prom.h | 3 ---
include/linux/of.h | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index 453397f..a8591ef 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -4,9 +4,6 @@
#include <linux/spinlock.h>
#include <asm/prom.h>
-extern struct device_node *allnodes; /* temporary while merging */
-extern rwlock_t devtree_lock; /* temporary while merging */
-
extern void * prom_early_alloc(unsigned long size);
extern void irq_trans_init(struct device_node *dp);
diff --git a/include/linux/of.h b/include/linux/of.h
index d34cc5d..f6d9cbc 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/kref.h>
#include <linux/mod_devicetable.h>
+#include <linux/spinlock.h>
#include <asm/byteorder.h>
@@ -67,6 +68,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
extern struct device_node *of_chosen;
+extern rwlock_t devtree_lock;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
2010-02-13 16:02 ` Grant Likely
` (13 preceding siblings ...)
(?)
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
Both allnodes and devtree_lock are defined in common code. The
extern declaration should be in the common header too so that the
compiler can type check. allnodes is already in of.h, but
devtree_lock should be declared there too.
This patch removes the SPARC declarations and uses decls in of.h instead.
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/sparc/kernel/prom.h | 3 ---
include/linux/of.h | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index 453397f..a8591ef 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -4,9 +4,6 @@
#include <linux/spinlock.h>
#include <asm/prom.h>
-extern struct device_node *allnodes; /* temporary while merging */
-extern rwlock_t devtree_lock; /* temporary while merging */
-
extern void * prom_early_alloc(unsigned long size);
extern void irq_trans_init(struct device_node *dp);
diff --git a/include/linux/of.h b/include/linux/of.h
index d34cc5d..f6d9cbc 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/kref.h>
#include <linux/mod_devicetable.h>
+#include <linux/spinlock.h>
#include <asm/byteorder.h>
@@ -67,6 +68,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
extern struct device_node *of_chosen;
+extern rwlock_t devtree_lock;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and
@ 2010-02-13 16:03 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Both allnodes and devtree_lock are defined in common code. The
extern declaration should be in the common header too so that the
compiler can type check. allnodes is already in of.h, but
devtree_lock should be declared there too.
This patch removes the SPARC declarations and uses decls in of.h instead.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/sparc/kernel/prom.h | 3 ---
include/linux/of.h | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
index 453397f..a8591ef 100644
--- a/arch/sparc/kernel/prom.h
+++ b/arch/sparc/kernel/prom.h
@@ -4,9 +4,6 @@
#include <linux/spinlock.h>
#include <asm/prom.h>
-extern struct device_node *allnodes; /* temporary while merging */
-extern rwlock_t devtree_lock; /* temporary while merging */
-
extern void * prom_early_alloc(unsigned long size);
extern void irq_trans_init(struct device_node *dp);
diff --git a/include/linux/of.h b/include/linux/of.h
index d34cc5d..f6d9cbc 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/kref.h>
#include <linux/mod_devicetable.h>
+#include <linux/spinlock.h>
#include <asm/byteorder.h>
@@ -67,6 +68,7 @@ struct device_node {
/* Pointer for first entry in chain of all nodes. */
extern struct device_node *allnodes;
extern struct device_node *of_chosen;
+extern rwlock_t devtree_lock;
static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
{
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource
2010-02-13 16:02 ` Grant Likely
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Neither request_OF_resource or release_OF_resource are defined
anywhere. Remove the declarations.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 4 ----
arch/powerpc/include/asm/prom.h | 5 -----
2 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index aa1a437..03f45a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -31,10 +31,6 @@
/* Other Prototypes */
extern int early_uartlite_console(void);
-extern struct resource *request_OF_resource(struct device_node *node,
- int index, const char *name_postfix);
-extern int release_OF_resource(struct device_node *node, int index);
-
/*
* OF address retreival & translation
*/
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7f9a50a..ddd408a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
extern void pci_create_OF_bus_map(void);
#endif
-extern struct resource *request_OF_resource(struct device_node* node,
- int index, const char* name_postfix);
-extern int release_OF_resource(struct device_node* node, int index);
-
-
/*
* OF address retreival & translation
*/
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource
2010-02-13 16:02 ` Grant Likely
` (16 preceding siblings ...)
(?)
@ 2010-02-13 16:03 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A, sparclinu
Neither request_OF_resource or release_OF_resource are defined
anywhere. Remove the declarations.
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
arch/microblaze/include/asm/prom.h | 4 ----
arch/powerpc/include/asm/prom.h | 5 -----
2 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index aa1a437..03f45a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -31,10 +31,6 @@
/* Other Prototypes */
extern int early_uartlite_console(void);
-extern struct resource *request_OF_resource(struct device_node *node,
- int index, const char *name_postfix);
-extern int release_OF_resource(struct device_node *node, int index);
-
/*
* OF address retreival & translation
*/
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7f9a50a..ddd408a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
extern void pci_create_OF_bus_map(void);
#endif
-extern struct resource *request_OF_resource(struct device_node* node,
- int index, const char* name_postfix);
-extern int release_OF_resource(struct device_node* node, int index);
-
-
/*
* OF address retreival & translation
*/
^ permalink raw reply related [flat|nested] 77+ messages in thread
* [PATCH 9/9] of: remove undefined request_OF_resource &
@ 2010-02-13 16:03 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-13 16:03 UTC (permalink / raw)
To: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Neither request_OF_resource or release_OF_resource are defined
anywhere. Remove the declarations.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/microblaze/include/asm/prom.h | 4 ----
arch/powerpc/include/asm/prom.h | 5 -----
2 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index aa1a437..03f45a9 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -31,10 +31,6 @@
/* Other Prototypes */
extern int early_uartlite_console(void);
-extern struct resource *request_OF_resource(struct device_node *node,
- int index, const char *name_postfix);
-extern int release_OF_resource(struct device_node *node, int index);
-
/*
* OF address retreival & translation
*/
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7f9a50a..ddd408a 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
extern void pci_create_OF_bus_map(void);
#endif
-extern struct resource *request_OF_resource(struct device_node* node,
- int index, const char* name_postfix);
-extern int release_OF_resource(struct device_node* node, int index);
-
-
/*
* OF address retreival & translation
*/
^ permalink raw reply related [flat|nested] 77+ messages in thread
* Re: [PATCH 1/9] of: Remove old and misplaced function declarations
2010-02-13 16:02 ` Grant Likely
(?)
(?)
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> The following functions don't exist:
> finish_device_tree()
> print_properties()
> prom_n_intr_cells()
> prom_get_irq_senses()
>
> The following functions are in drivers/of/base.c, so the declaration
> belongs in of.h instead of of_fdt.h
> of_machine_is_compatible()
> prom_add_property()
> prom_remove_property()
> prom_update_property()
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> include/linux/of.h | 8 ++++++++
> include/linux/of_fdt.h | 10 ----------
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index fa5571b..5c7b6a6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
> const char *list_name, const char *cells_name, int index,
> struct device_node **out_node, const void **out_args);
>
> +extern int of_machine_is_compatible(const char *compat);
> +
> +extern int prom_add_property(struct device_node* np, struct property* prop);
> +extern int prom_remove_property(struct device_node *np, struct property *prop);
> +extern int prom_update_property(struct device_node *np,
> + struct property *newprop,
> + struct property *oldprop);
> +
> #if defined(CONFIG_OF_DYNAMIC)
> /* For updating the device tree at runtime */
> extern void of_attach_node(struct device_node *);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 0007187..c9cb8a7 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
> int depth, void *data);
>
> /* Other Prototypes */
> -extern void finish_device_tree(void);
> extern void unflatten_device_tree(void);
> extern void early_init_devtree(void *);
> -extern int of_machine_is_compatible(const char *compat);
> -extern void print_properties(struct device_node *node);
> -extern int prom_n_intr_cells(struct device_node* np);
> -extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
> -extern int prom_add_property(struct device_node* np, struct property* prop);
> -extern int prom_remove_property(struct device_node *np, struct property *prop);
> -extern int prom_update_property(struct device_node *np,
> - struct property *newprop,
> - struct property *oldprop);
>
> #endif /* __ASSEMBLY__ */
> #endif /* _LINUX_OF_FDT_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 1/9] of: Remove old and misplaced function declarations
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> The following functions don't exist:
> finish_device_tree()
> print_properties()
> prom_n_intr_cells()
> prom_get_irq_senses()
>
> The following functions are in drivers/of/base.c, so the declaration
> belongs in of.h instead of of_fdt.h
> of_machine_is_compatible()
> prom_add_property()
> prom_remove_property()
> prom_update_property()
>
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Acked-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
> ---
>
> include/linux/of.h | 8 ++++++++
> include/linux/of_fdt.h | 10 ----------
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index fa5571b..5c7b6a6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
> const char *list_name, const char *cells_name, int index,
> struct device_node **out_node, const void **out_args);
>
> +extern int of_machine_is_compatible(const char *compat);
> +
> +extern int prom_add_property(struct device_node* np, struct property* prop);
> +extern int prom_remove_property(struct device_node *np, struct property *prop);
> +extern int prom_update_property(struct device_node *np,
> + struct property *newprop,
> + struct property *oldprop);
> +
> #if defined(CONFIG_OF_DYNAMIC)
> /* For updating the device tree at runtime */
> extern void of_attach_node(struct device_node *);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 0007187..c9cb8a7 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
> int depth, void *data);
>
> /* Other Prototypes */
> -extern void finish_device_tree(void);
> extern void unflatten_device_tree(void);
> extern void early_init_devtree(void *);
> -extern int of_machine_is_compatible(const char *compat);
> -extern void print_properties(struct device_node *node);
> -extern int prom_n_intr_cells(struct device_node* np);
> -extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
> -extern int prom_add_property(struct device_node* np, struct property* prop);
> -extern int prom_remove_property(struct device_node *np, struct property *prop);
> -extern int prom_update_property(struct device_node *np,
> - struct property *newprop,
> - struct property *oldprop);
>
> #endif /* __ASSEMBLY__ */
> #endif /* _LINUX_OF_FDT_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 1/9] of: Remove old and misplaced function declarations
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> The following functions don't exist:
> finish_device_tree()
> print_properties()
> prom_n_intr_cells()
> prom_get_irq_senses()
>
> The following functions are in drivers/of/base.c, so the declaration
> belongs in of.h instead of of_fdt.h
> of_machine_is_compatible()
> prom_add_property()
> prom_remove_property()
> prom_update_property()
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> include/linux/of.h | 8 ++++++++
> include/linux/of_fdt.h | 10 ----------
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index fa5571b..5c7b6a6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
> const char *list_name, const char *cells_name, int index,
> struct device_node **out_node, const void **out_args);
>
> +extern int of_machine_is_compatible(const char *compat);
> +
> +extern int prom_add_property(struct device_node* np, struct property* prop);
> +extern int prom_remove_property(struct device_node *np, struct property *prop);
> +extern int prom_update_property(struct device_node *np,
> + struct property *newprop,
> + struct property *oldprop);
> +
> #if defined(CONFIG_OF_DYNAMIC)
> /* For updating the device tree at runtime */
> extern void of_attach_node(struct device_node *);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 0007187..c9cb8a7 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
> int depth, void *data);
>
> /* Other Prototypes */
> -extern void finish_device_tree(void);
> extern void unflatten_device_tree(void);
> extern void early_init_devtree(void *);
> -extern int of_machine_is_compatible(const char *compat);
> -extern void print_properties(struct device_node *node);
> -extern int prom_n_intr_cells(struct device_node* np);
> -extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
> -extern int prom_add_property(struct device_node* np, struct property* prop);
> -extern int prom_remove_property(struct device_node *np, struct property *prop);
> -extern int prom_update_property(struct device_node *np,
> - struct property *newprop,
> - struct property *oldprop);
>
> #endif /* __ASSEMBLY__ */
> #endif /* _LINUX_OF_FDT_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 1/9] of: Remove old and misplaced function declarations
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> The following functions don't exist:
> finish_device_tree()
> print_properties()
> prom_n_intr_cells()
> prom_get_irq_senses()
>
> The following functions are in drivers/of/base.c, so the declaration
> belongs in of.h instead of of_fdt.h
> of_machine_is_compatible()
> prom_add_property()
> prom_remove_property()
> prom_update_property()
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> include/linux/of.h | 8 ++++++++
> include/linux/of_fdt.h | 10 ----------
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index fa5571b..5c7b6a6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -180,6 +180,14 @@ extern int of_parse_phandles_with_args(struct device_node *np,
> const char *list_name, const char *cells_name, int index,
> struct device_node **out_node, const void **out_args);
>
> +extern int of_machine_is_compatible(const char *compat);
> +
> +extern int prom_add_property(struct device_node* np, struct property* prop);
> +extern int prom_remove_property(struct device_node *np, struct property *prop);
> +extern int prom_update_property(struct device_node *np,
> + struct property *newprop,
> + struct property *oldprop);
> +
> #if defined(CONFIG_OF_DYNAMIC)
> /* For updating the device tree at runtime */
> extern void of_attach_node(struct device_node *);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 0007187..c9cb8a7 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -95,18 +95,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
> int depth, void *data);
>
> /* Other Prototypes */
> -extern void finish_device_tree(void);
> extern void unflatten_device_tree(void);
> extern void early_init_devtree(void *);
> -extern int of_machine_is_compatible(const char *compat);
> -extern void print_properties(struct device_node *node);
> -extern int prom_n_intr_cells(struct device_node* np);
> -extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
> -extern int prom_add_property(struct device_node* np, struct property* prop);
> -extern int prom_remove_property(struct device_node *np, struct property *prop);
> -extern int prom_update_property(struct device_node *np,
> - struct property *newprop,
> - struct property *oldprop);
>
> #endif /* __ASSEMBLY__ */
> #endif /* _LINUX_OF_FDT_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
> breakage for ARM devtree work: the THIS_MODULE macro was added, but we
> don't have module.h
>
> This change adds the necessary #include to get THIS_MODULE defined.
> While we could just replace it with NULL (PROC_FS is a bool, not a
> tristate), using THIS_MODULE will prevent unexpected breakage if we
> ever do compile this as a module.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> fs/proc/proc_devtree.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
> index 0ec4511..f8650dc 100644
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -11,6 +11,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/of.h>
> +#include <linux/module.h>
> #include <asm/prom.h>
> #include <asm/uaccess.h>
> #include "internal.h"
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
> breakage for ARM devtree work: the THIS_MODULE macro was added, but we
> don't have module.h
>
> This change adds the necessary #include to get THIS_MODULE defined.
> While we could just replace it with NULL (PROC_FS is a bool, not a
> tristate), using THIS_MODULE will prevent unexpected breakage if we
> ever do compile this as a module.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> fs/proc/proc_devtree.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
> index 0ec4511..f8650dc 100644
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -11,6 +11,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/of.h>
> +#include <linux/module.h>
> #include <asm/prom.h>
> #include <asm/uaccess.h>
> #include "internal.h"
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h
@ 2010-02-14 6:09 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:09 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> Commit e22f628395432b967f2f505858c64450f7835365 introduced a build
> breakage for ARM devtree work: the THIS_MODULE macro was added, but we
> don't have module.h
>
> This change adds the necessary #include to get THIS_MODULE defined.
> While we could just replace it with NULL (PROC_FS is a bool, not a
> tristate), using THIS_MODULE will prevent unexpected breakage if we
> ever do compile this as a module.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> fs/proc/proc_devtree.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
> index 0ec4511..f8650dc 100644
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -11,6 +11,7 @@
> #include <linux/stat.h>
> #include <linux/string.h>
> #include <linux/of.h>
> +#include <linux/module.h>
> #include <asm/prom.h>
> #include <asm/uaccess.h>
> #include "internal.h"
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-14 6:10 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:10 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> For platforms that have CONFIG_OF optional, we need to make the contents
> of linux/of.h conditional on CONFIG_OF.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
For now...
In the long run, maybe we want some of the iterators to be empty inlines
returning NULL ?
Cheers,
Ben.
> ---
>
> include/linux/of.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5c7b6a6..48b0ee6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -22,6 +22,8 @@
>
> #include <asm/byteorder.h>
>
> +#ifdef CONFIG_OF
> +
> typedef u32 phandle;
> typedef u32 ihandle;
>
> @@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
> extern void of_detach_node(struct device_node *);
> #endif
>
> +#endif /* CONFIG_OF */
> #endif /* _LINUX_OF_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
@ 2010-02-14 6:10 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:10 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> For platforms that have CONFIG_OF optional, we need to make the contents
> of linux/of.h conditional on CONFIG_OF.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
For now...
In the long run, maybe we want some of the iterators to be empty inlines
returning NULL ?
Cheers,
Ben.
> ---
>
> include/linux/of.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5c7b6a6..48b0ee6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -22,6 +22,8 @@
>
> #include <asm/byteorder.h>
>
> +#ifdef CONFIG_OF
> +
> typedef u32 phandle;
> typedef u32 ihandle;
>
> @@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
> extern void of_detach_node(struct device_node *);
> #endif
>
> +#endif /* CONFIG_OF */
> #endif /* _LINUX_OF_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
@ 2010-02-14 6:10 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:10 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> For platforms that have CONFIG_OF optional, we need to make the contents
> of linux/of.h conditional on CONFIG_OF.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
For now...
In the long run, maybe we want some of the iterators to be empty inlines
returning NULL ?
Cheers,
Ben.
> ---
>
> include/linux/of.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5c7b6a6..48b0ee6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -22,6 +22,8 @@
>
> #include <asm/byteorder.h>
>
> +#ifdef CONFIG_OF
> +
> typedef u32 phandle;
> typedef u32 ihandle;
>
> @@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
> extern void of_detach_node(struct device_node *);
> #endif
>
> +#endif /* CONFIG_OF */
> #endif /* _LINUX_OF_H */
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
2010-02-13 16:02 ` Grant Likely
(?)
(?)
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Acked-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 5/9] of: put default string compare and #a/s-cell values into common header
2010-02-13 16:02 ` [PATCH 5/9] of: put default string compare and #a/s-cell values into Grant Likely
(?)
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Most architectures don't need to change these. Put them into common
> code to eliminate some duplication
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> arch/microblaze/include/asm/prom.h | 7 -------
> arch/powerpc/include/asm/prom.h | 7 -------
> include/linux/of.h | 13 +++++++++++++
> 3 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 6c6b386..ddc5c57 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,13 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index f384db8..4a5070e 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,13 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 48b0ee6..5cd2840 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
>
> #include <asm/prom.h>
>
> +/* Default #address and #size cells. Allow arch asm/prom.h to override */
> +#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
> +#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> +#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> +#endif
> +
> +/* Default string compare functions, Allow arch asm/prom.h to override */
> +#if !defined(of_compat_cmp)
> +#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> +#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> +#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> +#endif
> +
> /* flag descriptions */
> #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
> #define OF_DETACHED 2 /* node has been detached from the device tree */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 5/9] of: put default string compare and #a/s-cell
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Most architectures don't need to change these. Put them into common
> code to eliminate some duplication
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> arch/microblaze/include/asm/prom.h | 7 -------
> arch/powerpc/include/asm/prom.h | 7 -------
> include/linux/of.h | 13 +++++++++++++
> 3 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 6c6b386..ddc5c57 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,13 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index f384db8..4a5070e 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,13 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 48b0ee6..5cd2840 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
>
> #include <asm/prom.h>
>
> +/* Default #address and #size cells. Allow arch asm/prom.h to override */
> +#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
> +#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> +#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> +#endif
> +
> +/* Default string compare functions, Allow arch asm/prom.h to override */
> +#if !defined(of_compat_cmp)
> +#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> +#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> +#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> +#endif
> +
> /* flag descriptions */
> #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
> #define OF_DETACHED 2 /* node has been detached from the device tree */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 5/9] of: put default string compare and #a/s-cell values into common header
@ 2010-02-14 6:11 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:11 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Most architectures don't need to change these. Put them into common
> code to eliminate some duplication
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> arch/microblaze/include/asm/prom.h | 7 -------
> arch/powerpc/include/asm/prom.h | 7 -------
> include/linux/of.h | 13 +++++++++++++
> 3 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 6c6b386..ddc5c57 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,13 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index f384db8..4a5070e 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,13 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> -#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> -
> -#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
> -#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> -#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> -
> extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 48b0ee6..5cd2840 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -116,6 +116,19 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
>
> #include <asm/prom.h>
>
> +/* Default #address and #size cells. Allow arch asm/prom.h to override */
> +#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
> +#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
> +#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
> +#endif
> +
> +/* Default string compare functions, Allow arch asm/prom.h to override */
> +#if !defined(of_compat_cmp)
> +#define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l))
> +#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
> +#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
> +#endif
> +
> /* flag descriptions */
> #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
> #define OF_DETACHED 2 /* node has been detached from the device tree */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 6/9] of: remove unused extern reference to devtree_lock
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Neither the powerpc nor the microblaze code use devtree_lock anymore.
> Remove the extern reference.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 2 --
> 2 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index ddc5c57..8b1ebd3 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 5bbbdb2..4869c93 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,8 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* export that to outside world */
> struct device_node *of_chosen;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 6/9] of: remove unused extern reference to devtree_lock
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Neither the powerpc nor the microblaze code use devtree_lock anymore.
> Remove the extern reference.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 2 --
> 2 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index ddc5c57..8b1ebd3 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 5bbbdb2..4869c93 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,8 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* export that to outside world */
> struct device_node *of_chosen;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 6/9] of: remove unused extern reference to devtree_lock
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> Neither the powerpc nor the microblaze code use devtree_lock anymore.
> Remove the extern reference.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 2 --
> 2 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index ddc5c57..8b1ebd3 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -30,8 +30,6 @@ extern struct device_node *of_chosen;
>
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 5bbbdb2..4869c93 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,8 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> /* export that to outside world */
> struct device_node *of_chosen;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 7/9] of: move definition of of_chosen into common code.
2010-02-13 16:03 ` Grant Likely
(?)
(?)
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Rather than defining of_chosen in each arch, it can be defined for all
> in driver/of/base.c
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/microblaze/kernel/prom.c | 3 ---
> arch/powerpc/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 3 ---
> drivers/of/base.c | 1 +
> include/linux/of.h | 1 +
> 6 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 8b1ebd3..aa1a437 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,8 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> /* Other Prototypes */
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index a7dcaf0..a15ef6d 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -42,9 +42,6 @@
> #include <asm/sections.h>
> #include <asm/pci-bridge.h>
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> void __init early_init_dt_scan_chosen_arch(unsigned long node)
> {
> /* No Microblaze specific code here */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 4a5070e..7f9a50a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,8 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> #ifdef CONFIG_PPC32
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4869c93..43238b2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,9 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> static int __init early_parse_mem(char *p)
> {
> if (!p)
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 873479a..cb96888 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -23,6 +23,7 @@
> #include <linux/proc_fs.h>
>
> struct device_node *allnodes;
> +struct device_node *of_chosen;
>
> /* use when traversing tree through the allnext, child, sibling,
> * or parent members of struct device_node.
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5cd2840..d34cc5d 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -66,6 +66,7 @@ struct device_node {
>
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> +extern struct device_node *of_chosen;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 7/9] of: move definition of of_chosen into common code.
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Rather than defining of_chosen in each arch, it can be defined for all
> in driver/of/base.c
>
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Acked-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
> ---
>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/microblaze/kernel/prom.c | 3 ---
> arch/powerpc/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 3 ---
> drivers/of/base.c | 1 +
> include/linux/of.h | 1 +
> 6 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 8b1ebd3..aa1a437 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,8 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> /* Other Prototypes */
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index a7dcaf0..a15ef6d 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -42,9 +42,6 @@
> #include <asm/sections.h>
> #include <asm/pci-bridge.h>
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> void __init early_init_dt_scan_chosen_arch(unsigned long node)
> {
> /* No Microblaze specific code here */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 4a5070e..7f9a50a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,8 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> #ifdef CONFIG_PPC32
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4869c93..43238b2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,9 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> static int __init early_parse_mem(char *p)
> {
> if (!p)
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 873479a..cb96888 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -23,6 +23,7 @@
> #include <linux/proc_fs.h>
>
> struct device_node *allnodes;
> +struct device_node *of_chosen;
>
> /* use when traversing tree through the allnext, child, sibling,
> * or parent members of struct device_node.
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5cd2840..d34cc5d 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -66,6 +66,7 @@ struct device_node {
>
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> +extern struct device_node *of_chosen;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 7/9] of: move definition of of_chosen into common code.
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Rather than defining of_chosen in each arch, it can be defined for all
> in driver/of/base.c
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/microblaze/kernel/prom.c | 3 ---
> arch/powerpc/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 3 ---
> drivers/of/base.c | 1 +
> include/linux/of.h | 1 +
> 6 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 8b1ebd3..aa1a437 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,8 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> /* Other Prototypes */
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index a7dcaf0..a15ef6d 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -42,9 +42,6 @@
> #include <asm/sections.h>
> #include <asm/pci-bridge.h>
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> void __init early_init_dt_scan_chosen_arch(unsigned long node)
> {
> /* No Microblaze specific code here */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 4a5070e..7f9a50a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,8 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> #ifdef CONFIG_PPC32
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4869c93..43238b2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,9 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> static int __init early_parse_mem(char *p)
> {
> if (!p)
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 873479a..cb96888 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -23,6 +23,7 @@
> #include <linux/proc_fs.h>
>
> struct device_node *allnodes;
> +struct device_node *of_chosen;
>
> /* use when traversing tree through the allnext, child, sibling,
> * or parent members of struct device_node.
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5cd2840..d34cc5d 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -66,6 +66,7 @@ struct device_node {
>
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> +extern struct device_node *of_chosen;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 7/9] of: move definition of of_chosen into common code.
@ 2010-02-14 6:12 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:12 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Rather than defining of_chosen in each arch, it can be defined for all
> in driver/of/base.c
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/microblaze/include/asm/prom.h | 2 --
> arch/microblaze/kernel/prom.c | 3 ---
> arch/powerpc/include/asm/prom.h | 2 --
> arch/powerpc/kernel/prom.c | 3 ---
> drivers/of/base.c | 1 +
> include/linux/of.h | 1 +
> 6 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index 8b1ebd3..aa1a437 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -26,8 +26,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> /* Other Prototypes */
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index a7dcaf0..a15ef6d 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -42,9 +42,6 @@
> #include <asm/sections.h>
> #include <asm/pci-bridge.h>
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> void __init early_init_dt_scan_chosen_arch(unsigned long node)
> {
> /* No Microblaze specific code here */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 4a5070e..7f9a50a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -23,8 +23,6 @@
> #include <asm/irq.h>
> #include <asm/atomic.h>
>
> -extern struct device_node *of_chosen;
> -
> #define HAVE_ARCH_DEVTREE_FIXUPS
>
> #ifdef CONFIG_PPC32
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 4869c93..43238b2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -67,9 +67,6 @@ int __initdata iommu_force_on;
> unsigned long tce_alloc_start, tce_alloc_end;
> #endif
>
> -/* export that to outside world */
> -struct device_node *of_chosen;
> -
> static int __init early_parse_mem(char *p)
> {
> if (!p)
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 873479a..cb96888 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -23,6 +23,7 @@
> #include <linux/proc_fs.h>
>
> struct device_node *allnodes;
> +struct device_node *of_chosen;
>
> /* use when traversing tree through the allnext, child, sibling,
> * or parent members of struct device_node.
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5cd2840..d34cc5d 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -66,6 +66,7 @@ struct device_node {
>
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> +extern struct device_node *of_chosen;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
2010-02-13 16:03 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and Grant Likely
(?)
@ 2010-02-14 6:13 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:13 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/sparc/kernel/prom.h | 3 ---
> include/linux/of.h | 2 ++
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
> index 453397f..a8591ef 100644
> --- a/arch/sparc/kernel/prom.h
> +++ b/arch/sparc/kernel/prom.h
> @@ -4,9 +4,6 @@
> #include <linux/spinlock.h>
> #include <asm/prom.h>
>
> -extern struct device_node *allnodes; /* temporary while merging */
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> extern void * prom_early_alloc(unsigned long size);
> extern void irq_trans_init(struct device_node *dp);
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index d34cc5d..f6d9cbc 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -19,6 +19,7 @@
> #include <linux/bitops.h>
> #include <linux/kref.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/spinlock.h>
>
> #include <asm/byteorder.h>
>
> @@ -67,6 +68,7 @@ struct device_node {
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> extern struct device_node *of_chosen;
> +extern rwlock_t devtree_lock;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of
@ 2010-02-14 6:13 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:13 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/sparc/kernel/prom.h | 3 ---
> include/linux/of.h | 2 ++
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
> index 453397f..a8591ef 100644
> --- a/arch/sparc/kernel/prom.h
> +++ b/arch/sparc/kernel/prom.h
> @@ -4,9 +4,6 @@
> #include <linux/spinlock.h>
> #include <asm/prom.h>
>
> -extern struct device_node *allnodes; /* temporary while merging */
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> extern void * prom_early_alloc(unsigned long size);
> extern void irq_trans_init(struct device_node *dp);
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index d34cc5d..f6d9cbc 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -19,6 +19,7 @@
> #include <linux/bitops.h>
> #include <linux/kref.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/spinlock.h>
>
> #include <asm/byteorder.h>
>
> @@ -67,6 +68,7 @@ struct device_node {
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> extern struct device_node *of_chosen;
> +extern rwlock_t devtree_lock;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
@ 2010-02-14 6:13 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:13 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
>
> arch/sparc/kernel/prom.h | 3 ---
> include/linux/of.h | 2 ++
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/sparc/kernel/prom.h b/arch/sparc/kernel/prom.h
> index 453397f..a8591ef 100644
> --- a/arch/sparc/kernel/prom.h
> +++ b/arch/sparc/kernel/prom.h
> @@ -4,9 +4,6 @@
> #include <linux/spinlock.h>
> #include <asm/prom.h>
>
> -extern struct device_node *allnodes; /* temporary while merging */
> -extern rwlock_t devtree_lock; /* temporary while merging */
> -
> extern void * prom_early_alloc(unsigned long size);
> extern void irq_trans_init(struct device_node *dp);
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index d34cc5d..f6d9cbc 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -19,6 +19,7 @@
> #include <linux/bitops.h>
> #include <linux/kref.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/spinlock.h>
>
> #include <asm/byteorder.h>
>
> @@ -67,6 +68,7 @@ struct device_node {
> /* Pointer for first entry in chain of all nodes. */
> extern struct device_node *allnodes;
> extern struct device_node *of_chosen;
> +extern rwlock_t devtree_lock;
>
> static inline int of_node_check_flag(struct device_node *n, unsigned long flag)
> {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource
2010-02-13 16:03 ` [PATCH 9/9] of: remove undefined request_OF_resource & Grant Likely
(?)
(?)
@ 2010-02-14 6:14 ` Benjamin Herrenschmidt
-1 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:14 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Neither request_OF_resource or release_OF_resource are defined
> anywhere. Remove the declarations.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 4 ----
> arch/powerpc/include/asm/prom.h | 5 -----
> 2 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index aa1a437..03f45a9 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -31,10 +31,6 @@
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> -extern struct resource *request_OF_resource(struct device_node *node,
> - int index, const char *name_postfix);
> -extern int release_OF_resource(struct device_node *node, int index);
> -
> /*
> * OF address retreival & translation
> */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 7f9a50a..ddd408a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
> extern void pci_create_OF_bus_map(void);
> #endif
>
> -extern struct resource *request_OF_resource(struct device_node* node,
> - int index, const char* name_postfix);
> -extern int release_OF_resource(struct device_node* node, int index);
> -
> -
> /*
> * OF address retreival & translation
> */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource
@ 2010-02-14 6:14 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:14 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Neither request_OF_resource or release_OF_resource are defined
> anywhere. Remove the declarations.
>
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> ---
Acked-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
> arch/microblaze/include/asm/prom.h | 4 ----
> arch/powerpc/include/asm/prom.h | 5 -----
> 2 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index aa1a437..03f45a9 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -31,10 +31,6 @@
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> -extern struct resource *request_OF_resource(struct device_node *node,
> - int index, const char *name_postfix);
> -extern int release_OF_resource(struct device_node *node, int index);
> -
> /*
> * OF address retreival & translation
> */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 7f9a50a..ddd408a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
> extern void pci_create_OF_bus_map(void);
> #endif
>
> -extern struct resource *request_OF_resource(struct device_node* node,
> - int index, const char* name_postfix);
> -extern int release_OF_resource(struct device_node* node, int index);
> -
> -
> /*
> * OF address retreival & translation
> */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 9/9] of: remove undefined request_OF_resource &
@ 2010-02-14 6:14 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:14 UTC (permalink / raw)
To: Grant Likely
Cc: sfr-3FnU+UHB4dNDw9hX6IcOSA,
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Neither request_OF_resource or release_OF_resource are defined
> anywhere. Remove the declarations.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 4 ----
> arch/powerpc/include/asm/prom.h | 5 -----
> 2 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index aa1a437..03f45a9 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -31,10 +31,6 @@
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> -extern struct resource *request_OF_resource(struct device_node *node,
> - int index, const char *name_postfix);
> -extern int release_OF_resource(struct device_node *node, int index);
> -
> /*
> * OF address retreival & translation
> */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 7f9a50a..ddd408a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
> extern void pci_create_OF_bus_map(void);
> #endif
>
> -extern struct resource *request_OF_resource(struct device_node* node,
> - int index, const char* name_postfix);
> -extern int release_OF_resource(struct device_node* node, int index);
> -
> -
> /*
> * OF address retreival & translation
> */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource
@ 2010-02-14 6:14 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 77+ messages in thread
From: Benjamin Herrenschmidt @ 2010-02-14 6:14 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, 2010-02-13 at 09:03 -0700, Grant Likely wrote:
> Neither request_OF_resource or release_OF_resource are defined
> anywhere. Remove the declarations.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> arch/microblaze/include/asm/prom.h | 4 ----
> arch/powerpc/include/asm/prom.h | 5 -----
> 2 files changed, 0 insertions(+), 9 deletions(-)
>
> diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
> index aa1a437..03f45a9 100644
> --- a/arch/microblaze/include/asm/prom.h
> +++ b/arch/microblaze/include/asm/prom.h
> @@ -31,10 +31,6 @@
> /* Other Prototypes */
> extern int early_uartlite_console(void);
>
> -extern struct resource *request_OF_resource(struct device_node *node,
> - int index, const char *name_postfix);
> -extern int release_OF_resource(struct device_node *node, int index);
> -
> /*
> * OF address retreival & translation
> */
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 7f9a50a..ddd408a 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -39,11 +39,6 @@ extern struct device_node* pci_device_to_OF_node(struct pci_dev *);
> extern void pci_create_OF_bus_map(void);
> #endif
>
> -extern struct resource *request_OF_resource(struct device_node* node,
> - int index, const char* name_postfix);
> -extern int release_OF_resource(struct device_node* node, int index);
> -
> -
> /*
> * OF address retreival & translation
> */
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 77+ messages in thread
* RE: Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
2010-02-14 6:10 ` Benjamin Herrenschmidt
(?)
(?)
@ 2010-02-14 7:13 ` WALID
-1 siblings, 0 replies; 77+ messages in thread
From: WALID @ 2010-02-14 7:13 UTC (permalink / raw)
To: microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ, 'Grant Likely'
Cc: monstr-pSz03upnqPeHXe+LvDLADg, sfr-3FnU+UHB4dNDw9hX6IcOSA,
jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A,
sparclinux-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Please remove my email from your mailing list!!!!!!!
-----Original Message-----
From: owner-microblaze-uclinux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org [mailto:owner-microblaze-uclinux-FR6EJeJVuqfA6Z3fQjNZrN9u6TNh0Fb7@public.gmane.org] On Behalf Of Benjamin Herrenschmidt
Sent: Sunday, February 14, 2010 8:11 AM
To: Grant Likely
Cc: monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org; sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org; jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org; davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org; microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org; linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org; sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [microblaze-uclinux] Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
>
> For platforms that have CONFIG_OF optional, we need to make the contents
> of linux/of.h conditional on CONFIG_OF.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Acked-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
For now...
In the long run, maybe we want some of the iterators to be empty inlines
returning NULL ?
Cheers,
Ben.
> ---
>
> include/linux/of.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 5c7b6a6..48b0ee6 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -22,6 +22,8 @@
>
> #include <asm/byteorder.h>
>
> +#ifdef CONFIG_OF
> +
> typedef u32 phandle;
> typedef u32 ihandle;
>
> @@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *);
> extern void of_detach_node(struct device_node *);
> #endif
>
> +#endif /* CONFIG_OF */
> #endif /* _LINUX_OF_H */
___________________________
microblaze-uclinux mailing list
microblaze-uclinux-rVRm/Wmeqae7NGdpmJTKYQ@public.gmane.org
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-14 14:00 ` Michal Simek
-1 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:00 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
It is not part of your patch but I think that will be great completely
remove this CONFIG_PPC part from generic OF file.
Would it be possible to include your asm/machdep.h through asm/page.h or
any other file?
Michal
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 14:00 ` Michal Simek
0 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:00 UTC (permalink / raw)
To: Grant Likely
Cc: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
It is not part of your patch but I think that will be great completely
remove this CONFIG_PPC part from generic OF file.
Would it be possible to include your asm/machdep.h through asm/page.h or
any other file?
Michal
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 14:00 ` Michal Simek
0 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:00 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
Grant Likely wrote:
> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>
> We don't always have lmb available, so make arches provide an
> early_init_dt_alloc_memory_arch() to handle the allocation of
> memory in the fdt code.
>
> When we don't have lmb.h included, we need asm/page.h for __va.
>
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> arch/microblaze/kernel/prom.c | 5 +++++
> arch/powerpc/kernel/prom.c | 5 +++++
> drivers/of/fdt.c | 9 ++++++---
> include/linux/of_fdt.h | 1 +
> 4 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
> index 050b799..a7dcaf0 100644
> --- a/arch/microblaze/kernel/prom.c
> +++ b/arch/microblaze/kernel/prom.c
> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> lmb_add(base, size);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_EARLY_PRINTK
> /* MS this is Microblaze specifig function */
> static int __init early_init_dt_scan_serial(unsigned long node,
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index 43c78d7..5bbbdb2 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
> memstart_addr = min((u64)memstart_addr, base);
> }
>
> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
> +{
> + return lmb_alloc(size, align);
> +}
> +
> #ifdef CONFIG_BLK_DEV_INITRD
> void __init early_init_dt_setup_initrd_arch(unsigned long start,
> unsigned long end)
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index b51f797..406757a 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -10,16 +10,18 @@
> */
>
> #include <linux/kernel.h>
> -#include <linux/lmb.h>
> #include <linux/initrd.h>
> #include <linux/of.h>
> #include <linux/of_fdt.h>
> -
> +#include <linux/string.h>
> +#include <linux/errno.h>
>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif /* CONFIG_PPC */
It is not part of your patch but I think that will be great completely
remove this CONFIG_PPC part from generic OF file.
Would it be possible to include your asm/machdep.h through asm/page.h or
any other file?
Michal
>
> +#include <asm/page.h>
> +
> int __initdata dt_root_addr_cells;
> int __initdata dt_root_size_cells;
>
> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
> pr_debug(" size is %lx, allocating...\n", size);
>
> /* Allocate memory for the expanded device tree */
> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
> + mem = early_init_dt_alloc_memory_arch(size + 4,
> + __alignof__(struct device_node));
> mem = (unsigned long) __va(mem);
>
> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index c9cb8a7..a1ca92c 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
> extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
> int depth, void *data);
> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>
> /*
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 0/9] Random OF cleanups and merges
2010-02-13 16:02 ` Grant Likely
(?)
@ 2010-02-14 14:06 ` Michal Simek
-1 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:06 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, benh, jeremy.kerr, davem, microblaze-uclinux, linuxppc-dev,
sparclinux, devicetree-discuss, linux-kernel
Grant Likely wrote:
> Here's another batch of cleanup patches from my test-devicetree branch.
> A number of cleanups, corrections and minor merges of common code.
> Also a patch from Jeremy to make the flat tree work on architectures
> without LMB (arm).
>
> Once I've collected acks on these, I'll move them over to my
> next-devicetree branch on git://git.secretlab.ca/git/linux-2.6
All changes look ok. Please add them to linux-next which I am testing. I
don't expect any problem with it but anywya if any problems arise, I
will let you know.
I don't want to reply every email as Ben that's why one my big ACK
for that 9 patches.
Acked-by: Michal Simek <monstr@monstr.eu>
>
> Cheers,
> g.
>
> ---
>
> Grant Likely (6):
> of: remove undefined request_OF_resource & release_OF_resource
> of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
> of: move definition of of_chosen into common code.
> of: remove unused extern reference to devtree_lock
> of: put default string compare and #a/s-cell values into common header
> of: Remove old and misplaced function declarations
>
> Jeremy Kerr (3):
> of/flattree: Don't assume HAVE_LMB
> of: protect linux/of.h with CONFIG_OF
> proc_devtree: fix THIS_MODULE without module.h
>
>
> arch/microblaze/include/asm/prom.h | 15 ---------------
> arch/microblaze/kernel/prom.c | 8 +++++---
> arch/powerpc/include/asm/prom.h | 14 --------------
> arch/powerpc/kernel/prom.c | 10 +++++-----
> arch/sparc/kernel/prom.h | 3 ---
> drivers/of/base.c | 1 +
> drivers/of/fdt.c | 9 ++++++---
> fs/proc/proc_devtree.c | 1 +
> include/linux/of.h | 27 +++++++++++++++++++++++++++
> include/linux/of_fdt.h | 11 +----------
> 10 files changed, 46 insertions(+), 53 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 0/9] Random OF cleanups and merges
@ 2010-02-14 14:06 ` Michal Simek
0 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:06 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, microblaze-uclinux, devicetree-discuss, linux-kernel,
linuxppc-dev, sparclinux, jeremy.kerr, davem
Grant Likely wrote:
> Here's another batch of cleanup patches from my test-devicetree branch.
> A number of cleanups, corrections and minor merges of common code.
> Also a patch from Jeremy to make the flat tree work on architectures
> without LMB (arm).
>
> Once I've collected acks on these, I'll move them over to my
> next-devicetree branch on git://git.secretlab.ca/git/linux-2.6
All changes look ok. Please add them to linux-next which I am testing. I
don't expect any problem with it but anywya if any problems arise, I
will let you know.
I don't want to reply every email as Ben that's why one my big ACK
for that 9 patches.
Acked-by: Michal Simek <monstr@monstr.eu>
>
> Cheers,
> g.
>
> ---
>
> Grant Likely (6):
> of: remove undefined request_OF_resource & release_OF_resource
> of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
> of: move definition of of_chosen into common code.
> of: remove unused extern reference to devtree_lock
> of: put default string compare and #a/s-cell values into common header
> of: Remove old and misplaced function declarations
>
> Jeremy Kerr (3):
> of/flattree: Don't assume HAVE_LMB
> of: protect linux/of.h with CONFIG_OF
> proc_devtree: fix THIS_MODULE without module.h
>
>
> arch/microblaze/include/asm/prom.h | 15 ---------------
> arch/microblaze/kernel/prom.c | 8 +++++---
> arch/powerpc/include/asm/prom.h | 14 --------------
> arch/powerpc/kernel/prom.c | 10 +++++-----
> arch/sparc/kernel/prom.h | 3 ---
> drivers/of/base.c | 1 +
> drivers/of/fdt.c | 9 ++++++---
> fs/proc/proc_devtree.c | 1 +
> include/linux/of.h | 27 +++++++++++++++++++++++++++
> include/linux/of_fdt.h | 11 +----------
> 10 files changed, 46 insertions(+), 53 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 0/9] Random OF cleanups and merges
@ 2010-02-14 14:06 ` Michal Simek
0 siblings, 0 replies; 77+ messages in thread
From: Michal Simek @ 2010-02-14 14:06 UTC (permalink / raw)
To: Grant Likely
Cc: sfr, microblaze-uclinux, devicetree-discuss, linux-kernel,
linuxppc-dev, sparclinux, jeremy.kerr, davem
Grant Likely wrote:
> Here's another batch of cleanup patches from my test-devicetree branch.
> A number of cleanups, corrections and minor merges of common code.
> Also a patch from Jeremy to make the flat tree work on architectures
> without LMB (arm).
>
> Once I've collected acks on these, I'll move them over to my
> next-devicetree branch on git://git.secretlab.ca/git/linux-2.6
All changes look ok. Please add them to linux-next which I am testing. I
don't expect any problem with it but anywya if any problems arise, I
will let you know.
I don't want to reply every email as Ben that's why one my big ACK
for that 9 patches.
Acked-by: Michal Simek <monstr@monstr.eu>
>
> Cheers,
> g.
>
> ---
>
> Grant Likely (6):
> of: remove undefined request_OF_resource & release_OF_resource
> of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
> of: move definition of of_chosen into common code.
> of: remove unused extern reference to devtree_lock
> of: put default string compare and #a/s-cell values into common header
> of: Remove old and misplaced function declarations
>
> Jeremy Kerr (3):
> of/flattree: Don't assume HAVE_LMB
> of: protect linux/of.h with CONFIG_OF
> proc_devtree: fix THIS_MODULE without module.h
>
>
> arch/microblaze/include/asm/prom.h | 15 ---------------
> arch/microblaze/kernel/prom.c | 8 +++++---
> arch/powerpc/include/asm/prom.h | 14 --------------
> arch/powerpc/kernel/prom.c | 10 +++++-----
> arch/sparc/kernel/prom.h | 3 ---
> drivers/of/base.c | 1 +
> drivers/of/fdt.c | 9 ++++++---
> fs/proc/proc_devtree.c | 1 +
> include/linux/of.h | 27 +++++++++++++++++++++++++++
> include/linux/of_fdt.h | 11 +----------
> 10 files changed, 46 insertions(+), 53 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
2010-02-14 6:10 ` Benjamin Herrenschmidt
(?)
@ 2010-02-14 14:06 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, Feb 13, 2010 at 11:10 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> For platforms that have CONFIG_OF optional, we need to make the contents
>> of linux/of.h conditional on CONFIG_OF.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> For now...
>
> In the long run, maybe we want some of the iterators to be empty inlines
> returning NULL ?
Yes. I'll add them as they are needed.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
@ 2010-02-14 14:06 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: monstr, sfr, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sat, Feb 13, 2010 at 11:10 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> For platforms that have CONFIG_OF optional, we need to make the contents
>> of linux/of.h conditional on CONFIG_OF.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> For now...
>
> In the long run, maybe we want some of the iterators to be empty inlines
> returning NULL ?
Yes. I'll add them as they are needed.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF
@ 2010-02-14 14:06 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sat, Feb 13, 2010 at 11:10 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote:
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> For platforms that have CONFIG_OF optional, we need to make the contents
>> of linux/of.h conditional on CONFIG_OF.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> For now...
>
> In the long run, maybe we want some of the iterators to be empty inlines
> returning NULL ?
Yes. I'll add them as they are needed.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
2010-02-14 14:00 ` Michal Simek
(?)
(?)
@ 2010-02-14 14:08 ` Grant Likely
-1 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:08 UTC (permalink / raw)
To: michal.simek
Cc: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sun, Feb 14, 2010 at 7:00 AM, Michal Simek
<michal.simek@petalogix.com> wrote:
> Grant Likely wrote:
>>
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> We don't always have lmb available, so make arches provide an
>> early_init_dt_alloc_memory_arch() to handle the allocation of
>> memory in the fdt code.
>>
>> When we don't have lmb.h included, we need asm/page.h for __va.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> arch/microblaze/kernel/prom.c | 5 +++++
>> arch/powerpc/kernel/prom.c | 5 +++++
>> drivers/of/fdt.c | 9 ++++++---
>> include/linux/of_fdt.h | 1 +
>> 4 files changed, 17 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
>> index 050b799..a7dcaf0 100644
>> --- a/arch/microblaze/kernel/prom.c
>> +++ b/arch/microblaze/kernel/prom.c
>> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64
>> size)
>> lmb_add(base, size);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_EARLY_PRINTK
>> /* MS this is Microblaze specifig function */
>> static int __init early_init_dt_scan_serial(unsigned long node,
>> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> index 43c78d7..5bbbdb2 100644
>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base,
>> u64 size)
>> memstart_addr = min((u64)memstart_addr, base);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_BLK_DEV_INITRD
>> void __init early_init_dt_setup_initrd_arch(unsigned long start,
>> unsigned long end)
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index b51f797..406757a 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -10,16 +10,18 @@
>> */
>> #include <linux/kernel.h>
>> -#include <linux/lmb.h>
>> #include <linux/initrd.h>
>> #include <linux/of.h>
>> #include <linux/of_fdt.h>
>> -
>> +#include <linux/string.h>
>> +#include <linux/errno.h>
>> #ifdef CONFIG_PPC
>> #include <asm/machdep.h>
>> #endif /* CONFIG_PPC */
>
> It is not part of your patch but I think that will be great completely
> remove this CONFIG_PPC part from generic OF file.
> Would it be possible to include your asm/machdep.h through asm/page.h or any
> other file?
Yup. I'll get there unless someone else beats me to it. :-)
>
> Michal
>
>> +#include <asm/page.h>
>> +
>> int __initdata dt_root_addr_cells;
>> int __initdata dt_root_size_cells;
>> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
>> pr_debug(" size is %lx, allocating...\n", size);
>> /* Allocate memory for the expanded device tree */
>> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
>> + mem = early_init_dt_alloc_memory_arch(size + 4,
>> + __alignof__(struct device_node));
>> mem = (unsigned long) __va(mem);
>> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
>> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
>> index c9cb8a7..a1ca92c 100644
>> --- a/include/linux/of_fdt.h
>> +++ b/include/linux/of_fdt.h
>> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long
>> node);
>> extern int early_init_dt_scan_memory(unsigned long node, const char
>> *uname,
>> int depth, void *data);
>> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
>> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
>> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>> /*
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
>
> --
> Michal Simek, Ing. (M.Eng)
> PetaLogix - Linux Solutions for a Reconfigurable World
> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 14:08 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:08 UTC (permalink / raw)
To: michal.simek
Cc: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sun, Feb 14, 2010 at 7:00 AM, Michal Simek
<michal.simek@petalogix.com> wrote:
> Grant Likely wrote:
>>
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> We don't always have lmb available, so make arches provide an
>> early_init_dt_alloc_memory_arch() to handle the allocation of
>> memory in the fdt code.
>>
>> When we don't have lmb.h included, we need asm/page.h for __va.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> arch/microblaze/kernel/prom.c | 5 +++++
>> arch/powerpc/kernel/prom.c | 5 +++++
>> drivers/of/fdt.c | 9 ++++++---
>> include/linux/of_fdt.h | 1 +
>> 4 files changed, 17 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
>> index 050b799..a7dcaf0 100644
>> --- a/arch/microblaze/kernel/prom.c
>> +++ b/arch/microblaze/kernel/prom.c
>> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64
>> size)
>> lmb_add(base, size);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_EARLY_PRINTK
>> /* MS this is Microblaze specifig function */
>> static int __init early_init_dt_scan_serial(unsigned long node,
>> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> index 43c78d7..5bbbdb2 100644
>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base,
>> u64 size)
>> memstart_addr = min((u64)memstart_addr, base);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_BLK_DEV_INITRD
>> void __init early_init_dt_setup_initrd_arch(unsigned long start,
>> unsigned long end)
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index b51f797..406757a 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -10,16 +10,18 @@
>> */
>> #include <linux/kernel.h>
>> -#include <linux/lmb.h>
>> #include <linux/initrd.h>
>> #include <linux/of.h>
>> #include <linux/of_fdt.h>
>> -
>> +#include <linux/string.h>
>> +#include <linux/errno.h>
>> #ifdef CONFIG_PPC
>> #include <asm/machdep.h>
>> #endif /* CONFIG_PPC */
>
> It is not part of your patch but I think that will be great completely
> remove this CONFIG_PPC part from generic OF file.
> Would it be possible to include your asm/machdep.h through asm/page.h or any
> other file?
Yup. I'll get there unless someone else beats me to it. :-)
>
> Michal
>
>> +#include <asm/page.h>
>> +
>> int __initdata dt_root_addr_cells;
>> int __initdata dt_root_size_cells;
>> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
>> pr_debug(" size is %lx, allocating...\n", size);
>> /* Allocate memory for the expanded device tree */
>> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
>> + mem = early_init_dt_alloc_memory_arch(size + 4,
>> + __alignof__(struct device_node));
>> mem = (unsigned long) __va(mem);
>> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
>> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
>> index c9cb8a7..a1ca92c 100644
>> --- a/include/linux/of_fdt.h
>> +++ b/include/linux/of_fdt.h
>> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long
>> node);
>> extern int early_init_dt_scan_memory(unsigned long node, const char
>> *uname,
>> int depth, void *data);
>> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
>> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
>> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>> /*
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
>
> --
> Michal Simek, Ing. (M.Eng)
> PetaLogix - Linux Solutions for a Reconfigurable World
> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 14:08 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:08 UTC (permalink / raw)
To: michal.simek
Cc: monstr, sfr, benh, jeremy.kerr, davem, microblaze-uclinux,
linuxppc-dev, sparclinux, devicetree-discuss, linux-kernel
On Sun, Feb 14, 2010 at 7:00 AM, Michal Simek
<michal.simek@petalogix.com> wrote:
> Grant Likely wrote:
>>
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> We don't always have lmb available, so make arches provide an
>> early_init_dt_alloc_memory_arch() to handle the allocation of
>> memory in the fdt code.
>>
>> When we don't have lmb.h included, we need asm/page.h for __va.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> arch/microblaze/kernel/prom.c | 5 +++++
>> arch/powerpc/kernel/prom.c | 5 +++++
>> drivers/of/fdt.c | 9 ++++++---
>> include/linux/of_fdt.h | 1 +
>> 4 files changed, 17 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
>> index 050b799..a7dcaf0 100644
>> --- a/arch/microblaze/kernel/prom.c
>> +++ b/arch/microblaze/kernel/prom.c
>> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64
>> size)
>> lmb_add(base, size);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_EARLY_PRINTK
>> /* MS this is Microblaze specifig function */
>> static int __init early_init_dt_scan_serial(unsigned long node,
>> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> index 43c78d7..5bbbdb2 100644
>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base,
>> u64 size)
>> memstart_addr = min((u64)memstart_addr, base);
>> }
>> +u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + return lmb_alloc(size, align);
>> +}
>> +
>> #ifdef CONFIG_BLK_DEV_INITRD
>> void __init early_init_dt_setup_initrd_arch(unsigned long start,
>> unsigned long end)
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index b51f797..406757a 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -10,16 +10,18 @@
>> */
>> #include <linux/kernel.h>
>> -#include <linux/lmb.h>
>> #include <linux/initrd.h>
>> #include <linux/of.h>
>> #include <linux/of_fdt.h>
>> -
>> +#include <linux/string.h>
>> +#include <linux/errno.h>
>> #ifdef CONFIG_PPC
>> #include <asm/machdep.h>
>> #endif /* CONFIG_PPC */
>
> It is not part of your patch but I think that will be great completely
> remove this CONFIG_PPC part from generic OF file.
> Would it be possible to include your asm/machdep.h through asm/page.h or any
> other file?
Yup. I'll get there unless someone else beats me to it. :-)
>
> Michal
>
>> +#include <asm/page.h>
>> +
>> int __initdata dt_root_addr_cells;
>> int __initdata dt_root_size_cells;
>> @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
>> pr_debug(" size is %lx, allocating...\n", size);
>> /* Allocate memory for the expanded device tree */
>> - mem = lmb_alloc(size + 4, __alignof__(struct device_node));
>> + mem = early_init_dt_alloc_memory_arch(size + 4,
>> + __alignof__(struct device_node));
>> mem = (unsigned long) __va(mem);
>> ((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
>> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
>> index c9cb8a7..a1ca92c 100644
>> --- a/include/linux/of_fdt.h
>> +++ b/include/linux/of_fdt.h
>> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long
>> node);
>> extern int early_init_dt_scan_memory(unsigned long node, const char
>> *uname,
>> int depth, void *data);
>> extern void early_init_dt_add_memory_arch(u64 base, u64 size);
>> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
>> extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>> /*
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
>
> --
> Michal Simek, Ing. (M.Eng)
> PetaLogix - Linux Solutions for a Reconfigurable World
> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 4/9] of/flattree: Don't assume HAVE_LMB
@ 2010-02-14 14:08 ` Grant Likely
0 siblings, 0 replies; 77+ messages in thread
From: Grant Likely @ 2010-02-14 14:08 UTC (permalink / raw)
To: michal.simek
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr, davem
On Sun, Feb 14, 2010 at 7:00 AM, Michal Simek
<michal.simek@petalogix.com> wrote:
> Grant Likely wrote:
>>
>> From: Jeremy Kerr <jeremy.kerr@canonical.com>
>>
>> We don't always have lmb available, so make arches provide an
>> early_init_dt_alloc_memory_arch() to handle the allocation of
>> memory in the fdt code.
>>
>> When we don't have lmb.h included, we need asm/page.h for __va.
>>
>> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>> ---
>>
>> =A0arch/microblaze/kernel/prom.c | =A0 =A05 +++++
>> =A0arch/powerpc/kernel/prom.c =A0 =A0| =A0 =A05 +++++
>> =A0drivers/of/fdt.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A09 ++++++---
>> =A0include/linux/of_fdt.h =A0 =A0 =A0 =A0| =A0 =A01 +
>> =A04 files changed, 17 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom=
.c
>> index 050b799..a7dcaf0 100644
>> --- a/arch/microblaze/kernel/prom.c
>> +++ b/arch/microblaze/kernel/prom.c
>> @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u=
64
>> size)
>> =A0 =A0 =A0 =A0lmb_add(base, size);
>> =A0}
>> =A0+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + =A0 =A0 =A0 return lmb_alloc(size, align);
>> +}
>> +
>> =A0#ifdef CONFIG_EARLY_PRINTK
>> =A0/* MS this is Microblaze specifig function */
>> =A0static int __init early_init_dt_scan_serial(unsigned long node,
>> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> index 43c78d7..5bbbdb2 100644
>> --- a/arch/powerpc/kernel/prom.c
>> +++ b/arch/powerpc/kernel/prom.c
>> @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base,
>> u64 size)
>> =A0 =A0 =A0 =A0memstart_addr =3D min((u64)memstart_addr, base);
>> =A0}
>> =A0+u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
>> +{
>> + =A0 =A0 =A0 return lmb_alloc(size, align);
>> +}
>> +
>> =A0#ifdef CONFIG_BLK_DEV_INITRD
>> =A0void __init early_init_dt_setup_initrd_arch(unsigned long start,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unsigned long end)
>> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
>> index b51f797..406757a 100644
>> --- a/drivers/of/fdt.c
>> +++ b/drivers/of/fdt.c
>> @@ -10,16 +10,18 @@
>> =A0*/
>> =A0=A0#include <linux/kernel.h>
>> -#include <linux/lmb.h>
>> =A0#include <linux/initrd.h>
>> =A0#include <linux/of.h>
>> =A0#include <linux/of_fdt.h>
>> -
>> +#include <linux/string.h>
>> +#include <linux/errno.h>
>> =A0=A0#ifdef CONFIG_PPC
>> =A0#include <asm/machdep.h>
>> =A0#endif /* CONFIG_PPC */
>
> It is not part of your patch but I think that will be great completely
> remove this CONFIG_PPC part from generic OF file.
> Would it be possible to include your asm/machdep.h through asm/page.h or =
any
> other file?
Yup. I'll get there unless someone else beats me to it. :-)
>
> Michal
>
>> =A0+#include <asm/page.h>
>> +
>> =A0int __initdata dt_root_addr_cells;
>> =A0int __initdata dt_root_size_cells;
>> =A0@@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
>> =A0 =A0 =A0 =A0pr_debug(" =A0size is %lx, allocating...\n", size);
>> =A0 =A0 =A0 =A0 =A0/* Allocate memory for the expanded device tree */
>> - =A0 =A0 =A0 mem =3D lmb_alloc(size + 4, __alignof__(struct device_node=
));
>> + =A0 =A0 =A0 mem =3D early_init_dt_alloc_memory_arch(size + 4,
>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 __alignof__(struct device_=
node));
>> =A0 =A0 =A0 =A0mem =3D (unsigned long) __va(mem);
>> =A0 =A0 =A0 =A0 =A0((__be32 *)mem)[size / 4] =3D cpu_to_be32(0xdeadbeef)=
;
>> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
>> index c9cb8a7..a1ca92c 100644
>> --- a/include/linux/of_fdt.h
>> +++ b/include/linux/of_fdt.h
>> @@ -78,6 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned lo=
ng
>> node);
>> =A0extern int early_init_dt_scan_memory(unsigned long node, const char
>> *uname,
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
int depth, void *data);
>> =A0extern void early_init_dt_add_memory_arch(u64 base, u64 size);
>> +extern u64 early_init_dt_alloc_memory_arch(u64 size, u64 align);
>> =A0extern u64 dt_mem_next_cell(int s, __be32 **cellp);
>> =A0=A0/*
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" =
in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at =A0http://www.tux.org/lkml/
>
>
> --
> Michal Simek, Ing. (M.Eng)
> PetaLogix - Linux Solutions for a Reconfigurable World
> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
>
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
2010-02-13 16:03 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and Grant Likely
(?)
@ 2010-02-14 19:50 ` David Miller
-1 siblings, 0 replies; 77+ messages in thread
From: David Miller @ 2010-02-14 19:50 UTC (permalink / raw)
To: grant.likely
Cc: monstr, sfr, benh, jeremy.kerr, microblaze-uclinux, linuxppc-dev,
sparclinux, devicetree-discuss, linux-kernel
From: Grant Likely <grant.likely@secretlab.ca>
Date: Sat, 13 Feb 2010 09:03:09 -0700
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of
@ 2010-02-14 19:50 ` David Miller
0 siblings, 0 replies; 77+ messages in thread
From: David Miller @ 2010-02-14 19:50 UTC (permalink / raw)
To: grant.likely
Cc: monstr, sfr, benh, jeremy.kerr, microblaze-uclinux, linuxppc-dev,
sparclinux, devicetree-discuss, linux-kernel
From: Grant Likely <grant.likely@secretlab.ca>
Date: Sat, 13 Feb 2010 09:03:09 -0700
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 77+ messages in thread
* Re: [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock
@ 2010-02-14 19:50 ` David Miller
0 siblings, 0 replies; 77+ messages in thread
From: David Miller @ 2010-02-14 19:50 UTC (permalink / raw)
To: grant.likely
Cc: sfr, monstr, microblaze-uclinux, devicetree-discuss,
linux-kernel, linuxppc-dev, sparclinux, jeremy.kerr
From: Grant Likely <grant.likely@secretlab.ca>
Date: Sat, 13 Feb 2010 09:03:09 -0700
> Both allnodes and devtree_lock are defined in common code. The
> extern declaration should be in the common header too so that the
> compiler can type check. allnodes is already in of.h, but
> devtree_lock should be declared there too.
>
> This patch removes the SPARC declarations and uses decls in of.h instead.
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 77+ messages in thread
end of thread, other threads:[~2010-02-14 19:50 UTC | newest]
Thread overview: 77+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-13 16:02 [PATCH 0/9] Random OF cleanups and merges Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` [PATCH 1/9] of: Remove old and misplaced function declarations Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-13 16:02 ` [PATCH 2/9] proc_devtree: fix THIS_MODULE without module.h Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-14 6:09 ` Benjamin Herrenschmidt
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` [PATCH 3/9] of: protect linux/of.h with CONFIG_OF Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-14 6:10 ` Benjamin Herrenschmidt
2010-02-14 6:10 ` Benjamin Herrenschmidt
2010-02-14 6:10 ` Benjamin Herrenschmidt
2010-02-14 7:13 ` WALID
2010-02-14 14:06 ` Grant Likely
2010-02-14 14:06 ` Grant Likely
2010-02-14 14:06 ` Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` [PATCH 4/9] of/flattree: Don't assume HAVE_LMB Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-14 6:11 ` Benjamin Herrenschmidt
2010-02-14 6:11 ` Benjamin Herrenschmidt
2010-02-14 6:11 ` Benjamin Herrenschmidt
2010-02-14 6:11 ` Benjamin Herrenschmidt
2010-02-14 14:00 ` Michal Simek
2010-02-14 14:00 ` Michal Simek
2010-02-14 14:00 ` Michal Simek
2010-02-14 14:08 ` Grant Likely
2010-02-14 14:08 ` Grant Likely
2010-02-14 14:08 ` Grant Likely
2010-02-14 14:08 ` Grant Likely
2010-02-13 16:02 ` [PATCH 5/9] of: put default string compare and #a/s-cell values into common header Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:02 ` [PATCH 5/9] of: put default string compare and #a/s-cell values into Grant Likely
2010-02-14 6:11 ` [PATCH 5/9] of: put default string compare and #a/s-cell values into common header Benjamin Herrenschmidt
2010-02-14 6:11 ` Benjamin Herrenschmidt
2010-02-14 6:11 ` [PATCH 5/9] of: put default string compare and #a/s-cell Benjamin Herrenschmidt
2010-02-13 16:02 ` [PATCH 6/9] of: remove unused extern reference to devtree_lock Grant Likely
2010-02-13 16:02 ` Grant Likely
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-13 16:02 ` Grant Likely
2010-02-13 16:03 ` [PATCH 7/9] of: move definition of of_chosen into common code Grant Likely
2010-02-13 16:03 ` Grant Likely
2010-02-13 16:03 ` Grant Likely
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-14 6:12 ` Benjamin Herrenschmidt
2010-02-13 16:03 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock Grant Likely
2010-02-13 16:03 ` Grant Likely
2010-02-13 16:03 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and Grant Likely
2010-02-14 6:13 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock Benjamin Herrenschmidt
2010-02-14 6:13 ` Benjamin Herrenschmidt
2010-02-14 6:13 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of Benjamin Herrenschmidt
2010-02-14 19:50 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of allnodes and devtree_lock David Miller
2010-02-14 19:50 ` David Miller
2010-02-14 19:50 ` [PATCH 8/9] of/sparc: Remove sparc-local declaration of David Miller
2010-02-13 16:03 ` [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource Grant Likely
2010-02-13 16:03 ` [PATCH 9/9] of: remove undefined request_OF_resource & Grant Likely
2010-02-14 6:14 ` [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource Benjamin Herrenschmidt
2010-02-14 6:14 ` Benjamin Herrenschmidt
2010-02-14 6:14 ` [PATCH 9/9] of: remove undefined request_OF_resource & Benjamin Herrenschmidt
2010-02-14 6:14 ` [PATCH 9/9] of: remove undefined request_OF_resource & release_OF_resource Benjamin Herrenschmidt
2010-02-13 16:03 ` Grant Likely
2010-02-14 14:06 ` [PATCH 0/9] Random OF cleanups and merges Michal Simek
2010-02-14 14:06 ` Michal Simek
2010-02-14 14:06 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.