aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h42
-rw-r--r--include/acpi/acpiosxf.h31
-rw-r--r--include/acpi/acpixf.h54
-rw-r--r--include/acpi/actbl1.h14
-rw-r--r--include/acpi/actbl2.h2
-rw-r--r--include/acpi/actypes.h14
-rw-r--r--include/acpi/ghes.h2
-rw-r--r--include/acpi/platform/acenv.h53
-rw-r--r--include/acpi/platform/aclinux.h12
-rw-r--r--include/acpi/platform/aclinuxex.h22
-rw-r--r--include/linux/acpi.h6
-rw-r--r--include/linux/libata.h1
-rw-r--r--include/linux/pagemap.h12
-rw-r--r--include/linux/pci-acpi.h13
-rw-r--r--include/linux/pm_runtime.h11
-rw-r--r--include/linux/sfi_acpi.h3
-rw-r--r--include/net/netfilter/nf_tables.h6
-rw-r--r--include/net/netns/nftables.h2
-rw-r--r--include/uapi/linux/fuse.h3
19 files changed, 229 insertions, 74 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index b5714580801a..bcfd808b1098 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -315,12 +315,19 @@ struct acpi_device_wakeup_flags {
315 u8 notifier_present:1; /* Wake-up notify handler has been installed */ 315 u8 notifier_present:1; /* Wake-up notify handler has been installed */
316}; 316};
317 317
318struct acpi_device_wakeup_context {
319 struct work_struct work;
320 struct device *dev;
321};
322
318struct acpi_device_wakeup { 323struct acpi_device_wakeup {
319 acpi_handle gpe_device; 324 acpi_handle gpe_device;
320 u64 gpe_number; 325 u64 gpe_number;
321 u64 sleep_state; 326 u64 sleep_state;
322 struct list_head resources; 327 struct list_head resources;
323 struct acpi_device_wakeup_flags flags; 328 struct acpi_device_wakeup_flags flags;
329 struct acpi_device_wakeup_context context;
330 struct wakeup_source *ws;
324 int prepare_count; 331 int prepare_count;
325}; 332};
326 333
@@ -372,15 +379,9 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta)
372} 379}
373 380
374static inline void acpi_set_hp_context(struct acpi_device *adev, 381static inline void acpi_set_hp_context(struct acpi_device *adev,
375 struct acpi_hotplug_context *hp, 382 struct acpi_hotplug_context *hp)
376 int (*notify)(struct acpi_device *, u32),
377 void (*uevent)(struct acpi_device *, u32),
378 void (*fixup)(struct acpi_device *))
379{ 383{
380 hp->self = adev; 384 hp->self = adev;
381 hp->notify = notify;
382 hp->uevent = uevent;
383 hp->fixup = fixup;
384 adev->hp = hp; 385 adev->hp = hp;
385} 386}
386 387
@@ -487,6 +488,8 @@ struct acpi_bus_type {
487}; 488};
488int register_acpi_bus_type(struct acpi_bus_type *); 489int register_acpi_bus_type(struct acpi_bus_type *);
489int unregister_acpi_bus_type(struct acpi_bus_type *); 490int unregister_acpi_bus_type(struct acpi_bus_type *);
491int acpi_bind_one(struct device *dev, struct acpi_device *adev);
492int acpi_unbind_one(struct device *dev);
490 493
491struct acpi_pci_root { 494struct acpi_pci_root {
492 struct acpi_device * device; 495 struct acpi_device * device;
@@ -510,20 +513,18 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
510int acpi_disable_wakeup_device_power(struct acpi_device *dev); 513int acpi_disable_wakeup_device_power(struct acpi_device *dev);
511 514
512#ifdef CONFIG_PM 515#ifdef CONFIG_PM
513acpi_status acpi_add_pm_notifier(struct acpi_device *adev, 516acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
514 acpi_notify_handler handler, void *context); 517 void (*work_func)(struct work_struct *work));
515acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, 518acpi_status acpi_remove_pm_notifier(struct acpi_device *adev);
516 acpi_notify_handler handler);
517int acpi_pm_device_sleep_state(struct device *, int *, int); 519int acpi_pm_device_sleep_state(struct device *, int *, int);
518#else 520#else
519static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, 521static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
520 acpi_notify_handler handler, 522 struct device *dev,
521 void *context) 523 void (*work_func)(struct work_struct *work))
522{ 524{
523 return AE_SUPPORT; 525 return AE_SUPPORT;
524} 526}
525static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, 527static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev)
526 acpi_notify_handler handler)
527{ 528{
528 return AE_SUPPORT; 529 return AE_SUPPORT;
529} 530}
@@ -538,13 +539,8 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
538#endif 539#endif
539 540
540#ifdef CONFIG_PM_RUNTIME 541#ifdef CONFIG_PM_RUNTIME
541int __acpi_device_run_wake(struct acpi_device *, bool);
542int acpi_pm_device_run_wake(struct device *, bool); 542int acpi_pm_device_run_wake(struct device *, bool);
543#else 543#else
544static inline int __acpi_device_run_wake(struct acpi_device *adev, bool en)
545{
546 return -ENODEV;
547}
548static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) 544static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
549{ 545{
550 return -ENODEV; 546 return -ENODEV;
@@ -552,14 +548,8 @@ static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
552#endif 548#endif
553 549
554#ifdef CONFIG_PM_SLEEP 550#ifdef CONFIG_PM_SLEEP
555int __acpi_device_sleep_wake(struct acpi_device *, u32, bool);
556int acpi_pm_device_sleep_wake(struct device *, bool); 551int acpi_pm_device_sleep_wake(struct device *, bool);
557#else 552#else
558static inline int __acpi_device_sleep_wake(struct acpi_device *adev,
559 u32 target_state, bool enable)
560{
561 return -ENODEV;
562}
563static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) 553static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
564{ 554{
565 return -ENODEV; 555 return -ENODEV;
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index f6f5f8af2112..03b3e6d405ff 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -399,4 +399,35 @@ char *acpi_os_get_next_filename(void *dir_handle);
399void acpi_os_close_directory(void *dir_handle); 399void acpi_os_close_directory(void *dir_handle);
400#endif 400#endif
401 401
402/*
403 * File I/O and related support
404 */
405#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_file
406ACPI_FILE acpi_os_open_file(const char *path, u8 modes);
407#endif
408
409#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_file
410void acpi_os_close_file(ACPI_FILE file);
411#endif
412
413#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_file
414int
415acpi_os_read_file(ACPI_FILE file,
416 void *buffer, acpi_size size, acpi_size count);
417#endif
418
419#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_file
420int
421acpi_os_write_file(ACPI_FILE file,
422 void *buffer, acpi_size size, acpi_size count);
423#endif
424
425#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_file_offset
426long acpi_os_get_file_offset(ACPI_FILE file);
427#endif
428
429#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_set_file_offset
430acpi_status acpi_os_set_file_offset(ACPI_FILE file, long offset, u8 from);
431#endif
432
402#endif /* __ACPIOSXF_H__ */ 433#endif /* __ACPIOSXF_H__ */
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 35b525c19711..c3f38bc459e1 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,15 +46,13 @@
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 0x20140424 49#define ACPI_CA_VERSION 0x20140627
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
53#include <acpi/actbl.h> 53#include <acpi/actbl.h>
54#include <acpi/acbuffer.h> 54#include <acpi/acbuffer.h>
55 55
56extern u8 acpi_gbl_permanent_mmap;
57
58/***************************************************************************** 56/*****************************************************************************
59 * 57 *
60 * Macros used for ACPICA globals and configuration 58 * Macros used for ACPICA globals and configuration
@@ -335,6 +333,23 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
335 333
336#endif /* ACPI_DEBUG_OUTPUT */ 334#endif /* ACPI_DEBUG_OUTPUT */
337 335
336/*
337 * Application prototypes
338 *
339 * All interfaces used by application will be configured
340 * out of the ACPICA build unless the ACPI_APPLICATION
341 * flag is defined.
342 */
343#ifdef ACPI_APPLICATION
344#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
345 prototype;
346
347#else
348#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
349 static ACPI_INLINE prototype {return;}
350
351#endif /* ACPI_APPLICATION */
352
338/***************************************************************************** 353/*****************************************************************************
339 * 354 *
340 * ACPICA public interface prototypes 355 * ACPICA public interface prototypes
@@ -658,6 +673,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
658 u32 gpe_number)) 673 u32 gpe_number))
659 674
660ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 675ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
676 acpi_mark_gpe_for_wake(acpi_handle gpe_device,
677 u32 gpe_number))
678
679ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
661 acpi_setup_gpe_for_wake(acpi_handle 680 acpi_setup_gpe_for_wake(acpi_handle
662 parent_device, 681 parent_device,
663 acpi_handle gpe_device, 682 acpi_handle gpe_device,
@@ -861,21 +880,32 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
861 const char *module_name, 880 const char *module_name,
862 u32 component_id, 881 u32 component_id,
863 const char *format, ...)) 882 const char *format, ...))
883ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
884 void ACPI_INTERNAL_VAR_XFACE
885 acpi_log_error(const char *format, ...))
864 886
865/* 887/*
866 * Divergences 888 * Divergences
867 */ 889 */
868acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); 890ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap);
869 891
870acpi_status acpi_unload_table_id(acpi_owner_id id); 892ACPI_EXTERNAL_RETURN_STATUS(acpi_status
893 acpi_get_id(acpi_handle object,
894 acpi_owner_id * out_type))
871 895
872acpi_status 896ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id))
873acpi_get_table_with_size(acpi_string signature,
874 u32 instance, struct acpi_table_header **out_table,
875 acpi_size *tbl_size);
876 897
877acpi_status 898ACPI_EXTERNAL_RETURN_STATUS(acpi_status
878acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, 899 acpi_get_table_with_size(acpi_string signature,
879 void (*callback)(void *)); 900 u32 instance,
901 struct acpi_table_header
902 **out_table,
903 acpi_size *tbl_size))
904
905ACPI_EXTERNAL_RETURN_STATUS(acpi_status
906 acpi_get_data_full(acpi_handle object,
907 acpi_object_handler handler,
908 void **data,
909 void (*callback)(void *)))
880 910
881#endif /* __ACXFACE_H__ */ 911#endif /* __ACXFACE_H__ */
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 4ad7da805180..9613e8e97960 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -604,7 +604,7 @@ struct acpi_hest_generic {
604 604
605/* Generic Error Status block */ 605/* Generic Error Status block */
606 606
607struct acpi_generic_status { 607struct acpi_hest_generic_status {
608 u32 block_status; 608 u32 block_status;
609 u32 raw_data_offset; 609 u32 raw_data_offset;
610 u32 raw_data_length; 610 u32 raw_data_length;
@@ -614,15 +614,15 @@ struct acpi_generic_status {
614 614
615/* Values for block_status flags above */ 615/* Values for block_status flags above */
616 616
617#define ACPI_GEN_ERR_UC BIT(0) 617#define ACPI_HEST_UNCORRECTABLE (1)
618#define ACPI_GEN_ERR_CE BIT(1) 618#define ACPI_HEST_CORRECTABLE (1<<1)
619#define ACPI_GEN_ERR_MULTI_UC BIT(2) 619#define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2)
620#define ACPI_GEN_ERR_MULTI_CE BIT(3) 620#define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3)
621#define ACPI_GEN_ERR_COUNT_SHIFT (0xFF<<4) /* 8 bits, error count */ 621#define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */
622 622
623/* Generic Error Data entry */ 623/* Generic Error Data entry */
624 624
625struct acpi_generic_data { 625struct acpi_hest_generic_data {
626 u8 section_type[16]; 626 u8 section_type[16];
627 u32 error_severity; 627 u32 error_severity;
628 u16 revision; 628 u16 revision;
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 860e5c883eb3..21314d37cb07 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -516,7 +516,7 @@ struct acpi_dmar_andd {
516 struct acpi_dmar_header header; 516 struct acpi_dmar_header header;
517 u8 reserved[3]; 517 u8 reserved[3];
518 u8 device_number; 518 u8 device_number;
519 u8 object_name[]; 519 char object_name[1];
520}; 520};
521 521
522/******************************************************************************* 522/*******************************************************************************
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 19b26bb69a70..608a04019372 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -126,6 +126,7 @@
126typedef unsigned char u8; 126typedef unsigned char u8;
127typedef unsigned char u8; 127typedef unsigned char u8;
128typedef unsigned short u16; 128typedef unsigned short u16;
129typedef short s16;
129typedef COMPILER_DEPENDENT_UINT64 u64; 130typedef COMPILER_DEPENDENT_UINT64 u64;
130typedef COMPILER_DEPENDENT_INT64 s64; 131typedef COMPILER_DEPENDENT_INT64 s64;
131 132
@@ -1244,4 +1245,17 @@ struct acpi_memory_list {
1244#define ACPI_OSI_WIN_7 0x0B 1245#define ACPI_OSI_WIN_7 0x0B
1245#define ACPI_OSI_WIN_8 0x0C 1246#define ACPI_OSI_WIN_8 0x0C
1246 1247
1248/* Definitions of file IO */
1249
1250#define ACPI_FILE_READING 0x01
1251#define ACPI_FILE_WRITING 0x02
1252#define ACPI_FILE_BINARY 0x04
1253
1254#define ACPI_FILE_BEGIN 0x01
1255#define ACPI_FILE_END 0x02
1256
1257/* Definitions of getopt */
1258
1259#define ACPI_OPT_END -1
1260
1247#endif /* __ACTYPES_H__ */ 1261#endif /* __ACTYPES_H__ */
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index dfd60d0bfd27..720446cb243e 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -14,7 +14,7 @@
14 14
15struct ghes { 15struct ghes {
16 struct acpi_hest_generic *generic; 16 struct acpi_hest_generic *generic;
17 struct acpi_generic_status *estatus; 17 struct acpi_hest_generic_status *estatus;
18 u64 buffer_paddr; 18 u64 buffer_paddr;
19 unsigned long flags; 19 unsigned long flags;
20 union { 20 union {
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index e863dd5c4e04..5f8cc1fa3278 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -87,20 +87,14 @@
87#define ACPI_DBG_TRACK_ALLOCATIONS 87#define ACPI_DBG_TRACK_ALLOCATIONS
88#endif 88#endif
89 89
90/* acpi_names configuration. Single threaded with debugger output enabled. */
91
92#ifdef ACPI_NAMES_APP
93#define ACPI_DEBUGGER
94#define ACPI_APPLICATION
95#define ACPI_SINGLE_THREADED
96#endif
97
98/* 90/*
99 * acpi_bin/acpi_dump/acpi_src/acpi_xtract/Example configuration. All single 91 * acpi_bin/acpi_dump/acpi_help/acpi_names/acpi_src/acpi_xtract/Example configuration.
100 * threaded, with no debug output. 92 * All single threaded.
101 */ 93 */
102#if (defined ACPI_BIN_APP) || \ 94#if (defined ACPI_BIN_APP) || \
103 (defined ACPI_DUMP_APP) || \ 95 (defined ACPI_DUMP_APP) || \
96 (defined ACPI_HELP_APP) || \
97 (defined ACPI_NAMES_APP) || \
104 (defined ACPI_SRC_APP) || \ 98 (defined ACPI_SRC_APP) || \
105 (defined ACPI_XTRACT_APP) || \ 99 (defined ACPI_XTRACT_APP) || \
106 (defined ACPI_EXAMPLE_APP) 100 (defined ACPI_EXAMPLE_APP)
@@ -108,12 +102,40 @@
108#define ACPI_SINGLE_THREADED 102#define ACPI_SINGLE_THREADED
109#endif 103#endif
110 104
105/* acpi_help configuration. Error messages disabled. */
106
111#ifdef ACPI_HELP_APP 107#ifdef ACPI_HELP_APP
112#define ACPI_APPLICATION
113#define ACPI_SINGLE_THREADED
114#define ACPI_NO_ERROR_MESSAGES 108#define ACPI_NO_ERROR_MESSAGES
115#endif 109#endif
116 110
111/* acpi_names configuration. Debug output enabled. */
112
113#ifdef ACPI_NAMES_APP
114#define ACPI_DEBUG_OUTPUT
115#endif
116
117/* acpi_exec/acpi_names/Example configuration. Native RSDP used. */
118
119#if (defined ACPI_EXEC_APP) || \
120 (defined ACPI_EXAMPLE_APP) || \
121 (defined ACPI_NAMES_APP)
122#define ACPI_USE_NATIVE_RSDP_POINTER
123#endif
124
125/* acpi_dump configuration. Native mapping used if provied by OSPMs */
126
127#ifdef ACPI_DUMP_APP
128#define ACPI_USE_NATIVE_MEMORY_MAPPING
129#define USE_NATIVE_ALLOCATE_ZEROED
130#endif
131
132/* acpi_names/Example configuration. Hardware disabled */
133
134#if (defined ACPI_EXAMPLE_APP) || \
135 (defined ACPI_NAMES_APP)
136#define ACPI_REDUCED_HARDWARE 1
137#endif
138
117/* Linkable ACPICA library */ 139/* Linkable ACPICA library */
118 140
119#ifdef ACPI_LIBRARY 141#ifdef ACPI_LIBRARY
@@ -185,6 +207,9 @@
185#elif defined(_AED_EFI) 207#elif defined(_AED_EFI)
186#include "acefi.h" 208#include "acefi.h"
187 209
210#elif defined(_GNU_EFI)
211#include "acefi.h"
212
188#elif defined(__HAIKU__) 213#elif defined(__HAIKU__)
189#include "achaiku.h" 214#include "achaiku.h"
190 215
@@ -399,8 +424,12 @@ typedef char *va_list;
399#ifdef ACPI_APPLICATION 424#ifdef ACPI_APPLICATION
400#include <stdio.h> 425#include <stdio.h>
401#define ACPI_FILE FILE * 426#define ACPI_FILE FILE *
427#define ACPI_FILE_OUT stdout
428#define ACPI_FILE_ERR stderr
402#else 429#else
403#define ACPI_FILE void * 430#define ACPI_FILE void *
431#define ACPI_FILE_OUT NULL
432#define ACPI_FILE_ERR NULL
404#endif /* ACPI_APPLICATION */ 433#endif /* ACPI_APPLICATION */
405#endif /* ACPI_FILE */ 434#endif /* ACPI_FILE */
406 435
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index cd1f052d55bb..1ba7c190c2cc 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -44,6 +44,16 @@
44#ifndef __ACLINUX_H__ 44#ifndef __ACLINUX_H__
45#define __ACLINUX_H__ 45#define __ACLINUX_H__
46 46
47#ifdef __KERNEL__
48
49/* ACPICA external files should not include ACPICA headers directly. */
50
51#if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H)
52#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
53#endif
54
55#endif
56
47/* Common (in-kernel/user-space) ACPICA configuration */ 57/* Common (in-kernel/user-space) ACPICA configuration */
48 58
49#define ACPI_USE_SYSTEM_CLIBRARY 59#define ACPI_USE_SYSTEM_CLIBRARY
@@ -70,7 +80,9 @@
70#ifdef EXPORT_ACPI_INTERFACES 80#ifdef EXPORT_ACPI_INTERFACES
71#include <linux/export.h> 81#include <linux/export.h>
72#endif 82#endif
83#ifdef CONFIG_ACPI
73#include <asm/acenv.h> 84#include <asm/acenv.h>
85#endif
74 86
75#ifndef CONFIG_ACPI 87#ifndef CONFIG_ACPI
76 88
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h
index 191e741cfa0e..568d4b886712 100644
--- a/include/acpi/platform/aclinuxex.h
+++ b/include/acpi/platform/aclinuxex.h
@@ -46,6 +46,28 @@
46 46
47#ifdef __KERNEL__ 47#ifdef __KERNEL__
48 48
49#ifndef ACPI_USE_NATIVE_DIVIDE
50
51#ifndef ACPI_DIV_64_BY_32
52#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
53 do { \
54 u64 (__n) = ((u64) n_hi) << 32 | (n_lo); \
55 (r32) = do_div ((__n), (d32)); \
56 (q32) = (u32) (__n); \
57 } while (0)
58#endif
59
60#ifndef ACPI_SHIFT_RIGHT_64
61#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
62 do { \
63 (n_lo) >>= 1; \
64 (n_lo) |= (((n_hi) & 1) << 31); \
65 (n_hi) >>= 1; \
66 } while (0)
67#endif
68
69#endif
70
49/* 71/*
50 * Overrides for in-kernel ACPICA 72 * Overrides for in-kernel ACPICA
51 */ 73 */
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 358c01b971db..5320153c311b 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -29,17 +29,17 @@
29#include <linux/ioport.h> /* for struct resource */ 29#include <linux/ioport.h> /* for struct resource */
30#include <linux/device.h> 30#include <linux/device.h>
31 31
32#ifdef CONFIG_ACPI
33
34#ifndef _LINUX 32#ifndef _LINUX
35#define _LINUX 33#define _LINUX
36#endif 34#endif
35#include <acpi/acpi.h>
36
37#ifdef CONFIG_ACPI
37 38
38#include <linux/list.h> 39#include <linux/list.h>
39#include <linux/mod_devicetable.h> 40#include <linux/mod_devicetable.h>
40#include <linux/dynamic_debug.h> 41#include <linux/dynamic_debug.h>
41 42
42#include <acpi/acpi.h>
43#include <acpi/acpi_bus.h> 43#include <acpi/acpi_bus.h>
44#include <acpi/acpi_drivers.h> 44#include <acpi/acpi_drivers.h>
45#include <acpi/acpi_numa.h> 45#include <acpi/acpi_numa.h>
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5ab4e3a76721..92abb497ab14 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -593,6 +593,7 @@ struct ata_host {
593 struct device *dev; 593 struct device *dev;
594 void __iomem * const *iomap; 594 void __iomem * const *iomap;
595 unsigned int n_ports; 595 unsigned int n_ports;
596 unsigned int n_tags; /* nr of NCQ tags */
596 void *private_data; 597 void *private_data;
597 struct ata_port_operations *ops; 598 struct ata_port_operations *ops;
598 unsigned long flags; 599 unsigned long flags;
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 0a97b583ee8d..e1474ae18c88 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -399,6 +399,18 @@ static inline struct page *read_mapping_page(struct address_space *mapping,
399} 399}
400 400
401/* 401/*
402 * Get the offset in PAGE_SIZE.
403 * (TODO: hugepage should have ->index in PAGE_SIZE)
404 */
405static inline pgoff_t page_to_pgoff(struct page *page)
406{
407 if (unlikely(PageHeadHuge(page)))
408 return page->index << compound_order(page);
409 else
410 return page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
411}
412
413/*
402 * Return byte-offset into filesystem object for page. 414 * Return byte-offset into filesystem object for page.
403 */ 415 */
404static inline loff_t page_offset(struct page *page) 416static inline loff_t page_offset(struct page *page)
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 637a608ded0b..64dacb7288a6 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -11,12 +11,17 @@
11#include <linux/acpi.h> 11#include <linux/acpi.h>
12 12
13#ifdef CONFIG_ACPI 13#ifdef CONFIG_ACPI
14extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev, 14extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev);
15 struct pci_bus *pci_bus); 15static inline acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev)
16extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev); 16{
17 return acpi_remove_pm_notifier(dev);
18}
17extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev, 19extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
18 struct pci_dev *pci_dev); 20 struct pci_dev *pci_dev);
19extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev); 21static inline acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev)
22{
23 return acpi_remove_pm_notifier(dev);
24}
20extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle); 25extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
21 26
22static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 27static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 43fd6716f662..367f49b9a1c9 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -24,11 +24,20 @@
24#define RPM_AUTO 0x08 /* Use autosuspend_delay */ 24#define RPM_AUTO 0x08 /* Use autosuspend_delay */
25 25
26#ifdef CONFIG_PM 26#ifdef CONFIG_PM
27extern struct workqueue_struct *pm_wq;
28
29static inline bool queue_pm_work(struct work_struct *work)
30{
31 return queue_work(pm_wq, work);
32}
33
27extern int pm_generic_runtime_suspend(struct device *dev); 34extern int pm_generic_runtime_suspend(struct device *dev);
28extern int pm_generic_runtime_resume(struct device *dev); 35extern int pm_generic_runtime_resume(struct device *dev);
29extern int pm_runtime_force_suspend(struct device *dev); 36extern int pm_runtime_force_suspend(struct device *dev);
30extern int pm_runtime_force_resume(struct device *dev); 37extern int pm_runtime_force_resume(struct device *dev);
31#else 38#else
39static inline bool queue_pm_work(struct work_struct *work) { return false; }
40
32static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } 41static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
33static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } 42static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
34static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } 43static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
@@ -37,8 +46,6 @@ static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
37 46
38#ifdef CONFIG_PM_RUNTIME 47#ifdef CONFIG_PM_RUNTIME
39 48
40extern struct workqueue_struct *pm_wq;
41
42extern int __pm_runtime_idle(struct device *dev, int rpmflags); 49extern int __pm_runtime_idle(struct device *dev, int rpmflags);
43extern int __pm_runtime_suspend(struct device *dev, int rpmflags); 50extern int __pm_runtime_suspend(struct device *dev, int rpmflags);
44extern int __pm_runtime_resume(struct device *dev, int rpmflags); 51extern int __pm_runtime_resume(struct device *dev, int rpmflags);
diff --git a/include/linux/sfi_acpi.h b/include/linux/sfi_acpi.h
index 4723bbfa1c26..a6e555cbe05c 100644
--- a/include/linux/sfi_acpi.h
+++ b/include/linux/sfi_acpi.h
@@ -63,8 +63,6 @@
63#include <linux/sfi.h> 63#include <linux/sfi.h>
64 64
65#ifdef CONFIG_SFI 65#ifdef CONFIG_SFI
66#include <acpi/acpi.h> /* FIXME: inclusion should be removed */
67
68extern int sfi_acpi_table_parse(char *signature, char *oem_id, 66extern int sfi_acpi_table_parse(char *signature, char *oem_id,
69 char *oem_table_id, 67 char *oem_table_id,
70 int (*handler)(struct acpi_table_header *)); 68 int (*handler)(struct acpi_table_header *));
@@ -78,7 +76,6 @@ static inline int __init acpi_sfi_table_parse(char *signature,
78 return sfi_acpi_table_parse(signature, NULL, NULL, handler); 76 return sfi_acpi_table_parse(signature, NULL, NULL, handler);
79} 77}
80#else /* !CONFIG_SFI */ 78#else /* !CONFIG_SFI */
81
82static inline int sfi_acpi_table_parse(char *signature, char *oem_id, 79static inline int sfi_acpi_table_parse(char *signature, char *oem_id,
83 char *oem_table_id, 80 char *oem_table_id,
84 int (*handler)(struct acpi_table_header *)) 81 int (*handler)(struct acpi_table_header *))
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 713b0b88bd5a..c4d86198d3d6 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -6,6 +6,7 @@
6#include <linux/netfilter/nfnetlink.h> 6#include <linux/netfilter/nfnetlink.h>
7#include <linux/netfilter/x_tables.h> 7#include <linux/netfilter/x_tables.h>
8#include <linux/netfilter/nf_tables.h> 8#include <linux/netfilter/nf_tables.h>
9#include <linux/u64_stats_sync.h>
9#include <net/netlink.h> 10#include <net/netlink.h>
10 11
11#define NFT_JUMP_STACK_SIZE 16 12#define NFT_JUMP_STACK_SIZE 16
@@ -528,8 +529,9 @@ enum nft_chain_type {
528}; 529};
529 530
530struct nft_stats { 531struct nft_stats {
531 u64 bytes; 532 u64 bytes;
532 u64 pkts; 533 u64 pkts;
534 struct u64_stats_sync syncp;
533}; 535};
534 536
535#define NFT_HOOK_OPS_MAX 2 537#define NFT_HOOK_OPS_MAX 2
diff --git a/include/net/netns/nftables.h b/include/net/netns/nftables.h
index 26a394cb91a8..eee608b12cc9 100644
--- a/include/net/netns/nftables.h
+++ b/include/net/netns/nftables.h
@@ -13,8 +13,8 @@ struct netns_nftables {
13 struct nft_af_info *inet; 13 struct nft_af_info *inet;
14 struct nft_af_info *arp; 14 struct nft_af_info *arp;
15 struct nft_af_info *bridge; 15 struct nft_af_info *bridge;
16 unsigned int base_seq;
16 u8 gencursor; 17 u8 gencursor;
17 u8 genctr;
18}; 18};
19 19
20#endif 20#endif
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 40b5ca8a1b1f..25084a052a1e 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -101,6 +101,7 @@
101 * - add FATTR_CTIME 101 * - add FATTR_CTIME
102 * - add ctime and ctimensec to fuse_setattr_in 102 * - add ctime and ctimensec to fuse_setattr_in
103 * - add FUSE_RENAME2 request 103 * - add FUSE_RENAME2 request
104 * - add FUSE_NO_OPEN_SUPPORT flag
104 */ 105 */
105 106
106#ifndef _LINUX_FUSE_H 107#ifndef _LINUX_FUSE_H
@@ -229,6 +230,7 @@ struct fuse_file_lock {
229 * FUSE_READDIRPLUS_AUTO: adaptive readdirplus 230 * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
230 * FUSE_ASYNC_DIO: asynchronous direct I/O submission 231 * FUSE_ASYNC_DIO: asynchronous direct I/O submission
231 * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes 232 * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes
233 * FUSE_NO_OPEN_SUPPORT: kernel supports zero-message opens
232 */ 234 */
233#define FUSE_ASYNC_READ (1 << 0) 235#define FUSE_ASYNC_READ (1 << 0)
234#define FUSE_POSIX_LOCKS (1 << 1) 236#define FUSE_POSIX_LOCKS (1 << 1)
@@ -247,6 +249,7 @@ struct fuse_file_lock {
247#define FUSE_READDIRPLUS_AUTO (1 << 14) 249#define FUSE_READDIRPLUS_AUTO (1 << 14)
248#define FUSE_ASYNC_DIO (1 << 15) 250#define FUSE_ASYNC_DIO (1 << 15)
249#define FUSE_WRITEBACK_CACHE (1 << 16) 251#define FUSE_WRITEBACK_CACHE (1 << 16)
252#define FUSE_NO_OPEN_SUPPORT (1 << 17)
250 253
251/** 254/**
252 * CUSE INIT request/reply flags 255 * CUSE INIT request/reply flags