Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b86db40e
Commit
b86db40e
authored
Mar 04, 2018
by
Helge Deller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parisc: Move various functions and strings to init section
Signed-off-by:
Helge Deller
<
deller@gmx.de
>
parent
d5b59a71
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
arch/parisc/kernel/drivers.c
arch/parisc/kernel/drivers.c
+11
-11
arch/parisc/kernel/hardware.c
arch/parisc/kernel/hardware.c
+6
-6
No files found.
arch/parisc/kernel/drivers.c
View file @
b86db40e
...
@@ -135,7 +135,7 @@ static int parisc_driver_probe(struct device *dev)
...
@@ -135,7 +135,7 @@ static int parisc_driver_probe(struct device *dev)
return
rc
;
return
rc
;
}
}
static
int
parisc_driver_remove
(
struct
device
*
dev
)
static
int
__exit
parisc_driver_remove
(
struct
device
*
dev
)
{
{
struct
parisc_device
*
pa_dev
=
to_parisc_device
(
dev
);
struct
parisc_device
*
pa_dev
=
to_parisc_device
(
dev
);
struct
parisc_driver
*
pa_drv
=
to_parisc_driver
(
dev
->
driver
);
struct
parisc_driver
*
pa_drv
=
to_parisc_driver
(
dev
->
driver
);
...
@@ -205,7 +205,7 @@ static int match_and_count(struct device * dev, void * data)
...
@@ -205,7 +205,7 @@ static int match_and_count(struct device * dev, void * data)
* Use by IOMMU support to "guess" the right size IOPdir.
* Use by IOMMU support to "guess" the right size IOPdir.
* Formula is something like memsize/(num_iommu * entry_size).
* Formula is something like memsize/(num_iommu * entry_size).
*/
*/
int
count_parisc_driver
(
struct
parisc_driver
*
driver
)
int
__init
count_parisc_driver
(
struct
parisc_driver
*
driver
)
{
{
struct
match_count
m
=
{
struct
match_count
m
=
{
.
driver
=
driver
,
.
driver
=
driver
,
...
@@ -268,7 +268,7 @@ static struct parisc_device *find_device_by_addr(unsigned long hpa)
...
@@ -268,7 +268,7 @@ static struct parisc_device *find_device_by_addr(unsigned long hpa)
* Walks up the device tree looking for a device of the specified type.
* Walks up the device tree looking for a device of the specified type.
* If it finds it, it returns it. If not, it returns NULL.
* If it finds it, it returns it. If not, it returns NULL.
*/
*/
const
struct
parisc_device
*
const
struct
parisc_device
*
__init
find_pa_parent_type
(
const
struct
parisc_device
*
padev
,
int
type
)
find_pa_parent_type
(
const
struct
parisc_device
*
padev
,
int
type
)
{
{
const
struct
device
*
dev
=
&
padev
->
dev
;
const
struct
device
*
dev
=
&
padev
->
dev
;
...
@@ -397,7 +397,7 @@ static void setup_bus_id(struct parisc_device *padev)
...
@@ -397,7 +397,7 @@ static void setup_bus_id(struct parisc_device *padev)
dev_set_name
(
&
padev
->
dev
,
name
);
dev_set_name
(
&
padev
->
dev
,
name
);
}
}
struct
parisc_device
*
create_tree_node
(
char
id
,
struct
device
*
parent
)
struct
parisc_device
*
__init
create_tree_node
(
char
id
,
struct
device
*
parent
)
{
{
struct
parisc_device
*
dev
=
kzalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
struct
parisc_device
*
dev
=
kzalloc
(
sizeof
(
*
dev
),
GFP_KERNEL
);
if
(
!
dev
)
if
(
!
dev
)
...
@@ -471,7 +471,7 @@ static struct parisc_device *create_parisc_device(struct hardware_path *modpath)
...
@@ -471,7 +471,7 @@ static struct parisc_device *create_parisc_device(struct hardware_path *modpath)
return
alloc_tree_node
(
parent
,
modpath
->
mod
);
return
alloc_tree_node
(
parent
,
modpath
->
mod
);
}
}
struct
parisc_device
*
struct
parisc_device
*
__init
alloc_pa_dev
(
unsigned
long
hpa
,
struct
hardware_path
*
mod_path
)
alloc_pa_dev
(
unsigned
long
hpa
,
struct
hardware_path
*
mod_path
)
{
{
int
status
;
int
status
;
...
@@ -609,7 +609,7 @@ struct bus_type parisc_bus_type = {
...
@@ -609,7 +609,7 @@ struct bus_type parisc_bus_type = {
.
uevent
=
parisc_uevent
,
.
uevent
=
parisc_uevent
,
.
dev_groups
=
parisc_device_groups
,
.
dev_groups
=
parisc_device_groups
,
.
probe
=
parisc_driver_probe
,
.
probe
=
parisc_driver_probe
,
.
remove
=
parisc_driver_remove
,
.
remove
=
__exit_p
(
parisc_driver_remove
)
,
};
};
/**
/**
...
@@ -619,7 +619,7 @@ struct bus_type parisc_bus_type = {
...
@@ -619,7 +619,7 @@ struct bus_type parisc_bus_type = {
* Search the driver list for a driver that is willing to manage
* Search the driver list for a driver that is willing to manage
* this device.
* this device.
*/
*/
int
register_parisc_device
(
struct
parisc_device
*
dev
)
int
__init
register_parisc_device
(
struct
parisc_device
*
dev
)
{
{
if
(
!
dev
)
if
(
!
dev
)
return
0
;
return
0
;
...
@@ -791,7 +791,7 @@ EXPORT_SYMBOL(device_to_hwpath);
...
@@ -791,7 +791,7 @@ EXPORT_SYMBOL(device_to_hwpath);
static
void
walk_native_bus
(
unsigned
long
io_io_low
,
unsigned
long
io_io_high
,
static
void
walk_native_bus
(
unsigned
long
io_io_low
,
unsigned
long
io_io_high
,
struct
device
*
parent
);
struct
device
*
parent
);
void
walk_lower_bus
(
struct
parisc_device
*
dev
)
static
void
walk_lower_bus
(
struct
parisc_device
*
dev
)
{
{
unsigned
long
io_io_low
,
io_io_high
;
unsigned
long
io_io_low
,
io_io_high
;
...
@@ -857,7 +857,7 @@ static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
...
@@ -857,7 +857,7 @@ static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
* PDC doesn't tell us about all devices in the system. This routine
* PDC doesn't tell us about all devices in the system. This routine
* finds devices connected to the central bus.
* finds devices connected to the central bus.
*/
*/
void
walk_central_bus
(
void
)
void
__init
walk_central_bus
(
void
)
{
{
walk_native_bus
(
CENTRAL_BUS_ADDR
,
walk_native_bus
(
CENTRAL_BUS_ADDR
,
CENTRAL_BUS_ADDR
+
(
MAX_NATIVE_DEVICES
*
NATIVE_DEVICE_OFFSET
),
CENTRAL_BUS_ADDR
+
(
MAX_NATIVE_DEVICES
*
NATIVE_DEVICE_OFFSET
),
...
@@ -886,7 +886,7 @@ static void print_parisc_device(struct parisc_device *dev)
...
@@ -886,7 +886,7 @@ static void print_parisc_device(struct parisc_device *dev)
/**
/**
* init_parisc_bus - Some preparation to be done before inventory
* init_parisc_bus - Some preparation to be done before inventory
*/
*/
void
init_parisc_bus
(
void
)
void
__init
init_parisc_bus
(
void
)
{
{
if
(
bus_register
(
&
parisc_bus_type
))
if
(
bus_register
(
&
parisc_bus_type
))
panic
(
"Could not register PA-RISC bus type
\n
"
);
panic
(
"Could not register PA-RISC bus type
\n
"
);
...
@@ -908,7 +908,7 @@ static int print_one_device(struct device * dev, void * data)
...
@@ -908,7 +908,7 @@ static int print_one_device(struct device * dev, void * data)
/**
/**
* print_parisc_devices - Print out a list of devices found in this system
* print_parisc_devices - Print out a list of devices found in this system
*/
*/
void
print_parisc_devices
(
void
)
void
__init
print_parisc_devices
(
void
)
{
{
for_each_padev
(
print_one_device
,
NULL
);
for_each_padev
(
print_one_device
,
NULL
);
}
}
arch/parisc/kernel/hardware.c
View file @
b86db40e
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
* are guessed. If you know the correct name, please let us know.
* are guessed. If you know the correct name, please let us know.
*/
*/
static
struct
hp_hardware
hp_hardware_list
[]
=
{
static
struct
hp_hardware
hp_hardware_list
[]
__initdata
=
{
{
HPHW_NPROC
,
0x01
,
0x4
,
0x0
,
"Indigo (840, 930)"
},
{
HPHW_NPROC
,
0x01
,
0x4
,
0x0
,
"Indigo (840, 930)"
},
{
HPHW_NPROC
,
0x8
,
0x4
,
0x01
,
"Firefox(825,925)"
},
{
HPHW_NPROC
,
0x8
,
0x4
,
0x01
,
"Firefox(825,925)"
},
{
HPHW_NPROC
,
0xA
,
0x4
,
0x01
,
"Top Gun (835,834,935,635)"
},
{
HPHW_NPROC
,
0xA
,
0x4
,
0x01
,
"Top Gun (835,834,935,635)"
},
...
@@ -1238,7 +1238,7 @@ static struct hp_cpu_type_mask {
...
@@ -1238,7 +1238,7 @@ static struct hp_cpu_type_mask {
unsigned
short
model
;
unsigned
short
model
;
unsigned
short
mask
;
unsigned
short
mask
;
enum
cpu_type
cpu
;
enum
cpu_type
cpu
;
}
hp_cpu_type_mask_list
[]
=
{
}
hp_cpu_type_mask_list
[]
__initdata
=
{
{
0x0000
,
0x0ff0
,
pcx
},
/* 0x0000 - 0x000f */
{
0x0000
,
0x0ff0
,
pcx
},
/* 0x0000 - 0x000f */
{
0x0048
,
0x0ff0
,
pcxl
},
/* 0x0040 - 0x004f */
{
0x0048
,
0x0ff0
,
pcxl
},
/* 0x0040 - 0x004f */
...
@@ -1325,17 +1325,17 @@ const char * const cpu_name_version[][2] = {
...
@@ -1325,17 +1325,17 @@ const char * const cpu_name_version[][2] = {
[
pcxt
]
=
{
"PA7100 (PCX-T)"
,
"1.1b"
},
[
pcxt
]
=
{
"PA7100 (PCX-T)"
,
"1.1b"
},
[
pcxt_
]
=
{
"PA7200 (PCX-T')"
,
"1.1c"
},
[
pcxt_
]
=
{
"PA7200 (PCX-T')"
,
"1.1c"
},
[
pcxl
]
=
{
"PA7100LC (PCX-L)"
,
"1.1d"
},
[
pcxl
]
=
{
"PA7100LC (PCX-L)"
,
"1.1d"
},
[
pcxl2
]
=
{
"PA7300LC (PCX-L2)"
,
"1.1e"
},
[
pcxl2
]
=
{
"PA7300LC (PCX-L2)"
,
"1.1e"
},
[
pcxu
]
=
{
"PA8000 (PCX-U)"
,
"2.0"
},
[
pcxu
]
=
{
"PA8000 (PCX-U)"
,
"2.0"
},
[
pcxu_
]
=
{
"PA8200 (PCX-U+)"
,
"2.0"
},
[
pcxu_
]
=
{
"PA8200 (PCX-U+)"
,
"2.0"
},
[
pcxw
]
=
{
"PA8500 (PCX-W)"
,
"2.0"
},
[
pcxw
]
=
{
"PA8500 (PCX-W)"
,
"2.0"
},
[
pcxw_
]
=
{
"PA8600 (PCX-W+)"
,
"2.0"
},
[
pcxw_
]
=
{
"PA8600 (PCX-W+)"
,
"2.0"
},
[
pcxw2
]
=
{
"PA8700 (PCX-W2)"
,
"2.0"
},
[
pcxw2
]
=
{
"PA8700 (PCX-W2)"
,
"2.0"
},
[
mako
]
=
{
"PA8800 (Mako)"
,
"2.0"
},
[
mako
]
=
{
"PA8800 (Mako)"
,
"2.0"
},
[
mako2
]
=
{
"PA8900 (Shortfin)"
,
"2.0"
}
[
mako2
]
=
{
"PA8900 (Shortfin)"
,
"2.0"
}
};
};
const
char
*
parisc_hardware_description
(
struct
parisc_device_id
*
id
)
const
char
*
__init
parisc_hardware_description
(
struct
parisc_device_id
*
id
)
{
{
struct
hp_hardware
*
listptr
;
struct
hp_hardware
*
listptr
;
...
@@ -1373,7 +1373,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id)
...
@@ -1373,7 +1373,7 @@ const char *parisc_hardware_description(struct parisc_device_id *id)
/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
enum
cpu_type
enum
cpu_type
__init
parisc_get_cpu_type
(
unsigned
long
hversion
)
parisc_get_cpu_type
(
unsigned
long
hversion
)
{
{
struct
hp_cpu_type_mask
*
ptr
;
struct
hp_cpu_type_mask
*
ptr
;
...
...
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