View | Details | Raw Unified | Return to bug 214899 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/acpi/acpica/evxfregn.c (-13 / +19 lines)
Lines 27-32 ACPI_MODULE_NAME("evxfregn") Link Here
27
 *              handler         - Address of the handler
27
 *              handler         - Address of the handler
28
 *              setup           - Address of the setup function
28
 *              setup           - Address of the setup function
29
 *              context         - Value passed to the handler on each access
29
 *              context         - Value passed to the handler on each access
30
 *              flags           - Flags
30
 *
31
 *
31
 * RETURN:      Status
32
 * RETURN:      Status
32
 *
33
 *
Lines 37-49 ACPI_MODULE_NAME("evxfregn") Link Here
37
 * are executed here, and these methods can only be safely executed after
38
 * are executed here, and these methods can only be safely executed after
38
 * the default handlers have been installed and the hardware has been
39
 * the default handlers have been installed and the hardware has been
39
 * initialized (via acpi_enable_subsystem.)
40
 * initialized (via acpi_enable_subsystem.)
41
 * To avoid this problem pass the ACPI_NO_EXEC__REG flag and
42
 * later call this function again with ACPI_NO_INSTALL_SPACE_HANDLER to
43
 * execute _REG.
40
 *
44
 *
41
 ******************************************************************************/
45
 ******************************************************************************/
42
acpi_status
46
acpi_status
43
acpi_install_address_space_handler(acpi_handle device,
47
acpi_install_address_space_handler_flags(acpi_handle device,
44
				   acpi_adr_space_type space_id,
48
					 acpi_adr_space_type space_id,
45
				   acpi_adr_space_handler handler,
49
					 acpi_adr_space_handler handler,
46
				   acpi_adr_space_setup setup, void *context)
50
					 acpi_adr_space_setup setup,
51
					 void *context,
52
					 u32 flags)
47
{
53
{
48
	struct acpi_namespace_node *node;
54
	struct acpi_namespace_node *node;
49
	acpi_status status;
55
	acpi_status status;
Lines 70-93 acpi_install_address_space_handler(acpi_handle device, Link Here
70
	}
76
	}
71
77
72
	/* Install the handler for all Regions for this Space ID */
78
	/* Install the handler for all Regions for this Space ID */
73
79
	if (!(flags & ACPI_NO_INSTALL_SPACE_HANDLER)) {
74
	status =
80
		status =
75
	    acpi_ev_install_space_handler(node, space_id, handler, setup,
81
		    acpi_ev_install_space_handler(node, space_id, handler, setup,
76
					  context);
82
						  context);
77
	if (ACPI_FAILURE(status)) {
83
		if (ACPI_FAILURE(status))
78
		goto unlock_and_exit;
84
			goto unlock_and_exit;
79
	}
85
	}
80
86
81
	/* Run all _REG methods for this address space */
87
	/* Run all _REG methods for this address space */
82
88
	if (!(flags & ACPI_NO_EXEC__REG))
83
	acpi_ev_execute_reg_methods(node, space_id, ACPI_REG_CONNECT);
89
		acpi_ev_execute_reg_methods(node, space_id, ACPI_REG_CONNECT);
84
90
85
unlock_and_exit:
91
unlock_and_exit:
86
	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
92
	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
87
	return_ACPI_STATUS(status);
93
	return_ACPI_STATUS(status);
88
}
94
}
89
95
90
ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler)
96
ACPI_EXPORT_SYMBOL(acpi_install_address_space_handler_flags)
91
97
92
/*******************************************************************************
98
/*******************************************************************************
93
 *
99
 *
(-)a/include/acpi/acpixf.h (-9 / +24 lines)
Lines 643-657 ACPI_EXTERNAL_RETURN_STATUS(acpi_status Link Here
643
							acpi_notify_handler
643
							acpi_notify_handler
644
							handler))
644
							handler))
645
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
645
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
646
			     acpi_install_address_space_handler(acpi_handle
646
			     acpi_install_address_space_handler_flags(acpi_handle
647
								device,
647
								      device,
648
								acpi_adr_space_type
648
								      acpi_adr_space_type
649
								space_id,
649
								      space_id,
650
								acpi_adr_space_handler
650
								      acpi_adr_space_handler
651
								handler,
651
								      handler,
652
								acpi_adr_space_setup
652
								      acpi_adr_space_setup
653
								setup,
653
								      setup,
654
								void *context))
654
								      void *context,
655
								      u32 flags))
656
static ACPI_INLINE acpi_status acpi_install_address_space_handler(acpi_handle
657
								  device,
658
								  acpi_adr_space_type
659
								  space_id,
660
								  acpi_adr_space_handler
661
								  handler,
662
								  acpi_adr_space_setup
663
								  setup,
664
								  void *context)
665
{
666
	return acpi_install_address_space_handler_flags(
667
			device, space_id, handler, setup, context,
668
			ACPI_FULL_INITIALIZATION);
669
}
655
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
670
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
656
			     acpi_remove_address_space_handler(acpi_handle
671
			     acpi_remove_address_space_handler(acpi_handle
657
							       device,
672
							       device,
(-)a/include/acpi/actypes.h (-1 / +2 lines)
Lines 566-571 typedef u64 acpi_integer; Link Here
566
#define ACPI_NO_OBJECT_INIT             0x0020
566
#define ACPI_NO_OBJECT_INIT             0x0020
567
#define ACPI_NO_DEVICE_INIT             0x0040
567
#define ACPI_NO_DEVICE_INIT             0x0040
568
#define ACPI_NO_ADDRESS_SPACE_INIT      0x0080
568
#define ACPI_NO_ADDRESS_SPACE_INIT      0x0080
569
#define ACPI_NO_INSTALL_SPACE_HANDLER   0x0100
570
#define ACPI_NO_EXEC__REG               0x0200
569
571
570
/*
572
/*
571
 * Initialization state
573
 * Initialization state
572
- 

Return to bug 214899