Re: [RFC PATCH v1 12/70] x86, pci, amd_bus: _FROZEN Cleanup

From: Chen, Gong
Date: Mon Jul 28 2014 - 02:34:48 EST


On Thu, Jul 24, 2014 at 10:28:47AM +0200, Borislav Petkov wrote:
> On Wed, Jul 23, 2014 at 09:31:30PM -0400, Chen, Gong wrote:
> > But what if new action is added? We have to change it back. If you
> > prefer to use that style I can update in next version.
>
> Not likely. This functionality in amd_bus.c is not going to expand
> anyway but rather die with its last user, AFAICR.
>

--------8<--------

Subject: [RFC PATCH v2 12/70] x86, pci, amd_bus: _FROZEN Cleanup

Remove XXX_FROZEN state from x86/pci/amd_bus.

Signed-off-by: Chen, Gong <gong.chen@xxxxxxxxxxxxxxx>
Suggested-by: Borislav Petkov <bp@xxxxxxxxx>
---
arch/x86/pci/amd_bus.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index c20d2cc..2d7c6c6 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -340,15 +340,10 @@ static void enable_pci_io_ecs(void *unused)
static int amd_cpu_notify(struct notifier_block *self, unsigned long action,
void *hcpu)
{
- int cpu = (long)hcpu;
- switch (action) {
- case CPU_ONLINE:
- case CPU_ONLINE_FROZEN:
- smp_call_function_single(cpu, enable_pci_io_ecs, NULL, 0);
- break;
- default:
- break;
- }
+ if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE)
+ smp_call_function_single((long)hcpu, enable_pci_io_ecs,
+ NULL, 0);
+
return NOTIFY_OK;
}

--
2.0.0.rc2

Attachment: signature.asc
Description: Digital signature