Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
c0dc250e
Commit
c0dc250e
authored
Jul 10, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull acpi_os_allocate into test branch
parents
0f12b15e
e21c1ca3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
40 deletions
+31
-40
drivers/acpi/osl.c
drivers/acpi/osl.c
+0
-30
drivers/acpi/parser/psutils.c
drivers/acpi/parser/psutils.c
+0
-2
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+0
-7
drivers/acpi/utilities/utalloc.c
drivers/acpi/utilities/utalloc.c
+2
-0
include/acpi/acmacros.h
include/acpi/acmacros.h
+7
-1
include/acpi/platform/aclinux.h
include/acpi/platform/aclinux.h
+22
-0
No files found.
drivers/acpi/osl.c
View file @
c0dc250e
...
...
@@ -136,16 +136,6 @@ void acpi_os_vprintf(const char *fmt, va_list args)
#endif
}
extern
int
acpi_in_resume
;
void
*
acpi_os_allocate
(
acpi_size
size
)
{
if
(
acpi_in_resume
)
return
kmalloc
(
size
,
GFP_ATOMIC
);
else
return
kmalloc
(
size
,
GFP_KERNEL
);
}
acpi_status
acpi_os_get_root_pointer
(
u32
flags
,
struct
acpi_pointer
*
addr
)
{
if
(
efi_enabled
)
{
...
...
@@ -1115,26 +1105,6 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object)
return
(
AE_OK
);
}
/*******************************************************************************
*
* FUNCTION: acpi_os_acquire_object
*
* PARAMETERS: Cache - Handle to cache object
* ReturnObject - Where the object is returned
*
* RETURN: Status
*
* DESCRIPTION: Return a zero-filled object.
*
******************************************************************************/
void
*
acpi_os_acquire_object
(
acpi_cache_t
*
cache
)
{
void
*
object
=
kmem_cache_zalloc
(
cache
,
GFP_KERNEL
);
WARN_ON
(
!
object
);
return
object
;
}
/******************************************************************************
*
* FUNCTION: acpi_os_validate_interface
...
...
drivers/acpi/parser/psutils.c
View file @
c0dc250e
...
...
@@ -139,12 +139,10 @@ union acpi_parse_object *acpi_ps_alloc_op(u16 opcode)
/* The generic op (default) is by far the most common (16 to 1) */
op
=
acpi_os_acquire_object
(
acpi_gbl_ps_node_cache
);
memset
(
op
,
0
,
sizeof
(
struct
acpi_parse_obj_common
));
}
else
{
/* Extended parseop */
op
=
acpi_os_acquire_object
(
acpi_gbl_ps_node_ext_cache
);
memset
(
op
,
0
,
sizeof
(
struct
acpi_parse_obj_named
));
}
/* Initialize the Op */
...
...
drivers/acpi/pci_link.c
View file @
c0dc250e
...
...
@@ -780,11 +780,6 @@ static int acpi_pci_link_resume(struct acpi_pci_link *link)
return
0
;
}
/*
* FIXME: this is a workaround to avoid nasty warning. It will be removed
* after every device calls pci_disable_device in .resume.
*/
int
acpi_in_resume
;
static
int
irqrouter_resume
(
struct
sys_device
*
dev
)
{
struct
list_head
*
node
=
NULL
;
...
...
@@ -794,7 +789,6 @@ static int irqrouter_resume(struct sys_device *dev)
/* Make sure SCI is enabled again (Apple firmware bug?) */
acpi_set_register
(
ACPI_BITREG_SCI_ENABLE
,
1
,
ACPI_MTX_DO_NOT_LOCK
);
acpi_in_resume
=
1
;
list_for_each
(
node
,
&
acpi_link
.
entries
)
{
link
=
list_entry
(
node
,
struct
acpi_pci_link
,
node
);
if
(
!
link
)
{
...
...
@@ -803,7 +797,6 @@ static int irqrouter_resume(struct sys_device *dev)
}
acpi_pci_link_resume
(
link
);
}
acpi_in_resume
=
0
;
return
0
;
}
...
...
drivers/acpi/utilities/utalloc.c
View file @
c0dc250e
...
...
@@ -285,6 +285,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
return
(
status
);
}
#ifdef NOT_USED_BY_LINUX
/*******************************************************************************
*
* FUNCTION: acpi_ut_allocate
...
...
@@ -360,3 +361,4 @@ void *acpi_ut_allocate_zeroed(acpi_size size,
return
(
allocation
);
}
#endif
include/acpi/acmacros.h
View file @
c0dc250e
...
...
@@ -724,9 +724,15 @@
/* Memory allocation */
#ifndef ACPI_ALLOCATE
#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
#endif
#ifndef ACPI_ALLOCATE_ZEROED
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_FREE(a) kfree(a)
#endif
#ifndef ACPI_FREE
#define ACPI_FREE(a) acpio_os_free(a)
#endif
#define ACPI_MEM_TRACKING(a)
#else
...
...
include/acpi/platform/aclinux.h
View file @
c0dc250e
...
...
@@ -105,4 +105,26 @@
static
inline
acpi_thread_id
acpi_os_get_thread_id
(
void
)
{
return
current
;
}
/*
* The irqs_disabled() check is for resume from RAM.
* Interrupts are off during resume, just like they are for boot.
* However, boot has (system_state != SYSTEM_RUNNING)
* to quiet __might_sleep() in kmalloc() and resume does not.
*/
#include <acpi/actypes.h>
static
inline
void
*
acpi_os_allocate
(
acpi_size
size
)
{
return
kmalloc
(
size
,
irqs_disabled
()
?
GFP_ATOMIC
:
GFP_KERNEL
);
}
static
inline
void
*
acpi_os_allocate_zeroed
(
acpi_size
size
)
{
return
kzalloc
(
size
,
irqs_disabled
()
?
GFP_ATOMIC
:
GFP_KERNEL
);
}
static
inline
void
*
acpi_os_acquire_object
(
acpi_cache_t
*
cache
)
{
return
kmem_cache_zalloc
(
cache
,
irqs_disabled
()
?
GFP_ATOMIC
:
GFP_KERNEL
);
}
#define ACPI_ALLOCATE(a) acpi_os_allocate(a)
#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
#define ACPI_FREE(a) kfree(a)
#endif
/* __ACLINUX_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment