summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/ram_console.c
Commit message (Collapse)AuthorAgeFilesLines
* staging/android: Remove ram_console driverAnton Vorontsov2012-06-131-181/+0
| | | | | | | | | All the functionality is now supported by pstore and pstore_ram drivers. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Colin Cross <ccross@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: Android: Fix some checkpatch warningsSachin Kamat2012-06-121-1/+3
| | | | | | | | Warnings reported by checkpatch.pl have been fixed. Cc: Brian Swetland <swetland@google.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: persistent_ram: Move to fs/pstore/ram_core.cAnton Vorontsov2012-05-171-1/+1
| | | | | | | | | | | | | | | This is a first step for adding ECC support for pstore RAM backend: we will use the persistent_ram routines, kindly provided by Google. Basically, persistent_ram is a set of helper routines to deal with the [optionally] ECC-protected persistent ram regions. A bit of Makefile, Kconfig and header files adjustments were needed because of the move. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: android: ram_console.c:Greg Kroah-Hartman2012-03-151-0/+4
| | | | | | | | Fix build error when CONFIG_PRINTK is not selected. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ram_console: Fix section mismatchesStephen Boyd2012-03-091-5/+2
| | | | | | | | | | | | | | | | | | | | | WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference from the function ram_console_driver_probe() to the function .init.text:persistent_ram_init_ringbuffer() The function ram_console_driver_probe() references the function __init persistent_ram_init_ringbuffer(). This is often because ram_console_driver_probe lacks a __init annotation or the annotation of persistent_ram_init_ringbuffer is wrong. Move this driver to platform_driver_probe() because ram console devices aren't going to be added and removed at runtime. Also shorten the probe function name since driver is redundant and makes the function name long. Cc: Android Kernel Team <kernel-team@android.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: honor dmesg_restrictNick Kralevich2012-03-081-0/+3
| | | | | | | | | | | | | | | | | The Linux kernel has a setting called dmesg_restrict. When true, only processes with CAP_SYSLOG can view the kernel dmesg logs. This helps prevent leaking of kernel information into user space. On Android, it's possible to bypass these restrictions by viewing /proc/last_kmsg. This change makes /proc/last_kmsg require the same permissions as dmesg. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: fix crash in ram_console_late_initColin Cross2012-03-081-0/+3
| | | | | | | | | | | If the persistent ram buffer is not available, ram_console_late_init would crash when dereferencing ram_console_zone. Return early if ram console was not initialized. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: persistent_ram: handle reserving and mapping memoryColin Cross2012-03-081-32/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Replace the ioremapped memory passed in from the drivers with a memblock_reserve and vmap. Adds a new function, persistent_ram_early_init, designed to be called from the machine init_early callback, that calls memblock_remove and saves the provided persistent ram area layout. Drivers only pass in their struct device * and ecc settings. Locating and mapping the memory is now handled entirely within persistent_ram. Also, convert ram_console to the new persistent_ram_init parameters that only take a struct device * and ecc settings. [jstultz: Fix pr_info casting issues on 64bit, folded two patches as the build breaks if they are apart. Also replaced phys_to_page() w/ pfn_to_page(addr>>PAGE_SHIFT), as phys_to_page is only on a few arches.] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: persistent_ram: refactor ecc supportColin Cross2012-03-081-1/+1
| | | | | | | | | | | | | | Remove CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION and related #ifdefs. Also allow persistent ram zones without ecc enabled. For some use cases, like the data portion of the upcoming persistent_vars patches, or a persistent ftrace ringbuffer, ecc on every update is too expensive. CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: split out persistent ramColin Cross2012-03-081-273/+36
| | | | | | | | | | | | | | | | | | | | | Split ram_console into two halves. persistent_ram is a set of apis that handle a block of memory that does not get erased across a reboot. It provides functions to fill it as a single buffer or a ring buffer, and to extract the old data after a reboot. It handles ecc on the data to correct bit errors introduced during reboot. ram_console is now a small wrapper around persistent_ram that feeds console data into the ringbuffer, and exports the old data to /proc/last_kmsg after a reboot. [jstultz: Moved persistent_ram.h to staging dir] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: drop verbose ram_console supportColin Cross2012-03-071-3/+0
| | | | | | | | | Equivalent functionality can be obtained with loglevel=15 CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: drop early buffer supportColin Cross2012-03-071-29/+0
| | | | | | | | | | | | Early ramconsole is not very useful, an early crash will prevent getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y will get the same information. Drop it to simplify a future refactoring. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: move footer stringsColin Cross2012-03-071-47/+68
| | | | | | | | | | | Don't store the bootinfo string and the ecc status string with the recovered old log data. This will simplify refactoring the persistent ram code out of the ram console code later. CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: set CON_ANYTIME console flagDima Zavin2012-03-071-1/+1
| | | | | | | | | | | We want to ensure that we get all the console messages, even ones that occur while the printing CPU is not yet online. [jstultz: tweaked commit subject line] CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Dima Zavin <dima@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: android: ram_console: Use resource_size functionThomas Meyer2012-02-081-1/+1
| | | | | | | | | | | The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console use kmemdup instead of kmallocGreg Dietsche2012-02-081-3/+2
| | | | | | | Replace kmalloc + memcpy will kmemdup in ram_console_late_init Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: ram_console: pass in a boot info stringColin Cross2011-11-301-10/+35
| | | | | | | | | | Allow the board file to pass a boot info string through the platform data that is appended to the /proc/last_kmsg file. [moved the .h file to drivers/staging/android/ to be self-contained - gregkh] Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: ram_console: Start ram console earlierArve Hjønnevåg2011-11-301-1/+1
| | | | | Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: android: ramconsole: Ensure ramconsole does not get cluttered by ↵San Mehat2011-11-301-0/+8
| | | | | | | | | | | | apanic threads [Note, this is part of a patch from Sam, just the drivers/staging/ portion, that adds a function that the apanic code calls, but the apanic code isn't here, so just include part of this to make merges and diffs easier and this keeps things self-contained - gregkh] Signed-off-by: San Mehat <san@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert "Staging: android: delete android drivers"Greg Kroah-Hartman2011-11-301-0/+410
| | | | | | | | | | | | | | This reverts commit b0a0ccfad85b3657fe999805df65f5cfe634ab8a. Turns out I was wrong, we want these in the tree. Note, I've disabled the drivers from the build at the moment, so other patches can be applied to fix some build issues due to internal api changes since the code was removed from the tree. Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: delete android driversGreg Kroah-Hartman2009-12-111-410/+0
| | | | | | | | | | | | These drivers are no longer being developed and the original authors seem to have abandonded them and hence, do not want them in the mainline kernel tree. So sad :( Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: ram_console: fix up remaining checkpatch warningsGreg Kroah-Hartman2009-06-191-4/+5
| | | | | | | | | | | | This cleans up the last of the checkpatch warnings in the android ram_console driver. Cc: San Mehat <san@android.com> Cc: Arve Hjønnevåg <arve@android.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Android: fix more printk formatsRandy Dunlap2009-04-031-2/+2
| | | | | | | | | | | Fix more android ram_console printk format warnings: drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' drivers/staging/android/ram_console.c:238: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: ram_console: fix printk format warningRandy Dunlap2009-04-031-2/+2
| | | | | | | | | | | | | Fix android printk format warnings: linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:228: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'size_t' linux-next-20090209/drivers/staging/android/ram_console.c:326: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: ram_console: Disable ECC when early init is enabled and ↵Arve Hjønnevåg2009-02-091-0/+14
| | | | | | | | validate buffer size Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: android: add ram_console driverArve Hjønnevåg2009-01-061-0/+395
Doesn't quite link properly under all configurations, and it has way too many different build options, but it's a start. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Brian Swetland <swetland@google.com> Cc: Robert Love <rlove@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud