* [PATCH 1/4] xfuncs.h: include linux/types.h to avoid non decleration of size_t @ 2010-08-27 5:15 Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 2/4] introduce pure_initcall Jean-Christophe PLAGNIOL-VILLARD ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 UTC (permalink / raw) To: barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- include/xfuncs.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/xfuncs.h b/include/xfuncs.h index 4ce4e92..222ea41 100644 --- a/include/xfuncs.h +++ b/include/xfuncs.h @@ -1,6 +1,8 @@ #ifndef __XFUNCS_H #define __XFUNCS_H +#include <linux/types.h> + void *xmalloc(size_t size); void *xrealloc(void *ptr, size_t size); void *xzalloc(size_t size); -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/4] introduce pure_initcall 2010-08-27 5:15 [PATCH 1/4] xfuncs.h: include linux/types.h to avoid non decleration of size_t Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 ` Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 3/4] introduce phys_addr_t and resource_size_t Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 4/4] use resource_size_t for device ressoruces Jean-Christophe PLAGNIOL-VILLARD 2 siblings, 0 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 UTC (permalink / raw) To: barebox A "pure" initcall has no dependencies on anything else, and purely initializes variables that couldn't be statically initialized. This only exists for built-in code, not for modules. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- include/init.h | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/init.h b/include/init.h index accc4d0..bc70874 100644 --- a/include/init.h +++ b/include/init.h @@ -14,10 +14,17 @@ typedef int (*initcall_t)(void); __attribute__((__section__(".initcall." level))) = fn -#define core_initcall(fn) __define_initcall("0",fn,0) -#define postcore_initcall(fn) __define_initcall("1",fn,1) -#define console_initcall(fn) __define_initcall("2",fn,2) -#define postconsole_initcall(fn) __define_initcall("3",fn,3) +/* + * A "pure" initcall has no dependencies on anything else, and purely + * initializes variables that couldn't be statically initialized. + * + * This only exists for built-in code, not for modules. + */ +#define pure_initcall(fn) __define_initcall("0",fn,0) + +#define core_initcall(fn) __define_initcall("1",fn,1) +#define postcore_initcall(fn) __define_initcall("2",fn,2) +#define console_initcall(fn) __define_initcall("3",fn,3) #define coredevice_initcall(fn) __define_initcall("4",fn,4) #define fs_initcall(fn) __define_initcall("5",fn,5) #define device_initcall(fn) __define_initcall("6",fn,6) -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/4] introduce phys_addr_t and resource_size_t 2010-08-27 5:15 [PATCH 1/4] xfuncs.h: include linux/types.h to avoid non decleration of size_t Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 2/4] introduce pure_initcall Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 ` Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 4/4] use resource_size_t for device ressoruces Jean-Christophe PLAGNIOL-VILLARD 2 siblings, 0 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 UTC (permalink / raw) To: barebox this will allow to support 64bit platform Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- include/linux/types.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/linux/types.h b/include/linux/types.h index 2241364..96e5708 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -139,6 +139,14 @@ typedef __u64 __bitwise __be64; typedef __u16 __bitwise __sum16; typedef __u32 __bitwise __wsum; +#ifdef CONFIG_PHYS_ADDR_T_64BIT +typedef u64 phys_addr_t; +#else +typedef u32 phys_addr_t; +#endif + +typedef phys_addr_t resource_size_t; + struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/4] use resource_size_t for device ressoruces 2010-08-27 5:15 [PATCH 1/4] xfuncs.h: include linux/types.h to avoid non decleration of size_t Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 2/4] introduce pure_initcall Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 3/4] introduce phys_addr_t and resource_size_t Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 ` Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:41 ` Uwe Kleine-König 2010-08-27 5:56 ` [PATCH 4/4 v2] use resource_size_t for device resources Jean-Christophe PLAGNIOL-VILLARD 2 siblings, 2 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:15 UTC (permalink / raw) To: barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- include/driver.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver.h b/include/driver.h index ae3e777..eddbbf3 100644 --- a/include/driver.h +++ b/include/driver.h @@ -70,11 +70,11 @@ struct device_d { int id; /*! FIXME */ - unsigned long size; + resource_size_t size; /*! For devices which are directly mapped into memory, i.e. NOR * Flash or SDRAM. */ - unsigned long map_base; + resource_size_t map_base; void *platform_data; /*! board specific information about this device */ -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] use resource_size_t for device ressoruces 2010-08-27 5:15 ` [PATCH 4/4] use resource_size_t for device ressoruces Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:41 ` Uwe Kleine-König 2010-08-27 5:56 ` [PATCH 4/4 v2] use resource_size_t for device resources Jean-Christophe PLAGNIOL-VILLARD 1 sibling, 0 replies; 6+ messages in thread From: Uwe Kleine-König @ 2010-08-27 5:41 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox Hello Jean-Christophe, $SUBJECT ~= s/ressoruces/resources/ On Fri, Aug 27, 2010 at 07:15:18AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> > --- > include/driver.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/driver.h b/include/driver.h > index ae3e777..eddbbf3 100644 > --- a/include/driver.h > +++ b/include/driver.h > @@ -70,11 +70,11 @@ struct device_d { > int id; > > /*! FIXME */ What is this fixme about? Can it be removed? > - unsigned long size; > + resource_size_t size; > > /*! For devices which are directly mapped into memory, i.e. NOR > * Flash or SDRAM. */ > - unsigned long map_base; > + resource_size_t map_base; > > void *platform_data; /*! board specific information about this device */ > Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/4 v2] use resource_size_t for device resources 2010-08-27 5:15 ` [PATCH 4/4] use resource_size_t for device ressoruces Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:41 ` Uwe Kleine-König @ 2010-08-27 5:56 ` Jean-Christophe PLAGNIOL-VILLARD 1 sibling, 0 replies; 6+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27 5:56 UTC (permalink / raw) To: barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> --- v2: remove comment as we fix it fix commit subject Best Regards, J. include/driver.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver.h b/include/driver.h index ae3e777..ee0749d 100644 --- a/include/driver.h +++ b/include/driver.h @@ -69,12 +69,11 @@ struct device_d { * something like eth0 or nor0. */ int id; - /*! FIXME */ - unsigned long size; + resource_size_t size; /*! For devices which are directly mapped into memory, i.e. NOR * Flash or SDRAM. */ - unsigned long map_base; + resource_size_t map_base; void *platform_data; /*! board specific information about this device */ -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-08-27 5:56 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-08-27 5:15 [PATCH 1/4] xfuncs.h: include linux/types.h to avoid non decleration of size_t Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 2/4] introduce pure_initcall Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 3/4] introduce phys_addr_t and resource_size_t Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:15 ` [PATCH 4/4] use resource_size_t for device ressoruces Jean-Christophe PLAGNIOL-VILLARD 2010-08-27 5:41 ` Uwe Kleine-König 2010-08-27 5:56 ` [PATCH 4/4 v2] use resource_size_t for device resources Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox