1. 17 7月, 2008 17 次提交
    • B
      ACPICA: Eliminate acpi_native_uint type v2 · 67a119f9
      Bob Moore 提交于
      No longer needed; replaced mostly with u32, but also acpi_size
      where a type that changes 32/64 bit on 32/64-bit platforms is
      required.
      
      v2: Fix a cast of a 32-bit int to a pointer in ACPI to avoid a compiler warning.
      from David Howells
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      67a119f9
    • B
      ACPICA: Fix possible negative array index in acpi_ut_validate_exception · 11f2a61a
      Bob Moore 提交于
      Added NULL fields to the exception string arrays to eliminate
      the -1 subtraction on the SubStatus field.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      11f2a61a
    • B
      ACPICA: Fix for hang on GPE method invocation · c91d924e
      Bob Moore 提交于
      Fixes problem where the new method argument count validation mechanism
      will enter an infinite loop when a GPE method is dispatched.
      Problem fixed be removing the obsolete code that passes GPE block
      information to the notify handler via the control method parameter pointer.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      c91d924e
    • B
      ACPICA: Add argument count checking to control method invocation via acpi_evaluate_object · f3454ae8
      Bob Moore 提交于
      Error if too few arguments, warning if too many. This applies
      only to external programmatic control method execution, not
      method-to-method calls within the AML.
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      f3454ae8
    • R
      ACPI PM: Remove obsolete Toshiba workaround · 741438b5
      Rafael J. Wysocki 提交于
      Remove the obsolete workaround for a Toshiba Satellite 4030cdt
      S1 problem from drivers/acpi/sleep/main.c .
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      741438b5
    • D
      ACPI PM: acpi_pm_device_sleep_state() cleanup · 2fe2de5f
      David Brownell 提交于
      Get rid of a superfluous acpi_pm_device_sleep_state() parameter.  The
      only legitimate value of that parameter must be derived from the first
      parameter, which is what all the callers already do.  (However, this
      does not address the fact that ACPI still doesn't set up those flags.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2fe2de5f
    • L
      cc7e5166
    • V
      ACPI: don't walk tables if ACPI was disabled · d1857056
      Vegard Nossum 提交于
      Ingo Molnar wrote:
      > -tip auto-testing started triggering this spinlock corruption message
      > yesterday:
      >
      > [    3.976213] calling  acpi_rtc_init+0x0/0xd3
      > [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
      > [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
      > [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0
      
      This is apparently because some parts of ACPI, including mutexes, are not
      initialized when acpi=off is passed to the kernel.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      d1857056
    • B
      Make GPE disable more robust · e38e8a07
      Bob Moore 提交于
      Implemented another change for the GPE disable. We now perform a
      read-change-write of the enable register instead of simply writing out the
      cached enable mask. This will prevent inadvertent enabling of GPEs if a rogue
      GPE is received during initialization (before GPE handlers are installed.)
      
      http://bugzilla.kernel.org/show_bug.cgi?id=6217Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      e38e8a07
    • R
      acpi: fix printk format warning · 12b2b34e
      Randy Dunlap 提交于
      Fix printk format warning:
      
      linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      12b2b34e
    • Y
      ACPI: fix processor throttling set error · 3d532d5e
      Yi Yang 提交于
      http://bugzilla.kernel.org/show_bug.cgi?id=9704
      
      When echo some invalid values to /proc/acpi/processor/*/throttling,
      there isn't any error info returned, on the contray, it sets
      throttling value to some T* successfully, obviously, this is incorrect,
      a correct way should be to let it fail and return error info.
      
      This patch fixed the aforementioned issue, it also enables
      /proc/acpi/processor/*/throttling to accept such values as 't0' and 'T0',
      it also strictly limits /proc/acpi/processor/*/throttling only to accept
       "*", "t*" and "T*", "*" is the throttling state value the processor can
      support, current, it is 0 - 7.
      
      Before applying this patch, the test result is below:
      
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "1xxxxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T1
      state available: T0 to T7
      states:
          T0:                  100%
         *T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost acpi]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost acpi]# cd /
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "T100" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "2xxxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T2
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
         *T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost /]# echo "7777" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost /]# echo "7xxx" > /proc/acpi/processor/CPU0/throttling
      [root@localhost /]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost /]#
      
      After applying this patch, the test result is below:
      
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "T0" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T0
      state available: T0 to T7
      states:
         *T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
          T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# vi drivers/acpi/processor_throttling.c
      [root@localhost linux-2.6.24-rc6]# echo "T8" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "t7" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo "t70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "7000" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "70" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo "xxx" > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo -n > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo $?
      0
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo -n "" > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# cat /proc/acpi/processor/CPU0/throttling
      state count:             8
      active state:            T7
      state available: T0 to T7
      states:
          T0:                  100%
          T1:                  87%
          T2:                  75%
          T3:                  62%
          T4:                  50%
          T5:                  37%
          T6:                  25%
         *T7:                  12%
      [root@localhost linux-2.6.24-rc6]# echo t0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo T0 > /proc/acpi/processor/CPU0/throttling
      [root@localhost linux-2.6.24-rc6]# echo Tt0 > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]# echo T > /proc/acpi/processor/CPU0/throttling
      -bash: echo: write error: Invalid argument
      [root@localhost linux-2.6.24-rc6]#
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      3d532d5e
    • Y
      ACPI: fix acpi fan state set error · 6594d87e
      Yi Yang 提交于
      Under /proc/acpi, there is a fan control interface, a user can
      set 0 or 3 to /proc/acpi/fan/*/state, 0 denotes D0 state, 3
      denotes D3 state, but in current implementation, a user can
      set a fan to D1 state by any char excluding '1', '2' and '3'.
      
      For example:
      
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      
      Obviously, such inputs as "" and "xxxxx" are invalid for fan state.
      
      This patch fixes this issue, it strictly limits fan state only to
      accept 0, 1, 2 and 3, any other inputs are invalid.
      
      Before applying this patch, the test result is:
      
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "3x" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost acpi]# echo "-1x" > /proc/acpi/fan/C31B/state
      [root@localhost acpi]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost acpi]#
      
      After applying this patch, the test result is:
      
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "3" > /proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "xxxxx" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "-1x" > /proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "0" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "4" > //proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "3" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  off
      [root@localhost ~]# echo "0" > //proc/acpi/fan/C31B/state
      [root@localhost ~]# cat /proc/acpi/fan/C31B/state
      status:                  on
      [root@localhost ~]# echo "3x" > //proc/acpi/fan/C31B/state
      -bash: echo: write error: Invalid argument
      [root@localhost ~]#
      Signed-off-by: NYi Yang <yi.y.yang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      6594d87e
    • A
    • M
      ACPI: change processors from array to per_cpu variable · 706546d0
      Mike Travis 提交于
      Change processors from an array sized by NR_CPUS to a per_cpu variable.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      706546d0
    • Z
      create sysfs link from acpi device to sysdev for cpu · 9f1eb99c
      Zhang Rui 提交于
      Sys I/F under acpi device node and sysdev device node are both
      needed for cpu hot-removal. User space need this link so that
      they know they are poking the sys I/F for the same cpu.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      9f1eb99c
    • Z
      force offline the processor during hot-removal · b62b8ef9
      Zhang Rui 提交于
      The ACPI device node for the cpu has already been unregistered
      when acpi_processor_handle_eject is called.
      Thus we should offline the cpu and continue, rather than a failure here.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      b62b8ef9
    • Z
      fix a deadlock issue when poking "eject" file · 26d46867
      Zhang Rui 提交于
      "/sys/devices/LNXSYSTM:00/.../eject" is used to evaluate _EJx method
      and eject a device in user space.
      But system hangs when poking the "eject" file because that
      the device hot-removal code invoke the driver .remove method which will
      try to remove the "eject" file as a result.
      
      Queues the hot-removal function for deferred execution in this patch.
      http://bugzilla.kernel.org/show_bug.cgi?id=9772Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      26d46867
  2. 11 7月, 2008 1 次提交
  3. 08 7月, 2008 1 次提交
  4. 05 7月, 2008 2 次提交
  5. 26 6月, 2008 3 次提交
  6. 14 6月, 2008 2 次提交
  7. 12 6月, 2008 14 次提交