Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit1a9a126

Browse files
committed
Merge tag 'acpi-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "The majority of this is an update of the ACPICA kernel code to upstream revision 20171215 with a cosmetic change and a maintainers information update on top of it. The rest is mostly some minor fixes and cleanups in the ACPI drivers and cleanups to initialization on x86. Specifics: - Update the ACPICA kernel code to upstream revision 20171215 including: * Support for ACPI 6.0A changes in the NFIT table (Bob Moore) * Local 64-bit divide in string conversions (Bob Moore) * Fix for a regression in acpi_evaluate_object_type() (Bob Moore) * Fixes for memory leaks during package object resolution (Bob Moore) * Deployment of safe version of strncpy() (Bob Moore) * Debug and messaging updates (Bob Moore) * Support for PDTT, SDEV, TPM2 tables in iASL and tools (Bob Moore) * Null pointer dereference avoidance in Op and cleanups (Colin Ian King) * Fix for memory leak from building prefixed pathname (Erik Schmauss) * Coding style fixes, disassembler and compiler updates (Hanjun Guo, Erik Schmauss) * Additional PPTT flags from ACPI 6.2 (Jeremy Linton) * Fix for an off-by-one error in acpi_get_timer_duration() (Jung-uk Kim) * Infinite loop detection timeout and utilities cleanups (Lv Zheng) * Windows 10 version 1607 and 1703 OSI strings (Mario Limonciello) - Update ACPICA information in MAINTAINERS to reflect the current status of ACPICA maintenance and rename a local variable in one function to match the corresponding upstream code (Rafael Wysocki) - Clean up ACPI-related initialization on x86 (Andy Shevchenko) - Add support for Intel Merrifield to the ACPI GPIO code (Andy Shevchenko) - Clean up ACPI PMIC drivers (Andy Shevchenko, Arvind Yadav) - Fix the ACPI Generic Event Device (GED) driver to free IRQs on shutdown and clean up the PCI IRQ Link driver (Sinan Kaya) - Make the GHES code call into the AER driver on all errors and clean up the ACPI APEI code (Colin Ian King, Tyler Baicar) - Make the IA64 ACPI NUMA code parse all SRAT entries (Ganapatrao Kulkarni) - Add a lid switch blacklist to the ACPI button driver and make it print extra debug messages on lid events (Hans de Goede) - Add quirks for Asus GL502VSK and UX305LA to the ACPI battery driver and clean it up somewhat (Bjørn Mork, Kai-Heng Feng) - Add device link for CHT SD card dependency on I2C to the ACPI LPSS (Intel SoCs) driver and make it avoid creating platform device objects for devices without MMIO resources (Adrian Hunter, Hans de Goede) - Fix the ACPI GPE mask kernel command line parameter handling (Prarit Bhargava) - Fix the handling of (incorrectly exposed) backlight interfaces without LCD (Hans de Goede) - Fix the usage of debugfs_create_*() in the ACPI EC driver (Geert Uytterhoeven)"* tag 'acpi-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (62 commits) ACPI/PCI: pci_link: reduce verbosity when IRQ is enabled ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources ACPI / PMIC: Convert to use builtin_platform_driver() macro ACPI / x86: boot: Propagate error code in acpi_gsi_to_irq() ACPICA: Update version to 20171215 ACPICA: trivial style fix, no functional change ACPICA: Fix a couple memory leaks during package object resolution ACPICA: Recognize the Windows 10 version 1607 and 1703 OSI strings ACPICA: DT compiler: prevent error if optional field at the end of table is not present ACPICA: Rename a global variable, no functional change ACPICA: Create and deploy safe version of strncpy ACPICA: Cleanup the global variables and update comments ACPICA: Debugger: fix slight indentation issue ACPICA: Fix a regression in the acpi_evaluate_object_type() interface ACPICA: Update for a few debug output statements ACPICA: Debug output, no functional change ACPI: EC: Fix debugfs_create_*() usage ACPI / video: Default lcd_only to true on Win8-ready and newer machines ACPI / x86: boot: Don't setup SCI on HW-reduced platforms ACPI / x86: boot: Use INVALID_ACPI_IRQ instead of 0 for acpi_sci_override_gsi ...
2 parents7f3fdd4 +a7f2766 commit1a9a126

File tree

69 files changed

+1210
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1210
-408
lines changed

‎Documentation/admin-guide/kernel-parameters.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
This facility can be used to prevent such uncontrolled
115115
GPE floodings.
116116
Format: <int>
117-
Support masking of GPEs numbered from 0x00 to 0x7f.
118117

