* Re: [PATCH] powerpc: Avoid pointless WARN_ON(irqs_disabled()) from panic codepath
From: Satyam Sharma @ 2007-09-18 0:08 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Linux Kernel Mailing List, Kamalesh Babulal
In-Reply-To: <alpine.LFD.0.999.0709180511070.8863@enigma.security.iitk.ac.in>
On Tue, 18 Sep 2007, Satyam Sharma wrote:
>
> > ------------[ cut here ]------------
> > Badness at arch/powerpc/kernel/smp.c:202
>
> comes when smp_call_function_map() has been called with irqs disabled,
> which is illegal. However, there is a special case, the panic() codepath,
> when we do not want to warn about this -- warning at that time is pointless
> anyway, and only serves to scroll away the *real* cause of the panic and
> distracts from the real bug.
BTW arch/ppc/ has same issue, but that's gonna be removed by next year
anyways, so I think there's no point making a patch for that (?)
^ permalink raw reply
* dtc: Add basic testcases for dtc
From: David Gibson @ 2007-09-18 0:33 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This patch adds a handful of simple testcases for dtc. It adds a dts
file which should generate the same sample tree as is used for the
libfdt testcases, and tests invoking dtc on this dts, plus the
standard batch of libfdt cases on the resulting dtb, which effectively
checks that the dtb is correct.
Because the test framework assumes each testcase is an executable with
the right output conventions, we use a little shell script, dtc.sh, as
a wrapper around dtc itself. It simply invokes dtc and returns a PASS
or FAIL depending on whether dtc returned an error.
It's not much, but it's a start.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
NB: Jon, you won't be able to simply git-applymbox this and have it
work. You'll need to manually add execute permission to tests/dtc.sh
before git commiting it, since I can't encode the permissions in a
patch. Sorry for the inconvenience, but it didn't really seem worth
setting up my own git to pull from just for that.
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-09-18 10:06:28.000000000 +1000
+++ dtc/tests/run_tests.sh 2007-09-18 10:06:31.000000000 +1000
@@ -86,6 +86,14 @@
run_test truncated_property
}
+dtc_tests () {
+ # Make sure we don't have stale blobs lying around
+ rm -f *.test.dtb
+
+ run_test dtc.sh -f -I dts -O dtb -o dtc_tree1.test.dtb test_tree1.dts
+ tree1_tests dtc_tree1.test.dtb
+}
+
while getopts "vdt:" ARG ; do
case $ARG in
"v")
@@ -98,7 +106,7 @@
done
if [ -z "$TESTSETS" ]; then
- TESTSETS="libfdt"
+ TESTSETS="libfdt dtc"
fi
for set in $TESTSETS; do
@@ -106,6 +114,9 @@
"libfdt")
libfdt_tests
;;
+ "dtc")
+ dtc_tests
+ ;;
esac
done
Index: dtc/tests/test_tree1.dts
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/test_tree1.dts 2007-09-18 10:06:31.000000000 +1000
@@ -0,0 +1,20 @@
+/ {
+ prop-int = <deadbeef>;
+ prop-str = "hello world";
+
+ subnode1 {
+ prop-int = <deadbeef>;
+
+ subsubnode {
+ prop-int = <deadbeef>;
+ };
+ };
+
+ subnode2 {
+ prop-int = <abcd1234>;
+
+ subsubnode {
+ prop-int = <abcd1234>;
+ };
+ };
+};
Index: dtc/tests/dtc.sh
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/dtc.sh 2007-09-18 10:07:34.000000000 +1000
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+PASS () {
+ echo "PASS"
+ exit 0
+}
+
+FAIL () {
+ echo "FAIL" "$@"
+ exit 2
+}
+
+DTC=../dtc
+
+verbose_run () {
+ if [ -z "$QUIET_TEST" ]; then
+ "$@"
+ else
+ "$@" > /dev/null 2> /dev/null
+ fi
+}
+
+if verbose_run "$DTC" "$@"; then
+ PASS
+else
+ ret="$?"
+ FAIL "dtc returned error code $ret"
+fi
Index: dtc/tests/Makefile.tests
===================================================================
--- dtc.orig/tests/Makefile.tests 2007-09-18 10:27:30.000000000 +1000
+++ dtc/tests/Makefile.tests 2007-09-18 10:27:46.000000000 +1000
@@ -43,10 +43,10 @@
rm -f $(STD_CLEANFILES:%=$(TESTS_PREFIX)%)
rm -f $(TESTS_CLEANFILES)
-check: tests
+check: tests dtc
cd $(TESTS_PREFIX); ./run_tests.sh
-checkv: tests
+checkv: tests dtc
cd $(TESTS_PREFIX); ./run_tests.sh -v
ifneq ($(DEPTARGETS),)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] powerpc: Avoid pointless WARN_ON(irqs_disabled()) from panic codepath
From: Randy Dunlap @ 2007-09-18 1:37 UTC (permalink / raw)
To: Satyam Sharma
Cc: linuxppc-dev, Linux, Paul Mackerras, Mailing List,
Kamalesh Babulal
In-Reply-To: <alpine.LFD.0.999.0709180511070.8863@enigma.security.iitk.ac.in>
On Tue, 18 Sep 2007 05:13:40 +0530 (IST) Satyam Sharma wrote:
> Untested (not even compile-tested) patch.
> Could someone point me to ppc32/64 cross-compilers for i386?
OSDL had some, but those are gone now.
I downloaded all of them and still use them, although it would
be good to have some more recent versions of them.
I put the power* compiler tarballs here:
http://userweb.kernel.org/~rdunlap/cross-compilers/
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* dtc: Whitespace cleanup
From: David Gibson @ 2007-09-18 1:44 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This large patch removes all trailing whitespace from dtc (including
libfdt, the testsuite and documentation). It also removes a handful
of redundant blank lines (at the end of functions, or when there are
two blank lines together for no particular reason).
As well as anything else, this means that quilt won't whinge when I go
to convert the whole of libfdt into a patch to apply to the kernel.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/data.c
===================================================================
--- dtc.orig/data.c 2007-09-18 11:05:03.000000000 +1000
+++ dtc/data.c 2007-09-18 11:05:55.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -106,7 +106,7 @@
val = strtol(x, &endx, 8);
if ((endx - x) == 0)
fprintf(stderr, "Empty \\nnn escape\n");
-
+
(*i) += endx - x;
return val;
}
@@ -125,7 +125,7 @@
val = strtol(x, &endx, 16);
if ((endx - x) == 0)
fprintf(stderr, "Empty \\x escape\n");
-
+
(*i) += endx - x;
return val;
}
Index: dtc/treesource.c
===================================================================
--- dtc.orig/treesource.c 2007-09-18 11:06:06.000000000 +1000
+++ dtc/treesource.c 2007-09-18 11:06:25.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -77,7 +77,6 @@
return PROP_CELLS;
else
return PROP_BYTES;
-
}
Index: dtc/tests/root_node.c
===================================================================
--- dtc.orig/tests/root_node.c 2007-09-18 11:06:53.000000000 +1000
+++ dtc/tests/root_node.c 2007-09-18 11:06:56.000000000 +1000
@@ -36,7 +36,7 @@
test_init(argc, argv);
fdt = load_blob_arg(argc, argv);
-
+
nh = fdt_offset_ptr_typed(fdt, 0, nh);
if (! nh)
Index: dtc/tests/testutils.c
===================================================================
--- dtc.orig/tests/testutils.c 2007-09-18 11:06:40.000000000 +1000
+++ dtc/tests/testutils.c 2007-09-18 11:06:44.000000000 +1000
@@ -104,7 +104,6 @@
name, proplen, len);
if (memcmp(val, prop->data, len) != 0)
FAIL("Data mismatch on property \"%s\"", name);
-
}
const void *check_getprop(void *fdt, int nodeoffset, const char *name,
Index: dtc/tests/nop_property.c
===================================================================
--- dtc.orig/tests/nop_property.c 2007-09-18 11:07:23.000000000 +1000
+++ dtc/tests/nop_property.c 2007-09-18 11:07:26.000000000 +1000
@@ -53,7 +53,7 @@
FAIL("prop-int still present after nopping");
if (lenerr != -FDT_ERR_NOTFOUND)
FAIL("Unexpected error on second getprop: %s", fdt_strerror(err));
-
+
strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1,
TEST_STRING_1);
verbose_printf("string value was \"%s\"\n", strp);
Index: dtc/tests/notfound.c
===================================================================
--- dtc.orig/tests/notfound.c 2007-09-18 11:07:10.000000000 +1000
+++ dtc/tests/notfound.c 2007-09-18 11:07:13.000000000 +1000
@@ -68,6 +68,6 @@
offset = fdt_path_offset(fdt, "/nonexistant-subnode");
check_error("fdt_path_offset(\"/nonexistant-subnode\")", offset);
-
+
PASS();
}
Index: dtc/tests/setprop.c
===================================================================
--- dtc.orig/tests/setprop.c 2007-09-18 11:08:17.000000000 +1000
+++ dtc/tests/setprop.c 2007-09-18 11:08:20.000000000 +1000
@@ -62,7 +62,7 @@
strp = check_getprop_string(fdt, 0, "prop-int", NEW_STRING);
verbose_printf("New value is \"%s\"\n", strp);
-
+
strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1,
TEST_STRING_1);
Index: dtc/tests/setprop_inplace.c
===================================================================
--- dtc.orig/tests/setprop_inplace.c 2007-09-18 11:07:38.000000000 +1000
+++ dtc/tests/setprop_inplace.c 2007-09-18 11:07:45.000000000 +1000
@@ -51,7 +51,7 @@
~TEST_VALUE_1, fdt_strerror(err));
intp = check_getprop_typed(fdt, 0, "prop-int", ~TEST_VALUE_1);
verbose_printf("New int value is 0x%08x\n", *intp);
-
+
strp = check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1,
TEST_STRING_1);
@@ -66,7 +66,7 @@
xstr, fdt_strerror(err));
strp = check_getprop(fdt, 0, "prop-str", xlen+1, xstr);
- verbose_printf("New string value is \"%s\"\n", strp);
+ verbose_printf("New string value is \"%s\"\n", strp);
PASS();
}
Index: dtc/tests/trees.S
===================================================================
--- dtc.orig/tests/trees.S 2007-09-18 11:07:51.000000000 +1000
+++ dtc/tests/trees.S 2007-09-18 11:08:08.000000000 +1000
@@ -65,7 +65,7 @@
#define STRING(tree, name, str) \
tree##_##name: \
.string str
-
+
.data
TREE_HDR(test_tree1)
@@ -77,7 +77,7 @@
BEGIN_NODE("")
PROP_INT(test_tree1, prop_int, TEST_VALUE_1)
PROP_STR(test_tree1, prop_str, TEST_STRING_1)
-
+
BEGIN_NODE("subnode1")
PROP_INT(test_tree1, prop_int, TEST_VALUE_1)
@@ -110,7 +110,7 @@
BEGIN_NODE("")
PROPHDR(truncated_property, prop_truncated, 4)
/* Oops, no actual property data here */
-
+
truncated_property_strings:
STRING(truncated_property, prop_truncated, "truncated")
truncated_property_end:
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c 2007-09-18 11:08:45.000000000 +1000
+++ dtc/flattree.c 2007-09-18 11:09:53.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -111,7 +111,7 @@
.data = bin_emit_data,
.beginnode = bin_emit_beginnode,
.endnode = bin_emit_endnode,
- .property = bin_emit_property,
+ .property = bin_emit_property,
};
static void emit_label(FILE *f, char *prefix, char *label)
@@ -144,7 +144,7 @@
c = str[len];
str[len] = '\0';
}
-
+
fprintf(f, "\t.string\t\"%s\"\n", str);
if (len != 0) {
@@ -178,7 +178,7 @@
}
if ((d.len - off) >= sizeof(u16)) {
- fprintf(f, "\t.short\t0x%hx\n",
+ fprintf(f, "\t.short\t0x%hx\n",
be16_to_cpu(*((u16 *)(d.val+off))));
off += sizeof(u16);
}
@@ -231,7 +231,7 @@
.data = asm_emit_data,
.beginnode = asm_emit_beginnode,
.endnode = asm_emit_endnode,
- .property = asm_emit_property,
+ .property = asm_emit_property,
};
static int stringtable_insert(struct data *d, char *str)
@@ -717,7 +717,7 @@
if (! strneq(ppath, cpath, plen))
return NULL;
-
+
return strdup(lslash+1);
}
@@ -766,7 +766,7 @@
node->name = flat_read_string(dtbuf);
node->fullpath = join_path(parent_path, node->name);
}
-
+
node->basenamelen = check_node_name(node->name);
if (node->basenamelen < 0) {
fprintf(stderr, "Warning \"%s\" has incorrect format\n", node->name);
@@ -926,7 +926,7 @@
if (off_dt+size_dt > totalsize)
die("Structure block extends past total size\n");
}
-
+
if (version < 16) {
flags |= FTF_FULLPATH | FTF_NAMEPROPS | FTF_VARALIGN;
} else {
Index: dtc/ftdump.c
===================================================================
--- dtc.orig/ftdump.c 2007-09-18 11:08:36.000000000 +1000
+++ dtc/ftdump.c 2007-09-18 11:08:39.000000000 +1000
@@ -81,7 +81,7 @@
static void dump_blob(void *blob)
{
struct boot_param_header *bph = blob;
- struct reserve_entry *p_rsvmap =
+ struct reserve_entry *p_rsvmap =
(struct reserve_entry *)(blob
+ be32_to_cpu(bph->off_mem_rsvmap));
char *p_struct = blob + be32_to_cpu(bph->off_dt_struct);
Index: dtc/Makefile
===================================================================
--- dtc.orig/Makefile 2007-09-18 11:09:44.000000000 +1000
+++ dtc/Makefile 2007-09-18 11:09:47.000000000 +1000
@@ -13,7 +13,7 @@
SUBLEVEL = 0
EXTRAVERSION =
LOCAL_VERSION =
-CONFIG_LOCALVERSION =
+CONFIG_LOCALVERSION =
DTC_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
VERSION_FILE = version_gen.h
Index: dtc/dtc.c
===================================================================
--- dtc.orig/dtc.c 2007-09-18 11:10:00.000000000 +1000
+++ dtc/dtc.c 2007-09-18 11:11:00.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -218,6 +218,6 @@
} else {
die("Unknown output format \"%s\"\n", outform);
}
-
+
exit(0);
}
Index: dtc/dtc-lexer.l
===================================================================
--- dtc.orig/dtc-lexer.l 2007-09-18 11:10:28.000000000 +1000
+++ dtc/dtc-lexer.l 2007-09-18 11:10:42.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
%option noyywrap nounput yylineno
Index: dtc/dtc-parser.y
===================================================================
--- dtc.orig/dtc-parser.y 2007-09-18 11:11:36.000000000 +1000
+++ dtc/dtc-parser.y 2007-09-18 11:11:47.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
%glr-parser
Index: dtc/dtc.h
===================================================================
--- dtc.orig/dtc.h 2007-09-18 11:11:11.000000000 +1000
+++ dtc/dtc.h 2007-09-18 11:11:25.000000000 +1000
@@ -4,7 +4,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -14,11 +14,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include <stdio.h>
Index: dtc/Documentation/dtc-paper.tex
===================================================================
--- dtc.orig/Documentation/dtc-paper.tex 2007-09-18 11:12:23.000000000 +1000
+++ dtc/Documentation/dtc-paper.tex 2007-09-18 11:12:27.000000000 +1000
@@ -193,7 +193,7 @@
\vdots & \multicolumn{1}{c|}{\vdots} & \\\cline{2-2}
& \texttt{\dtendnode} \\\cline{2-2}
& \texttt{\dtend} \\\cline{2-2}
- \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
+ \multicolumn{1}{r}{\vdots} & \multicolumn{1}{c}{\vdots} & \\\cline{2-2}
\multicolumn{1}{r}{\emph{totalsize}} \\
\end{tabular}
\caption{Device tree blob layout}
Index: dtc/Documentation/manual.txt
===================================================================
--- dtc.orig/Documentation/manual.txt 2007-09-18 11:12:07.000000000 +1000
+++ dtc/Documentation/manual.txt 2007-09-18 11:12:11.000000000 +1000
@@ -140,7 +140,7 @@
memreserve: label 'memreserve' ADDR ADDR ';'
| label 'memreserve' ADDR '-' ADDR ';'
-
+
devicetree: '/' nodedef
nodedef: '{' list_of_property list_of_subnode '}' ';'
Index: dtc/livetree.c
===================================================================
--- dtc.orig/livetree.c 2007-09-18 11:13:12.000000000 +1000
+++ dtc/livetree.c 2007-09-18 11:14:00.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -41,9 +41,9 @@
struct property *chain_property(struct property *first, struct property *list)
{
assert(first->next == NULL);
-
+
first->next = list;
- return first;
+ return first;
}
struct node *build_node(struct property *proplist, struct node *children)
@@ -232,7 +232,7 @@
static struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
{
- struct node *child, *node;
+ struct node *child, *node;
assert((phandle != 0) && (phandle != -1));
@@ -333,13 +333,12 @@
prop->name, node->fullpath);
}
}
-
/* check name length */
if (strlen(prop->name) > MAX_PROPNAME_LEN)
WARNMSG("Property name %s is too long in %s\n",
prop->name, node->fullpath);
-
+
/* check this property */
for (i = 0; i < ARRAY_SIZE(prop_checker_table); i++) {
if (streq(prop->name, prop_checker_table[i].propname))
@@ -426,7 +425,7 @@
(node)->fullpath, (propname), \
prop->val.val, (value)); \
} while (0)
-
+
#define CHECK_HAVE_ONECELL(node, propname) \
do { \
CHECK_HAVE((node), (propname)); \
@@ -553,7 +552,7 @@
WARNMSG("physical boot CPU not set. Use -b option to set\n");
}
- return ok;
+ return ok;
}
static int check_memory(struct node *root)
@@ -578,7 +577,7 @@
return 0;
}
- return ok;
+ return ok;
}
static int check_chosen(struct node *root)
Index: dtc/fstree.c
===================================================================
--- dtc.orig/fstree.c 2007-09-18 11:14:39.000000000 +1000
+++ dtc/fstree.c 2007-09-18 11:15:02.000000000 +1000
@@ -1,7 +1,7 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -11,11 +11,11 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
*/
#include "dtc.h"
@@ -44,7 +44,7 @@
continue;
tmpnam = join_path(dirname, de->d_name);
-
+
if (lstat(tmpnam, &st) < 0)
die("stat(%s): %s\n", tmpnam, strerror(errno));
Index: dtc/libfdt/fdt_ro.c
===================================================================
--- dtc.orig/libfdt/fdt_ro.c 2007-09-18 11:14:24.000000000 +1000
+++ dtc/libfdt/fdt_ro.c 2007-09-18 11:14:32.000000000 +1000
@@ -166,7 +166,7 @@
p = q;
}
- return offset;
+ return offset;
}
const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
@@ -244,7 +244,7 @@
if (lenp)
*lenp = len;
-
+
return prop;
}
break;
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] powerpc: Avoid pointless WARN_ON(irqs_disabled()) from panic codepath
From: Josh Boyer @ 2007-09-18 1:46 UTC (permalink / raw)
To: Randy Dunlap
Cc: Mailing List, Kamalesh Babulal, linuxppc-dev, Paul Mackerras,
Linux, Satyam Sharma
In-Reply-To: <20070917183749.fd690505.randy.dunlap@oracle.com>
On Mon, 17 Sep 2007 18:37:49 -0700
Randy Dunlap <randy.dunlap@oracle.com> wrote:
> On Tue, 18 Sep 2007 05:13:40 +0530 (IST) Satyam Sharma wrote:
>
> > Untested (not even compile-tested) patch.
> > Could someone point me to ppc32/64 cross-compilers for i386?
>
> OSDL had some, but those are gone now.
> I downloaded all of them and still use them, although it would
> be good to have some more recent versions of them.
>
> I put the power* compiler tarballs here:
>
> http://userweb.kernel.org/~rdunlap/cross-compilers/
Crosstool is widely used. It'll build several combinations of
gcc/binutils/glibc for you.
http://www.kegel.com/crosstool/
There's also the ELDK from Denx:
http://www.denx.de/en/view/Software/WebHome#Embedded_Linux_Development_Kit
josh
^ permalink raw reply
* Re: [PATCH 0/7] MPC52xx Bestcomm submission for 2.6.24
From: Jon Smirl @ 2007-09-18 2:15 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: Grant Likely, Paul Mackerras, PowerPC dev list
In-Reply-To: <11899400103383-git-send-email-tnt@246tNt.com>
On 9/16/07, Sylvain Munaut <tnt@246tnt.com> wrote:
> Hello Paul, Hi everyone,
>
> This series of patch is mainly the bestcomm support for
> the mpc5200. It was posted a while ago and received some
> comments. Theses are all addressed here (afaik).
Does this series supersede these pacthes out of your older series?
0010-powerpc-In-rheap.c-move-the-EXPORT_SYMBOL-and-use.patch
0011-powerpc-BestComm-move-the-EXPORT_SYMBOL-and-use-th.patch
0012-powerpc-BestComm-ATA-task-move-the-EXPORT_SYMBOL-a.patch
0013-powerpc-BestComm-FEC-task-move-the-EXPORT_SYMBOL-a.patch
0014-powerpc-BestComm-GenBD-task-move-the-EXPORT_SYMBOL.patch
0015-powerpc-BestComm-Replace-global-variable-bcom-by-b.patch
0016-powerpc-Make-the-BestComm-driver-a-standard-of_plat.patch
0017-powerpc-Fix-typo-in-BestComm-ATA-task-support-code.patch
0018-powerpc-BestComm-ATA-task-microcode-insert-copyri.patch
0019-powerpc-BestComm-FEC-task-microcode-insert-copyri.patch
0020-powerpc-BestComm-GenBD-task-microcode-insert-copy.patch
0021-powerpc-Fix-errors-in-bcom-bcom_eng-renaming.patch
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply
* Re: [PATCH 09/28] cpm_uart: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.
From: Stephen Rothwell @ 2007-09-18 4:19 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165738.GI6563@loki.buserror.net>
[-- Attachment #1: Type: text/plain, Size: 361 bytes --]
On Mon, 17 Sep 2007 11:57:38 -0500 Scott Wood <scottwood@freescale.com> wrote:
>
> +++ b/drivers/serial/cpm_uart/cpm_uart_core.c
> @@ -10,7 +10,7 @@
> +
> +#ifdef CONFIG_PPC_CPM_NEW_BINDING
> +#include <asm/of_platform.h>
linux/of_platform.h
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH 1/3] usb: add device-tree-aware ehci driver
From: Stephen Rothwell @ 2007-09-18 4:26 UTC (permalink / raw)
To: Valentine Barshak; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <46EEC4AB.2030707@ru.mvista.com>
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
On Mon, 17 Sep 2007 22:17:15 +0400 Valentine Barshak <vbarshak@ru.mvista.com> wrote:
>
> Looks like we'll need a patch that replaces asm/prom.h and
> asm/of_platform.h with linux/of.h and linux/of_platform.h
> in other drivers.
Yeah, but at the moment I am just stopping the infection spreading :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources
From: Benjamin Herrenschmidt @ 2007-09-18 4:26 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20070917201229.GA17302@lixom.net>
On Mon, 2007-09-17 at 15:12 -0500, Olof Johansson wrote:
> Hook up affinity-setting for U3/U4 MSI interrupt sources.
>
> Tested on Quad G5 with myri10ge.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 8de29f2..22600fd 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -768,7 +768,7 @@ static void mpic_end_ipi(unsigned int irq)
>
> #endif /* CONFIG_SMP */
>
> -static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
> +void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
> {
> struct mpic *mpic = mpic_from_irq(irq);
> unsigned int src = mpic_irq_to_hw(irq);
> diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h
> index 3a1c3d2..1cb6bd8 100644
> --- a/arch/powerpc/sysdev/mpic.h
> +++ b/arch/powerpc/sysdev/mpic.h
> @@ -34,5 +34,6 @@ extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
> extern void mpic_end_irq(unsigned int irq);
> extern void mpic_mask_irq(unsigned int irq);
> extern void mpic_unmask_irq(unsigned int irq);
> +extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
>
> #endif /* _POWERPC_SYSDEV_MPIC_H */
> diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
> index 305b864..0fc4e96 100644
> --- a/arch/powerpc/sysdev/mpic_u3msi.c
> +++ b/arch/powerpc/sysdev/mpic_u3msi.c
> @@ -40,6 +40,7 @@ static struct irq_chip mpic_u3msi_chip = {
> .unmask = mpic_u3msi_unmask_irq,
> .eoi = mpic_end_irq,
> .set_type = mpic_set_irq_type,
> + .set_affinity = mpic_set_affinity,
> .typename = "MPIC-U3MSI",
> };
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 1/3] usb: add device-tree-aware ehci driver
From: David Gibson @ 2007-09-18 5:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, linux-usb-devel
In-Reply-To: <20070918142606.06477b04.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
On Tue, Sep 18, 2007 at 02:26:06PM +1000, Stephen Rothwell wrote:
> On Mon, 17 Sep 2007 22:17:15 +0400 Valentine Barshak <vbarshak@ru.mvista.com> wrote:
> >
> > Looks like we'll need a patch that replaces asm/prom.h and
> > asm/of_platform.h with linux/of.h and linux/of_platform.h
> > in other drivers.
>
> Yeah, but at the moment I am just stopping the infection spreading
> :-)
Patching the existing instances would probably help with that, since
it would mean less bad examples for people to copy.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH 0/7] MPC52xx Bestcomm submission for 2.6.24
From: tnt @ 2007-09-18 4:29 UTC (permalink / raw)
To: Jon Smirl; +Cc: PowerPC dev list
In-Reply-To: <9e4733910709171915neced927yaf014a08ce21aa66@mail.gmail.com>
> On 9/16/07, Sylvain Munaut <tnt@246tnt.com> wrote:
>> Hello Paul, Hi everyone,
>>
>> This series of patch is mainly the bestcomm support for
>> the mpc5200. It was posted a while ago and received some
>> comments. Theses are all addressed here (afaik).
>
> Does this series supersede these pacthes out of your older series?
Yes.
Those are the patches I wrote to fix the comments received last time.
They are now merged inside the main patches.
Apparently I forgot to fix some other comments so I'll have to do
that and repost again.
Sylvain
>
> 0010-powerpc-In-rheap.c-move-the-EXPORT_SYMBOL-and-use.patch
> 0011-powerpc-BestComm-move-the-EXPORT_SYMBOL-and-use-th.patch
> 0012-powerpc-BestComm-ATA-task-move-the-EXPORT_SYMBOL-a.patch
> 0013-powerpc-BestComm-FEC-task-move-the-EXPORT_SYMBOL-a.patch
> 0014-powerpc-BestComm-GenBD-task-move-the-EXPORT_SYMBOL.patch
> 0015-powerpc-BestComm-Replace-global-variable-bcom-by-b.patch
> 0016-powerpc-Make-the-BestComm-driver-a-standard-of_plat.patch
> 0017-powerpc-Fix-typo-in-BestComm-ATA-task-support-code.patch
> 0018-powerpc-BestComm-ATA-task-microcode-insert-copyri.patch
> 0019-powerpc-BestComm-FEC-task-microcode-insert-copyri.patch
> 0020-powerpc-BestComm-GenBD-task-microcode-insert-copy.patch
> 0021-powerpc-Fix-errors-in-bcom-bcom_eng-renaming.patch
>
>
>
> --
> Jon Smirl
> jonsmirl@gmail.com
>
>
^ permalink raw reply
* Re: [PATCH 01/28] CPM: Change from fsl, brg-frequency to brg/clock-frequency
From: David Gibson @ 2007-09-18 6:11 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165728.GA6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:28AM -0500, Scott Wood wrote:
> As suggested by David Gibson, now that we have a separate node
> for the baud rate generators, it's better to use the standard
> clock-frequency property than a cpm-node-level fsl,brg-frequency
> property.
>
> This patch updates existing places where fsl,brg-frequency is
> used.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
[snip]
> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> index d028e8d..3052366 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -73,22 +73,26 @@ static u32 brgfreq = -1;
> u32 get_brgfreq(void)
> {
> struct device_node *node;
> + const unsigned int *prop;
> + int size;
>
> if (brgfreq != -1)
> return brgfreq;
>
> - node = of_find_compatible_node(NULL, NULL, "fsl,cpm1");
> - if (!node)
> - node = of_find_compatible_node(NULL, NULL, "fsl,cpm2");
> - if (!node)
> - node = of_find_node_by_type(NULL, "cpm");
> + node = of_find_compatible_node(NULL, NULL, "fsl,cpm-brg");
> if (node) {
> - int size;
> - const unsigned int *prop;
> + prop = of_get_property(node, "clock-frequency", &size);
> + if (prop && size == 4)
> + brgfreq = *prop;
>
> - prop = of_get_property(node, "fsl,brg-frequency", &size);
> - if (!prop)
> - prop = of_get_property(node, "brg-frequency", &size);
> + of_node_put(node);
> + return brgfreq;
> + }
> +
> + /* Legacy device binding -- will go away when no users are left. */
> + node = of_find_node_by_type(NULL, "cpm");
> + if (node) {
> + prop = of_get_property(node, "brg-frequency", &size);
Shouldn't you check for "fsl,brg-frequency" here, in case of old
device trees?
> if (prop && size == 4)
> brgfreq = *prop;
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 02/28] Introduce new CPM device bindings.
From: David Gibson @ 2007-09-18 6:13 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165730.GB6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:57:30AM -0500, Scott Wood wrote:
> This introduces a new device binding for the CPM and other devices on
> these boards. Some of the changes include:
>
> 1. Proper namespace scoping for Freescale compatibles and properties.
>
> 2. Use compatible rather than things like device_type and model
> to determine which particular variant of a device is present.
>
> 3. Give the drivers the relevant CPM command word directly, rather than
> requiring it to have a lookup table based on device-id, SCC v. SMC, and
> CPM version.
>
> 4. Specify the CPCR and the usable DPRAM region in the CPM's reg property.
>
> Boards that do not require the legacy bindings should select
> CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
> all existing boards are converted and tested, the config option can
> become default y to prevent new boards from using the old model. Once
> arch/ppc is gone, the config option can be removed altogether.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH 24/28] mpc82xx: Remove a bunch of cruft that duplicates generic functionality.
From: David Gibson @ 2007-09-18 6:48 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20070917165816.GX6563@loki.buserror.net>
On Mon, Sep 17, 2007 at 11:58:16AM -0500, Scott Wood wrote:
> m82xx_calibrate_decr(), mpc82xx_ads_show_cpuinfo(), and mpc82xx_halt() do
> anything useful beyond what the generic code does.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* [PATCH 1/2] [POWERPC] Size swapper_pg_dir correctly
From: Stephen Rothwell @ 2007-09-18 7:22 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
David Gibson pointed out that swapper_pg_dir actually need to be
PGD_TABLE_SIZE bytes long not PAGE_SIZE. This actually saves 64k in
the bss for a kernel ppc64_defconfig built with CONFIG_PPC_64K_PAGES.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/asm-offsets.c | 4 ++++
arch/powerpc/kernel/head_64.S | 2 +-
include/asm-powerpc/pgtable-4k.h | 2 ++
include/asm-powerpc/pgtable-64k.h | 2 ++
4 files changed, 9 insertions(+), 1 deletions(-)
Boot tested on a POWER5+ with 4K and 64K pages.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index a408053..0ae5d57 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -320,5 +320,9 @@ int main(void)
DEFINE(VMALLOC_START_ESID, GET_ESID(VMALLOC_START));
DEFINE(VMALLOC_START_VSID, KERNEL_VSID(VMALLOC_START));
#endif
+
+#ifdef CONFIG_PPC64
+ DEFINE(PGD_TABLE_SIZE, PGD_TABLE_SIZE);
+#endif
return 0;
}
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index f4ae82e..384cc75 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1539,4 +1539,4 @@ empty_zero_page:
.globl swapper_pg_dir
swapper_pg_dir:
- .space PAGE_SIZE
+ .space PGD_TABLE_SIZE
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h
index add5481..818e2ab 100644
--- a/include/asm-powerpc/pgtable-4k.h
+++ b/include/asm-powerpc/pgtable-4k.h
@@ -10,10 +10,12 @@
#define PUD_INDEX_SIZE 7
#define PGD_INDEX_SIZE 9
+#ifndef __ASSEMBLY__
#define PTE_TABLE_SIZE (sizeof(pte_t) << PTE_INDEX_SIZE)
#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE)
#define PUD_TABLE_SIZE (sizeof(pud_t) << PUD_INDEX_SIZE)
#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
+#endif /* __ASSEMBLY__ */
#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE)
#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h
index 33ae901..bd54b77 100644
--- a/include/asm-powerpc/pgtable-64k.h
+++ b/include/asm-powerpc/pgtable-64k.h
@@ -9,9 +9,11 @@
#define PUD_INDEX_SIZE 0
#define PGD_INDEX_SIZE 4
+#ifndef __ASSEMBLY__
#define PTE_TABLE_SIZE (sizeof(real_pte_t) << PTE_INDEX_SIZE)
#define PMD_TABLE_SIZE (sizeof(pmd_t) << PMD_INDEX_SIZE)
#define PGD_TABLE_SIZE (sizeof(pgd_t) << PGD_INDEX_SIZE)
+#endif /* __ASSEMBLY__ */
#define PTRS_PER_PTE (1 << PTE_INDEX_SIZE)
#define PTRS_PER_PMD (1 << PMD_INDEX_SIZE)
--
1.5.3.1
^ permalink raw reply related
* [PATCH 2/2] [POWERPC] fwnmi is only used on pSeries
From: Stephen Rothwell @ 2007-09-18 7:25 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
In-Reply-To: <20070918172259.dc4172b0.sfr@canb.auug.org.au>
This saves 4k on non pSeries builds (except for iSeries where it saves
almost 4k).
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/crash_dump.c | 2 ++
arch/powerpc/kernel/head_64.S | 7 +++++++
2 files changed, 9 insertions(+), 0 deletions(-)
Boot tested on iSeries and POWER5+.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index ffa91d6..29ff77c 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -54,8 +54,10 @@ void __init setup_kdump_trampoline(void)
create_trampoline(i);
}
+#ifdef CONFIG_PPC_PSERIES
create_trampoline(__pa(system_reset_fwnmi) - PHYSICAL_START);
create_trampoline(__pa(machine_check_fwnmi) - PHYSICAL_START);
+#endif /* CONFIG_PPC_PSERIES */
DBG(" <- setup_kdump_trampoline()\n");
}
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 384cc75..22ac245 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -341,6 +341,7 @@ slb_miss_user_pseries:
b . /* prevent spec. execution */
#endif /* __DISABLED__ */
+#ifdef CONFIG_PPC_PSERIES
/*
* Vectors for the FWNMI option. Share common code.
*/
@@ -358,6 +359,8 @@ machine_check_fwnmi:
mtspr SPRN_SPRG1,r13 /* save r13 */
EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common)
+#endif /* CONFIG_PPC_PSERIES */
+
/*** Common interrupt handlers ***/
STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception)
@@ -1012,6 +1015,7 @@ _GLOBAL(do_stab_bolted)
initial_stab:
.space 4096
+#ifdef CONFIG_PPC_PSERIES
/*
* Data area reserved for FWNMI option.
* This address (0x7000) is fixed by the RPA.
@@ -1019,6 +1023,7 @@ initial_stab:
.= 0x7000
.globl fwnmi_data_area
fwnmi_data_area:
+#endif /* CONFIG_PPC_PSERIES */
/* iSeries does not use the FWNMI stuff, so it is safe to put
* this here, even if we later allow kernels that will boot on
@@ -1043,7 +1048,9 @@ xLparMap:
#endif /* CONFIG_PPC_ISERIES */
+#ifdef CONFIG_PPC_PSERIES
. = 0x8000
+#endif /* CONFIG_PPC_PSERIES */
/*
* On pSeries and most other platforms, secondary processors spin
--
1.5.3.1
^ permalink raw reply related
* RE: Ethernet adapter not found in Xilinx ppc, with linux 2.6.22
From: Ming Liu @ 2007-09-18 7:39 UTC (permalink / raw)
To: jqhu936, linuxppc-embedded
In-Reply-To: <12745876.post@talk.nabble.com>
Hi,
>
>After several days of struggling I'm now able to boot the linux 2.6.22 and
>run the busybox-1.7.1 root system. Yet I could not find the Ethernet
>adapter using Xilinx GMAC core. Pretty sure that I've chosen the 10/100
>Ethernet drivers. Should I use the Xilinx driver xemac, or other drivers,
>or any other way to apply a patch?
If you are using gigabit ethernet, you must have the corresponding driver
(gigabit or tri-state) instead of 10/100 one included.
BR
Ming
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
^ permalink raw reply
* Problem booting linux with device tree table
From: Mustafa Cayir @ 2007-09-18 7:53 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
Hi all,
I am trying to boot TQM5200 with linux 2.6 kernel. i am using latest version of linux and u-boot from denx. And compiled with ELDK4.1
i use dtc compiler with following command:
dtc -O dtb -o tqm5200.dtb -b 0 tqm5200.dts
Booting process gives following error and reset the board.
WARNING: could not create /chosen FDT_ERR_NOSPACE.
ERROR: /chosen node create failed - must RESET the board to recover.
Regards.
Using FEC ETHERNET device
TFTP from server 10.18.2.83; our IP address is 10.18.5.44
Filename 'uImage'.
Load address: 0x200000
Loading: #################################################################
####################################
done
Bytes transferred = 1473038 (167a0e hex)
Using FEC ETHERNET device
TFTP from server 10.18.2.83; our IP address is 10.18.5.44
Filename 'tqm5200.dtb'.
Load address: 0x400000
Loading: #
done
Bytes transferred = 3816 (ee8 hex)
## Booting image at 00200000 ...
Image Name: Linux-2.6.23-rc6-gf695e369
Created: 2007-09-19 1:31:43 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1472974 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0x400000
WARNING: could not create /chosen FDT_ERR_NOSPACE.
ERROR: /chosen node create failed - must RESET the board to recover.
[-- Attachment #2: Type: text/html, Size: 2231 bytes --]
^ permalink raw reply
* Re: Problem booting linux with device tree table
From: Bartlomiej Sieka @ 2007-09-18 8:06 UTC (permalink / raw)
To: Mustafa Cayir; +Cc: linuxppc-embedded
In-Reply-To: <7B9A8FF57DBB524190E98CABF6E56F070B9298@itri.bte.mam.gov.tr>
Mustafa Cayir wrote:
> Hi all,
>
> I am trying to boot TQM5200 with linux 2.6 kernel. i am using latest
> version of linux and u-boot from denx. And compiled with ELDK4.1
>
> i use dtc compiler with following command: dtc -O dtb -o tqm5200.dtb
> -b 0 tqm5200.dts
The following switches to dtc taken from
http://www.denx.de/wiki/UBoot/UBootFdtInfo work for me:
dtc -b 0 -V 17 -R 4 -S 0x3000 -I dts -O dtb -f tqm5200.dts > tqm5200.dtb
You might want to try them out, especially the "-S 0x3000".
Regards,
Bartlomiej
^ permalink raw reply
* RE: [PATCH] ucc_geth: fix compilation
From: Li Yang-r58472 @ 2007-09-18 8:56 UTC (permalink / raw)
To: Kumar Gala, Jeff Garzik; +Cc: linuxppc-dev, netdev
In-Reply-To: <C844988E-F6B9-44B9-AB78-C44E19A2E605@kernel.crashing.org>
> -----Original Message-----
> From: linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org=20
> [mailto:linuxppc-dev-bounces+leoli=3Dfreescale.com@ozlabs.org]=20
> On Behalf Of Kumar Gala
> Sent: Friday, September 14, 2007 10:08 PM
> To: Jeff Garzik
> Cc: linuxppc-dev@ozlabs.org list; netdev
> Subject: Re: [PATCH] ucc_geth: fix compilation
>=20
>=20
> On Sep 13, 2007, at 10:23 AM, Anton Vorontsov wrote:
>=20
> > Currently qe_bd_t is used in the macro call --=20
> dma_unmap_single, which=20
> > is a no-op on PPC32, thus error is hidden today. Starting=20
> with 2.6.24,=20
> > macro will be replaced by the empty static function, and=20
> erroneous use=20
> > of qe_bd_t will trigger compilation error.
> >
> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> > ---
>=20
> Jeff, I'm going to pick this up via the powerpc.git tree=20
> since its currently only broken in our for-2.6.24 branch=20
> (because of other changes in there). Any issues?
Kumar,
Kim Phillips has posted the same patch to netdev list before Anton.
Therefore, I do prefer to use his. Thanks
- Leo
^ permalink raw reply
* Jtag under Linux on MPC875
From: fabien @ 2007-09-18 9:04 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
I'm new in embedded system and i need some informations ...
Which tool could i use to connect my board througt the JTAG connector ?
My board is a custom board with a MPC875, and flash is S29GL032M. The probe
that can i use is
a PowerPC BDM windriver Probe 2.
I'm looking for a tool running on linux.
Best regards
Fab
[-- Attachment #2: Type: text/html, Size: 352 bytes --]
^ permalink raw reply
* Re: 2.6.23-rc6-mm1
From: Andy Whitcroft @ 2007-09-18 9:34 UTC (permalink / raw)
To: Kamalesh Babulal; +Cc: linuxppc-dev, Andrew Morton, linux-kernel
In-Reply-To: <46EF96CC.1080807@linux.vnet.ibm.com>
On Tue, Sep 18, 2007 at 02:43:48PM +0530, Kamalesh Babulal wrote:
> Andrew Morton wrote:
> >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc6/2.6.23-rc6-mm1/
> >
> >2.6.23-rc6-mm1 is a 29MB diff against 2.6.23-rc6.
> >
> >
> <snip>
>
> Hi Andrew,
>
> The 2.6.23-rc6-mm1build fails at
>
> CC drivers/pci/hotplug/rpadlpar_core.o
> CC drivers/pci/hotplug/rpadlpar_sysfs.o
> drivers/pci/hotplug/rpadlpar_sysfs.c:132: error: unknown field `name'
> specified in initializer
> drivers/pci/hotplug/rpadlpar_sysfs.c: In function `dlpar_sysfs_init':
> drivers/pci/hotplug/rpadlpar_sysfs.c:142: error: structure has no member
> named `name'
> make[3]: *** [drivers/pci/hotplug/rpadlpar_sysfs.o] Error 1
> make[2]: *** [drivers/pci/hotplug] Error 2
> make[1]: *** [drivers/pci] Error 2
> make: *** [drivers] Error 2
This seems to be occuring across a number of the powerpc systems we test
with. That driver is a power dynamic lpar IO partitioning driver.
Relevant Cc: added.
-apw
^ permalink raw reply
* Re: 2.6.23-rc6-mm1
From: Benjamin Herrenschmidt @ 2007-09-18 10:02 UTC (permalink / raw)
To: Andy Whitcroft
Cc: linuxppc-dev, Andrew Morton, linux-kernel, Kamalesh Babulal
In-Reply-To: <20070918093444.GB973@shadowen.org>
On Tue, 2007-09-18 at 10:34 +0100, Andy Whitcroft wrote:
> On Tue, Sep 18, 2007 at 02:43:48PM +0530, Kamalesh Babulal wrote:
> > Andrew Morton wrote:
> > >ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc6/2.6.23-rc6-mm1/
> > >
> > >2.6.23-rc6-mm1 is a 29MB diff against 2.6.23-rc6.
> > >
> > >
> > <snip>
> >
> > Hi Andrew,
> >
> > The 2.6.23-rc6-mm1build fails at
> >
> > CC drivers/pci/hotplug/rpadlpar_core.o
> > CC drivers/pci/hotplug/rpadlpar_sysfs.o
> > drivers/pci/hotplug/rpadlpar_sysfs.c:132: error: unknown field `name'
> > specified in initializer
> > drivers/pci/hotplug/rpadlpar_sysfs.c: In function `dlpar_sysfs_init':
> > drivers/pci/hotplug/rpadlpar_sysfs.c:142: error: structure has no member
> > named `name'
> > make[3]: *** [drivers/pci/hotplug/rpadlpar_sysfs.o] Error 1
> > make[2]: *** [drivers/pci/hotplug] Error 2
> > make[1]: *** [drivers/pci] Error 2
> > make: *** [drivers] Error 2
>
> This seems to be occuring across a number of the powerpc systems we test
> with. That driver is a power dynamic lpar IO partitioning driver.
>
> Relevant Cc: added.
That's because somebody is breaking sysfs/kobject interfaces without
fixing all users :-) (Fair enough... it's just that we need to make sure
whoever takes care of that driver nowadays is aware of the breakage).
Ben.
^ permalink raw reply
* PSC in UART mode on TQM5200S
From: Leopold Stotch @ 2007-09-18 10:13 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
Hello, everyone !
I have TQM5200S module and development board.
It runs factory UBoot and latest DENX's linuxppc_2_4_devel kernel.
I want to configure all TQM5200S's onboard PSC's as UART's.
TQM5200S's onboard PSC's are connected to custom board
that makes all electrical things as my hardware engineer says...
So changed $HOME/linuxppc_2_4_devel/arch/ppc/platforms/tqm5200.h
the following way:
#ifdef CONFIG_PS2MULT
#define RS_TABLE_SIZE 4
#else
#if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
#define RS_TABLE_SIZE 2
#elif defined(CONFIG_CAM5200)
#define RS_TABLE_SIZE 6
#else
#define RS_TABLE_SIZE 3
#endif
#endif
changed to
#ifdef CONFIG_PS2MULT
#define RS_TABLE_SIZE 4
#else
#if defined(CONFIG_SPI_EVAL) || defined(CONFIG_TB5200)
#define RS_TABLE_SIZE 2
#elif defined(CONFIG_CAM5200)
#define RS_TABLE_SIZE 6
#else
#define RS_TABLE_SIZE 6
#endif
#endif
and
#else /* default */
#define SERIAL_PORT_DFNS \
STD_PSC_OP(1) \
STD_PSC_OP(2) \
STD_PSC_OP(3)
#endif
changed to
#else /* default */
#define SERIAL_PORT_DFNS \
STD_PSC_OP(1) \
STD_PSC_OP(2) \
STD_PSC_OP(3) \
STD_PSC_OP(4) \
STD_PSC_OP(5) \
STD_PSC_OP(6)
#endif
After rebuilding the kernel, dmesg says:
...
ttyS0 on PSC1
ttyS1 on PSC2
ttyS2 on PSC3
ttyS3 on PSC4
ttyS4 on PSC5
ttyS5 on PSC6
...
But when i do "echo 1 > /dev/ttyS4" i receive nothing at the other end.
The questions are:
Is it possible to reconfigure all PSC's as UART's ?
Should i change something in UBoot or everything i did was wrong ?
P.S. Sorry for my poor english and newbie questions :-)
--
Best regards,
Leopold Stotch
[-- Attachment #2: Type: text/html, Size: 2381 bytes --]
^ permalink raw reply
* Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances
From: Valentine Barshak @ 2007-09-18 12:03 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev
In-Reply-To: <20070911224952.9838.46644.stgit@localhost.localdomain>
Vitaly Bordug wrote:
> +
> + hose->io_base_phys = cpu_phys_addr - pci_addr;
This is not gonna work on 32-bit platform (unless pci_addr == 0).
Should be
hose->io_base_phys = cpu_phys_addr;
The other way we should adjust io size like we do on 64-bit and rewrite
resource fixup functions.
> + /* handle from 0 to top of I/O window */
> +#ifdef CONFIG_PPC64
> + hose->pci_io_size = pci_addr + size;
> +#endif
> + hose->io_base_virt = ioremap(hose->io_base_phys, size);
Do we need to ioremap on 64-bit? I think 64-bit uses different approach
in handling io space.
> +#ifdef CONFIG_PPC32
> + if (prim)
> + isa_io_base = (unsigned long)hose->io_base_virt;
> +#endif
What's exactly the point of merging this single function?
If this was intended to add 64-bit physical address support to 32-bit
platforms (like ppc440), then it does not seem sufficient to make pci
stuff work right.
What about the 32-bit pcibios_fixup_resources(),
pcibios_resource_to_bus(), pcibios_bus_to_resource() stuff?
There's still no 64-bit support. You'll get
"PCI Cannot allocate resource region" attempting to initialize resources
at PCI start-up.
Thanks,
Valentine.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox