Re: [kbuild-devel] scripts/kallsyms: extending region checking for Blackfin memory regions

2009-06-14 Thread Mike Frysinger
On Mon, Jun 15, 2009 at 00:37, Sam Ravnborg wrote:
 On Sun, Jun 14, 2009 at 10:05:26PM -0400, Mike Frysinger wrote:
 On Sun, Jun 14, 2009 at 21:59, Robin Getz wrote:
  On Sun 14 Jun 2009 16:44, Sam Ravnborg pondered:
  On Mon, Jun 08, 2009 at 07:23:16PM -0400, Mike Frysinger wrote:
   intro: the current Blackfin memory architecture is (1) no virtualized
   memory and (2) distinctly harvard.  that means we cannot create a
   linear map of start/end text sections.  we end up with distinct
   regions like so:
   1000 T __stext
   000dc4c0 T __etext
   feb0 A __etext_l2
   feb00010 A __stext_l2
   ffa0 T __stext_l1
   ffa0160c T __etext_l1
   this is because external memory starts at address 0 while on-chip
   regions have different discontiguous hardcoded addresses (L1
   instruction in this case starts at 0xffa0 while L2 starts at
   0xfeb0).
  
   the current kallsyms is written to search for the special stext/etext
   symbols only which means the resulting kallsyms output knows nothing
   of the Blackfin symbols living in these on-chip regions.  we've
   written two patches to fix this: the first one is straight forward and
   simply copies  pastes the existing hardcoded regions.  the second
   creates an array of text regions which makes it much easier to extend
   in the future for other people (and can be squashed into the first
   one).
  
   doesnt matter to me which method is picked :)
 
  I added both as I liked the generalization.
  I had to rearrange the Signed-off-by in the first patch
  as this patch came in vai you and not Robin.
 
  I think Mike pulled this from some work I did awhile ago, (and sent to you)
  that obviously never got added (since I didn't send it in the proper patch
  format).
 
  http://lkml.indiana.edu/hypermail/linux/kernel/0607.1/0558.html

 yeah, the first patch was by Robin ... the From: line in the patch
 should have shown that (and git-am would have respected) ...

 So does the patch.
 What I had to change was that the Signed-off-by: lines indicated
 that this patch came in like this:

 Robin - Mike - Bryan Wu - Sam
 So I rearranged the signed-off-by: lines so it indicated
 the following order:

 Robin - Bryan Wu - Mike - Sam


 I trust that Bryan really did add his sob, and it
 was only a mistake that Mike added his sob before
 that of Bryans.

yes, i took a bunch of patches from Bryan like this one
-mike

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] scripts/kallsyms: extending region checking for Blackfin memory regions

2009-06-08 Thread Mike Frysinger
intro: the current Blackfin memory architecture is (1) no virtualized
memory and (2) distinctly harvard.  that means we cannot create a
linear map of start/end text sections.  we end up with distinct
regions like so:
1000 T __stext
000dc4c0 T __etext
feb0 A __etext_l2
feb00010 A __stext_l2
ffa0 T __stext_l1
ffa0160c T __etext_l1
this is because external memory starts at address 0 while on-chip
regions have different discontiguous hardcoded addresses (L1
instruction in this case starts at 0xffa0 while L2 starts at
0xfeb0).

the current kallsyms is written to search for the special stext/etext
symbols only which means the resulting kallsyms output knows nothing
of the Blackfin symbols living in these on-chip regions.  we've
written two patches to fix this: the first one is straight forward and
simply copies  pastes the existing hardcoded regions.  the second
creates an array of text regions which makes it much easier to extend
in the future for other people (and can be squashed into the first
one).

doesnt matter to me which method is picked :)

(yes, another change is needed to kernel/kallsysms.c, but one thing at a time)
-mike


0001-kallsyms-support-kernel-symbols-in-Blackfin-on-chip-.patch
Description: Binary data


0005-kallsyms-generalize-text-region-handling.patch
Description: Binary data
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 25/33] kbuild: use POSIX BRE in headers install target

2007-07-21 Thread Mike Frysinger
On 7/21/07, Oleg Verych [EMAIL PROTECTED] wrote:
 * Date: Tue, 17 Jul 2007 16:08:54 +0200
 
  From: Mike Frysinger [EMAIL PROTECTED]
 
  The sed expression used at the moment in scripts/Makefile.headersinst
  relies on the (handy) GNU extension where you can escape ERE's in an
  otherwise BRE without using the GNU -r option.  The following patch
  replaces this \+ usage with a functionally equivalent POSIX BRE compliant
  \{1,\}.

 Matching at least one occurrence, right?

that is the definition of both + and \{1,\}

   # Eliminate the contents of (and inclusions of) compiler.h

 OK, that means annotations and non ANSI 'inline' thing. Lets see.

   HDRSED  := sed   -e s/ inline / __inline__ /g \
 []
  - -e s/[[:space:]]__attribute_const__[[:space:]]\+/\ /g \

 * [[:space:]] are more than tab and space isspace(3), is it more
   effective to use [[:blank:]] instead?

