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
bde31e2e
Commit
bde31e2e
authored
Jul 25, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: Convert pci_config_lock to atomic_spinlock
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
48c7e18d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
22 deletions
+22
-22
arch/x86/include/asm/pci_x86.h
arch/x86/include/asm/pci_x86.h
+1
-1
arch/x86/pci/common.c
arch/x86/pci/common.c
+1
-1
arch/x86/pci/direct.c
arch/x86/pci/direct.c
+8
-8
arch/x86/pci/mmconfig_32.c
arch/x86/pci/mmconfig_32.c
+4
-4
arch/x86/pci/numaq_32.c
arch/x86/pci/numaq_32.c
+4
-4
arch/x86/pci/pcbios.c
arch/x86/pci/pcbios.c
+4
-4
No files found.
arch/x86/include/asm/pci_x86.h
View file @
bde31e2e
...
...
@@ -83,7 +83,7 @@ struct irq_routing_table {
extern
unsigned
int
pcibios_irq_mask
;
extern
int
pcibios_scanned
;
extern
spinlock_t
pci_config_lock
;
extern
atomic_
spinlock_t
pci_config_lock
;
extern
int
(
*
pcibios_enable_irq
)(
struct
pci_dev
*
dev
);
extern
void
(
*
pcibios_disable_irq
)(
struct
pci_dev
*
dev
);
...
...
arch/x86/pci/common.c
View file @
bde31e2e
...
...
@@ -81,7 +81,7 @@ int pcibios_scanned;
* This interrupt-safe spinlock protects all accesses to PCI
* configuration space.
*/
DEFINE_SPINLOCK
(
pci_config_lock
);
DEFINE_
ATOMIC_
SPINLOCK
(
pci_config_lock
);
static
int
__devinit
can_skip_ioresource_align
(
const
struct
dmi_system_id
*
d
)
{
...
...
arch/x86/pci/direct.c
View file @
bde31e2e
...
...
@@ -27,7 +27,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
return
-
EINVAL
;
}
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
outl
(
PCI_CONF1_ADDRESS
(
bus
,
devfn
,
reg
),
0xCF8
);
...
...
@@ -43,7 +43,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
@@ -56,7 +56,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
if
((
bus
>
255
)
||
(
devfn
>
255
)
||
(
reg
>
4095
))
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
outl
(
PCI_CONF1_ADDRESS
(
bus
,
devfn
,
reg
),
0xCF8
);
...
...
@@ -72,7 +72,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
@@ -108,7 +108,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus,
if
(
dev
&
0x10
)
return
PCIBIOS_DEVICE_NOT_FOUND
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
outb
((
u8
)(
0xF0
|
(
fn
<<
1
)),
0xCF8
);
outb
((
u8
)
bus
,
0xCFA
);
...
...
@@ -127,7 +127,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus,
outb
(
0
,
0xCF8
);
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
@@ -147,7 +147,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
if
(
dev
&
0x10
)
return
PCIBIOS_DEVICE_NOT_FOUND
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
outb
((
u8
)(
0xF0
|
(
fn
<<
1
)),
0xCF8
);
outb
((
u8
)
bus
,
0xCFA
);
...
...
@@ -166,7 +166,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
outb
(
0
,
0xCF8
);
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
arch/x86/pci/mmconfig_32.c
View file @
bde31e2e
...
...
@@ -72,7 +72,7 @@ err: *value = -1;
if
(
!
base
)
goto
err
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
pci_exp_set_dev_base
(
base
,
bus
,
devfn
);
...
...
@@ -87,7 +87,7 @@ err: *value = -1;
*
value
=
mmio_config_readl
(
mmcfg_virt_addr
+
reg
);
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
@@ -105,7 +105,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
if
(
!
base
)
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
pci_exp_set_dev_base
(
base
,
bus
,
devfn
);
...
...
@@ -120,7 +120,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
mmio_config_writel
(
mmcfg_virt_addr
+
reg
,
value
);
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
arch/x86/pci/numaq_32.c
View file @
bde31e2e
...
...
@@ -41,7 +41,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
if
(
!
value
||
(
bus
>=
MAX_MP_BUSSES
)
||
(
devfn
>
255
)
||
(
reg
>
255
))
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
write_cf8
(
bus
,
devfn
,
reg
);
...
...
@@ -66,7 +66,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
@@ -80,7 +80,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
if
((
bus
>=
MAX_MP_BUSSES
)
||
(
devfn
>
255
)
||
(
reg
>
255
))
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
write_cf8
(
bus
,
devfn
,
reg
);
...
...
@@ -105,7 +105,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
0
;
}
...
...
arch/x86/pci/pcbios.c
View file @
bde31e2e
...
...
@@ -161,7 +161,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
if
(
!
value
||
(
bus
>
255
)
||
(
devfn
>
255
)
||
(
reg
>
255
))
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
switch
(
len
)
{
case
1
:
...
...
@@ -212,7 +212,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
(
int
)((
result
&
0xff00
)
>>
8
);
}
...
...
@@ -227,7 +227,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
if
((
bus
>
255
)
||
(
devfn
>
255
)
||
(
reg
>
255
))
return
-
EINVAL
;
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
pci_config_lock
,
flags
);
switch
(
len
)
{
case
1
:
...
...
@@ -268,7 +268,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
break
;
}
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
pci_config_lock
,
flags
);
return
(
int
)((
result
&
0xff00
)
>>
8
);
}
...
...
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