arm: Generate privileged stacks

This patch adds the generation and incorporation of privileged stack
regions that are used by ARM user mode threads.  This patch adds the
infrastructure for privileged stacks.  Later patches will utilize the
generated stacks and helper functions.

Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
diff --git a/scripts/process_gperf.py b/scripts/process_gperf.py
index 95a4f78..7578888 100755
--- a/scripts/process_gperf.py
+++ b/scripts/process_gperf.py
@@ -86,7 +86,7 @@
 
     # Set the lookup function to static inline so it gets rolled into
     # _k_object_find(), nothing else will use it
-    if re.search("struct _k_object [*]$", line):
+    if re.search(args.pattern + " [*]$", line):
         fp.write("static inline " + line)
         return
 
@@ -142,6 +142,8 @@
                         help="Input C file from gperf")
     parser.add_argument("-o", "--output", required=True,
                         help="Output C file with processing done")
+    parser.add_argument("-p", "--pattern", required=True,
+            help="Search pattern for objects")
     parser.add_argument("-v", "--verbose", action="store_true",
                         help="Print extra debugging information")
     args = parser.parse_args()