if you want to make some micro optimization in the build install step,
sure ... but functionally, the difference is irrelevant considering
sed operates only on individual lines

  + -e
  s/[[:space:]]__user[[:space:]]\{1,\}

 substitute one or more ' __user '

  / /g \

 with ' ', everywhere (flag 'g'). So, is it really needed that '\{' thing?

no, there is no grouping marker anywhere, so the match always applies
to just the whitespace

  + -e s/(__user[[:space:]]\{1,\}/ (/g \
  + -e s/[[:space:]]__force[[:space:]]\{1,\}/ /g \
  + -e s/(__force[[:space:]]\{1,\}/ (/g \
  + -e s/[[:space:]]__iomem[[:space:]]\{1,\}/ /g \
  + -e s/(__iomem[[:space:]]\{1,\}/ (/g \
  + -e s/[[:space:]]__attribute_const__[[:space:]]\{1,\}/\ /g \
-e s/[[:space:]]__attribute_const__$$// \

 Is it allowed to use identifiers like '__attribute_const__foo' or
 __attribute_const__[anything]? If it's not, last line is useless also.

a question that i think is really only relevant if it actually occurs
in the source code

-e /^\#include linux\/compiler.h/d
 whitespace is allowed   ^ here and is used for better readability
 sometimes.

so post a patch for inclusion ... not that it's been an actual problem
[yet] though
-mike

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [PATCH 25/33] kbuild: use POSIX BRE in headers install target

2007-07-21 Thread Mike Frysinger
On 7/21/07, Sam Ravnborg [EMAIL PROTECTED] wrote:
 On Sat, Jul 21, 2007 at 06:03:00PM -0400, Mike Frysinger wrote:
  On 7/21/07, Sam Ravnborg [EMAIL PROTECTED] wrote:
  I would much more prefer this functionality to be integrated into unifdef.
  There is no good reason to have two different preprocesisng methonds, one
  being the sed based one and the other the unidef one.
  
  A sinlge dedicated program that contian the sum of the functionality would
  be faster too.
 
  which functionality ?  normalizing of whitespace or all these
  linux-specific hacks ?  unifdef serves one specific function which is
  stated in its manpage: remove preprocessor conditionals from code.

 At present the kernel has a private copy of unidef. So adjusting the
 private copy for the needs of the kernels seems like a god plan.

didnt realize the kernel had integrated it since it didnt at first ...
so yeah, extending it however we see fit should be fine
-mike

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] More effective processing (Re: [PATCH 25/33] kbuild: use POSIX BRE in headers install target)

2007-07-21 Thread Mike Frysinger
On 7/21/07, Oleg Verych [EMAIL PROTECTED] wrote:
 On Sat, Jul 21, 2007 at 10:39:16PM +0200, Sam Ravnborg wrote:
  On Sat, Jul 21, 2007 at 03:21:43PM -0400, Mike Frysinger wrote:
 []
   while you could try and make a claim against memory/cpu effeciency, i
   fail to see how the first or last claims could possibly be backed up

 Less \{\(\\n\t\+\)\} [0] stuff make readings regex much easier. My
 confusion shows that i didn't used \{ much, because have another ways
 so far. And even after my quick testing i didn't realize that there
 was unrelated to main task whitespace cleanup.

the e-mail text you were quoting was [[:blank:]] vs [[:space:]], not + vs \{1,\}

 ./linux/stat.h:#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__  
 2)

__GLIBC__ cruft should be cleansed rather than looked at for anything else
-mike

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] help text on choices

2007-07-10 Thread Mike Frysinger
ive always wondered about this but never got around to asking ;)

is the help text on the top level choice supposed to be usable ?  for example:
choice
prompt you [may] have a choice
default YES
help
  This help text is never viewable :(
config YES
bool yes
help
  This help text is viewable when yes is selected.
config NO
bool no
help
  This help text is viewable when no is selected.
endchoice

if you highlight the you [may] have a choice and query help, you get
no output ... but if you go into the choice selection and query help
on the options, you can view the help text for those individual ones.
generally i like to put an overview in the choice help and explain
each option in depth in the individual choices.
-mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] [rfe] easier customization of kconfig for non-Linux projects

2007-05-24 Thread Mike Frysinger
On Thursday 24 May 2007, Sam Ravnborg wrote:
 The intent with this is clear but the solution you suggest albeit simple
 does not really match where we could end up with kconfig.
 Recently Roman added support for options in the kconfig language
 and I would assume we could deal with most of this just using options.

that certainly sounds nicer :)

 One example could be to support options for the mainmenu entrye like this:

 mainmenu Busybow config system
   option project=Busybox
   option version=$VERSION   = Where '$' signify an environment variable

this is doable now ?  if so, i'll test it out in uClibc ...

 In this way we could later distribute kconfig as a binary instead
 of building it into the source as today.

not entirely sure how useful that'd be unless you mean as a completely sep 
package that distributions would include ...
-mike


signature.asc
Description: This is a digitally signed message part.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


Re: [kbuild-devel] vmlinux.lds not marked for update when building on OS X and changing config options

2007-05-24 Thread Mike Frysinger

lovely ... looks like Darwin fails at life when it comes to respecting
POSIX and open() with O_TRUNC and a 0 byte file ... in particular,
this statement:

http://www.opengroup.org/onlinepubs/009695399/functions/open.html
If O_TRUNC is set and the file did previously exist, upon successful
completion, open() shall mark for update the st_ctime and st_mtime
fields of the file.

on OS X, if the file is 0 bytes and the file is opened with O_TRUNC,
it only updates st_ctime ... if the file is more than 0 bytes, then it
will correctly updated st_ctime and st_mtime ... ive attached my test
case if anyone is interested

the machine i'm testing on:
$ uname -a
Darwin Blackfin-Linux-Mac-Mini.local 8.9.0 Darwin Kernel Version
8.9.0: Thu Feb 22 20:54:07 PST 2007; root:xnu-792.17.14~1/RELEASE_PPC
Power Macintosh powerpc

the filesystem is default OS X HFS+ with case sensitivity enabled

i hate to ask this, but would you consider adding an unlink() or a
write() to conf_split_config() in scripts/kconfig/confdata.c ?  if you
want to tell me to blow it out my ass, that's OK :)

Signed-off-by: Mike Frysinger [EMAIL PROTECTED]
---
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -607,6 +607,7 @@ int conf_split_config(void)
strcpy(d, .h);

/* Assume directory path already exists. */
+   unlink(path); /* hack for non-POSIX compliant systems (Darwin) 
*/
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd == -1) {
if (errno != ENOENT) {
#include sys/types.h
#include sys/stat.h
#include fcntl.h
#include stdio.h
#include stdlib.h
#include unistd.h
#include assert.h

void timestest(size_t num_bytes)
{
	const char *tempfile = MOO_MOO;
	struct stat st1, st2;
	int fd, ret;

	/* punt the file and then create a 0 byte file and get its times */
	printf(getting first times ...\n);
	unlink(tempfile);

	fd = open(tempfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
	assert(fd = 0);
	if (num_bytes)
		write(fd, tempfile, num_bytes);
	close(fd);

	ret = stat(tempfile, st1);
	assert(ret == 0);

	/* sleep a little to make there is a difference in the times */
	printf(sleeping for three seconds ...\n);
	sleep(3);

	/* open the file again and grab the new file times */
	printf(getting second times ...\n);
	fd = open(tempfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
	assert(fd = 0);
	close(fd);

	ret = stat(tempfile, st2);
	assert(ret == 0);

	unlink(tempfile);

	/* each of these should be different (except for atime if you
	 * mount your filesystem with atime turned off)
	 */
#define comp(member) (st1.member == st2.member ? same : diff)
	printf(the following times should all be different\n(atime can be the same if you have filesystem mounted noatime)\n);
	printf(atime: %lu vs %lu (%s)\n
	   mtime: %lu vs %lu (%s)\n
	   ctime: %lu vs %lu (%s)\n,
	   st1.st_atime, st2.st_atime, comp(st_atime),
	   st1.st_mtime, st2.st_mtime, comp(st_mtime),
	   st1.st_ctime, st2.st_ctime, comp(st_ctime));

	printf(\n);
}

int main(int argc, char *argv[])
{
	printf(testing truncation with a 0 byte file\n);
	timestest(0);

	printf(testing truncation with a 4 byte file\n);
	timestest(4);

	return 0;
}
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel


[kbuild-devel] vmlinux.lds not marked for update when building on OS X and changing config options

2007-05-21 Thread Mike Frysinger
i'm not terribly familiar with the kconfig/kbuild system so i'm
looking for some pointers so i can track down the root cause here ...

some people like to cross-compile the Blackfin kernel on OS X hosts
and we noticed that in some cases the vmlinux.lds linker script is not
properly regenerated when changing some options in the kernel config
menu ... it works just fine on all our Linux hosts :)

linux/arch/blackfin/kernel/vmlinux.lds.S has this:
MEMORY
{
ram : ORIGIN = CONFIG_BOOT_LOAD,
...

and in linux/arch/blackfin/Kconfig, we have:
config BOOT_LOAD
hex Kernel load address
default 0x1000

if vmlinux.lds does not exist yet, running `make` generates the proper
file.  but if we do `make menuconfig` and update just BOOT_LOAD to say
0x4000 and then run `make`, vmlinux.lds is not regenerated.

doing `rm -f` on vmlinux.lds and re-running `make` once again produces
the correct file

any pointers on where to dig ? :)
-mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kbuild-devel mailing list
kbuild-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kbuild-devel