diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-03 10:06:37 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-03 10:06:37 -0400 |
| commit | 00fdffb5131125dce0702bf61e24a806ec3aed80 (patch) | |
| tree | 1cf855601ce34630b487f8555cf7df2e96efb506 /include | |
| parent | ce857229e0c3adc211944a13a5579ef84fd7b4af (diff) | |
| parent | bd08ec33b5c23833581e5a36b2a69ccae6b39a28 (diff) | |
Merge tag 'for-v3.10' of git://git.infradead.org/users/cbou/linux-pstore
Pull pstore update from Anton Vorontsov:
- A new platform data parameter to specify ECC configuration;
- Rounding fixup to not waste memory in ecc_blocks;
- Restore ECC information printouts;
- A small code cleanup: use kmemdup where appropriate.
* tag 'for-v3.10' of git://git.infradead.org/users/cbou/linux-pstore:
pstore/ram: Restore ecc information block
pstore/ram: Allow specifying ecc parameters in platform data
pstore/ram: Include ecc_size when calculating ecc_block
pstore: Replace calls to kmalloc and memcpy with kmemdup
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/pstore_ram.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/pstore_ram.h b/include/linux/pstore_ram.h index cb6ab5feab67..9974975d40db 100644 --- a/include/linux/pstore_ram.h +++ b/include/linux/pstore_ram.h | |||
| @@ -26,6 +26,13 @@ | |||
| 26 | struct persistent_ram_buffer; | 26 | struct persistent_ram_buffer; |
| 27 | struct rs_control; | 27 | struct rs_control; |
| 28 | 28 | ||
| 29 | struct persistent_ram_ecc_info { | ||
| 30 | int block_size; | ||
| 31 | int ecc_size; | ||
| 32 | int symsize; | ||
| 33 | int poly; | ||
| 34 | }; | ||
| 35 | |||
| 29 | struct persistent_ram_zone { | 36 | struct persistent_ram_zone { |
| 30 | phys_addr_t paddr; | 37 | phys_addr_t paddr; |
| 31 | size_t size; | 38 | size_t size; |
| @@ -39,15 +46,14 @@ struct persistent_ram_zone { | |||
| 39 | struct rs_control *rs_decoder; | 46 | struct rs_control *rs_decoder; |
| 40 | int corrected_bytes; | 47 | int corrected_bytes; |
| 41 | int bad_blocks; | 48 | int bad_blocks; |
| 42 | int ecc_block_size; | 49 | struct persistent_ram_ecc_info ecc_info; |
| 43 | int ecc_size; | ||
| 44 | 50 | ||
| 45 | char *old_log; | 51 | char *old_log; |
| 46 | size_t old_log_size; | 52 | size_t old_log_size; |
| 47 | }; | 53 | }; |
| 48 | 54 | ||
| 49 | struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, | 55 | struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, |
| 50 | u32 sig, int ecc_size); | 56 | u32 sig, struct persistent_ram_ecc_info *ecc_info); |
| 51 | void persistent_ram_free(struct persistent_ram_zone *prz); | 57 | void persistent_ram_free(struct persistent_ram_zone *prz); |
| 52 | void persistent_ram_zap(struct persistent_ram_zone *prz); | 58 | void persistent_ram_zap(struct persistent_ram_zone *prz); |
| 53 | 59 | ||
| @@ -74,7 +80,7 @@ struct ramoops_platform_data { | |||
| 74 | unsigned long console_size; | 80 | unsigned long console_size; |
| 75 | unsigned long ftrace_size; | 81 | unsigned long ftrace_size; |
| 76 | int dump_oops; | 82 | int dump_oops; |
| 77 | int ecc_size; | 83 | struct persistent_ram_ecc_info ecc_info; |
| 78 | }; | 84 | }; |
| 79 | 85 | ||
| 80 | #endif | 86 | #endif |
