Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252917
b: refs/heads/master
c: c4f7907
h: refs/heads/master
i:
  252915: 0bb3f1e
v: v3
  • Loading branch information
Tyler Hicks committed May 29, 2011
1 parent 6b2bedb commit 9625f26
Show file tree
Hide file tree
Showing 174 changed files with 2,580 additions and 7,664 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd1acdf1723d71b28175f95b04305f1cc74ce363
refs/heads/master: c4f790736ca8d7d86883c5aee2ba1caa15cd8da3
5 changes: 0 additions & 5 deletions trunk/Documentation/acpi/method-customizing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,3 @@ Note: We can use a kernel with multiple custom ACPI method running,
But each individual write to debugfs can implement a SINGLE
method override. i.e. if we want to insert/override multiple
ACPI methods, we need to redo step c) ~ g) for multiple times.

Note: Be aware that root can mis-use this driver to modify arbitrary
memory and gain additional rights, if root's privileges got
restricted (for example if root is not allowed to load additional
modules after boot).
36 changes: 0 additions & 36 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,6 @@ be removed from this file.

---------------------------

What: x86 floppy disable_hlt
When: 2012
Why: ancient workaround of dubious utility clutters the
code used by everybody else.
Who: Len Brown <len.brown@intel.com>

---------------------------

What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
When: 2012
Why: This optional sub-feature of APM is of dubious reliability,
and ancient APM laptops are likely better served by calling HLT.
Deleting CONFIG_APM_CPU_IDLE allows x86 to stop exporting
the pm_idle function pointer to modules.
Who: Len Brown <len.brown@intel.com>

----------------------------

What: x86_32 "no-hlt" cmdline param
When: 2012
Why: remove a branch from idle path, simplify code used by everybody.
This option disabled the use of HLT in idle and machine_halt()
for hardware that was flakey 15-years ago. Today we have
"idle=poll" that removed HLT from idle, and so if such a machine
is still running the upstream kernel, "idle=poll" is likely sufficient.
Who: Len Brown <len.brown@intel.com>

----------------------------

What: x86 "idle=mwait" cmdline param
When: 2012
Why: simplify x86 idle code
Who: Len Brown <len.brown@intel.com>

----------------------------

What: PRISM54
When: 2.6.34

Expand Down
184 changes: 184 additions & 0 deletions trunk/Documentation/laptops/acer-wmi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
Acer Laptop WMI Extras Driver
http://code.google.com/p/aceracpi
Version 0.3
4th April 2009

Copyright 2007-2009 Carlos Corbacho <carlos@strangeworlds.co.uk>

acer-wmi is a driver to allow you to control various parts of your Acer laptop
hardware under Linux which are exposed via ACPI-WMI.

This driver completely replaces the old out-of-tree acer_acpi, which I am
currently maintaining for bug fixes only on pre-2.6.25 kernels. All development
work is now focused solely on acer-wmi.

Disclaimer
**********

Acer and Wistron have provided nothing towards the development acer_acpi or
acer-wmi. All information we have has been through the efforts of the developers
and the users to discover as much as possible about the hardware.

As such, I do warn that this could break your hardware - this is extremely
unlikely of course, but please bear this in mind.

Background
**********

acer-wmi is derived from acer_acpi, originally developed by Mark
Smith in 2005, then taken over by Carlos Corbacho in 2007, in order to activate
the wireless LAN card under a 64-bit version of Linux, as acerhk[1] (the
previous solution to the problem) relied on making 32 bit BIOS calls which are
not possible in kernel space from a 64 bit OS.

[1] acerhk: http://www.cakey.de/acerhk/

Supported Hardware
******************

NOTE: The Acer Aspire One is not supported hardware. It cannot work with
acer-wmi until Acer fix their ACPI-WMI implementation on them, so has been
blacklisted until that happens.

Please see the website for the current list of known working hardware:

http://code.google.com/p/aceracpi/wiki/SupportedHardware

If your laptop is not listed, or listed as unknown, and works with acer-wmi,
please contact me with a copy of the DSDT.

If your Acer laptop doesn't work with acer-wmi, I would also like to see the
DSDT.

To send me the DSDT, as root/sudo:

cat /sys/firmware/acpi/tables/DSDT > dsdt

And send me the resulting 'dsdt' file.

Usage
*****

On Acer laptops, acer-wmi should already be autoloaded based on DMI matching.
For non-Acer laptops, until WMI based autoloading support is added, you will
need to manually load acer-wmi.

acer-wmi creates /sys/devices/platform/acer-wmi, and fills it with various
files whose usage is detailed below, which enables you to control some of the
following (varies between models):

* the wireless LAN card radio
* inbuilt Bluetooth adapter
* inbuilt 3G card
* mail LED of your laptop
* brightness of the LCD panel

Wireless
********

With regards to wireless, all acer-wmi does is enable the radio on the card. It
is not responsible for the wireless LED - once the radio is enabled, this is
down to the wireless driver for your card. So the behaviour of the wireless LED,
once you enable the radio, will depend on your hardware and driver combination.

e.g. With the BCM4318 on the Acer Aspire 5020 series:

ndiswrapper: Light blinks on when transmitting
b43: Solid light, blinks off when transmitting

Wireless radio control is unconditionally enabled - all Acer laptops that support
acer-wmi come with built-in wireless. However, should you feel so inclined to
ever wish to remove the card, or swap it out at some point, please get in touch
with me, as we may well be able to gain some data on wireless card detection.

The wireless radio is exposed through rfkill.

Bluetooth
*********

For bluetooth, this is an internal USB dongle, so once enabled, you will get
a USB device connection event, and a new USB device appears. When you disable
bluetooth, you get the reverse - a USB device disconnect event, followed by the
device disappearing again.

Bluetooth is autodetected by acer-wmi, so if you do not have a bluetooth module
installed in your laptop, this file won't exist (please be aware that it is
quite common for Acer not to fit bluetooth to their laptops - so just because
you have a bluetooth button on the laptop, doesn't mean that bluetooth is
installed).

For the adventurously minded - if you want to buy an internal bluetooth
module off the internet that is compatible with your laptop and fit it, then
it will work just fine with acer-wmi.

Bluetooth is exposed through rfkill.

3G
**

3G is currently not autodetected, so the 'threeg' file is always created under
sysfs. So far, no-one in possession of an Acer laptop with 3G built-in appears to
have tried Linux, or reported back, so we don't have any information on this.

If you have an Acer laptop that does have a 3G card in, please contact me so we
can properly detect these, and find out a bit more about them.

To read the status of the 3G card (0=off, 1=on):
cat /sys/devices/platform/acer-wmi/threeg

To enable the 3G card:
echo 1 > /sys/devices/platform/acer-wmi/threeg

To disable the 3G card:
echo 0 > /sys/devices/platform/acer-wmi/threeg

To set the state of the 3G card when loading acer-wmi, pass:
threeg=X (where X is 0 or 1)

Mail LED
********

This can be found in most older Acer laptops supported by acer-wmi, and many
newer ones - it is built into the 'mail' button, and blinks when active.

On newer (WMID) laptops though, we have no way of detecting the mail LED. If
your laptop identifies itself in dmesg as a WMID model, then please try loading
acer_acpi with:

force_series=2490

This will use a known alternative method of reading/ writing the mail LED. If
it works, please report back to me with the DMI data from your laptop so this
can be added to acer-wmi.

The LED is exposed through the LED subsystem, and can be found in:

/sys/devices/platform/acer-wmi/leds/acer-wmi::mail/

The mail LED is autodetected, so if you don't have one, the LED device won't
be registered.

Backlight
*********

The backlight brightness control is available on all acer-wmi supported
hardware. The maximum brightness level is usually 15, but on some newer laptops
it's 10 (this is again autodetected).

The backlight is exposed through the backlight subsystem, and can be found in:

/sys/devices/platform/acer-wmi/backlight/acer-wmi/

Credits
*******

Olaf Tauber, who did the real hard work when he developed acerhk
http://www.cakey.de/acerhk/
All the authors of laptop ACPI modules in the kernel, whose work
was an inspiration in the early days of acer_acpi
Mathieu Segaud, who solved the problem with having to modprobe the driver
twice in acer_acpi 0.2.
Jim Ramsay, who added support for the WMID interface
Mark Smith, who started the original acer_acpi

And the many people who have used both acer_acpi and acer-wmi.
11 changes: 8 additions & 3 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,10 @@ S: Maintained
F: drivers/platform/x86/acerhdf.c

ACER WMI LAPTOP EXTRAS
M: Joey Lee <jlee@novell.com>
M: Carlos Corbacho <carlos@strangeworlds.co.uk>
L: aceracpi@googlegroups.com (subscribers-only)
L: platform-driver-x86@vger.kernel.org
W: http://code.google.com/p/aceracpi
S: Maintained
F: drivers/platform/x86/acer-wmi.c

Expand Down Expand Up @@ -269,8 +271,10 @@ S: Supported
F: drivers/acpi/video.c

ACPI WMI DRIVER
M: Carlos Corbacho <carlos@strangeworlds.co.uk>
L: platform-driver-x86@vger.kernel.org
S: Orphan
W: http://www.lesswatts.org/projects/acpi/
S: Maintained
F: drivers/platform/x86/wmi.c

AD1889 ALSA SOUND DRIVER
Expand Down Expand Up @@ -3029,8 +3033,9 @@ S: Maintained
F: drivers/net/wireless/hostap/

HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
M: Carlos Corbacho <carlos@strangeworlds.co.uk>
L: platform-driver-x86@vger.kernel.org
S: Orphan
S: Odd Fixes
F: drivers/platform/x86/tc1100-wmi.c

HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series
Expand Down
16 changes: 8 additions & 8 deletions trunk/arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -577,16 +577,16 @@ static inline void pgste_set_unlock(pte_t *ptep, pgste_t pgste)
static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste)
{
#ifdef CONFIG_PGSTE
unsigned long address, bits;
unsigned long pfn, bits;
unsigned char skey;

address = pte_val(*ptep) & PAGE_MASK;
skey = page_get_storage_key(address);
pfn = pte_val(*ptep) >> PAGE_SHIFT;
skey = page_get_storage_key(pfn);
bits = skey & (_PAGE_CHANGED | _PAGE_REFERENCED);
/* Clear page changed & referenced bit in the storage key */
if (bits) {
skey ^= bits;
page_set_storage_key(address, skey, 1);
page_set_storage_key(pfn, skey, 1);
}
/* Transfer page changed & referenced bit to guest bits in pgste */
pgste_val(pgste) |= bits << 48; /* RCP_GR_BIT & RCP_GC_BIT */
Expand Down Expand Up @@ -628,16 +628,16 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste)
static inline void pgste_set_pte(pte_t *ptep, pgste_t pgste)
{
#ifdef CONFIG_PGSTE
unsigned long address;
unsigned long pfn;
unsigned long okey, nkey;

address = pte_val(*ptep) & PAGE_MASK;
okey = nkey = page_get_storage_key(address);
pfn = pte_val(*ptep) >> PAGE_SHIFT;
okey = nkey = page_get_storage_key(pfn);
nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT);
/* Set page access key and fetch protection bit from pgste */
nkey |= (pgste_val(pgste) & (RCP_ACC_BITS | RCP_FP_BIT)) >> 56;
if (okey != nkey)
page_set_storage_key(address, nkey, 1);
page_set_storage_key(pfn, nkey, 1);
#endif
}

Expand Down
23 changes: 7 additions & 16 deletions trunk/arch/s390/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@ static void rcu_table_freelist_callback(struct rcu_head *head)

void rcu_table_freelist_finish(void)
{
struct rcu_table_freelist **batchp = &get_cpu_var(rcu_table_freelist);
struct rcu_table_freelist *batch = *batchp;
struct rcu_table_freelist *batch = __get_cpu_var(rcu_table_freelist);

if (!batch)
goto out;
return;
call_rcu(&batch->rcu, rcu_table_freelist_callback);
*batchp = NULL;
out:
put_cpu_var(rcu_table_freelist);
__get_cpu_var(rcu_table_freelist) = NULL;
}

static void smp_sync(void *arg)
Expand Down Expand Up @@ -144,23 +141,20 @@ void crst_table_free_rcu(struct mm_struct *mm, unsigned long *table)
{
struct rcu_table_freelist *batch;

preempt_disable();
if (atomic_read(&mm->mm_users) < 2 &&
cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
crst_table_free(mm, table);
goto out;
return;
}
batch = rcu_table_freelist_get(mm);
if (!batch) {
smp_call_function(smp_sync, NULL, 1);
crst_table_free(mm, table);
goto out;
return;
}
batch->table[--batch->crst_index] = table;
if (batch->pgt_index >= batch->crst_index)
rcu_table_freelist_finish();
out:
preempt_enable();
}

#ifdef CONFIG_64BIT
Expand Down Expand Up @@ -329,17 +323,16 @@ void page_table_free_rcu(struct mm_struct *mm, unsigned long *table)
struct page *page;
unsigned long bits;

preempt_disable();
if (atomic_read(&mm->mm_users) < 2 &&
cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
page_table_free(mm, table);
goto out;
return;
}
batch = rcu_table_freelist_get(mm);
if (!batch) {
smp_call_function(smp_sync, NULL, 1);
page_table_free(mm, table);
goto out;
return;
}
bits = (mm->context.has_pgste) ? 3UL : 1UL;
bits <<= (__pa(table) & (PAGE_SIZE - 1)) / 256 / sizeof(unsigned long);
Expand All @@ -352,8 +345,6 @@ void page_table_free_rcu(struct mm_struct *mm, unsigned long *table)
batch->table[batch->pgt_index++] = table;
if (batch->pgt_index >= batch->crst_index)
rcu_table_freelist_finish();
out:
preempt_enable();
}

/*
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/tile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ config TILE
select GENERIC_IRQ_PROBE
select GENERIC_PENDING_IRQ if SMP
select GENERIC_IRQ_SHOW
select SYS_HYPERVISOR

# FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT
Expand Down
Loading

0 comments on commit 9625f26

Please sign in to comment.