119118
acpi_no_auto_serialize[HW,ACPI]
120119
Disable auto-serialization of AML methods

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ F:drivers/acpi/apei/
329329

330330
ACPI COMPONENT ARCHITECTURE (ACPICA)
331331
M:Robert Moore <robert.moore@intel.com>
332-
M:Lv Zheng <lv.zheng@intel.com>
332+
M:Erik Schmauss <erik.schmauss@intel.com>
333333
M:"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
334334
L:linux-acpi@vger.kernel.org
335335
L:devel@acpica.org

‎arch/ia64/kernel/acpi.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
504504
if (!(ma->flags&ACPI_SRAT_MEM_ENABLED))
505505
return-1;
506506

507+
if (num_node_memblks >=NR_NODE_MEMBLKS) {
508+
pr_err("NUMA: too many memblk ranges\n");
509+
return-EINVAL;
510+
}
511+
507512
/* record this node in proximity bitmap */
508513
pxm_bit_set(pxm);
509514

‎arch/x86/include/asm/acpi.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern int acpi_fix_pin2_polarity;
4949
externintacpi_disable_cmcff;
5050

5151
externu8acpi_sci_flags;
52-
externintacpi_sci_override_gsi;
52+
externu32acpi_sci_override_gsi;
5353
voidacpi_pic_sci_set_trigger(unsignedint,u16);
5454

5555
structdevice;

‎arch/x86/kernel/acpi/boot.c‎

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ int acpi_ioapic;
6868
intacpi_strict;
6969
intacpi_disable_cmcff;
7070

71+
/* ACPI SCI override configuration */
7172
u8acpi_sci_flags__initdata;
72-
intacpi_sci_override_gsi__initdata;
73+
u32acpi_sci_override_gsi__initdata=INVALID_ACPI_IRQ;
7374
intacpi_skip_timer_override__initdata;
7475
intacpi_use_timer_override__initdata;
7576
intacpi_fix_pin2_polarity__initdata;
@@ -112,8 +113,6 @@ static u32 isa_irq_to_gsi[NR_IRQS_LEGACY] __read_mostly = {
112113
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
113114
};
114115

115-
#defineACPI_INVALID_GSIINT_MIN
116-
117116
/*
118117
* This is just a simple wrapper around early_memremap(),
119118
* with sanity checks for phys == 0 and size == 0.
@@ -372,7 +371,7 @@ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
372371
* and acpi_isa_irq_to_gsi() may give wrong result.
373372
*/
374373
if (gsi<nr_legacy_irqs()&&isa_irq_to_gsi[gsi]==gsi)
375-
isa_irq_to_gsi[gsi]=ACPI_INVALID_GSI;
374+
isa_irq_to_gsi[gsi]=INVALID_ACPI_IRQ;
376375
isa_irq_to_gsi[bus_irq]=gsi;
377376
}
378377

@@ -620,24 +619,24 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp)
620619
}
621620

622621
rc=acpi_get_override_irq(gsi,&trigger,&polarity);
623-
if (rc==0) {
624-
trigger=trigger ?ACPI_LEVEL_SENSITIVE :ACPI_EDGE_SENSITIVE;
625-
polarity=polarity ?ACPI_ACTIVE_LOW :ACPI_ACTIVE_HIGH;
626-
irq=acpi_register_gsi(NULL,gsi,trigger,polarity);
627-
if (irq >=0) {
628-
*irqp=irq;
629-
return0;
630-
}
631-
}
622+
if (rc)
623+
returnrc;
632624

633-
return-1;
625+
trigger=trigger ?ACPI_LEVEL_SENSITIVE :ACPI_EDGE_SENSITIVE;
626+
polarity=polarity ?ACPI_ACTIVE_LOW :ACPI_ACTIVE_HIGH;
627+
irq=acpi_register_gsi(NULL,gsi,trigger,polarity);
628+
if (irq<0)
629+
returnirq;
630+
631+
*irqp=irq;
632+
return0;
634633
}
635634
EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
636635

