04 Mar, 2011
1 commit
-
Adapt the functions used to create and write to the RTAS-log partition
to work with any OS-type partition.Signed-off-by: Jim Keniston
Signed-off-by: Benjamin Herrenschmidt
30 Nov, 2010
12 commits
-
The name field in the nvram_header can be < 12 chars, null-terminated,
or 12 chars without the null. Handle this safely.Signed-off-by: Jim Keniston
Signed-off-by: Benjamin Herrenschmidt -
Simplify creation and use of the NVRAM partition list.
Signed-off-by: Jim Keniston
Signed-off-by: Benjamin Herrenschmidt -
The nvram log partition stuff currently in nvram_64.c is really
pseries specific. It isn't actually used on anything else (despite
the fact that we ran the code to setup the partition on anything
except powermac) and the log format is specific to pseries RTAS
implementation. So move it where it belongsSigned-off-by: Benjamin Herrenschmidt
-
This changes the function to use nvram_find_partition() instead
of doing the lookup "by hand". It also makes some of the logic
clearer and prints out more useful diagnostic information.Signed-off-by: Benjamin Herrenschmidt
-
Signed-off-by: Benjamin Herrenschmidt
-
Existing code is nasty, has bugs etc... rewrite the function
more simply, and make it take the signature and optional
name of the partitions to remove as arguments, thus making
it a more generic utility.We also try to remove a log partition that we find and is too
small rather than creating a duplicate.Signed-off-by: Benjamin Herrenschmidt
-
This error log stuff is really pseries specific. As a first step we move
the initialization of these variables to the caller of
nvram_create_partition(), which is also slightly reorganized so we
setup the free partition before we clear the new partition, so the
chance of an error during clear leaving us with invalid headers
is lessened.Signed-off-by: Benjamin Herrenschmidt
-
When creating a partition, we clear it entirely rather than
just the first two words since the previous code was rather
specific to the pseries log partition format.Signed-off-by: Benjamin Herrenschmidt
-
Use BUILD_BUG_ON to ensure the structure representing a partition
header have the right size.Signed-off-by: Benjamin Herrenschmidt
-
This converts nvram_create_partition() to use a size in bytes
rather than blocks. It does the appropriate alignment internallyThe size passed is also the data size (ie. doesn't include the
header anymore).Signed-off-by: Benjamin Herrenschmidt
-
Replace nvram_create_os_partition() with a variant that takes
the partition name, signature and size as arguments.Signed-off-by: Benjamin Herrenschmidt
-
This moves a bunch of definitions out of asm/nvram.h to the files
that use them or just outright remove completely unused stuff.We leave the partition signatures definitions, they will be useful
Signed-off-by: Benjamin Herrenschmidt
09 Feb, 2010
1 commit
-
String constants that are continued on subsequent lines with \
are not good.Signed-off-by: Joe Perches
Signed-off-by: Benjamin Herrenschmidt
24 Nov, 2009
1 commit
-
The ioctl is only used for powermac systems and reads a partition
number from an array which is initialized at boot time way before the
nvram code is initialized. So it's safe to switch to unlocked_ioctl.Signed-off-by: Thomas Gleixner
Cc: Benjamin Herrenschmidt
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt
30 Oct, 2009
3 commits
-
Mark all functions which are only called from nvram_init() __init.
Signed-off-by: Thomas Gleixner
Cc: Benjamin Herrenschmidt
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt -
nvram_clear_error_log() calls ppc_md.nvram_write() even when
nvram_error_log_index is -1 (invalid). The nvram_write() function does
not check for a negative offset.Check nvram_error_log_index as the other nvram log functions do.
Signed-off-by: Thomas Gleixner
Cc: Benjamin Herrenschmidt
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt -
nvram_find_partition() has no user. The call site was removed in the
arch/powerpc move, but the function stayed. Remove it.Signed-off-by: Thomas Gleixner
Cc: Benjamin Herrenschmidt
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt
17 Aug, 2007
3 commits
-
Eliminate the use of error_log_cnt as a global var shared across
different directories. Pass it as a parameter instead.Signed-off-by: Linas Vepstas
----
Respin of earlier patch, with the CONFIG_PSERIES junk removed from the
header file.arch/powerpc/kernel/nvram_64.c | 10 +++++-----
arch/powerpc/platforms/pseries/rtasd.c | 7 ++++---
include/asm-powerpc/nvram.h | 6 ++++--
3 files changed, 13 insertions(+), 10 deletions(-)
Signed-off-by: Paul Mackerras -
Get rid of the jumbled usage of the no_logging flag. Its use
spans several directories, and is incorrectly/misleadingly
documented. Instead, two changes:
1) nvram will accept error log as soon as its ready.
2) logging to nvram stops on the first fatal error reported.Signed-off-by: Linas Vepstas
----
arch/powerpc/kernel/nvram_64.c | 8 --------
arch/powerpc/platforms/pseries/rtasd.c | 14 ++++++--------
2 files changed, 6 insertions(+), 16 deletions(-)
Signed-off-by: Paul Mackerras -
Forward declarations serve no purpose in this file.
Signed-off-by: Linas Vepstas
----
arch/powerpc/kernel/nvram_64.c | 5 -----
1 file changed, 5 deletions(-)
Signed-off-by: Paul Mackerras
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.[akpm@osdl.org: sparc64 fix]
Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Dec, 2006
1 commit
-
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
doneAnd then go through and reinstate those cases where code is casting pointers
to non-pointers.And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King , Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Roman Zippel
Cc: Geert Uytterhoeven
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Kyle McMartin
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Greg KH
Cc: Jens Axboe
Cc: Paul Fulghum
Cc: Alan Cox
Cc: Karsten Keil
Cc: Mauro Carvalho Chehab
Cc: Jeff Garzik
Cc: James Bottomley
Cc: Ian Kent
Cc: Steven French
Cc: David Woodhouse
Cc: Neil Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Apr, 2006
1 commit
-
This is a cosmetic fixup. When printing the nvram partition table, the
first couple entries have a shorter 'index' value than the others, so
table is a bit askew. This change makes the table look pretty.
Tested on pseries and g5. Footnote: yes, this table is normally hidden
behind a DEBUG_NVRAM #define.Signed-off-by: Will Schmidt
Signed-off-by: Paul Mackerras
28 Mar, 2006
1 commit
-
This removes statically assigned platform numbers and reworks the
powerpc platform probe code to use a better mechanism. With this,
board support files can simply declare a new machine type with a
macro, and implement a probe() function that uses the flattened
device-tree to detect if they apply for a given machine.We now have a machine_is() macro that replaces the comparisons of
_machine with the various PLATFORM_* constants. This commit also
changes various drivers to use the new macro instead of looking at
_machine.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
27 Mar, 2006
1 commit
-
Signed-off-by: Stephen Rothwell
Signed-off-by: Paul Mackerras
09 Jan, 2006
1 commit
-
/dev/nvram uses the user-provided read/write size
for kmalloc, which fails, if a large number is passed.
This will always use a single page at most, which
can be expected to succeed.Signed-off-by: Arnd Bergmann
Signed-off-by: Paul Mackerras
18 Nov, 2005
1 commit
-
This also deletes the now-unused Makefiles under arch/ppc64.
Both of the files moved over could use some merging, but for now I
have moved them as-is and arranged for them to be used only in 64-bit
kernels. For 32-bit kernels we still use arch/ppc/kernel/idle.c and
drivers/char/generic_nvram.c as before.Signed-off-by: Paul Mackerras