diff options
Diffstat (limited to 'include')
97 files changed, 728 insertions, 278 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h index d5ec6c87810f..6b040f4ddfab 100644 --- a/include/acpi/acbuffer.h +++ b/include/acpi/acbuffer.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 5a0a3e5daf85..03aacfb3e98b 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 8b06e4c1dd5d..11c3a011dcbf 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 7461327e14e4..273de709495c 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 1baae6edda89..9318a87ee39a 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index a08e55a263c9..b0bb30ebb807 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 03b3e6d405ff..0bc78df66d4b 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| 10 | * Copyright (C) 2000 - 2014, Intel Corp. | 10 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 11 | * All rights reserved. | 11 | * All rights reserved. |
| 12 | * | 12 | * |
| 13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 5ba78464c1b1..d56f5d722138 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 48 | 48 | ||
| 49 | #define ACPI_CA_VERSION 0x20141107 | 49 | #define ACPI_CA_VERSION 0x20150204 |
| 50 | 50 | ||
| 51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
| 52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
| @@ -569,6 +569,14 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
| 569 | address, | 569 | address, |
| 570 | void *context)) | 570 | void *context)) |
| 571 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 571 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 572 | acpi_install_gpe_raw_handler(acpi_handle | ||
| 573 | gpe_device, | ||
| 574 | u32 gpe_number, | ||
| 575 | u32 type, | ||
| 576 | acpi_gpe_handler | ||
| 577 | address, | ||
| 578 | void *context)) | ||
| 579 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 572 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 580 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 573 | u32 gpe_number, | 581 | u32 gpe_number, |
| 574 | acpi_gpe_handler | 582 | acpi_gpe_handler |
| @@ -891,12 +899,6 @@ ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) | |||
| 891 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); | 899 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); |
| 892 | 900 | ||
| 893 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | 901 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 894 | acpi_get_id(acpi_handle object, | ||
| 895 | acpi_owner_id * out_type)) | ||
| 896 | |||
| 897 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id)) | ||
| 898 | |||
| 899 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | ||
| 900 | acpi_get_table_with_size(acpi_string signature, | 902 | acpi_get_table_with_size(acpi_string signature, |
| 901 | u32 instance, | 903 | u32 instance, |
| 902 | struct acpi_table_header | 904 | struct acpi_table_header |
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index eb760ca0b2e0..ebe242638591 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -305,43 +305,51 @@ struct acpi_resource_source { | |||
| 305 | u8 max_address_fixed; \ | 305 | u8 max_address_fixed; \ |
| 306 | union acpi_resource_attribute info; | 306 | union acpi_resource_attribute info; |
| 307 | 307 | ||
| 308 | struct acpi_resource_address { | 308 | struct acpi_address16_attribute { |
| 309 | ACPI_RESOURCE_ADDRESS_COMMON}; | 309 | u16 granularity; |
| 310 | |||
| 311 | struct acpi_resource_address16 { | ||
| 312 | ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; | ||
| 313 | u16 minimum; | 310 | u16 minimum; |
| 314 | u16 maximum; | 311 | u16 maximum; |
| 315 | u16 translation_offset; | 312 | u16 translation_offset; |
| 316 | u16 address_length; | 313 | u16 address_length; |
| 317 | struct acpi_resource_source resource_source; | ||
| 318 | }; | 314 | }; |
| 319 | 315 | ||
| 320 | struct acpi_resource_address32 { | 316 | struct acpi_address32_attribute { |
| 321 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 317 | u32 granularity; |
| 322 | u32 minimum; | 318 | u32 minimum; |
| 323 | u32 maximum; | 319 | u32 maximum; |
| 324 | u32 translation_offset; | 320 | u32 translation_offset; |
| 325 | u32 address_length; | 321 | u32 address_length; |
| 326 | struct acpi_resource_source resource_source; | ||
| 327 | }; | 322 | }; |
| 328 | 323 | ||
| 329 | struct acpi_resource_address64 { | 324 | struct acpi_address64_attribute { |
| 330 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; | 325 | u64 granularity; |
| 331 | u64 minimum; | 326 | u64 minimum; |
| 332 | u64 maximum; | 327 | u64 maximum; |
| 333 | u64 translation_offset; | 328 | u64 translation_offset; |
| 334 | u64 address_length; | 329 | u64 address_length; |
| 330 | }; | ||
| 331 | |||
| 332 | struct acpi_resource_address { | ||
| 333 | ACPI_RESOURCE_ADDRESS_COMMON}; | ||
| 334 | |||
| 335 | struct acpi_resource_address16 { | ||
| 336 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address; | ||
| 337 | struct acpi_resource_source resource_source; | ||
| 338 | }; | ||
| 339 | |||
| 340 | struct acpi_resource_address32 { | ||
| 341 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address; | ||
| 342 | struct acpi_resource_source resource_source; | ||
| 343 | }; | ||
| 344 | |||
| 345 | struct acpi_resource_address64 { | ||
| 346 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address; | ||
| 335 | struct acpi_resource_source resource_source; | 347 | struct acpi_resource_source resource_source; |
| 336 | }; | 348 | }; |
| 337 | 349 | ||
| 338 | struct acpi_resource_extended_address64 { | 350 | struct acpi_resource_extended_address64 { |
| 339 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID; | 351 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID; |
| 340 | u64 granularity; | 352 | struct acpi_address64_attribute address; |
| 341 | u64 minimum; | ||
| 342 | u64 maximum; | ||
| 343 | u64 translation_offset; | ||
| 344 | u64 address_length; | ||
| 345 | u64 type_specific; | 353 | u64 type_specific; |
| 346 | }; | 354 | }; |
| 347 | 355 | ||
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index bee19d8170c5..d4081fef1095 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 29e79370641d..b80b0e6dabc5 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index ecff62405f17..f06d75e5fa54 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 5480cb2236bf..440ca8104b43 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index bbef17368e49..b034f1068dfe 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -744,7 +744,7 @@ typedef u32 acpi_event_status; | |||
| 744 | /* | 744 | /* |
| 745 | * GPE info flags - Per GPE | 745 | * GPE info flags - Per GPE |
| 746 | * +-------+-+-+---+ | 746 | * +-------+-+-+---+ |
| 747 | * | 7:4 |3|2|1:0| | 747 | * | 7:5 |4|3|2:0| |
| 748 | * +-------+-+-+---+ | 748 | * +-------+-+-+---+ |
| 749 | * | | | | | 749 | * | | | | |
| 750 | * | | | +-- Type of dispatch:to method, handler, notify, or none | 750 | * | | | +-- Type of dispatch:to method, handler, notify, or none |
| @@ -756,13 +756,15 @@ typedef u32 acpi_event_status; | |||
| 756 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 | 756 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 |
| 757 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 | 757 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 |
| 758 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 | 758 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 |
| 759 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x03 | 759 | #define ACPI_GPE_DISPATCH_RAW_HANDLER (u8) 0x04 |
| 760 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x07 | ||
| 761 | #define ACPI_GPE_DISPATCH_TYPE(flags) ((u8) ((flags) & ACPI_GPE_DISPATCH_MASK)) | ||
| 760 | 762 | ||
| 761 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x04 | 763 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x08 |
| 762 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | 764 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 |
| 763 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x04 | 765 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x08 |
| 764 | 766 | ||
| 765 | #define ACPI_GPE_CAN_WAKE (u8) 0x08 | 767 | #define ACPI_GPE_CAN_WAKE (u8) 0x10 |
| 766 | 768 | ||
| 767 | /* | 769 | /* |
| 768 | * Flags for GPE and Lock interfaces | 770 | * Flags for GPE and Lock interfaces |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 5f8cc1fa3278..ad74dc51d5b7 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h index 2b612384c994..71e5ec5b07a3 100644 --- a/include/acpi/platform/acenvex.h +++ b/include/acpi/platform/acenvex.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 384875da3713..f54de0a63558 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 1ba7c190c2cc..74ba46c8157a 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index 568d4b886712..acedc3f026de 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d459cd17b477..24c7aa8b1d20 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
| 29 | #include <linux/ioport.h> /* for struct resource */ | 29 | #include <linux/ioport.h> /* for struct resource */ |
| 30 | #include <linux/resource_ext.h> | ||
| 30 | #include <linux/device.h> | 31 | #include <linux/device.h> |
| 31 | #include <linux/property.h> | 32 | #include <linux/property.h> |
| 32 | 33 | ||
| @@ -151,6 +152,10 @@ int acpi_map_cpu(acpi_handle handle, int physid, int *pcpu); | |||
| 151 | int acpi_unmap_cpu(int cpu); | 152 | int acpi_unmap_cpu(int cpu); |
| 152 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 153 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 153 | 154 | ||
| 155 | #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC | ||
| 156 | int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr); | ||
| 157 | #endif | ||
| 158 | |||
| 154 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | 159 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); |
| 155 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 160 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
| 156 | int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base); | 161 | int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base); |
| @@ -288,22 +293,25 @@ extern int pnpacpi_disabled; | |||
| 288 | bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res); | 293 | bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res); |
| 289 | bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res); | 294 | bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res); |
| 290 | bool acpi_dev_resource_address_space(struct acpi_resource *ares, | 295 | bool acpi_dev_resource_address_space(struct acpi_resource *ares, |
| 291 | struct resource *res); | 296 | struct resource_win *win); |
| 292 | bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares, | 297 | bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares, |
| 293 | struct resource *res); | 298 | struct resource_win *win); |
| 294 | unsigned long acpi_dev_irq_flags(u8 triggering, u8 polarity, u8 shareable); | 299 | unsigned long acpi_dev_irq_flags(u8 triggering, u8 polarity, u8 shareable); |
| 295 | bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, | 300 | bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, |
| 296 | struct resource *res); | 301 | struct resource *res); |
| 297 | 302 | ||
| 298 | struct resource_list_entry { | ||
| 299 | struct list_head node; | ||
| 300 | struct resource res; | ||
| 301 | }; | ||
| 302 | |||
| 303 | void acpi_dev_free_resource_list(struct list_head *list); | 303 | void acpi_dev_free_resource_list(struct list_head *list); |
| 304 | int acpi_dev_get_resources(struct acpi_device *adev, struct list_head *list, | 304 | int acpi_dev_get_resources(struct acpi_device *adev, struct list_head *list, |
| 305 | int (*preproc)(struct acpi_resource *, void *), | 305 | int (*preproc)(struct acpi_resource *, void *), |
| 306 | void *preproc_data); | 306 | void *preproc_data); |
| 307 | int acpi_dev_filter_resource_type(struct acpi_resource *ares, | ||
| 308 | unsigned long types); | ||
| 309 | |||
| 310 | static inline int acpi_dev_filter_resource_type_cb(struct acpi_resource *ares, | ||
| 311 | void *arg) | ||
| 312 | { | ||
| 313 | return acpi_dev_filter_resource_type(ares, (unsigned long)arg); | ||
| 314 | } | ||
| 307 | 315 | ||
| 308 | int acpi_check_resource_conflict(const struct resource *res); | 316 | int acpi_check_resource_conflict(const struct resource *res); |
| 309 | 317 | ||
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h index 642d6ae4030c..a270f25ee7c7 100644 --- a/include/linux/ahci_platform.h +++ b/include/linux/ahci_platform.h | |||
| @@ -21,16 +21,20 @@ struct device; | |||
| 21 | struct ata_port_info; | 21 | struct ata_port_info; |
| 22 | struct ahci_host_priv; | 22 | struct ahci_host_priv; |
| 23 | struct platform_device; | 23 | struct platform_device; |
| 24 | struct scsi_host_template; | ||
| 24 | 25 | ||
| 25 | int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); | 26 | int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); |
| 26 | void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); | 27 | void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); |
| 28 | int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv); | ||
| 29 | void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv); | ||
| 27 | int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); | 30 | int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); |
| 28 | void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); | 31 | void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); |
| 29 | struct ahci_host_priv *ahci_platform_get_resources( | 32 | struct ahci_host_priv *ahci_platform_get_resources( |
| 30 | struct platform_device *pdev); | 33 | struct platform_device *pdev); |
| 31 | int ahci_platform_init_host(struct platform_device *pdev, | 34 | int ahci_platform_init_host(struct platform_device *pdev, |
| 32 | struct ahci_host_priv *hpriv, | 35 | struct ahci_host_priv *hpriv, |
| 33 | const struct ata_port_info *pi_template); | 36 | const struct ata_port_info *pi_template, |
| 37 | struct scsi_host_template *sht); | ||
| 34 | 38 | ||
| 35 | int ahci_platform_suspend_host(struct device *dev); | 39 | int ahci_platform_suspend_host(struct device *dev); |
| 36 | int ahci_platform_resume_host(struct device *dev); | 40 | int ahci_platform_resume_host(struct device *dev); |
diff --git a/include/linux/ata.h b/include/linux/ata.h index f2f4d8da97c0..1648026e06b4 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -503,7 +503,7 @@ struct ata_bmdma_prd { | |||
| 503 | #define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8)) | 503 | #define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8)) |
| 504 | #define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8)) | 504 | #define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8)) |
| 505 | #define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1) | 505 | #define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1) |
| 506 | #define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7)) | 506 | #define ata_id_removable(id) ((id)[ATA_ID_CONFIG] & (1 << 7)) |
| 507 | #define ata_id_has_atapi_AN(id) \ | 507 | #define ata_id_has_atapi_AN(id) \ |
| 508 | ((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \ | 508 | ((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \ |
| 509 | ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \ | 509 | ((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \ |
diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h index 5c618a084225..619d9e78e644 100644 --- a/include/linux/ata_platform.h +++ b/include/linux/ata_platform.h | |||
| @@ -10,12 +10,15 @@ struct pata_platform_info { | |||
| 10 | unsigned int ioport_shift; | 10 | unsigned int ioport_shift; |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | struct scsi_host_template; | ||
| 14 | |||
| 13 | extern int __pata_platform_probe(struct device *dev, | 15 | extern int __pata_platform_probe(struct device *dev, |
| 14 | struct resource *io_res, | 16 | struct resource *io_res, |
| 15 | struct resource *ctl_res, | 17 | struct resource *ctl_res, |
| 16 | struct resource *irq_res, | 18 | struct resource *irq_res, |
| 17 | unsigned int ioport_shift, | 19 | unsigned int ioport_shift, |
| 18 | int __pio_mask); | 20 | int __pio_mask, |
| 21 | struct scsi_host_template *sht); | ||
| 19 | 22 | ||
| 20 | /* | 23 | /* |
| 21 | * Marvell SATA private data | 24 | * Marvell SATA private data |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index da0dae0600e6..b9cb94c3102a 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -943,6 +943,8 @@ struct cgroup_subsys_state *css_tryget_online_from_dir(struct dentry *dentry, | |||
| 943 | 943 | ||
| 944 | #else /* !CONFIG_CGROUPS */ | 944 | #else /* !CONFIG_CGROUPS */ |
| 945 | 945 | ||
| 946 | struct cgroup_subsys_state; | ||
| 947 | |||
| 946 | static inline int cgroup_init_early(void) { return 0; } | 948 | static inline int cgroup_init_early(void) { return 0; } |
| 947 | static inline int cgroup_init(void) { return 0; } | 949 | static inline int cgroup_init(void) { return 0; } |
| 948 | static inline void cgroup_fork(struct task_struct *p) {} | 950 | static inline void cgroup_fork(struct task_struct *p) {} |
| @@ -955,6 +957,8 @@ static inline int cgroupstats_build(struct cgroupstats *stats, | |||
| 955 | return -EINVAL; | 957 | return -EINVAL; |
| 956 | } | 958 | } |
| 957 | 959 | ||
| 960 | static inline void css_put(struct cgroup_subsys_state *css) {} | ||
| 961 | |||
| 958 | /* No cgroups - nothing to do */ | 962 | /* No cgroups - nothing to do */ |
| 959 | static inline int cgroup_attach_task_all(struct task_struct *from, | 963 | static inline int cgroup_attach_task_all(struct task_struct *from, |
| 960 | struct task_struct *t) | 964 | struct task_struct *t) |
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index 98c4f9b12b03..e4a96fb14403 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
| @@ -15,6 +15,10 @@ SUBSYS(cpu) | |||
| 15 | SUBSYS(cpuacct) | 15 | SUBSYS(cpuacct) |
| 16 | #endif | 16 | #endif |
| 17 | 17 | ||
| 18 | #if IS_ENABLED(CONFIG_BLK_CGROUP) | ||
| 19 | SUBSYS(blkio) | ||
| 20 | #endif | ||
| 21 | |||
| 18 | #if IS_ENABLED(CONFIG_MEMCG) | 22 | #if IS_ENABLED(CONFIG_MEMCG) |
| 19 | SUBSYS(memory) | 23 | SUBSYS(memory) |
| 20 | #endif | 24 | #endif |
| @@ -31,10 +35,6 @@ SUBSYS(freezer) | |||
| 31 | SUBSYS(net_cls) | 35 | SUBSYS(net_cls) |
| 32 | #endif | 36 | #endif |
| 33 | 37 | ||
| 34 | #if IS_ENABLED(CONFIG_BLK_CGROUP) | ||
| 35 | SUBSYS(blkio) | ||
| 36 | #endif | ||
| 37 | |||
| 38 | #if IS_ENABLED(CONFIG_CGROUP_PERF) | 38 | #if IS_ENABLED(CONFIG_CGROUP_PERF) |
| 39 | SUBSYS(perf_event) | 39 | SUBSYS(perf_event) |
| 40 | #endif | 40 | #endif |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 33063f872ee3..176bf816875e 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -385,7 +385,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s | |||
| 385 | 385 | ||
| 386 | /* Is this type a native word size -- useful for atomic operations */ | 386 | /* Is this type a native word size -- useful for atomic operations */ |
| 387 | #ifndef __native_word | 387 | #ifndef __native_word |
| 388 | # define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) | 388 | # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) |
| 389 | #endif | 389 | #endif |
| 390 | 390 | ||
| 391 | /* Compile time object size, -1 for unknown */ | 391 | /* Compile time object size, -1 for unknown */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4d078cebafd2..2ee4888c1f47 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -66,8 +66,6 @@ struct cpufreq_policy { | |||
| 66 | unsigned int shared_type; /* ACPI: ANY or ALL affected CPUs | 66 | unsigned int shared_type; /* ACPI: ANY or ALL affected CPUs |
| 67 | should set cpufreq */ | 67 | should set cpufreq */ |
| 68 | unsigned int cpu; /* cpu nr of CPU managing this policy */ | 68 | unsigned int cpu; /* cpu nr of CPU managing this policy */ |
| 69 | unsigned int last_cpu; /* cpu nr of previous CPU that managed | ||
| 70 | * this policy */ | ||
| 71 | struct clk *clk; | 69 | struct clk *clk; |
| 72 | struct cpufreq_cpuinfo cpuinfo;/* see above */ | 70 | struct cpufreq_cpuinfo cpuinfo;/* see above */ |
| 73 | 71 | ||
| @@ -113,6 +111,9 @@ struct cpufreq_policy { | |||
| 113 | wait_queue_head_t transition_wait; | 111 | wait_queue_head_t transition_wait; |
| 114 | struct task_struct *transition_task; /* Task which is doing the transition */ | 112 | struct task_struct *transition_task; /* Task which is doing the transition */ |
| 115 | 113 | ||
| 114 | /* cpufreq-stats */ | ||
| 115 | struct cpufreq_stats *stats; | ||
| 116 | |||
| 116 | /* For cpufreq driver's internal use */ | 117 | /* For cpufreq driver's internal use */ |
| 117 | void *driver_data; | 118 | void *driver_data; |
| 118 | }; | 119 | }; |
| @@ -367,9 +368,8 @@ static inline void cpufreq_resume(void) {} | |||
| 367 | #define CPUFREQ_INCOMPATIBLE (1) | 368 | #define CPUFREQ_INCOMPATIBLE (1) |
| 368 | #define CPUFREQ_NOTIFY (2) | 369 | #define CPUFREQ_NOTIFY (2) |
| 369 | #define CPUFREQ_START (3) | 370 | #define CPUFREQ_START (3) |
| 370 | #define CPUFREQ_UPDATE_POLICY_CPU (4) | 371 | #define CPUFREQ_CREATE_POLICY (4) |
| 371 | #define CPUFREQ_CREATE_POLICY (5) | 372 | #define CPUFREQ_REMOVE_POLICY (5) |
| 372 | #define CPUFREQ_REMOVE_POLICY (6) | ||
| 373 | 373 | ||
| 374 | #ifdef CONFIG_CPU_FREQ | 374 | #ifdef CONFIG_CPU_FREQ |
| 375 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 375 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 0238d612750e..b674837e2b98 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -848,7 +848,7 @@ efi_guidcmp (efi_guid_t left, efi_guid_t right) | |||
| 848 | } | 848 | } |
| 849 | 849 | ||
| 850 | static inline char * | 850 | static inline char * |
| 851 | efi_guid_unparse(efi_guid_t *guid, char *out) | 851 | efi_guid_to_str(efi_guid_t *guid, char *out) |
| 852 | { | 852 | { |
| 853 | sprintf(out, "%pUl", guid->b); | 853 | sprintf(out, "%pUl", guid->b); |
| 854 | return out; | 854 | return out; |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 0bebb5c348b8..d36f68b08acc 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -595,7 +595,7 @@ extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | |||
| 595 | char *filter_str); | 595 | char *filter_str); |
| 596 | extern void ftrace_profile_free_filter(struct perf_event *event); | 596 | extern void ftrace_profile_free_filter(struct perf_event *event); |
| 597 | extern void *perf_trace_buf_prepare(int size, unsigned short type, | 597 | extern void *perf_trace_buf_prepare(int size, unsigned short type, |
| 598 | struct pt_regs *regs, int *rctxp); | 598 | struct pt_regs **regs, int *rctxp); |
| 599 | 599 | ||
| 600 | static inline void | 600 | static inline void |
| 601 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 601 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index a036d058a249..05f6df1fdf5b 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -170,6 +170,7 @@ enum hrtimer_base_type { | |||
| 170 | * @clock_was_set: Indicates that clock was set from irq context. | 170 | * @clock_was_set: Indicates that clock was set from irq context. |
| 171 | * @expires_next: absolute time of the next event which was scheduled | 171 | * @expires_next: absolute time of the next event which was scheduled |
| 172 | * via clock_set_next_event() | 172 | * via clock_set_next_event() |
| 173 | * @in_hrtirq: hrtimer_interrupt() is currently executing | ||
| 173 | * @hres_active: State of high resolution mode | 174 | * @hres_active: State of high resolution mode |
| 174 | * @hang_detected: The last hrtimer interrupt detected a hang | 175 | * @hang_detected: The last hrtimer interrupt detected a hang |
| 175 | * @nr_events: Total number of hrtimer interrupt events | 176 | * @nr_events: Total number of hrtimer interrupt events |
| @@ -185,6 +186,7 @@ struct hrtimer_cpu_base { | |||
| 185 | unsigned int clock_was_set; | 186 | unsigned int clock_was_set; |
| 186 | #ifdef CONFIG_HIGH_RES_TIMERS | 187 | #ifdef CONFIG_HIGH_RES_TIMERS |
| 187 | ktime_t expires_next; | 188 | ktime_t expires_next; |
| 189 | int in_hrtirq; | ||
| 188 | int hres_active; | 190 | int hres_active; |
| 189 | int hang_detected; | 191 | int hang_detected; |
| 190 | unsigned long nr_events; | 192 | unsigned long nr_events; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index e3a1721c8354..7c7695940ddd 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -228,7 +228,9 @@ struct i2c_client { | |||
| 228 | struct device dev; /* the device structure */ | 228 | struct device dev; /* the device structure */ |
| 229 | int irq; /* irq issued by device */ | 229 | int irq; /* irq issued by device */ |
| 230 | struct list_head detected; | 230 | struct list_head detected; |
| 231 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 231 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ | 232 | i2c_slave_cb_t slave_cb; /* callback for slave mode */ |
| 233 | #endif | ||
| 232 | }; | 234 | }; |
| 233 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 235 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
| 234 | 236 | ||
| @@ -253,6 +255,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data) | |||
| 253 | 255 | ||
| 254 | /* I2C slave support */ | 256 | /* I2C slave support */ |
| 255 | 257 | ||
| 258 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 256 | enum i2c_slave_event { | 259 | enum i2c_slave_event { |
| 257 | I2C_SLAVE_REQ_READ_START, | 260 | I2C_SLAVE_REQ_READ_START, |
| 258 | I2C_SLAVE_REQ_READ_END, | 261 | I2C_SLAVE_REQ_READ_END, |
| @@ -269,6 +272,7 @@ static inline int i2c_slave_event(struct i2c_client *client, | |||
| 269 | { | 272 | { |
| 270 | return client->slave_cb(client, event, val); | 273 | return client->slave_cb(client, event, val); |
| 271 | } | 274 | } |
| 275 | #endif | ||
| 272 | 276 | ||
| 273 | /** | 277 | /** |
| 274 | * struct i2c_board_info - template for device creation | 278 | * struct i2c_board_info - template for device creation |
| @@ -404,8 +408,10 @@ struct i2c_algorithm { | |||
| 404 | /* To determine what the adapter supports */ | 408 | /* To determine what the adapter supports */ |
| 405 | u32 (*functionality) (struct i2c_adapter *); | 409 | u32 (*functionality) (struct i2c_adapter *); |
| 406 | 410 | ||
| 411 | #if IS_ENABLED(CONFIG_I2C_SLAVE) | ||
| 407 | int (*reg_slave)(struct i2c_client *client); | 412 | int (*reg_slave)(struct i2c_client *client); |
| 408 | int (*unreg_slave)(struct i2c_client *client); | 413 | int (*unreg_slave)(struct i2c_client *client); |
| 414 | #endif | ||
| 409 | }; | 415 | }; |
| 410 | 416 | ||
| 411 | /** | 417 | /** |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 515a35e2a48a..960e666c51e4 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
| @@ -472,27 +472,59 @@ static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci) | |||
| 472 | /** | 472 | /** |
| 473 | * vlan_get_protocol - get protocol EtherType. | 473 | * vlan_get_protocol - get protocol EtherType. |
| 474 | * @skb: skbuff to query | 474 | * @skb: skbuff to query |
| 475 | * @type: first vlan protocol | ||
| 476 | * @depth: buffer to store length of eth and vlan tags in bytes | ||
| 475 | * | 477 | * |
| 476 | * Returns the EtherType of the packet, regardless of whether it is | 478 | * Returns the EtherType of the packet, regardless of whether it is |
| 477 | * vlan encapsulated (normal or hardware accelerated) or not. | 479 | * vlan encapsulated (normal or hardware accelerated) or not. |
| 478 | */ | 480 | */ |
| 479 | static inline __be16 vlan_get_protocol(const struct sk_buff *skb) | 481 | static inline __be16 __vlan_get_protocol(struct sk_buff *skb, __be16 type, |
| 482 | int *depth) | ||
| 480 | { | 483 | { |
| 481 | __be16 protocol = 0; | 484 | unsigned int vlan_depth = skb->mac_len; |
| 482 | 485 | ||
| 483 | if (vlan_tx_tag_present(skb) || | 486 | /* if type is 802.1Q/AD then the header should already be |
| 484 | skb->protocol != cpu_to_be16(ETH_P_8021Q)) | 487 | * present at mac_len - VLAN_HLEN (if mac_len > 0), or at |
| 485 | protocol = skb->protocol; | 488 | * ETH_HLEN otherwise |
| 486 | else { | 489 | */ |
| 487 | __be16 proto, *protop; | 490 | if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) { |
| 488 | protop = skb_header_pointer(skb, offsetof(struct vlan_ethhdr, | 491 | if (vlan_depth) { |
| 489 | h_vlan_encapsulated_proto), | 492 | if (WARN_ON(vlan_depth < VLAN_HLEN)) |
| 490 | sizeof(proto), &proto); | 493 | return 0; |
| 491 | if (likely(protop)) | 494 | vlan_depth -= VLAN_HLEN; |
| 492 | protocol = *protop; | 495 | } else { |
| 496 | vlan_depth = ETH_HLEN; | ||
| 497 | } | ||
| 498 | do { | ||
| 499 | struct vlan_hdr *vh; | ||
| 500 | |||
| 501 | if (unlikely(!pskb_may_pull(skb, | ||
| 502 | vlan_depth + VLAN_HLEN))) | ||
| 503 | return 0; | ||
| 504 | |||
| 505 | vh = (struct vlan_hdr *)(skb->data + vlan_depth); | ||
| 506 | type = vh->h_vlan_encapsulated_proto; | ||
| 507 | vlan_depth += VLAN_HLEN; | ||
| 508 | } while (type == htons(ETH_P_8021Q) || | ||
| 509 | type == htons(ETH_P_8021AD)); | ||
| 493 | } | 510 | } |
| 494 | 511 | ||
| 495 | return protocol; | 512 | if (depth) |
| 513 | *depth = vlan_depth; | ||
| 514 | |||
| 515 | return type; | ||
| 516 | } | ||
| 517 | |||
| 518 | /** | ||
| 519 | * vlan_get_protocol - get protocol EtherType. | ||
| 520 | * @skb: skbuff to query | ||
| 521 | * | ||
| 522 | * Returns the EtherType of the packet, regardless of whether it is | ||
| 523 | * vlan encapsulated (normal or hardware accelerated) or not. | ||
| 524 | */ | ||
| 525 | static inline __be16 vlan_get_protocol(struct sk_buff *skb) | ||
| 526 | { | ||
| 527 | return __vlan_get_protocol(skb, skb->protocol, NULL); | ||
| 496 | } | 528 | } |
| 497 | 529 | ||
| 498 | static inline void vlan_set_encap_proto(struct sk_buff *skb, | 530 | static inline void vlan_set_encap_proto(struct sk_buff *skb, |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5449d2f4a1ef..64ce58bee6f5 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -176,7 +176,7 @@ extern int _cond_resched(void); | |||
| 176 | */ | 176 | */ |
| 177 | # define might_sleep() \ | 177 | # define might_sleep() \ |
| 178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) | 178 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) |
| 179 | # define sched_annotate_sleep() __set_current_state(TASK_RUNNING) | 179 | # define sched_annotate_sleep() (current->task_state_change = 0) |
| 180 | #else | 180 | #else |
| 181 | static inline void ___might_sleep(const char *file, int line, | 181 | static inline void ___might_sleep(const char *file, int line, |
| 182 | int preempt_offset) { } | 182 | int preempt_offset) { } |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index c9d645ad98ff..5fc3d1083071 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
| @@ -166,7 +166,17 @@ static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2) | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | #if BITS_PER_LONG < 64 | 168 | #if BITS_PER_LONG < 64 |
| 169 | extern u64 ktime_divns(const ktime_t kt, s64 div); | 169 | extern u64 __ktime_divns(const ktime_t kt, s64 div); |
| 170 | static inline u64 ktime_divns(const ktime_t kt, s64 div) | ||
| 171 | { | ||
| 172 | if (__builtin_constant_p(div) && !(div >> 32)) { | ||
| 173 | u64 ns = kt.tv64; | ||
| 174 | do_div(ns, div); | ||
| 175 | return ns; | ||
| 176 | } else { | ||
| 177 | return __ktime_divns(kt, div); | ||
| 178 | } | ||
| 179 | } | ||
| 170 | #else /* BITS_PER_LONG < 64 */ | 180 | #else /* BITS_PER_LONG < 64 */ |
| 171 | # define ktime_divns(kt, div) (u64)((kt).tv64 / (div)) | 181 | # define ktime_divns(kt, div) (u64)((kt).tv64 / (div)) |
| 172 | #endif | 182 | #endif |
| @@ -186,6 +196,11 @@ static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) | |||
| 186 | return ktime_to_us(ktime_sub(later, earlier)); | 196 | return ktime_to_us(ktime_sub(later, earlier)); |
| 187 | } | 197 | } |
| 188 | 198 | ||
| 199 | static inline s64 ktime_ms_delta(const ktime_t later, const ktime_t earlier) | ||
| 200 | { | ||
| 201 | return ktime_to_ms(ktime_sub(later, earlier)); | ||
| 202 | } | ||
| 203 | |||
| 189 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) | 204 | static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec) |
| 190 | { | 205 | { |
| 191 | return ktime_add_ns(kt, usec * NSEC_PER_USEC); | 206 | return ktime_add_ns(kt, usec * NSEC_PER_USEC); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91f705de2c0b..61df823ac86a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -1340,6 +1340,12 @@ extern const struct ata_port_operations ata_base_port_ops; | |||
| 1340 | extern const struct ata_port_operations sata_port_ops; | 1340 | extern const struct ata_port_operations sata_port_ops; |
| 1341 | extern struct device_attribute *ata_common_sdev_attrs[]; | 1341 | extern struct device_attribute *ata_common_sdev_attrs[]; |
| 1342 | 1342 | ||
| 1343 | /* | ||
| 1344 | * All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated | ||
| 1345 | * by the edge drivers. Because the 'module' field of sht must be the | ||
| 1346 | * edge driver's module reference, otherwise the driver can be unloaded | ||
| 1347 | * even if the scsi_device is being accessed. | ||
| 1348 | */ | ||
| 1343 | #define ATA_BASE_SHT(drv_name) \ | 1349 | #define ATA_BASE_SHT(drv_name) \ |
| 1344 | .module = THIS_MODULE, \ | 1350 | .module = THIS_MODULE, \ |
| 1345 | .name = drv_name, \ | 1351 | .name = drv_name, \ |
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h index ce5dda8958fe..b1fd675fa36f 100644 --- a/include/linux/mfd/samsung/s2mps13.h +++ b/include/linux/mfd/samsung/s2mps13.h | |||
| @@ -59,6 +59,7 @@ enum s2mps13_reg { | |||
| 59 | S2MPS13_REG_B6CTRL, | 59 | S2MPS13_REG_B6CTRL, |
| 60 | S2MPS13_REG_B6OUT, | 60 | S2MPS13_REG_B6OUT, |
| 61 | S2MPS13_REG_B7CTRL, | 61 | S2MPS13_REG_B7CTRL, |
| 62 | S2MPS13_REG_B7SW, | ||
| 62 | S2MPS13_REG_B7OUT, | 63 | S2MPS13_REG_B7OUT, |
| 63 | S2MPS13_REG_B8CTRL, | 64 | S2MPS13_REG_B8CTRL, |
| 64 | S2MPS13_REG_B8OUT, | 65 | S2MPS13_REG_B8OUT, |
| @@ -102,6 +103,7 @@ enum s2mps13_reg { | |||
| 102 | S2MPS13_REG_L26CTRL, | 103 | S2MPS13_REG_L26CTRL, |
| 103 | S2MPS13_REG_L27CTRL, | 104 | S2MPS13_REG_L27CTRL, |
| 104 | S2MPS13_REG_L28CTRL, | 105 | S2MPS13_REG_L28CTRL, |
| 106 | S2MPS13_REG_L29CTRL, | ||
| 105 | S2MPS13_REG_L30CTRL, | 107 | S2MPS13_REG_L30CTRL, |
| 106 | S2MPS13_REG_L31CTRL, | 108 | S2MPS13_REG_L31CTRL, |
| 107 | S2MPS13_REG_L32CTRL, | 109 | S2MPS13_REG_L32CTRL, |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 25c791e295fd..5f3a9aa7225d 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -97,7 +97,7 @@ enum { | |||
| 97 | MLX4_MAX_NUM_PF = 16, | 97 | MLX4_MAX_NUM_PF = 16, |
| 98 | MLX4_MAX_NUM_VF = 126, | 98 | MLX4_MAX_NUM_VF = 126, |
| 99 | MLX4_MAX_NUM_VF_P_PORT = 64, | 99 | MLX4_MAX_NUM_VF_P_PORT = 64, |
| 100 | MLX4_MFUNC_MAX = 80, | 100 | MLX4_MFUNC_MAX = 128, |
| 101 | MLX4_MAX_EQ_NUM = 1024, | 101 | MLX4_MAX_EQ_NUM = 1024, |
| 102 | MLX4_MFUNC_EQ_NUM = 4, | 102 | MLX4_MFUNC_EQ_NUM = 4, |
| 103 | MLX4_MFUNC_MAX_EQES = 8, | 103 | MLX4_MFUNC_MAX_EQES = 8, |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 80fc92a49649..237b3ba29225 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -290,6 +290,14 @@ struct vm_operations_struct { | |||
| 290 | /* called by sys_remap_file_pages() to populate non-linear mapping */ | 290 | /* called by sys_remap_file_pages() to populate non-linear mapping */ |
| 291 | int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr, | 291 | int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr, |
| 292 | unsigned long size, pgoff_t pgoff); | 292 | unsigned long size, pgoff_t pgoff); |
| 293 | |||
| 294 | /* | ||
| 295 | * Called by vm_normal_page() for special PTEs to find the | ||
| 296 | * page for @addr. This is useful if the default behavior | ||
| 297 | * (using pte_page()) would not find the correct page. | ||
| 298 | */ | ||
| 299 | struct page *(*find_special_page)(struct vm_area_struct *vma, | ||
| 300 | unsigned long addr); | ||
| 293 | }; | 301 | }; |
| 294 | 302 | ||
| 295 | struct mmu_gather; | 303 | struct mmu_gather; |
| @@ -1070,6 +1078,7 @@ static inline int page_mapped(struct page *page) | |||
| 1070 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 1078 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
| 1071 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ | 1079 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ |
| 1072 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | 1080 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ |
| 1081 | #define VM_FAULT_SIGSEGV 0x0040 | ||
| 1073 | 1082 | ||
| 1074 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 1083 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
| 1075 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 1084 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
| @@ -1078,8 +1087,9 @@ static inline int page_mapped(struct page *page) | |||
| 1078 | 1087 | ||
| 1079 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ | 1088 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ |
| 1080 | 1089 | ||
| 1081 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | 1090 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \ |
| 1082 | VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) | 1091 | VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \ |
| 1092 | VM_FAULT_FALLBACK) | ||
| 1083 | 1093 | ||
| 1084 | /* Encode hstate index for a hwpoisoned large page */ | 1094 | /* Encode hstate index for a hwpoisoned large page */ |
| 1085 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | 1095 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 853698c721f7..76200984d1e2 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
| @@ -85,11 +85,6 @@ static inline void oom_killer_enable(void) | |||
| 85 | oom_killer_disabled = false; | 85 | oom_killer_disabled = false; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static inline bool oom_gfp_allowed(gfp_t gfp_mask) | ||
| 89 | { | ||
| 90 | return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); | ||
| 91 | } | ||
| 92 | |||
| 93 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); | 88 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); |
| 94 | 89 | ||
| 95 | static inline bool task_will_free_mem(struct task_struct *task) | 90 | static inline bool task_will_free_mem(struct task_struct *task) |
diff --git a/include/linux/osq_lock.h b/include/linux/osq_lock.h index 90230d5811c5..3a6490e81b28 100644 --- a/include/linux/osq_lock.h +++ b/include/linux/osq_lock.h | |||
| @@ -5,8 +5,11 @@ | |||
| 5 | * An MCS like lock especially tailored for optimistic spinning for sleeping | 5 | * An MCS like lock especially tailored for optimistic spinning for sleeping |
| 6 | * lock implementations (mutex, rwsem, etc). | 6 | * lock implementations (mutex, rwsem, etc). |
| 7 | */ | 7 | */ |
| 8 | 8 | struct optimistic_spin_node { | |
| 9 | #define OSQ_UNLOCKED_VAL (0) | 9 | struct optimistic_spin_node *next, *prev; |
| 10 | int locked; /* 1 if lock acquired */ | ||
| 11 | int cpu; /* encoded CPU # + 1 value */ | ||
| 12 | }; | ||
| 10 | 13 | ||
| 11 | struct optimistic_spin_queue { | 14 | struct optimistic_spin_queue { |
| 12 | /* | 15 | /* |
| @@ -16,6 +19,8 @@ struct optimistic_spin_queue { | |||
| 16 | atomic_t tail; | 19 | atomic_t tail; |
| 17 | }; | 20 | }; |
| 18 | 21 | ||
| 22 | #define OSQ_UNLOCKED_VAL (0) | ||
| 23 | |||
| 19 | /* Init macro and function. */ | 24 | /* Init macro and function. */ |
| 20 | #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) } | 25 | #define OSQ_LOCK_UNLOCKED { ATOMIC_INIT(OSQ_UNLOCKED_VAL) } |
| 21 | 26 | ||
| @@ -24,4 +29,7 @@ static inline void osq_lock_init(struct optimistic_spin_queue *lock) | |||
| 24 | atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); | 29 | atomic_set(&lock->tail, OSQ_UNLOCKED_VAL); |
| 25 | } | 30 | } |
| 26 | 31 | ||
| 32 | extern bool osq_lock(struct optimistic_spin_queue *lock); | ||
| 33 | extern void osq_unlock(struct optimistic_spin_queue *lock); | ||
| 34 | |||
| 27 | #endif | 35 | #endif |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index e1f5fcd79792..5ed7bdaf22d5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
| @@ -121,8 +121,12 @@ enum pageflags { | |||
| 121 | PG_fscache = PG_private_2, /* page backed by cache */ | 121 | PG_fscache = PG_private_2, /* page backed by cache */ |
| 122 | 122 | ||
| 123 | /* XEN */ | 123 | /* XEN */ |
| 124 | /* Pinned in Xen as a read-only pagetable page. */ | ||
| 124 | PG_pinned = PG_owner_priv_1, | 125 | PG_pinned = PG_owner_priv_1, |
| 126 | /* Pinned as part of domain save (see xen_mm_pin_all()). */ | ||
| 125 | PG_savepinned = PG_dirty, | 127 | PG_savepinned = PG_dirty, |
| 128 | /* Has a grant mapping of another (foreign) domain's page. */ | ||
| 129 | PG_foreign = PG_owner_priv_1, | ||
| 126 | 130 | ||
| 127 | /* SLOB */ | 131 | /* SLOB */ |
| 128 | PG_slob_free = PG_private, | 132 | PG_slob_free = PG_private, |
| @@ -215,6 +219,7 @@ __PAGEFLAG(Slab, slab) | |||
| 215 | PAGEFLAG(Checked, checked) /* Used by some filesystems */ | 219 | PAGEFLAG(Checked, checked) /* Used by some filesystems */ |
| 216 | PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */ | 220 | PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */ |
| 217 | PAGEFLAG(SavePinned, savepinned); /* Xen */ | 221 | PAGEFLAG(SavePinned, savepinned); /* Xen */ |
| 222 | PAGEFLAG(Foreign, foreign); /* Xen */ | ||
| 218 | PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) | 223 | PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) |
| 219 | PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked) | 224 | PAGEFLAG(SwapBacked, swapbacked) __CLEARPAGEFLAG(SwapBacked, swapbacked) |
| 220 | __SETPAGEFLAG(SwapBacked, swapbacked) | 225 | __SETPAGEFLAG(SwapBacked, swapbacked) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9603094ed59b..211e9da8a7d7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
| 30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
| 31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
| 32 | #include <linux/resource_ext.h> | ||
| 32 | #include <uapi/linux/pci.h> | 33 | #include <uapi/linux/pci.h> |
| 33 | 34 | ||
| 34 | #include <linux/pci_ids.h> | 35 | #include <linux/pci_ids.h> |
| @@ -177,6 +178,8 @@ enum pci_dev_flags { | |||
| 177 | PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5), | 178 | PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = (__force pci_dev_flags_t) (1 << 5), |
| 178 | /* Do not use bus resets for device */ | 179 | /* Do not use bus resets for device */ |
| 179 | PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6), | 180 | PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6), |
| 181 | /* Do not use PM reset even if device advertises NoSoftRst- */ | ||
| 182 | PCI_DEV_FLAGS_NO_PM_RESET = (__force pci_dev_flags_t) (1 << 7), | ||
| 180 | }; | 183 | }; |
| 181 | 184 | ||
| 182 | enum pci_irq_reroute_variant { | 185 | enum pci_irq_reroute_variant { |
| @@ -397,16 +400,10 @@ static inline int pci_channel_offline(struct pci_dev *pdev) | |||
| 397 | return (pdev->error_state != pci_channel_io_normal); | 400 | return (pdev->error_state != pci_channel_io_normal); |
| 398 | } | 401 | } |
| 399 | 402 | ||
| 400 | struct pci_host_bridge_window { | ||
| 401 | struct list_head list; | ||
| 402 | struct resource *res; /* host bridge aperture (CPU address) */ | ||
| 403 | resource_size_t offset; /* bus address + offset = CPU address */ | ||
| 404 | }; | ||
| 405 | |||
| 406 | struct pci_host_bridge { | 403 | struct pci_host_bridge { |
| 407 | struct device dev; | 404 | struct device dev; |
| 408 | struct pci_bus *bus; /* root bus */ | 405 | struct pci_bus *bus; /* root bus */ |
| 409 | struct list_head windows; /* pci_host_bridge_windows */ | 406 | struct list_head windows; /* resource_entry */ |
| 410 | void (*release_fn)(struct pci_host_bridge *); | 407 | void (*release_fn)(struct pci_host_bridge *); |
| 411 | void *release_data; | 408 | void *release_data; |
| 412 | }; | 409 | }; |
| @@ -562,6 +559,7 @@ static inline int pcibios_err_to_errno(int err) | |||
| 562 | /* Low-level architecture-dependent routines */ | 559 | /* Low-level architecture-dependent routines */ |
| 563 | 560 | ||
| 564 | struct pci_ops { | 561 | struct pci_ops { |
| 562 | void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where); | ||
| 565 | int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); | 563 | int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); |
| 566 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); | 564 | int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); |
| 567 | }; | 565 | }; |
| @@ -859,6 +857,16 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
| 859 | int where, u16 val); | 857 | int where, u16 val); |
| 860 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 858 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
| 861 | int where, u32 val); | 859 | int where, u32 val); |
| 860 | |||
| 861 | int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, | ||
| 862 | int where, int size, u32 *val); | ||
| 863 | int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, | ||
| 864 | int where, int size, u32 val); | ||
| 865 | int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, | ||
| 866 | int where, int size, u32 *val); | ||
| 867 | int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn, | ||
| 868 | int where, int size, u32 val); | ||
| 869 | |||
| 862 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | 870 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); |
| 863 | 871 | ||
| 864 | static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val) | 872 | static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val) |
| @@ -1850,6 +1858,8 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } | |||
| 1850 | static inline void pci_release_of_node(struct pci_dev *dev) { } | 1858 | static inline void pci_release_of_node(struct pci_dev *dev) { } |
| 1851 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } | 1859 | static inline void pci_set_bus_of_node(struct pci_bus *bus) { } |
| 1852 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } | 1860 | static inline void pci_release_bus_of_node(struct pci_bus *bus) { } |
| 1861 | static inline struct device_node * | ||
| 1862 | pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; } | ||
| 1853 | #endif /* CONFIG_OF */ | 1863 | #endif /* CONFIG_OF */ |
| 1854 | 1864 | ||
| 1855 | #ifdef CONFIG_EEH | 1865 | #ifdef CONFIG_EEH |
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index b4337646388b..12c9b485beb7 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
| @@ -128,8 +128,22 @@ static inline void percpu_ref_kill(struct percpu_ref *ref) | |||
| 128 | static inline bool __ref_is_percpu(struct percpu_ref *ref, | 128 | static inline bool __ref_is_percpu(struct percpu_ref *ref, |
| 129 | unsigned long __percpu **percpu_countp) | 129 | unsigned long __percpu **percpu_countp) |
| 130 | { | 130 | { |
| 131 | /* paired with smp_store_release() in percpu_ref_reinit() */ | 131 | unsigned long percpu_ptr; |
| 132 | unsigned long percpu_ptr = lockless_dereference(ref->percpu_count_ptr); | 132 | |
| 133 | /* | ||
| 134 | * The value of @ref->percpu_count_ptr is tested for | ||
| 135 | * !__PERCPU_REF_ATOMIC, which may be set asynchronously, and then | ||
| 136 | * used as a pointer. If the compiler generates a separate fetch | ||
| 137 | * when using it as a pointer, __PERCPU_REF_ATOMIC may be set in | ||
| 138 | * between contaminating the pointer value, meaning that | ||
| 139 | * ACCESS_ONCE() is required when fetching it. | ||
| 140 | * | ||
| 141 | * Also, we need a data dependency barrier to be paired with | ||
| 142 | * smp_store_release() in __percpu_ref_switch_to_percpu(). | ||
| 143 | * | ||
| 144 | * Use lockless deref which contains both. | ||
| 145 | */ | ||
| 146 | percpu_ptr = lockless_dereference(ref->percpu_count_ptr); | ||
| 133 | 147 | ||
| 134 | /* | 148 | /* |
| 135 | * Theoretically, the following could test just ATOMIC; however, | 149 | * Theoretically, the following could test just ATOMIC; however, |
| @@ -233,7 +247,7 @@ static inline bool percpu_ref_tryget_live(struct percpu_ref *ref) | |||
| 233 | if (__ref_is_percpu(ref, &percpu_count)) { | 247 | if (__ref_is_percpu(ref, &percpu_count)) { |
| 234 | this_cpu_inc(*percpu_count); | 248 | this_cpu_inc(*percpu_count); |
| 235 | ret = true; | 249 | ret = true; |
| 236 | } else if (!(ACCESS_ONCE(ref->percpu_count_ptr) & __PERCPU_REF_DEAD)) { | 250 | } else if (!(ref->percpu_count_ptr & __PERCPU_REF_DEAD)) { |
| 237 | ret = atomic_long_inc_not_zero(&ref->count); | 251 | ret = atomic_long_inc_not_zero(&ref->count); |
| 238 | } | 252 | } |
| 239 | 253 | ||
| @@ -281,6 +295,20 @@ static inline void percpu_ref_put(struct percpu_ref *ref) | |||
| 281 | } | 295 | } |
| 282 | 296 | ||
| 283 | /** | 297 | /** |
| 298 | * percpu_ref_is_dying - test whether a percpu refcount is dying or dead | ||
| 299 | * @ref: percpu_ref to test | ||
| 300 | * | ||
| 301 | * Returns %true if @ref is dying or dead. | ||
| 302 | * | ||
| 303 | * This function is safe to call as long as @ref is between init and exit | ||
| 304 | * and the caller is responsible for synchronizing against state changes. | ||
| 305 | */ | ||
| 306 | static inline bool percpu_ref_is_dying(struct percpu_ref *ref) | ||
| 307 | { | ||
| 308 | return ref->percpu_count_ptr & __PERCPU_REF_DEAD; | ||
| 309 | } | ||
| 310 | |||
| 311 | /** | ||
| 284 | * percpu_ref_is_zero - test whether a percpu refcount reached zero | 312 | * percpu_ref_is_zero - test whether a percpu refcount reached zero |
| 285 | * @ref: percpu_ref to test | 313 | * @ref: percpu_ref to test |
| 286 | * | 314 | * |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 4f7a61ca4b39..5cad0e6f3552 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -450,11 +450,6 @@ struct perf_event { | |||
| 450 | #endif /* CONFIG_PERF_EVENTS */ | 450 | #endif /* CONFIG_PERF_EVENTS */ |
| 451 | }; | 451 | }; |
| 452 | 452 | ||
| 453 | enum perf_event_context_type { | ||
| 454 | task_context, | ||
| 455 | cpu_context, | ||
| 456 | }; | ||
| 457 | |||
| 458 | /** | 453 | /** |
| 459 | * struct perf_event_context - event context structure | 454 | * struct perf_event_context - event context structure |
| 460 | * | 455 | * |
| @@ -462,7 +457,6 @@ enum perf_event_context_type { | |||
| 462 | */ | 457 | */ |
| 463 | struct perf_event_context { | 458 | struct perf_event_context { |
| 464 | struct pmu *pmu; | 459 | struct pmu *pmu; |
| 465 | enum perf_event_context_type type; | ||
| 466 | /* | 460 | /* |
| 467 | * Protect the states of the events in the list, | 461 | * Protect the states of the events in the list, |
| 468 | * nr_active, and the list: | 462 | * nr_active, and the list: |
| @@ -475,6 +469,7 @@ struct perf_event_context { | |||
| 475 | */ | 469 | */ |
| 476 | struct mutex mutex; | 470 | struct mutex mutex; |
| 477 | 471 | ||
| 472 | struct list_head active_ctx_list; | ||
| 478 | struct list_head pinned_groups; | 473 | struct list_head pinned_groups; |
| 479 | struct list_head flexible_groups; | 474 | struct list_head flexible_groups; |
| 480 | struct list_head event_list; | 475 | struct list_head event_list; |
| @@ -525,7 +520,6 @@ struct perf_cpu_context { | |||
| 525 | int exclusive; | 520 | int exclusive; |
| 526 | struct hrtimer hrtimer; | 521 | struct hrtimer hrtimer; |
| 527 | ktime_t hrtimer_interval; | 522 | ktime_t hrtimer_interval; |
| 528 | struct list_head rotation_list; | ||
| 529 | struct pmu *unique_pmu; | 523 | struct pmu *unique_pmu; |
| 530 | struct perf_cgroup *cgrp; | 524 | struct perf_cgroup *cgrp; |
| 531 | }; | 525 | }; |
| @@ -665,6 +659,7 @@ static inline int is_software_event(struct perf_event *event) | |||
| 665 | 659 | ||
| 666 | extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; | 660 | extern struct static_key perf_swevent_enabled[PERF_COUNT_SW_MAX]; |
| 667 | 661 | ||
| 662 | extern void ___perf_sw_event(u32, u64, struct pt_regs *, u64); | ||
| 668 | extern void __perf_sw_event(u32, u64, struct pt_regs *, u64); | 663 | extern void __perf_sw_event(u32, u64, struct pt_regs *, u64); |
| 669 | 664 | ||
| 670 | #ifndef perf_arch_fetch_caller_regs | 665 | #ifndef perf_arch_fetch_caller_regs |
| @@ -689,14 +684,25 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs) | |||
| 689 | static __always_inline void | 684 | static __always_inline void |
| 690 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) | 685 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) |
| 691 | { | 686 | { |
| 692 | struct pt_regs hot_regs; | 687 | if (static_key_false(&perf_swevent_enabled[event_id])) |
| 688 | __perf_sw_event(event_id, nr, regs, addr); | ||
| 689 | } | ||
| 690 | |||
| 691 | DECLARE_PER_CPU(struct pt_regs, __perf_regs[4]); | ||
| 693 | 692 | ||
| 693 | /* | ||
| 694 | * 'Special' version for the scheduler, it hard assumes no recursion, | ||
| 695 | * which is guaranteed by us not actually scheduling inside other swevents | ||
| 696 | * because those disable preemption. | ||
| 697 | */ | ||
| 698 | static __always_inline void | ||
| 699 | perf_sw_event_sched(u32 event_id, u64 nr, u64 addr) | ||
| 700 | { | ||
| 694 | if (static_key_false(&perf_swevent_enabled[event_id])) { | 701 | if (static_key_false(&perf_swevent_enabled[event_id])) { |
| 695 | if (!regs) { | 702 | struct pt_regs *regs = this_cpu_ptr(&__perf_regs[0]); |
| 696 | perf_fetch_caller_regs(&hot_regs); | 703 | |
| 697 | regs = &hot_regs; | 704 | perf_fetch_caller_regs(regs); |
| 698 | } | 705 | ___perf_sw_event(event_id, nr, regs, addr); |
| 699 | __perf_sw_event(event_id, nr, regs, addr); | ||
| 700 | } | 706 | } |
| 701 | } | 707 | } |
| 702 | 708 | ||
| @@ -712,7 +718,7 @@ static inline void perf_event_task_sched_in(struct task_struct *prev, | |||
| 712 | static inline void perf_event_task_sched_out(struct task_struct *prev, | 718 | static inline void perf_event_task_sched_out(struct task_struct *prev, |
| 713 | struct task_struct *next) | 719 | struct task_struct *next) |
| 714 | { | 720 | { |
| 715 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0); | 721 | perf_sw_event_sched(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 0); |
| 716 | 722 | ||
| 717 | if (static_key_false(&perf_sched_events.key)) | 723 | if (static_key_false(&perf_sched_events.key)) |
| 718 | __perf_event_task_sched_out(prev, next); | 724 | __perf_event_task_sched_out(prev, next); |
| @@ -823,6 +829,8 @@ static inline int perf_event_refresh(struct perf_event *event, int refresh) | |||
| 823 | static inline void | 829 | static inline void |
| 824 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { } | 830 | perf_sw_event(u32 event_id, u64 nr, struct pt_regs *regs, u64 addr) { } |
| 825 | static inline void | 831 | static inline void |
| 832 | perf_sw_event_sched(u32 event_id, u64 nr, u64 addr) { } | ||
| 833 | static inline void | ||
| 826 | perf_bp_event(struct perf_event *event, void *data) { } | 834 | perf_bp_event(struct perf_event *event, void *data) { } |
| 827 | 835 | ||
| 828 | static inline int perf_register_guest_info_callbacks | 836 | static inline int perf_register_guest_info_callbacks |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 8b5976364619..e2f1be6dd9dd 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -597,7 +597,7 @@ struct dev_pm_info { | |||
| 597 | 597 | ||
| 598 | extern void update_pm_runtime_accounting(struct device *dev); | 598 | extern void update_pm_runtime_accounting(struct device *dev); |
| 599 | extern int dev_pm_get_subsys_data(struct device *dev); | 599 | extern int dev_pm_get_subsys_data(struct device *dev); |
| 600 | extern int dev_pm_put_subsys_data(struct device *dev); | 600 | extern void dev_pm_put_subsys_data(struct device *dev); |
| 601 | 601 | ||
| 602 | /* | 602 | /* |
| 603 | * Power domains provide callbacks that are executed during system suspend, | 603 | * Power domains provide callbacks that are executed during system suspend, |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index a9edab2c787a..080e778118ba 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -113,8 +113,6 @@ struct generic_pm_domain_data { | |||
| 113 | struct pm_domain_data base; | 113 | struct pm_domain_data base; |
| 114 | struct gpd_timing_data td; | 114 | struct gpd_timing_data td; |
| 115 | struct notifier_block nb; | 115 | struct notifier_block nb; |
| 116 | struct mutex lock; | ||
| 117 | unsigned int refcount; | ||
| 118 | int need_restore; | 116 | int need_restore; |
| 119 | }; | 117 | }; |
| 120 | 118 | ||
| @@ -140,7 +138,6 @@ extern int __pm_genpd_name_add_device(const char *domain_name, | |||
| 140 | 138 | ||
| 141 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, | 139 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, |
| 142 | struct device *dev); | 140 | struct device *dev); |
| 143 | extern void pm_genpd_dev_need_restore(struct device *dev, bool val); | ||
| 144 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 141 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
| 145 | struct generic_pm_domain *new_subdomain); | 142 | struct generic_pm_domain *new_subdomain); |
| 146 | extern int pm_genpd_add_subdomain_names(const char *master_name, | 143 | extern int pm_genpd_add_subdomain_names(const char *master_name, |
| @@ -187,7 +184,6 @@ static inline int pm_genpd_remove_device(struct generic_pm_domain *genpd, | |||
| 187 | { | 184 | { |
| 188 | return -ENOSYS; | 185 | return -ENOSYS; |
| 189 | } | 186 | } |
| 190 | static inline void pm_genpd_dev_need_restore(struct device *dev, bool val) {} | ||
| 191 | static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 187 | static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
| 192 | struct generic_pm_domain *new_sd) | 188 | struct generic_pm_domain *new_sd) |
| 193 | { | 189 | { |
diff --git a/include/linux/printk.h b/include/linux/printk.h index c8f170324e64..4d5bf5726578 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
| @@ -10,9 +10,6 @@ | |||
| 10 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
| 11 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
| 12 | 12 | ||
| 13 | extern char *log_buf_addr_get(void); | ||
| 14 | extern u32 log_buf_len_get(void); | ||
| 15 | |||
| 16 | static inline int printk_get_level(const char *buffer) | 13 | static inline int printk_get_level(const char *buffer) |
| 17 | { | 14 | { |
| 18 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { | 15 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { |
| @@ -163,6 +160,8 @@ extern int kptr_restrict; | |||
| 163 | 160 | ||
| 164 | extern void wake_up_klogd(void); | 161 | extern void wake_up_klogd(void); |
| 165 | 162 | ||
| 163 | char *log_buf_addr_get(void); | ||
| 164 | u32 log_buf_len_get(void); | ||
| 166 | void log_buf_kexec_setup(void); | 165 | void log_buf_kexec_setup(void); |
| 167 | void __init setup_log_buf(int early); | 166 | void __init setup_log_buf(int early); |
| 168 | void dump_stack_set_arch_desc(const char *fmt, ...); | 167 | void dump_stack_set_arch_desc(const char *fmt, ...); |
| @@ -198,6 +197,16 @@ static inline void wake_up_klogd(void) | |||
| 198 | { | 197 | { |
| 199 | } | 198 | } |
| 200 | 199 | ||
| 200 | static inline char *log_buf_addr_get(void) | ||
| 201 | { | ||
| 202 | return NULL; | ||
| 203 | } | ||
| 204 | |||
| 205 | static inline u32 log_buf_len_get(void) | ||
| 206 | { | ||
| 207 | return 0; | ||
| 208 | } | ||
| 209 | |||
| 201 | static inline void log_buf_kexec_setup(void) | 210 | static inline void log_buf_kexec_setup(void) |
| 202 | { | 211 | { |
| 203 | } | 212 | } |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 77aed9ea1d26..dab545bb66b3 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #define SSDR (0x10) /* SSP Data Write/Data Read Register */ | 37 | #define SSDR (0x10) /* SSP Data Write/Data Read Register */ |
| 38 | 38 | ||
| 39 | #define SSTO (0x28) /* SSP Time Out Register */ | 39 | #define SSTO (0x28) /* SSP Time Out Register */ |
| 40 | #define DDS_RATE (0x28) /* SSP DDS Clock Rate Register (Intel Quark) */ | ||
| 40 | #define SSPSP (0x2C) /* SSP Programmable Serial Protocol */ | 41 | #define SSPSP (0x2C) /* SSP Programmable Serial Protocol */ |
| 41 | #define SSTSA (0x30) /* SSP Tx Timeslot Active */ | 42 | #define SSTSA (0x30) /* SSP Tx Timeslot Active */ |
| 42 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ | 43 | #define SSRSA (0x34) /* SSP Rx Timeslot Active */ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 50978b781a19..097d7eb2441e 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -321,6 +321,49 @@ struct dquot_operations { | |||
| 321 | 321 | ||
| 322 | struct path; | 322 | struct path; |
| 323 | 323 | ||
| 324 | /* Structure for communicating via ->get_dqblk() & ->set_dqblk() */ | ||
| 325 | struct qc_dqblk { | ||
| 326 | int d_fieldmask; /* mask of fields to change in ->set_dqblk() */ | ||
| 327 | u64 d_spc_hardlimit; /* absolute limit on used space */ | ||
| 328 | u64 d_spc_softlimit; /* preferred limit on used space */ | ||
| 329 | u64 d_ino_hardlimit; /* maximum # allocated inodes */ | ||
| 330 | u64 d_ino_softlimit; /* preferred inode limit */ | ||
| 331 | u64 d_space; /* Space owned by the user */ | ||
| 332 | u64 d_ino_count; /* # inodes owned by the user */ | ||
| 333 | s64 d_ino_timer; /* zero if within inode limits */ | ||
| 334 | /* if not, we refuse service */ | ||
| 335 | s64 d_spc_timer; /* similar to above; for space */ | ||
| 336 | int d_ino_warns; /* # warnings issued wrt num inodes */ | ||
| 337 | int d_spc_warns; /* # warnings issued wrt used space */ | ||
| 338 | u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */ | ||
| 339 | u64 d_rt_spc_softlimit; /* preferred limit on RT space */ | ||
| 340 | u64 d_rt_space; /* realtime space owned */ | ||
| 341 | s64 d_rt_spc_timer; /* similar to above; for RT space */ | ||
| 342 | int d_rt_spc_warns; /* # warnings issued wrt RT space */ | ||
| 343 | }; | ||
| 344 | |||
| 345 | /* Field specifiers for ->set_dqblk() in struct qc_dqblk */ | ||
| 346 | #define QC_INO_SOFT (1<<0) | ||
| 347 | #define QC_INO_HARD (1<<1) | ||
| 348 | #define QC_SPC_SOFT (1<<2) | ||
| 349 | #define QC_SPC_HARD (1<<3) | ||
| 350 | #define QC_RT_SPC_SOFT (1<<4) | ||
| 351 | #define QC_RT_SPC_HARD (1<<5) | ||
| 352 | #define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \ | ||
| 353 | QC_RT_SPC_SOFT | QC_RT_SPC_HARD) | ||
| 354 | #define QC_SPC_TIMER (1<<6) | ||
| 355 | #define QC_INO_TIMER (1<<7) | ||
| 356 | #define QC_RT_SPC_TIMER (1<<8) | ||
| 357 | #define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER) | ||
| 358 | #define QC_SPC_WARNS (1<<9) | ||
| 359 | #define QC_INO_WARNS (1<<10) | ||
| 360 | #define QC_RT_SPC_WARNS (1<<11) | ||
| 361 | #define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS) | ||
| 362 | #define QC_SPACE (1<<12) | ||
| 363 | #define QC_INO_COUNT (1<<13) | ||
| 364 | #define QC_RT_SPACE (1<<14) | ||
| 365 | #define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE) | ||
| 366 | |||
| 324 | /* Operations handling requests from userspace */ | 367 | /* Operations handling requests from userspace */ |
| 325 | struct quotactl_ops { | 368 | struct quotactl_ops { |
| 326 | int (*quota_on)(struct super_block *, int, int, struct path *); | 369 | int (*quota_on)(struct super_block *, int, int, struct path *); |
| @@ -329,8 +372,8 @@ struct quotactl_ops { | |||
| 329 | int (*quota_sync)(struct super_block *, int); | 372 | int (*quota_sync)(struct super_block *, int); |
| 330 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 373 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
| 331 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 374 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
| 332 | int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 375 | int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 333 | int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); | 376 | int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); |
| 334 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); | 377 | int (*get_xstate)(struct super_block *, struct fs_quota_stat *); |
| 335 | int (*set_xstate)(struct super_block *, unsigned int, int); | 378 | int (*set_xstate)(struct super_block *, unsigned int, int); |
| 336 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); | 379 | int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index f23538a6e411..29e3455f7d41 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -98,9 +98,9 @@ int dquot_quota_sync(struct super_block *sb, int type); | |||
| 98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 98 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 99 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, | 100 | int dquot_get_dqblk(struct super_block *sb, struct kqid id, |
| 101 | struct fs_disk_quota *di); | 101 | struct qc_dqblk *di); |
| 102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, | 102 | int dquot_set_dqblk(struct super_block *sb, struct kqid id, |
| 103 | struct fs_disk_quota *di); | 103 | struct qc_dqblk *di); |
| 104 | 104 | ||
| 105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); | 105 | int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); |
| 106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | 106 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 529bc946f450..a18b16f1dc0e 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -524,11 +524,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n, | |||
| 524 | * @member: the name of the hlist_node within the struct. | 524 | * @member: the name of the hlist_node within the struct. |
| 525 | */ | 525 | */ |
| 526 | #define hlist_for_each_entry_continue_rcu(pos, member) \ | 526 | #define hlist_for_each_entry_continue_rcu(pos, member) \ |
| 527 | for (pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\ | 527 | for (pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \ |
| 528 | typeof(*(pos)), member); \ | 528 | &(pos)->member)), typeof(*(pos)), member); \ |
| 529 | pos; \ | 529 | pos; \ |
| 530 | pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\ | 530 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \ |
| 531 | typeof(*(pos)), member)) | 531 | &(pos)->member)), typeof(*(pos)), member)) |
| 532 | 532 | ||
| 533 | /** | 533 | /** |
| 534 | * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point | 534 | * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point |
| @@ -536,11 +536,11 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n, | |||
| 536 | * @member: the name of the hlist_node within the struct. | 536 | * @member: the name of the hlist_node within the struct. |
| 537 | */ | 537 | */ |
| 538 | #define hlist_for_each_entry_continue_rcu_bh(pos, member) \ | 538 | #define hlist_for_each_entry_continue_rcu_bh(pos, member) \ |
| 539 | for (pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\ | 539 | for (pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \ |
| 540 | typeof(*(pos)), member); \ | 540 | &(pos)->member)), typeof(*(pos)), member); \ |
| 541 | pos; \ | 541 | pos; \ |
| 542 | pos = hlist_entry_safe(rcu_dereference_bh((pos)->member.next),\ | 542 | pos = hlist_entry_safe(rcu_dereference_bh(hlist_next_rcu( \ |
| 543 | typeof(*(pos)), member)) | 543 | &(pos)->member)), typeof(*(pos)), member)) |
| 544 | 544 | ||
| 545 | /** | 545 | /** |
| 546 | * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point | 546 | * hlist_for_each_entry_from_rcu - iterate over a hlist continuing from current point |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index ed4f5939a452..78097491cd99 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -331,12 +331,13 @@ static inline void rcu_init_nohz(void) | |||
| 331 | extern struct srcu_struct tasks_rcu_exit_srcu; | 331 | extern struct srcu_struct tasks_rcu_exit_srcu; |
| 332 | #define rcu_note_voluntary_context_switch(t) \ | 332 | #define rcu_note_voluntary_context_switch(t) \ |
| 333 | do { \ | 333 | do { \ |
| 334 | rcu_all_qs(); \ | ||
| 334 | if (ACCESS_ONCE((t)->rcu_tasks_holdout)) \ | 335 | if (ACCESS_ONCE((t)->rcu_tasks_holdout)) \ |
| 335 | ACCESS_ONCE((t)->rcu_tasks_holdout) = false; \ | 336 | ACCESS_ONCE((t)->rcu_tasks_holdout) = false; \ |
| 336 | } while (0) | 337 | } while (0) |
| 337 | #else /* #ifdef CONFIG_TASKS_RCU */ | 338 | #else /* #ifdef CONFIG_TASKS_RCU */ |
| 338 | #define TASKS_RCU(x) do { } while (0) | 339 | #define TASKS_RCU(x) do { } while (0) |
| 339 | #define rcu_note_voluntary_context_switch(t) do { } while (0) | 340 | #define rcu_note_voluntary_context_switch(t) rcu_all_qs() |
| 340 | #endif /* #else #ifdef CONFIG_TASKS_RCU */ | 341 | #endif /* #else #ifdef CONFIG_TASKS_RCU */ |
| 341 | 342 | ||
| 342 | /** | 343 | /** |
| @@ -582,11 +583,11 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 582 | }) | 583 | }) |
| 583 | #define __rcu_dereference_check(p, c, space) \ | 584 | #define __rcu_dereference_check(p, c, space) \ |
| 584 | ({ \ | 585 | ({ \ |
| 585 | typeof(*p) *_________p1 = (typeof(*p) *__force)ACCESS_ONCE(p); \ | 586 | /* Dependency order vs. p above. */ \ |
| 587 | typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ | ||
| 586 | rcu_lockdep_assert(c, "suspicious rcu_dereference_check() usage"); \ | 588 | rcu_lockdep_assert(c, "suspicious rcu_dereference_check() usage"); \ |
| 587 | rcu_dereference_sparse(p, space); \ | 589 | rcu_dereference_sparse(p, space); \ |
| 588 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | 590 | ((typeof(*p) __force __kernel *)(________p1)); \ |
| 589 | ((typeof(*p) __force __kernel *)(_________p1)); \ | ||
| 590 | }) | 591 | }) |
| 591 | #define __rcu_dereference_protected(p, c, space) \ | 592 | #define __rcu_dereference_protected(p, c, space) \ |
| 592 | ({ \ | 593 | ({ \ |
| @@ -603,10 +604,10 @@ static inline void rcu_preempt_sleep_check(void) | |||
| 603 | }) | 604 | }) |
| 604 | #define __rcu_dereference_index_check(p, c) \ | 605 | #define __rcu_dereference_index_check(p, c) \ |
| 605 | ({ \ | 606 | ({ \ |
| 606 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 607 | /* Dependency order vs. p above. */ \ |
| 608 | typeof(p) _________p1 = lockless_dereference(p); \ | ||
| 607 | rcu_lockdep_assert(c, \ | 609 | rcu_lockdep_assert(c, \ |
| 608 | "suspicious rcu_dereference_index_check() usage"); \ | 610 | "suspicious rcu_dereference_index_check() usage"); \ |
| 609 | smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ | ||
| 610 | (_________p1); \ | 611 | (_________p1); \ |
| 611 | }) | 612 | }) |
| 612 | 613 | ||
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 0e5366200154..937edaeb150d 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -92,17 +92,49 @@ static inline void rcu_virt_note_context_switch(int cpu) | |||
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | /* | 94 | /* |
| 95 | * Return the number of grace periods. | 95 | * Return the number of grace periods started. |
| 96 | */ | 96 | */ |
| 97 | static inline long rcu_batches_completed(void) | 97 | static inline unsigned long rcu_batches_started(void) |
| 98 | { | 98 | { |
| 99 | return 0; | 99 | return 0; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | /* | 102 | /* |
| 103 | * Return the number of bottom-half grace periods. | 103 | * Return the number of bottom-half grace periods started. |
| 104 | */ | 104 | */ |
| 105 | static inline long rcu_batches_completed_bh(void) | 105 | static inline unsigned long rcu_batches_started_bh(void) |
| 106 | { | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | |||
| 110 | /* | ||
| 111 | * Return the number of sched grace periods started. | ||
| 112 | */ | ||
| 113 | static inline unsigned long rcu_batches_started_sched(void) | ||
| 114 | { | ||
| 115 | return 0; | ||
| 116 | } | ||
| 117 | |||
| 118 | /* | ||
| 119 | * Return the number of grace periods completed. | ||
| 120 | */ | ||
| 121 | static inline unsigned long rcu_batches_completed(void) | ||
| 122 | { | ||
| 123 | return 0; | ||
| 124 | } | ||
| 125 | |||
| 126 | /* | ||
| 127 | * Return the number of bottom-half grace periods completed. | ||
| 128 | */ | ||
| 129 | static inline unsigned long rcu_batches_completed_bh(void) | ||
| 130 | { | ||
| 131 | return 0; | ||
| 132 | } | ||
| 133 | |||
| 134 | /* | ||
| 135 | * Return the number of sched grace periods completed. | ||
| 136 | */ | ||
| 137 | static inline unsigned long rcu_batches_completed_sched(void) | ||
| 106 | { | 138 | { |
| 107 | return 0; | 139 | return 0; |
| 108 | } | 140 | } |
| @@ -154,7 +186,10 @@ static inline bool rcu_is_watching(void) | |||
| 154 | return true; | 186 | return true; |
| 155 | } | 187 | } |
| 156 | 188 | ||
| 157 | |||
| 158 | #endif /* #else defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */ | 189 | #endif /* #else defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) */ |
| 159 | 190 | ||
| 191 | static inline void rcu_all_qs(void) | ||
| 192 | { | ||
| 193 | } | ||
| 194 | |||
| 160 | #endif /* __LINUX_RCUTINY_H */ | 195 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 52953790dcca..d2e583a6aaca 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
| @@ -81,9 +81,12 @@ void cond_synchronize_rcu(unsigned long oldstate); | |||
| 81 | 81 | ||
| 82 | extern unsigned long rcutorture_testseq; | 82 | extern unsigned long rcutorture_testseq; |
| 83 | extern unsigned long rcutorture_vernum; | 83 | extern unsigned long rcutorture_vernum; |
| 84 | long rcu_batches_completed(void); | 84 | unsigned long rcu_batches_started(void); |
| 85 | long rcu_batches_completed_bh(void); | 85 | unsigned long rcu_batches_started_bh(void); |
| 86 | long rcu_batches_completed_sched(void); | 86 | unsigned long rcu_batches_started_sched(void); |
| 87 | unsigned long rcu_batches_completed(void); | ||
| 88 | unsigned long rcu_batches_completed_bh(void); | ||
| 89 | unsigned long rcu_batches_completed_sched(void); | ||
| 87 | void show_rcu_gp_kthreads(void); | 90 | void show_rcu_gp_kthreads(void); |
| 88 | 91 | ||
| 89 | void rcu_force_quiescent_state(void); | 92 | void rcu_force_quiescent_state(void); |
| @@ -97,4 +100,6 @@ extern int rcu_scheduler_active __read_mostly; | |||
| 97 | 100 | ||
| 98 | bool rcu_is_watching(void); | 101 | bool rcu_is_watching(void); |
| 99 | 102 | ||
| 103 | void rcu_all_qs(void); | ||
| 104 | |||
| 100 | #endif /* __LINUX_RCUTREE_H */ | 105 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4419b99d8d6e..116655d92269 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
| @@ -468,7 +468,7 @@ bool regmap_reg_in_ranges(unsigned int reg, | |||
| 468 | * | 468 | * |
| 469 | * @reg: Offset of the register within the regmap bank | 469 | * @reg: Offset of the register within the regmap bank |
| 470 | * @lsb: lsb of the register field. | 470 | * @lsb: lsb of the register field. |
| 471 | * @reg: msb of the register field. | 471 | * @msb: msb of the register field. |
| 472 | * @id_size: port size if it has some ports | 472 | * @id_size: port size if it has some ports |
| 473 | * @id_offset: address offset for each ports | 473 | * @id_offset: address offset for each ports |
| 474 | */ | 474 | */ |
diff --git a/include/linux/regulator/da9211.h b/include/linux/regulator/da9211.h index 5479394fefce..5dd65acc2a69 100644 --- a/include/linux/regulator/da9211.h +++ b/include/linux/regulator/da9211.h | |||
| @@ -32,6 +32,8 @@ struct da9211_pdata { | |||
| 32 | * 2 : 2 phase 2 buck | 32 | * 2 : 2 phase 2 buck |
| 33 | */ | 33 | */ |
| 34 | int num_buck; | 34 | int num_buck; |
| 35 | int gpio_ren[DA9211_MAX_REGULATORS]; | ||
| 36 | struct device_node *reg_node[DA9211_MAX_REGULATORS]; | ||
| 35 | struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; | 37 | struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; |
| 36 | }; | 38 | }; |
| 37 | #endif | 39 | #endif |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 5f1e9ca47417..d4ad5b5a02bb 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | struct regmap; | 22 | struct regmap; |
| 23 | struct regulator_dev; | 23 | struct regulator_dev; |
| 24 | struct regulator_config; | ||
| 24 | struct regulator_init_data; | 25 | struct regulator_init_data; |
| 25 | struct regulator_enable_gpio; | 26 | struct regulator_enable_gpio; |
| 26 | 27 | ||
| @@ -205,6 +206,15 @@ enum regulator_type { | |||
| 205 | * @supply_name: Identifying the regulator supply | 206 | * @supply_name: Identifying the regulator supply |
| 206 | * @of_match: Name used to identify regulator in DT. | 207 | * @of_match: Name used to identify regulator in DT. |
| 207 | * @regulators_node: Name of node containing regulator definitions in DT. | 208 | * @regulators_node: Name of node containing regulator definitions in DT. |
| 209 | * @of_parse_cb: Optional callback called only if of_match is present. | ||
| 210 | * Will be called for each regulator parsed from DT, during | ||
| 211 | * init_data parsing. | ||
| 212 | * The regulator_config passed as argument to the callback will | ||
| 213 | * be a copy of config passed to regulator_register, valid only | ||
| 214 | * for this particular call. Callback may freely change the | ||
| 215 | * config but it cannot store it for later usage. | ||
| 216 | * Callback should return 0 on success or negative ERRNO | ||
| 217 | * indicating failure. | ||
| 208 | * @id: Numerical identifier for the regulator. | 218 | * @id: Numerical identifier for the regulator. |
| 209 | * @ops: Regulator operations table. | 219 | * @ops: Regulator operations table. |
| 210 | * @irq: Interrupt number for the regulator. | 220 | * @irq: Interrupt number for the regulator. |
| @@ -251,6 +261,9 @@ struct regulator_desc { | |||
| 251 | const char *supply_name; | 261 | const char *supply_name; |
| 252 | const char *of_match; | 262 | const char *of_match; |
| 253 | const char *regulators_node; | 263 | const char *regulators_node; |
| 264 | int (*of_parse_cb)(struct device_node *, | ||
| 265 | const struct regulator_desc *, | ||
| 266 | struct regulator_config *); | ||
| 254 | int id; | 267 | int id; |
| 255 | bool continuous_voltage_range; | 268 | bool continuous_voltage_range; |
| 256 | unsigned n_voltages; | 269 | unsigned n_voltages; |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 0b08d05d470b..b07562e082c4 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -191,15 +191,22 @@ struct regulator_init_data { | |||
| 191 | void *driver_data; /* core does not touch this */ | 191 | void *driver_data; /* core does not touch this */ |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | int regulator_suspend_prepare(suspend_state_t state); | ||
| 195 | int regulator_suspend_finish(void); | ||
| 196 | |||
| 197 | #ifdef CONFIG_REGULATOR | 194 | #ifdef CONFIG_REGULATOR |
| 198 | void regulator_has_full_constraints(void); | 195 | void regulator_has_full_constraints(void); |
| 196 | int regulator_suspend_prepare(suspend_state_t state); | ||
| 197 | int regulator_suspend_finish(void); | ||
| 199 | #else | 198 | #else |
| 200 | static inline void regulator_has_full_constraints(void) | 199 | static inline void regulator_has_full_constraints(void) |
| 201 | { | 200 | { |
| 202 | } | 201 | } |
| 202 | static inline int regulator_suspend_prepare(suspend_state_t state) | ||
| 203 | { | ||
| 204 | return 0; | ||
| 205 | } | ||
| 206 | static inline int regulator_suspend_finish(void) | ||
| 207 | { | ||
| 208 | return 0; | ||
| 209 | } | ||
| 203 | #endif | 210 | #endif |
| 204 | 211 | ||
| 205 | #endif | 212 | #endif |
diff --git a/include/linux/regulator/mt6397-regulator.h b/include/linux/regulator/mt6397-regulator.h new file mode 100644 index 000000000000..30cc5963e265 --- /dev/null +++ b/include/linux/regulator/mt6397-regulator.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2014 MediaTek Inc. | ||
| 3 | * Author: Flora Fu <flora.fu@mediatek.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __LINUX_REGULATOR_MT6397_H | ||
| 16 | #define __LINUX_REGULATOR_MT6397_H | ||
| 17 | |||
| 18 | enum { | ||
| 19 | MT6397_ID_VPCA15 = 0, | ||
| 20 | MT6397_ID_VPCA7, | ||
| 21 | MT6397_ID_VSRAMCA15, | ||
| 22 | MT6397_ID_VSRAMCA7, | ||
| 23 | MT6397_ID_VCORE, | ||
| 24 | MT6397_ID_VGPU, | ||
| 25 | MT6397_ID_VDRM, | ||
| 26 | MT6397_ID_VIO18 = 7, | ||
| 27 | MT6397_ID_VTCXO, | ||
| 28 | MT6397_ID_VA28, | ||
| 29 | MT6397_ID_VCAMA, | ||
| 30 | MT6397_ID_VIO28, | ||
| 31 | MT6397_ID_VUSB, | ||
| 32 | MT6397_ID_VMC, | ||
| 33 | MT6397_ID_VMCH, | ||
| 34 | MT6397_ID_VEMC3V3, | ||
| 35 | MT6397_ID_VGP1, | ||
| 36 | MT6397_ID_VGP2, | ||
| 37 | MT6397_ID_VGP3, | ||
| 38 | MT6397_ID_VGP4, | ||
| 39 | MT6397_ID_VGP5, | ||
| 40 | MT6397_ID_VGP6, | ||
| 41 | MT6397_ID_VIBR, | ||
| 42 | MT6397_ID_RG_MAX, | ||
| 43 | }; | ||
| 44 | |||
| 45 | #define MT6397_MAX_REGULATOR MT6397_ID_RG_MAX | ||
| 46 | #define MT6397_REGULATOR_ID97 0x97 | ||
| 47 | #define MT6397_REGULATOR_ID91 0x91 | ||
| 48 | |||
| 49 | #endif /* __LINUX_REGULATOR_MT6397_H */ | ||
diff --git a/include/linux/regulator/pfuze100.h b/include/linux/regulator/pfuze100.h index 364f7a7c43db..70c6c66c5bcf 100644 --- a/include/linux/regulator/pfuze100.h +++ b/include/linux/regulator/pfuze100.h | |||
| @@ -49,6 +49,20 @@ | |||
| 49 | #define PFUZE200_VGEN5 11 | 49 | #define PFUZE200_VGEN5 11 |
| 50 | #define PFUZE200_VGEN6 12 | 50 | #define PFUZE200_VGEN6 12 |
| 51 | 51 | ||
| 52 | #define PFUZE3000_SW1A 0 | ||
| 53 | #define PFUZE3000_SW1B 1 | ||
| 54 | #define PFUZE3000_SW2 2 | ||
| 55 | #define PFUZE3000_SW3 3 | ||
| 56 | #define PFUZE3000_SWBST 4 | ||
| 57 | #define PFUZE3000_VSNVS 5 | ||
| 58 | #define PFUZE3000_VREFDDR 6 | ||
| 59 | #define PFUZE3000_VLDO1 7 | ||
| 60 | #define PFUZE3000_VLDO2 8 | ||
| 61 | #define PFUZE3000_VCCSD 9 | ||
| 62 | #define PFUZE3000_V33 10 | ||
| 63 | #define PFUZE3000_VLDO3 11 | ||
| 64 | #define PFUZE3000_VLDO4 12 | ||
| 65 | |||
| 52 | struct regulator_init_data; | 66 | struct regulator_init_data; |
| 53 | 67 | ||
| 54 | struct pfuze_regulator_platform_data { | 68 | struct pfuze_regulator_platform_data { |
diff --git a/include/linux/resource_ext.h b/include/linux/resource_ext.h new file mode 100644 index 000000000000..e2bf63d881d4 --- /dev/null +++ b/include/linux/resource_ext.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015, Intel Corporation | ||
| 3 | * Author: Jiang Liu <jiang.liu@linux.intel.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | #ifndef _LINUX_RESOURCE_EXT_H | ||
| 15 | #define _LINUX_RESOURCE_EXT_H | ||
| 16 | #include <linux/types.h> | ||
| 17 | #include <linux/list.h> | ||
| 18 | #include <linux/ioport.h> | ||
| 19 | #include <linux/slab.h> | ||
| 20 | |||
| 21 | /* Represent resource window for bridge devices */ | ||
| 22 | struct resource_win { | ||
| 23 | struct resource res; /* In master (CPU) address space */ | ||
| 24 | resource_size_t offset; /* Translation offset for bridge */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Common resource list management data structure and interfaces to support | ||
| 29 | * ACPI, PNP and PCI host bridge etc. | ||
| 30 | */ | ||
| 31 | struct resource_entry { | ||
| 32 | struct list_head node; | ||
| 33 | struct resource *res; /* In master (CPU) address space */ | ||
| 34 | resource_size_t offset; /* Translation offset for bridge */ | ||
| 35 | struct resource __res; /* Default storage for res */ | ||
| 36 | }; | ||
| 37 | |||
| 38 | extern struct resource_entry * | ||
| 39 | resource_list_create_entry(struct resource *res, size_t extra_size); | ||
| 40 | extern void resource_list_free(struct list_head *head); | ||
| 41 | |||
| 42 | static inline void resource_list_add(struct resource_entry *entry, | ||
| 43 | struct list_head *head) | ||
| 44 | { | ||
| 45 | list_add(&entry->node, head); | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline void resource_list_add_tail(struct resource_entry *entry, | ||
| 49 | struct list_head *head) | ||
| 50 | { | ||
| 51 | list_add_tail(&entry->node, head); | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline void resource_list_del(struct resource_entry *entry) | ||
| 55 | { | ||
| 56 | list_del(&entry->node); | ||
| 57 | } | ||
| 58 | |||
| 59 | static inline void resource_list_free_entry(struct resource_entry *entry) | ||
| 60 | { | ||
| 61 | kfree(entry); | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline void | ||
| 65 | resource_list_destroy_entry(struct resource_entry *entry) | ||
| 66 | { | ||
| 67 | resource_list_del(entry); | ||
| 68 | resource_list_free_entry(entry); | ||
| 69 | } | ||
| 70 | |||
| 71 | #define resource_list_for_each_entry(entry, list) \ | ||
| 72 | list_for_each_entry((entry), (list), node) | ||
| 73 | |||
| 74 | #define resource_list_for_each_entry_safe(entry, tmp, list) \ | ||
| 75 | list_for_each_entry_safe((entry), (tmp), (list), node) | ||
| 76 | |||
| 77 | #endif /* _LINUX_RESOURCE_EXT_H */ | ||
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 6d6be09a2fe5..dcad7ee0d746 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -161,7 +161,7 @@ extern void devm_rtc_device_unregister(struct device *dev, | |||
| 161 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 161 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
| 162 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 162 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
| 163 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); | 163 | extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); |
| 164 | extern int rtc_set_ntp_time(struct timespec now); | 164 | extern int rtc_set_ntp_time(struct timespec64 now); |
| 165 | int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); | 165 | int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); |
| 166 | extern int rtc_read_alarm(struct rtc_device *rtc, | 166 | extern int rtc_read_alarm(struct rtc_device *rtc, |
| 167 | struct rtc_wkalrm *alrm); | 167 | struct rtc_wkalrm *alrm); |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 93dff5fff524..be91db2a7017 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -151,6 +151,13 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, | |||
| 151 | static inline void kick_all_cpus_sync(void) { } | 151 | static inline void kick_all_cpus_sync(void) { } |
| 152 | static inline void wake_up_all_idle_cpus(void) { } | 152 | static inline void wake_up_all_idle_cpus(void) { } |
| 153 | 153 | ||
| 154 | #ifdef CONFIG_UP_LATE_INIT | ||
| 155 | extern void __init up_late_init(void); | ||
| 156 | static inline void smp_init(void) { up_late_init(); } | ||
| 157 | #else | ||
| 158 | static inline void smp_init(void) { } | ||
| 159 | #endif | ||
| 160 | |||
| 154 | #endif /* !SMP */ | 161 | #endif /* !SMP */ |
| 155 | 162 | ||
| 156 | /* | 163 | /* |
diff --git a/include/linux/spi/at86rf230.h b/include/linux/spi/at86rf230.h index b2b1afbb3202..cd519a11c2c6 100644 --- a/include/linux/spi/at86rf230.h +++ b/include/linux/spi/at86rf230.h | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | 14 | * |
| 15 | * You should have received a copy of the GNU General Public License along | ||
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 18 | * | ||
| 19 | * Written by: | 15 | * Written by: |
| 20 | * Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com> | 16 | * Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com> |
| 21 | */ | 17 | */ |
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h index bc8677c8eba9..e69e9b51b21a 100644 --- a/include/linux/spi/l4f00242t03.h +++ b/include/linux/spi/l4f00242t03.h | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ | 17 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ |
diff --git a/include/linux/spi/lms283gf05.h b/include/linux/spi/lms283gf05.h index 555d254e6606..fdd1d1d51da5 100644 --- a/include/linux/spi/lms283gf05.h +++ b/include/linux/spi/lms283gf05.h | |||
| @@ -11,10 +11,6 @@ | |||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 18 | */ | 14 | */ |
| 19 | 15 | ||
| 20 | #ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_ | 16 | #ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_ |
diff --git a/include/linux/spi/mxs-spi.h b/include/linux/spi/mxs-spi.h index 4835486f58e5..381d368b91b4 100644 --- a/include/linux/spi/mxs-spi.h +++ b/include/linux/spi/mxs-spi.h | |||
| @@ -15,10 +15,6 @@ | |||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License along | ||
| 20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 21 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 22 | */ | 18 | */ |
| 23 | 19 | ||
| 24 | #ifndef __LINUX_SPI_MXS_SPI_H__ | 20 | #ifndef __LINUX_SPI_MXS_SPI_H__ |
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h index d5a316550177..6d36dacec4ba 100644 --- a/include/linux/spi/pxa2xx_spi.h +++ b/include/linux/spi/pxa2xx_spi.h | |||
| @@ -10,10 +10,6 @@ | |||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | 13 | */ |
| 18 | #ifndef __linux_pxa2xx_spi_h | 14 | #ifndef __linux_pxa2xx_spi_h |
| 19 | #define __linux_pxa2xx_spi_h | 15 | #define __linux_pxa2xx_spi_h |
| @@ -57,7 +53,6 @@ struct pxa2xx_spi_chip { | |||
| 57 | #if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) | 53 | #if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) |
| 58 | 54 | ||
| 59 | #include <linux/clk.h> | 55 | #include <linux/clk.h> |
| 60 | #include <mach/dma.h> | ||
| 61 | 56 | ||
| 62 | extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); | 57 | extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); |
| 63 | 58 | ||
diff --git a/include/linux/spi/rspi.h b/include/linux/spi/rspi.h index e546b2ceb623..a693188cc08b 100644 --- a/include/linux/spi/rspi.h +++ b/include/linux/spi/rspi.h | |||
| @@ -11,11 +11,6 @@ | |||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 18 | * | ||
| 19 | */ | 14 | */ |
| 20 | 15 | ||
| 21 | #ifndef __LINUX_SPI_RENESAS_SPI_H__ | 16 | #ifndef __LINUX_SPI_RENESAS_SPI_H__ |
diff --git a/include/linux/spi/sh_hspi.h b/include/linux/spi/sh_hspi.h index a1121f872ac1..aa0d440ab4f0 100644 --- a/include/linux/spi/sh_hspi.h +++ b/include/linux/spi/sh_hspi.h | |||
| @@ -9,10 +9,6 @@ | |||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; if not, write to the Free Software | ||
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 16 | */ | 12 | */ |
| 17 | #ifndef SH_HSPI_H | 13 | #ifndef SH_HSPI_H |
| 18 | #define SH_HSPI_H | 14 | #define SH_HSPI_H |
diff --git a/include/linux/spi/sh_msiof.h b/include/linux/spi/sh_msiof.h index 88a14d81c49e..b087a85f5f72 100644 --- a/include/linux/spi/sh_msiof.h +++ b/include/linux/spi/sh_msiof.h | |||
| @@ -7,6 +7,8 @@ struct sh_msiof_spi_info { | |||
| 7 | u16 num_chipselect; | 7 | u16 num_chipselect; |
| 8 | unsigned int dma_tx_id; | 8 | unsigned int dma_tx_id; |
| 9 | unsigned int dma_rx_id; | 9 | unsigned int dma_rx_id; |
| 10 | u32 dtdl; | ||
| 11 | u32 syncdl; | ||
| 10 | }; | 12 | }; |
| 11 | 13 | ||
| 12 | #endif /* __SPI_SH_MSIOF_H__ */ | 14 | #endif /* __SPI_SH_MSIOF_H__ */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a6ef2a8e6de4..ed9489d893a4 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -10,10 +10,6 @@ | |||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | 13 | */ |
| 18 | 14 | ||
| 19 | #ifndef __LINUX_SPI_H | 15 | #ifndef __LINUX_SPI_H |
| @@ -260,6 +256,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 260 | * @pump_messages: work struct for scheduling work to the message pump | 256 | * @pump_messages: work struct for scheduling work to the message pump |
| 261 | * @queue_lock: spinlock to syncronise access to message queue | 257 | * @queue_lock: spinlock to syncronise access to message queue |
| 262 | * @queue: message queue | 258 | * @queue: message queue |
| 259 | * @idling: the device is entering idle state | ||
| 263 | * @cur_msg: the currently in-flight message | 260 | * @cur_msg: the currently in-flight message |
| 264 | * @cur_msg_prepared: spi_prepare_message was called for the currently | 261 | * @cur_msg_prepared: spi_prepare_message was called for the currently |
| 265 | * in-flight message | 262 | * in-flight message |
| @@ -425,6 +422,7 @@ struct spi_master { | |||
| 425 | spinlock_t queue_lock; | 422 | spinlock_t queue_lock; |
| 426 | struct list_head queue; | 423 | struct list_head queue; |
| 427 | struct spi_message *cur_msg; | 424 | struct spi_message *cur_msg; |
| 425 | bool idling; | ||
| 428 | bool busy; | 426 | bool busy; |
| 429 | bool running; | 427 | bool running; |
| 430 | bool rt; | 428 | bool rt; |
diff --git a/include/linux/spi/tle62x0.h b/include/linux/spi/tle62x0.h index 60b59187e590..414c6fddfcf0 100644 --- a/include/linux/spi/tle62x0.h +++ b/include/linux/spi/tle62x0.h | |||
| @@ -12,10 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | 15 | */ |
| 20 | 16 | ||
| 21 | struct tle62x0_pdata { | 17 | struct tle62x0_pdata { |
diff --git a/include/linux/spi/tsc2005.h b/include/linux/spi/tsc2005.h index 8f721e465e05..563b3b1799a8 100644 --- a/include/linux/spi/tsc2005.h +++ b/include/linux/spi/tsc2005.h | |||
| @@ -12,11 +12,6 @@ | |||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | * | ||
| 20 | */ | 15 | */ |
| 21 | 16 | ||
| 22 | #ifndef _LINUX_SPI_TSC2005_H | 17 | #ifndef _LINUX_SPI_TSC2005_H |
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index a2783cb5d275..9cfd9623fb03 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -45,7 +45,7 @@ struct rcu_batch { | |||
| 45 | #define RCU_BATCH_INIT(name) { NULL, &(name.head) } | 45 | #define RCU_BATCH_INIT(name) { NULL, &(name.head) } |
| 46 | 46 | ||
| 47 | struct srcu_struct { | 47 | struct srcu_struct { |
| 48 | unsigned completed; | 48 | unsigned long completed; |
| 49 | struct srcu_struct_array __percpu *per_cpu_ref; | 49 | struct srcu_struct_array __percpu *per_cpu_ref; |
| 50 | spinlock_t queue_lock; /* protect ->batch_queue, ->running */ | 50 | spinlock_t queue_lock; /* protect ->batch_queue, ->running */ |
| 51 | bool running; | 51 | bool running; |
| @@ -102,13 +102,11 @@ void process_srcu(struct work_struct *work); | |||
| 102 | * define and init a srcu struct at build time. | 102 | * define and init a srcu struct at build time. |
| 103 | * dont't call init_srcu_struct() nor cleanup_srcu_struct() on it. | 103 | * dont't call init_srcu_struct() nor cleanup_srcu_struct() on it. |
| 104 | */ | 104 | */ |
| 105 | #define DEFINE_SRCU(name) \ | 105 | #define __DEFINE_SRCU(name, is_static) \ |
| 106 | static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\ | 106 | static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\ |
| 107 | struct srcu_struct name = __SRCU_STRUCT_INIT(name); | 107 | is_static struct srcu_struct name = __SRCU_STRUCT_INIT(name) |
| 108 | 108 | #define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */) | |
| 109 | #define DEFINE_STATIC_SRCU(name) \ | 109 | #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static) |
| 110 | static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\ | ||
| 111 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name); | ||
| 112 | 110 | ||
| 113 | /** | 111 | /** |
| 114 | * call_srcu() - Queue a callback for invocation after an SRCU grace period | 112 | * call_srcu() - Queue a callback for invocation after an SRCU grace period |
| @@ -135,7 +133,7 @@ int __srcu_read_lock(struct srcu_struct *sp) __acquires(sp); | |||
| 135 | void __srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp); | 133 | void __srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp); |
| 136 | void synchronize_srcu(struct srcu_struct *sp); | 134 | void synchronize_srcu(struct srcu_struct *sp); |
| 137 | void synchronize_srcu_expedited(struct srcu_struct *sp); | 135 | void synchronize_srcu_expedited(struct srcu_struct *sp); |
| 138 | long srcu_batches_completed(struct srcu_struct *sp); | 136 | unsigned long srcu_batches_completed(struct srcu_struct *sp); |
| 139 | void srcu_barrier(struct srcu_struct *sp); | 137 | void srcu_barrier(struct srcu_struct *sp); |
| 140 | 138 | ||
| 141 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 139 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 9b63d13ba82b..3eaae4754275 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
| @@ -33,6 +33,7 @@ extern time64_t ktime_get_real_seconds(void); | |||
| 33 | 33 | ||
| 34 | extern int __getnstimeofday64(struct timespec64 *tv); | 34 | extern int __getnstimeofday64(struct timespec64 *tv); |
| 35 | extern void getnstimeofday64(struct timespec64 *tv); | 35 | extern void getnstimeofday64(struct timespec64 *tv); |
| 36 | extern void getboottime64(struct timespec64 *ts); | ||
| 36 | 37 | ||
| 37 | #if BITS_PER_LONG == 64 | 38 | #if BITS_PER_LONG == 64 |
| 38 | /** | 39 | /** |
| @@ -72,6 +73,11 @@ static inline struct timespec get_monotonic_coarse(void) | |||
| 72 | { | 73 | { |
| 73 | return get_monotonic_coarse64(); | 74 | return get_monotonic_coarse64(); |
| 74 | } | 75 | } |
| 76 | |||
| 77 | static inline void getboottime(struct timespec *ts) | ||
| 78 | { | ||
| 79 | return getboottime64(ts); | ||
| 80 | } | ||
| 75 | #else | 81 | #else |
| 76 | /** | 82 | /** |
| 77 | * Deprecated. Use do_settimeofday64(). | 83 | * Deprecated. Use do_settimeofday64(). |
| @@ -129,9 +135,15 @@ static inline struct timespec get_monotonic_coarse(void) | |||
| 129 | { | 135 | { |
| 130 | return timespec64_to_timespec(get_monotonic_coarse64()); | 136 | return timespec64_to_timespec(get_monotonic_coarse64()); |
| 131 | } | 137 | } |
| 132 | #endif | ||
| 133 | 138 | ||
| 134 | extern void getboottime(struct timespec *ts); | 139 | static inline void getboottime(struct timespec *ts) |
| 140 | { | ||
| 141 | struct timespec64 ts64; | ||
| 142 | |||
| 143 | getboottime64(&ts64); | ||
| 144 | *ts = timespec64_to_timespec(ts64); | ||
| 145 | } | ||
| 146 | #endif | ||
| 135 | 147 | ||
| 136 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) | 148 | #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) |
| 137 | #define ktime_get_real_ts64(ts) getnstimeofday64(ts) | 149 | #define ktime_get_real_ts64(ts) getnstimeofday64(ts) |
| @@ -217,6 +229,11 @@ static inline void get_monotonic_boottime(struct timespec *ts) | |||
| 217 | *ts = ktime_to_timespec(ktime_get_boottime()); | 229 | *ts = ktime_to_timespec(ktime_get_boottime()); |
| 218 | } | 230 | } |
| 219 | 231 | ||
| 232 | static inline void get_monotonic_boottime64(struct timespec64 *ts) | ||
| 233 | { | ||
| 234 | *ts = ktime_to_timespec64(ktime_get_boottime()); | ||
| 235 | } | ||
| 236 | |||
| 220 | static inline void timekeeping_clocktai(struct timespec *ts) | 237 | static inline void timekeeping_clocktai(struct timespec *ts) |
| 221 | { | 238 | { |
| 222 | *ts = ktime_to_timespec(ktime_get_clocktai()); | 239 | *ts = ktime_to_timespec(ktime_get_clocktai()); |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index e08e21e5f601..c72851328ca9 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -173,7 +173,7 @@ extern void syscall_unregfunc(void); | |||
| 173 | TP_PROTO(data_proto), \ | 173 | TP_PROTO(data_proto), \ |
| 174 | TP_ARGS(data_args), \ | 174 | TP_ARGS(data_args), \ |
| 175 | TP_CONDITION(cond),,); \ | 175 | TP_CONDITION(cond),,); \ |
| 176 | if (IS_ENABLED(CONFIG_LOCKDEP)) { \ | 176 | if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \ |
| 177 | rcu_read_lock_sched_notrace(); \ | 177 | rcu_read_lock_sched_notrace(); \ |
| 178 | rcu_dereference_sched(__tracepoint_##name.funcs);\ | 178 | rcu_dereference_sched(__tracepoint_##name.funcs);\ |
| 179 | rcu_read_unlock_sched_notrace(); \ | 179 | rcu_read_unlock_sched_notrace(); \ |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 2232ed16635a..537d58eea8a0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -363,7 +363,6 @@ do { \ | |||
| 363 | */ | 363 | */ |
| 364 | #define wait_event_cmd(wq, condition, cmd1, cmd2) \ | 364 | #define wait_event_cmd(wq, condition, cmd1, cmd2) \ |
| 365 | do { \ | 365 | do { \ |
| 366 | might_sleep(); \ | ||
| 367 | if (condition) \ | 366 | if (condition) \ |
| 368 | break; \ | 367 | break; \ |
| 369 | __wait_event_cmd(wq, condition, cmd1, cmd2); \ | 368 | __wait_event_cmd(wq, condition, cmd1, cmd2); \ |
| @@ -991,6 +990,32 @@ wait_on_bit_io(void *word, int bit, unsigned mode) | |||
| 991 | } | 990 | } |
| 992 | 991 | ||
| 993 | /** | 992 | /** |
| 993 | * wait_on_bit_timeout - wait for a bit to be cleared or a timeout elapses | ||
| 994 | * @word: the word being waited on, a kernel virtual address | ||
| 995 | * @bit: the bit of the word being waited on | ||
| 996 | * @mode: the task state to sleep in | ||
| 997 | * @timeout: timeout, in jiffies | ||
| 998 | * | ||
| 999 | * Use the standard hashed waitqueue table to wait for a bit | ||
| 1000 | * to be cleared. This is similar to wait_on_bit(), except also takes a | ||
| 1001 | * timeout parameter. | ||
| 1002 | * | ||
| 1003 | * Returned value will be zero if the bit was cleared before the | ||
| 1004 | * @timeout elapsed, or non-zero if the @timeout elapsed or process | ||
| 1005 | * received a signal and the mode permitted wakeup on that signal. | ||
| 1006 | */ | ||
| 1007 | static inline int | ||
| 1008 | wait_on_bit_timeout(void *word, int bit, unsigned mode, unsigned long timeout) | ||
| 1009 | { | ||
| 1010 | might_sleep(); | ||
| 1011 | if (!test_bit(bit, word)) | ||
| 1012 | return 0; | ||
| 1013 | return out_of_line_wait_on_bit_timeout(word, bit, | ||
| 1014 | bit_wait_timeout, | ||
| 1015 | mode, timeout); | ||
| 1016 | } | ||
| 1017 | |||
| 1018 | /** | ||
| 994 | * wait_on_bit_action - wait for a bit to be cleared | 1019 | * wait_on_bit_action - wait for a bit to be cleared |
| 995 | * @word: the word being waited on, a kernel virtual address | 1020 | * @word: the word being waited on, a kernel virtual address |
| 996 | * @bit: the bit of the word being waited on | 1021 | * @bit: the bit of the word being waited on |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index b996e6cde6bb..74db135f9957 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -220,14 +220,10 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 220 | #endif | 220 | #endif |
| 221 | 221 | ||
| 222 | #define INIT_WORK(_work, _func) \ | 222 | #define INIT_WORK(_work, _func) \ |
| 223 | do { \ | 223 | __INIT_WORK((_work), (_func), 0) |
| 224 | __INIT_WORK((_work), (_func), 0); \ | ||
| 225 | } while (0) | ||
| 226 | 224 | ||
| 227 | #define INIT_WORK_ONSTACK(_work, _func) \ | 225 | #define INIT_WORK_ONSTACK(_work, _func) \ |
| 228 | do { \ | 226 | __INIT_WORK((_work), (_func), 1) |
| 229 | __INIT_WORK((_work), (_func), 1); \ | ||
| 230 | } while (0) | ||
| 231 | 227 | ||
| 232 | #define __INIT_DELAYED_WORK(_work, _func, _tflags) \ | 228 | #define __INIT_DELAYED_WORK(_work, _func, _tflags) \ |
| 233 | do { \ | 229 | do { \ |
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 7ee2df083542..dc8fd81412bf 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h | |||
| @@ -22,9 +22,9 @@ struct flow_keys { | |||
| 22 | __be32 ports; | 22 | __be32 ports; |
| 23 | __be16 port16[2]; | 23 | __be16 port16[2]; |
| 24 | }; | 24 | }; |
| 25 | u16 thoff; | 25 | u16 thoff; |
| 26 | u16 n_proto; | 26 | __be16 n_proto; |
| 27 | u8 ip_proto; | 27 | u8 ip_proto; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow, | 30 | bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow, |
diff --git a/include/net/ip.h b/include/net/ip.h index 0bb620702929..09cf5aebb283 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
| @@ -39,11 +39,12 @@ struct inet_skb_parm { | |||
| 39 | struct ip_options opt; /* Compiled IP options */ | 39 | struct ip_options opt; /* Compiled IP options */ |
| 40 | unsigned char flags; | 40 | unsigned char flags; |
| 41 | 41 | ||
| 42 | #define IPSKB_FORWARDED 1 | 42 | #define IPSKB_FORWARDED BIT(0) |
| 43 | #define IPSKB_XFRM_TUNNEL_SIZE 2 | 43 | #define IPSKB_XFRM_TUNNEL_SIZE BIT(1) |
| 44 | #define IPSKB_XFRM_TRANSFORMED 4 | 44 | #define IPSKB_XFRM_TRANSFORMED BIT(2) |
| 45 | #define IPSKB_FRAG_COMPLETE 8 | 45 | #define IPSKB_FRAG_COMPLETE BIT(3) |
| 46 | #define IPSKB_REROUTED 16 | 46 | #define IPSKB_REROUTED BIT(4) |
| 47 | #define IPSKB_DOREDIRECT BIT(5) | ||
| 47 | 48 | ||
| 48 | u16 frag_max_size; | 49 | u16 frag_max_size; |
| 49 | }; | 50 | }; |
| @@ -180,7 +181,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg) | |||
| 180 | return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; | 181 | return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0; |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 183 | void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, | 184 | void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, |
| 184 | const struct ip_options *sopt, | 185 | const struct ip_options *sopt, |
| 185 | __be32 daddr, __be32 saddr, | 186 | __be32 daddr, __be32 saddr, |
| 186 | const struct ip_reply_arg *arg, | 187 | const struct ip_reply_arg *arg, |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 4292929392b0..6e416f6d3e3c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -671,6 +671,9 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add | |||
| 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); | 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); |
| 672 | } | 672 | } |
| 673 | 673 | ||
| 674 | u32 __ipv6_select_ident(u32 hashrnd, struct in6_addr *dst, | ||
| 675 | struct in6_addr *src); | ||
| 676 | void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); | ||
| 674 | void ipv6_proxy_select_ident(struct sk_buff *skb); | 677 | void ipv6_proxy_select_ident(struct sk_buff *skb); |
| 675 | 678 | ||
| 676 | int ip6_dst_hoplimit(struct dst_entry *dst); | 679 | int ip6_dst_hoplimit(struct dst_entry *dst); |
| @@ -708,7 +711,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
| 708 | __be32 flowlabel, bool autolabel) | 711 | __be32 flowlabel, bool autolabel) |
| 709 | { | 712 | { |
| 710 | if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) { | 713 | if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) { |
| 711 | __be32 hash; | 714 | u32 hash; |
| 712 | 715 | ||
| 713 | hash = skb_get_hash(skb); | 716 | hash = skb_get_hash(skb); |
| 714 | 717 | ||
| @@ -718,7 +721,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
| 718 | */ | 721 | */ |
| 719 | hash ^= hash >> 12; | 722 | hash ^= hash >> 12; |
| 720 | 723 | ||
| 721 | flowlabel = hash & IPV6_FLOWLABEL_MASK; | 724 | flowlabel = (__force __be32)hash & IPV6_FLOWLABEL_MASK; |
| 722 | } | 725 | } |
| 723 | 726 | ||
| 724 | return flowlabel; | 727 | return flowlabel; |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 3ae969e3acf0..9eaaa7884586 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -530,6 +530,8 @@ enum nft_chain_type { | |||
| 530 | 530 | ||
| 531 | int nft_chain_validate_dependency(const struct nft_chain *chain, | 531 | int nft_chain_validate_dependency(const struct nft_chain *chain, |
| 532 | enum nft_chain_type type); | 532 | enum nft_chain_type type); |
| 533 | int nft_chain_validate_hooks(const struct nft_chain *chain, | ||
| 534 | unsigned int hook_flags); | ||
| 533 | 535 | ||
| 534 | struct nft_stats { | 536 | struct nft_stats { |
| 535 | u64 bytes; | 537 | u64 bytes; |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 24945cefc4fd..0ffef1a38efc 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
| @@ -52,6 +52,7 @@ struct netns_ipv4 { | |||
| 52 | struct inet_peer_base *peers; | 52 | struct inet_peer_base *peers; |
| 53 | struct tcpm_hash_bucket *tcp_metrics_hash; | 53 | struct tcpm_hash_bucket *tcp_metrics_hash; |
| 54 | unsigned int tcp_metrics_hash_log; | 54 | unsigned int tcp_metrics_hash_log; |
| 55 | struct sock * __percpu *tcp_sk; | ||
| 55 | struct netns_frags frags; | 56 | struct netns_frags frags; |
| 56 | #ifdef CONFIG_NETFILTER | 57 | #ifdef CONFIG_NETFILTER |
| 57 | struct xt_table *iptable_filter; | 58 | struct xt_table *iptable_filter; |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 3d282cbb66bf..c605d305c577 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
| @@ -79,6 +79,9 @@ struct Qdisc { | |||
| 79 | struct netdev_queue *dev_queue; | 79 | struct netdev_queue *dev_queue; |
| 80 | 80 | ||
| 81 | struct gnet_stats_rate_est64 rate_est; | 81 | struct gnet_stats_rate_est64 rate_est; |
| 82 | struct gnet_stats_basic_cpu __percpu *cpu_bstats; | ||
| 83 | struct gnet_stats_queue __percpu *cpu_qstats; | ||
| 84 | |||
| 82 | struct Qdisc *next_sched; | 85 | struct Qdisc *next_sched; |
| 83 | struct sk_buff *gso_skb; | 86 | struct sk_buff *gso_skb; |
| 84 | /* | 87 | /* |
| @@ -86,15 +89,9 @@ struct Qdisc { | |||
| 86 | */ | 89 | */ |
| 87 | unsigned long state; | 90 | unsigned long state; |
| 88 | struct sk_buff_head q; | 91 | struct sk_buff_head q; |
| 89 | union { | 92 | struct gnet_stats_basic_packed bstats; |
| 90 | struct gnet_stats_basic_packed bstats; | ||
| 91 | struct gnet_stats_basic_cpu __percpu *cpu_bstats; | ||
| 92 | } __packed; | ||
| 93 | unsigned int __state; | 93 | unsigned int __state; |
| 94 | union { | 94 | struct gnet_stats_queue qstats; |
| 95 | struct gnet_stats_queue qstats; | ||
| 96 | struct gnet_stats_queue __percpu *cpu_qstats; | ||
| 97 | } __packed; | ||
| 98 | struct rcu_head rcu_head; | 95 | struct rcu_head rcu_head; |
| 99 | int padded; | 96 | int padded; |
| 100 | atomic_t refcnt; | 97 | atomic_t refcnt; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index f50f29faf76f..9d9111ef43ae 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -834,8 +834,8 @@ void tcp_get_available_congestion_control(char *buf, size_t len); | |||
| 834 | void tcp_get_allowed_congestion_control(char *buf, size_t len); | 834 | void tcp_get_allowed_congestion_control(char *buf, size_t len); |
| 835 | int tcp_set_allowed_congestion_control(char *allowed); | 835 | int tcp_set_allowed_congestion_control(char *allowed); |
| 836 | int tcp_set_congestion_control(struct sock *sk, const char *name); | 836 | int tcp_set_congestion_control(struct sock *sk, const char *name); |
| 837 | void tcp_slow_start(struct tcp_sock *tp, u32 acked); | 837 | u32 tcp_slow_start(struct tcp_sock *tp, u32 acked); |
| 838 | void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w); | 838 | void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked); |
| 839 | 839 | ||
| 840 | u32 tcp_reno_ssthresh(struct sock *sk); | 840 | u32 tcp_reno_ssthresh(struct sock *sk); |
| 841 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked); | 841 | void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 0d74f1de99aa..65994a19e840 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -1707,10 +1707,7 @@ static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t | |||
| 1707 | 1707 | ||
| 1708 | static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) | 1708 | static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) |
| 1709 | { | 1709 | { |
| 1710 | size_t copy_sz; | 1710 | return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; |
| 1711 | |||
| 1712 | copy_sz = min_t(size_t, len, udata->outlen); | ||
| 1713 | return copy_to_user(udata->outbuf, src, copy_sz) ? -EFAULT : 0; | ||
| 1714 | } | 1711 | } |
| 1715 | 1712 | ||
| 1716 | /** | 1713 | /** |
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 2609048c1d44..3a34f6edc2d1 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
| @@ -286,7 +286,7 @@ struct ak4113 { | |||
| 286 | ak4113_write_t *write; | 286 | ak4113_write_t *write; |
| 287 | ak4113_read_t *read; | 287 | ak4113_read_t *read; |
| 288 | void *private_data; | 288 | void *private_data; |
| 289 | unsigned int init:1; | 289 | atomic_t wq_processing; |
| 290 | spinlock_t lock; | 290 | spinlock_t lock; |
| 291 | unsigned char regmap[AK4113_WRITABLE_REGS]; | 291 | unsigned char regmap[AK4113_WRITABLE_REGS]; |
| 292 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; | 292 | struct snd_kcontrol *kctls[AK4113_CONTROLS]; |
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 52f02a60dba7..069299a88915 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
| @@ -168,7 +168,7 @@ struct ak4114 { | |||
| 168 | ak4114_write_t * write; | 168 | ak4114_write_t * write; |
| 169 | ak4114_read_t * read; | 169 | ak4114_read_t * read; |
| 170 | void * private_data; | 170 | void * private_data; |
| 171 | unsigned int init: 1; | 171 | atomic_t wq_processing; |
| 172 | spinlock_t lock; | 172 | spinlock_t lock; |
| 173 | unsigned char regmap[6]; | 173 | unsigned char regmap[6]; |
| 174 | unsigned char txcsb[5]; | 174 | unsigned char txcsb[5]; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index b4fca9aed2a2..ac8b333acb4d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
| @@ -498,6 +498,7 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, | |||
| 498 | unsigned int mask, unsigned int value); | 498 | unsigned int mask, unsigned int value); |
| 499 | 499 | ||
| 500 | #ifdef CONFIG_SND_SOC_AC97_BUS | 500 | #ifdef CONFIG_SND_SOC_AC97_BUS |
| 501 | struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); | ||
| 501 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); | 502 | struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); |
| 502 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); | 503 | void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); |
| 503 | 504 | ||
diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h index 13391d288107..0e7635765153 100644 --- a/include/trace/events/tlb.h +++ b/include/trace/events/tlb.h | |||
| @@ -13,11 +13,13 @@ | |||
| 13 | { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \ | 13 | { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \ |
| 14 | { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" } | 14 | { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" } |
| 15 | 15 | ||
| 16 | TRACE_EVENT(tlb_flush, | 16 | TRACE_EVENT_CONDITION(tlb_flush, |
| 17 | 17 | ||
| 18 | TP_PROTO(int reason, unsigned long pages), | 18 | TP_PROTO(int reason, unsigned long pages), |
| 19 | TP_ARGS(reason, pages), | 19 | TP_ARGS(reason, pages), |
| 20 | 20 | ||
| 21 | TP_CONDITION(cpu_online(smp_processor_id())), | ||
| 22 | |||
| 21 | TP_STRUCT__entry( | 23 | TP_STRUCT__entry( |
| 22 | __field( int, reason) | 24 | __field( int, reason) |
| 23 | __field(unsigned long, pages) | 25 | __field(unsigned long, pages) |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 139b5067345b..27609dfcce25 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -763,7 +763,7 @@ perf_trace_##call(void *__data, proto) \ | |||
| 763 | struct ftrace_event_call *event_call = __data; \ | 763 | struct ftrace_event_call *event_call = __data; \ |
| 764 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 764 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
| 765 | struct ftrace_raw_##call *entry; \ | 765 | struct ftrace_raw_##call *entry; \ |
| 766 | struct pt_regs __regs; \ | 766 | struct pt_regs *__regs; \ |
| 767 | u64 __addr = 0, __count = 1; \ | 767 | u64 __addr = 0, __count = 1; \ |
| 768 | struct task_struct *__task = NULL; \ | 768 | struct task_struct *__task = NULL; \ |
| 769 | struct hlist_head *head; \ | 769 | struct hlist_head *head; \ |
| @@ -782,18 +782,19 @@ perf_trace_##call(void *__data, proto) \ | |||
| 782 | sizeof(u64)); \ | 782 | sizeof(u64)); \ |
| 783 | __entry_size -= sizeof(u32); \ | 783 | __entry_size -= sizeof(u32); \ |
| 784 | \ | 784 | \ |
| 785 | perf_fetch_caller_regs(&__regs); \ | ||
| 786 | entry = perf_trace_buf_prepare(__entry_size, \ | 785 | entry = perf_trace_buf_prepare(__entry_size, \ |
| 787 | event_call->event.type, &__regs, &rctx); \ | 786 | event_call->event.type, &__regs, &rctx); \ |
| 788 | if (!entry) \ | 787 | if (!entry) \ |
| 789 | return; \ | 788 | return; \ |
| 790 | \ | 789 | \ |
| 790 | perf_fetch_caller_regs(__regs); \ | ||
| 791 | \ | ||
| 791 | tstruct \ | 792 | tstruct \ |
| 792 | \ | 793 | \ |
| 793 | { assign; } \ | 794 | { assign; } \ |
| 794 | \ | 795 | \ |
| 795 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | 796 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ |
| 796 | __count, &__regs, head, __task); \ | 797 | __count, __regs, head, __task); \ |
| 797 | } | 798 | } |
| 798 | 799 | ||
| 799 | /* | 800 | /* |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 4a1d0cc38ff2..efe3443572ba 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
| @@ -451,6 +451,10 @@ | |||
| 451 | #define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ | 451 | #define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ |
| 452 | #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ | 452 | #define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ |
| 453 | #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ | 453 | #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ |
| 454 | #define PCI_EXP_DEVCTL_READRQ_128B 0x0000 /* 128 Bytes */ | ||
| 455 | #define PCI_EXP_DEVCTL_READRQ_256B 0x1000 /* 256 Bytes */ | ||
| 456 | #define PCI_EXP_DEVCTL_READRQ_512B 0x2000 /* 512 Bytes */ | ||
| 457 | #define PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */ | ||
| 454 | #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ | 458 | #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ |
| 455 | #define PCI_EXP_DEVSTA 10 /* Device Status */ | 459 | #define PCI_EXP_DEVSTA 10 /* Device Status */ |
| 456 | #define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ | 460 | #define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ |
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index 4275b961bf60..867cc5084afb 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
| @@ -90,7 +90,6 @@ enum { | |||
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | enum { | 92 | enum { |
| 93 | IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE, | ||
| 94 | IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, | 93 | IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD, |
| 95 | IB_USER_VERBS_EX_CMD_DESTROY_FLOW, | 94 | IB_USER_VERBS_EX_CMD_DESTROY_FLOW, |
| 96 | }; | 95 | }; |
| @@ -202,32 +201,6 @@ struct ib_uverbs_query_device_resp { | |||
| 202 | __u8 reserved[4]; | 201 | __u8 reserved[4]; |
| 203 | }; | 202 | }; |
| 204 | 203 | ||
| 205 | enum { | ||
| 206 | IB_USER_VERBS_EX_QUERY_DEVICE_ODP = 1ULL << 0, | ||
| 207 | }; | ||
| 208 | |||
| 209 | struct ib_uverbs_ex_query_device { | ||
| 210 | __u32 comp_mask; | ||
| 211 | __u32 reserved; | ||
| 212 | }; | ||
| 213 | |||
| 214 | struct ib_uverbs_odp_caps { | ||
| 215 | __u64 general_caps; | ||
| 216 | struct { | ||
| 217 | __u32 rc_odp_caps; | ||
| 218 | __u32 uc_odp_caps; | ||
| 219 | __u32 ud_odp_caps; | ||
| 220 | } per_transport_caps; | ||
| 221 | __u32 reserved; | ||
| 222 | }; | ||
| 223 | |||
| 224 | struct ib_uverbs_ex_query_device_resp { | ||
| 225 | struct ib_uverbs_query_device_resp base; | ||
| 226 | __u32 comp_mask; | ||
| 227 | __u32 reserved; | ||
| 228 | struct ib_uverbs_odp_caps odp_caps; | ||
| 229 | }; | ||
| 230 | |||
| 231 | struct ib_uverbs_query_port { | 204 | struct ib_uverbs_query_port { |
| 232 | __u64 response; | 205 | __u64 response; |
| 233 | __u8 port_num; | 206 | __u8 port_num; |
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 3387465b9caa..143ca5ffab7a 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h | |||
| @@ -45,6 +45,8 @@ | |||
| 45 | #include <asm/xen/hypervisor.h> | 45 | #include <asm/xen/hypervisor.h> |
| 46 | 46 | ||
| 47 | #include <xen/features.h> | 47 | #include <xen/features.h> |
| 48 | #include <linux/mm_types.h> | ||
| 49 | #include <linux/page-flags.h> | ||
| 48 | 50 | ||
| 49 | #define GNTTAB_RESERVED_XENSTORE 1 | 51 | #define GNTTAB_RESERVED_XENSTORE 1 |
| 50 | 52 | ||
| @@ -58,6 +60,22 @@ struct gnttab_free_callback { | |||
| 58 | u16 count; | 60 | u16 count; |
| 59 | }; | 61 | }; |
| 60 | 62 | ||
| 63 | struct gntab_unmap_queue_data; | ||
| 64 | |||
| 65 | typedef void (*gnttab_unmap_refs_done)(int result, struct gntab_unmap_queue_data *data); | ||
| 66 | |||
| 67 | struct gntab_unmap_queue_data | ||
| 68 | { | ||
| 69 | struct delayed_work gnttab_work; | ||
| 70 | void *data; | ||
| 71 | gnttab_unmap_refs_done done; | ||
| 72 | struct gnttab_unmap_grant_ref *unmap_ops; | ||
| 73 | struct gnttab_unmap_grant_ref *kunmap_ops; | ||
| 74 | struct page **pages; | ||
| 75 | unsigned int count; | ||
| 76 | unsigned int age; | ||
| 77 | }; | ||
| 78 | |||
| 61 | int gnttab_init(void); | 79 | int gnttab_init(void); |
| 62 | int gnttab_suspend(void); | 80 | int gnttab_suspend(void); |
| 63 | int gnttab_resume(void); | 81 | int gnttab_resume(void); |
| @@ -163,12 +181,17 @@ void gnttab_free_auto_xlat_frames(void); | |||
| 163 | 181 | ||
| 164 | #define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) | 182 | #define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) |
| 165 | 183 | ||
| 184 | int gnttab_alloc_pages(int nr_pages, struct page **pages); | ||
| 185 | void gnttab_free_pages(int nr_pages, struct page **pages); | ||
| 186 | |||
| 166 | int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, | 187 | int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, |
| 167 | struct gnttab_map_grant_ref *kmap_ops, | 188 | struct gnttab_map_grant_ref *kmap_ops, |
| 168 | struct page **pages, unsigned int count); | 189 | struct page **pages, unsigned int count); |
| 169 | int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, | 190 | int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, |
| 170 | struct gnttab_map_grant_ref *kunmap_ops, | 191 | struct gnttab_unmap_grant_ref *kunmap_ops, |
| 171 | struct page **pages, unsigned int count); | 192 | struct page **pages, unsigned int count); |
| 193 | void gnttab_unmap_refs_async(struct gntab_unmap_queue_data* item); | ||
| 194 | |||
| 172 | 195 | ||
| 173 | /* Perform a batch of grant map/copy operations. Retry every batch slot | 196 | /* Perform a batch of grant map/copy operations. Retry every batch slot |
| 174 | * for which the hypervisor returns GNTST_eagain. This is typically due | 197 | * for which the hypervisor returns GNTST_eagain. This is typically due |
| @@ -182,4 +205,22 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, | |||
| 182 | void gnttab_batch_map(struct gnttab_map_grant_ref *batch, unsigned count); | 205 | void gnttab_batch_map(struct gnttab_map_grant_ref *batch, unsigned count); |
| 183 | void gnttab_batch_copy(struct gnttab_copy *batch, unsigned count); | 206 | void gnttab_batch_copy(struct gnttab_copy *batch, unsigned count); |
| 184 | 207 | ||
| 208 | |||
| 209 | struct xen_page_foreign { | ||
| 210 | domid_t domid; | ||
| 211 | grant_ref_t gref; | ||
| 212 | }; | ||
| 213 | |||
| 214 | static inline struct xen_page_foreign *xen_page_foreign(struct page *page) | ||
| 215 | { | ||
| 216 | if (!PageForeign(page)) | ||
| 217 | return NULL; | ||
| 218 | #if BITS_PER_LONG < 64 | ||
| 219 | return (struct xen_page_foreign *)page->private; | ||
| 220 | #else | ||
| 221 | BUILD_BUG_ON(sizeof(struct xen_page_foreign) > BITS_PER_LONG); | ||
| 222 | return (struct xen_page_foreign *)&page->private; | ||
| 223 | #endif | ||
| 224 | } | ||
| 225 | |||
| 185 | #endif /* __ASM_GNTTAB_H__ */ | 226 | #endif /* __ASM_GNTTAB_H__ */ |
diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h index 131a6ccdba25..6ad3d110bb81 100644 --- a/include/xen/interface/features.h +++ b/include/xen/interface/features.h | |||
| @@ -41,6 +41,12 @@ | |||
| 41 | /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ | 41 | /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ |
| 42 | #define XENFEAT_mmu_pt_update_preserve_ad 5 | 42 | #define XENFEAT_mmu_pt_update_preserve_ad 5 |
| 43 | 43 | ||
| 44 | /* | ||
| 45 | * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel | ||
| 46 | * available pte bits. | ||
| 47 | */ | ||
| 48 | #define XENFEAT_gnttab_map_avail_bits 7 | ||
| 49 | |||
| 44 | /* x86: Does this Xen host support the HVM callback vector type? */ | 50 | /* x86: Does this Xen host support the HVM callback vector type? */ |
| 45 | #define XENFEAT_hvm_callback_vector 8 | 51 | #define XENFEAT_hvm_callback_vector 8 |
| 46 | 52 | ||
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h index bcce56439d64..56806bc90c2f 100644 --- a/include/xen/interface/grant_table.h +++ b/include/xen/interface/grant_table.h | |||
| @@ -526,6 +526,13 @@ DEFINE_GUEST_HANDLE_STRUCT(gnttab_cache_flush); | |||
| 526 | #define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) | 526 | #define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) |
| 527 | 527 | ||
| 528 | /* | 528 | /* |
| 529 | * Bits to be placed in guest kernel available PTE bits (architecture | ||
| 530 | * dependent; only supported when XENFEAT_gnttab_map_avail_bits is set). | ||
| 531 | */ | ||
| 532 | #define _GNTMAP_guest_avail0 (16) | ||
| 533 | #define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0) | ||
| 534 | |||
| 535 | /* | ||
| 529 | * Values for error status returns. All errors are -ve. | 536 | * Values for error status returns. All errors are -ve. |
| 530 | */ | 537 | */ |
| 531 | #define GNTST_okay (0) /* Normal return. */ | 538 | #define GNTST_okay (0) /* Normal return. */ |