637636
intacpi_isa_irq_to_gsi(unsignedisa_irq,u32*gsi)
638637
{
639638
if (isa_irq<nr_legacy_irqs()&&
640-
isa_irq_to_gsi[isa_irq]!=ACPI_INVALID_GSI) {
639+
isa_irq_to_gsi[isa_irq]!=INVALID_ACPI_IRQ) {
641640
*gsi=isa_irq_to_gsi[isa_irq];
642641
return0;
643642
}
@@ -676,8 +675,7 @@ static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi,
676675
mutex_lock(&acpi_ioapic_lock);
677676
irq=mp_map_gsi_to_irq(gsi,IOAPIC_MAP_ALLOC,&info);
678677
/* Don't set up the ACPI SCI because it's already set up */
679-
if (irq >=0&&enable_update_mptable&&
680-
acpi_gbl_FADT.sci_interrupt!=gsi)
678+
if (irq >=0&&enable_update_mptable&&gsi!=acpi_gbl_FADT.sci_interrupt)
681679
mp_config_acpi_gsi(dev,gsi,trigger,polarity);
682680
mutex_unlock(&acpi_ioapic_lock);
683681
#endif
@@ -1211,8 +1209,9 @@ static int __init acpi_parse_madt_ioapic_entries(void)
12111209
/*
12121210
* If BIOS did not supply an INT_SRC_OVR for the SCI
12131211
* pretend we got one so we can set the SCI flags.
1212+
* But ignore setting up SCI on hardware reduced platforms.
12141213
*/
1215-
if (!acpi_sci_override_gsi)
1214+
if (acpi_sci_override_gsi==INVALID_ACPI_IRQ&& !acpi_gbl_reduced_hardware)
12161215
acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt,0,0,
12171216
acpi_gbl_FADT.sci_interrupt);
12181217

‎drivers/acpi/acpi_lpss.c‎

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,142 @@ static int register_device_clock(struct acpi_device *adev,
427427
return0;
428428
}
429429

430+
structlpss_device_links {
431+
constchar*supplier_hid;
432+
constchar*supplier_uid;
433+
constchar*consumer_hid;
434+
constchar*consumer_uid;
435+
u32flags;
436+
};
437+
438+
/*
439+
* The _DEP method is used to identify dependencies but instead of creating
440+
* device links for every handle in _DEP, only links in the following list are
441+
* created. That is necessary because, in the general case, _DEP can refer to
442+
* devices that might not have drivers, or that are on different buses, or where
443+
* the supplier is not enumerated until after the consumer is probed.
444+
*/
445+
staticconststructlpss_device_linkslpss_device_links[]= {
446+
{"808622C1","7","80860F14","3",DL_FLAG_PM_RUNTIME},
447+
};
448+
449+
staticboolhid_uid_match(constchar*hid1,constchar*uid1,
450+
constchar*hid2,constchar*uid2)
451+
{
452+
return !strcmp(hid1,hid2)&&uid1&&uid2&& !strcmp(uid1,uid2);
453+
}
454+
455+
staticboolacpi_lpss_is_supplier(structacpi_device*adev,
456+
conststructlpss_device_links*link)
457+
{
458+
returnhid_uid_match(acpi_device_hid(adev),acpi_device_uid(adev),
459+
link->supplier_hid,link->supplier_uid);
460+
}
461+
462+
staticboolacpi_lpss_is_consumer(structacpi_device*adev,
463+
conststructlpss_device_links*link)
464+
{
465+
returnhid_uid_match(acpi_device_hid(adev),acpi_device_uid(adev),
466+
link->consumer_hid,link->consumer_uid);
467+
}
468+
469+
structhid_uid {
470+
constchar*hid;
471+
constchar*uid;
472+
};
473+
474+
staticintmatch_hid_uid(structdevice*dev,void*data)
475+
{
476+
structacpi_device*adev=ACPI_COMPANION(dev);
477+
structhid_uid*id=data;
478+
479+
if (!adev)
480+
return0;
481+
482+
returnhid_uid_match(acpi_device_hid(adev),acpi_device_uid(adev),
483+
id->hid,id->uid);
484+
}
485+
486+
staticstructdevice*acpi_lpss_find_device(constchar*hid,constchar*uid)
487+
{
488+
structhid_uiddata= {
489+
.hid=hid,
490+
.uid=uid,
491+
};
492+
493+
returnbus_find_device(&platform_bus_type,NULL,&data,match_hid_uid);
494+
}
495+
496+
staticboolacpi_lpss_dep(structacpi_device*adev,acpi_handlehandle)
497+
{
498+
structacpi_handle_listdep_devices;
499+
acpi_statusstatus;
500+
inti;
501+
502+
if (!acpi_has_method(adev->handle,"_DEP"))
503+
return false;
504+
505+
status=acpi_evaluate_reference(adev->handle,"_DEP",NULL,
506+
&dep_devices);
507+
if (ACPI_FAILURE(status)) {
508+
dev_dbg(&adev->dev,"Failed to evaluate _DEP.\n");
509+
return false;
510+
}
511+
512+
for (i=0;i<dep_devices.count;i++) {
513+
if (dep_devices.handles[i]==handle)
514+
return true;
515+
}
516+
517+
return false;
518+
}
519+
520+
staticvoidacpi_lpss_link_consumer(structdevice*dev1,
521+
conststructlpss_device_links*link)
522+
{
523+
structdevice*dev2;
524+
525+
dev2=acpi_lpss_find_device(link->consumer_hid,link->consumer_uid);
526+
if (!dev2)
527+
return;
528+
529+
if (acpi_lpss_dep(ACPI_COMPANION(dev2),ACPI_HANDLE(dev1)))
530+
device_link_add(dev2,dev1,link->flags);
531+
532+
put_device(dev2);
533+
}
534+
535+
staticvoidacpi_lpss_link_supplier(structdevice*dev1,
536+
conststructlpss_device_links*link)
537+
{
538+
structdevice*dev2;
539+
540+
dev2=acpi_lpss_find_device(link->supplier_hid,link->supplier_uid);
541+
if (!dev2)
542+
return;
543+
544+
if (acpi_lpss_dep(ACPI_COMPANION(dev1),ACPI_HANDLE(dev2)))
545+
device_link_add(dev1,dev2,link->flags);
546+
547+
put_device(dev2);
548+
}
549+
550+
staticvoidacpi_lpss_create_device_links(structacpi_device*adev,
551+
structplatform_device*pdev)
552+
{
553+
inti;
554+
555+
for (i=0;i<ARRAY_SIZE(lpss_device_links);i++) {
556+
conststructlpss_device_links*link=&lpss_device_links[i];
557+
558+
if (acpi_lpss_is_supplier(adev,link))
559+
acpi_lpss_link_consumer(&pdev->dev,link);
560+
561+
if (acpi_lpss_is_consumer(adev,link))
562+
acpi_lpss_link_supplier(&pdev->dev,link);
563+
}
564+
}
565+
430566
staticintacpi_lpss_create_device(structacpi_device*adev,
431567
conststructacpi_device_id*id)
432568
{
@@ -465,6 +601,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
465601
acpi_dev_free_resource_list(&resource_list);
466602

467603
if (!pdata->mmio_base) {
604+
/* Avoid acpi_bus_attach() instantiating a pdev for this dev. */
605+
adev->pnp.type.platform_id=0;
468606
/* Skip the device, but continue the namespace scan. */
469607
ret=0;
470608
gotoerr_out;
@@ -500,6 +638,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
500638
adev->driver_data=pdata;
501639
pdev=acpi_create_platform_device(adev,dev_desc->properties);
502640
if (!IS_ERR_OR_NULL(pdev)) {
641+
acpi_lpss_create_device_links(adev,pdev);
503642
return1;
504643
}
505644

‎drivers/acpi/acpi_video.c‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ MODULE_PARM_DESC(report_key_events,
8080
staticbooldevice_id_scheme= false;
8181
module_param(device_id_scheme,bool,0444);
8282

83-
staticboolonly_lcd=false;
84-
module_param(only_lcd,bool,0444);
83+
staticintonly_lcd=-1;
84+
module_param(only_lcd,int,0444);
8585

8686
staticintregister_count;
8787
staticDEFINE_MUTEX(register_count_mutex);
@@ -2136,6 +2136,16 @@ int acpi_video_register(void)
21362136
gotoleave;
21372137
}
21382138

2139+
/*
2140+
* We're seeing a lot of bogus backlight interfaces on newer machines
2141+
* without a LCD such as desktops, servers and HDMI sticks. Checking
2142+
* the lcd flag fixes this, so enable this on any machines which are
2143+
* win8 ready (where we also prefer the native backlight driver, so
2144+
* normally the acpi_video code should not register there anyways).
2145+
*/
2146+
if (only_lcd==-1)
2147+
only_lcd=acpi_osi_is_win8();
2148+
21392149
dmi_check_system(video_dmi_table);
21402150

21412151
ret=acpi_bus_register_driver(&acpi_video_bus);

‎drivers/acpi/acpica/acapps.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
prefix, ACPICA_COPYRIGHT, \
8181
prefix
8282

83+
#defineACPI_COMMON_BUILD_TIME \
84+
"Build date/time: %s %s\n", __DATE__, __TIME__
85+
8386
/* Macros for usage messages */
8487

8588
#defineACPI_USAGE_HEADER(usage) \

‎drivers/acpi/acpica/acdebug.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void
222222
void
223223
acpi_db_execute(char*name,char**args,acpi_object_type*types,u32flags);
224224

225+
void
226+
acpi_db_create_execution_thread(char*method_name_arg,
227+
char**arguments,acpi_object_type*types);
228+
225229
void
226230
acpi_db_create_execution_threads(char*num_threads_arg,
227231
char*num_loops_arg,char*method_name_arg);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp